<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hello Thiago,</p>
    <p>It looks like the library you are using uses opaque types. Or, in
      other words, a type that is declared but not defined, such as:</p>
    <p>    <font face="monospace">struct Foo;</font></p>
    <p>These types are not supported by jextract in the sense that the
      header file does not contain any definition for these types, so
      jextract also can't generate any code to access the fields of such
      a struct. This is not a current limitation of jextract, but a
      limitation imposed by the wayland library.<br>
    </p>
    <p>This is known as the 'opaque pointer idiom' [1]. It is a way of
      encapsulating the internals of a type, while still allowing a
      client to use it. It looks like the wayland library uses types
      like these in a lot of places. It doesn't mean that the library is
      unusable, it just means that the contents of these structs is not
      exposed by the library (and therefore <i>cannot</i> be exposed by
      jextract). i.e. this is by design. You should still be able to use
      the library through the generated bindings.<br>
    </p>
    <p>I think for clarity we could perhaps change the warning message
      that jextract prints to something like:    </p>
    <p><font face="monospace">    WARNING: Skipping wl_registry (type
        Declared(wl_registry) is declared but not defined)</font></p>
    <p>HTH,<br>
      Jorn<br>
    </p>
    <p>[1]: <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Opaque_pointer">https://en.wikipedia.org/wiki/Opaque_pointer</a></p>
    <div class="moz-cite-prefix">On 21/04/2024 18:58, Thiago Milczarek
      SayĆ£o wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAAP_wu=r-ZZA9Quupz-GJeymeyECaDmqThvG2gvRUc5R5waUTA@mail.gmail.com">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I'm trying to make a java wayland client (currently as a
          proof of concept).</div>
        <div><br>
        </div>
        <div>I've attempted to generate the bindings like this:</div>
        <div><br>
        </div>
        <div>jextract --output src -t org.freedesktop.wayland.client
          --header-class-name WlClient -lwayland-client
           /usr/include/wayland-client.h</div>
        <div><br>
        </div>
        <div>But the wl_xxx types seem to not be supported as it
          outputs:</div>
        <div><br>
        </div>
        <div>WARNING: Skipping wl_registry (type Declared(wl_registry)
          is not supported)<br>
        </div>
        <div><br>
        </div>
        <div>I've probably hit a current limitation. Is it expected to
          work in the future?</div>
        <div><br>
        </div>
        <div>Thanks.</div>
        <div>-- Thiago.</div>
      </div>
    </blockquote>
  </body>
</html>