Who generate the headers?

ferreiradaselva ferreiradaselva at protonmail.com
Sat Dec 2 13:27:32 UTC 2017

Hi, Phillip

I was able to easily generate the xdg-shell header with wayland-scanner :)
I will make some tests. If I have some other question I will come back

Thanks for the help!
-- Felipe Ferreira da Silva

> -------- Original Message --------
> Subject: Re: Who generate the headers?
> Local Time: December 2, 2017 9:02 AM
> UTC Time: December 2, 2017 12:02 PM
> From: pkerling at casix.org
> To: wayland-devel at lists.freedesktop.org <wayland-devel at lists.freedesktop.org>
> ferreiradaselva <ferreiradaselva at protonmail.com>
> Hi,
> 2017-12-02 (土) の 06:05 -0500 に ferreiradaselva さんは書きました:
>> Hello, everyone
>> I'm still learning how the distribution to the access of the API
>> works. I'm making a library like GLFW/SDL2 with Wayland as one of the
>> backends.
>> I have in my system /usr/include the headers of my interest
>> wayland-client-protocol.h and wayland-client.h. However, the
>> protocols header doesn't have the XDG Shell API, since it's just
>> recently declared stable.
>> I think there is a fundamental misunderstanding here: wayland-client-
>> protocol.h only includes the Wayland core protocol, which XDG Shell is
>> not part of. All other more-or-less-standardized stuff is in wayland-
>> protocols, which is separate. XDG Shell will (presumably) never be
>> available in wayland-client-protocol.h, also in future versions.
>> Only the protocol XML files are installed as part of wayland-protocols
>> (to /usr/share/wayland-protocols or similar). If you want to use them
>> in your application, you will have to call wayland-scanner and generate
>> the header and code files yourself (see below).
>> The questions:
>> - If I wanted to have access to the unstable features (could be any,
>> like XDG output, tablet, text input), could I generate the headers
>> myself and I would have access to them by just linking my sources
>> with -lwayland-client?
>> You have to generate the headers yourself if what you want to use is
>> not part of the core protocol, no matter whether the extension protocol
>> is stable or unstable. You also have to generate the code. Linking with
>> wayland-client is not enough as it also only contains the core protocol
>> symbols.
>> - Is there some header generator available, anywhere, that is
>> recommended?
>> wayland-scanner is part of core wayland. You hvae to generate the
>> "client-header" (.h) and "code" (.c) parts out of the XML(s) you want
>> to use.
>> Regards,
>> Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171202/24208a38/attachment.html>

More information about the wayland-devel mailing list