Re: Who generate the headers?

2017-12-02 Thread ferreiradaselva
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: pkerl...@casix.org
> To: wayland-devel@lists.freedesktop.org <wayland-devel@lists.freedesktop.org>
> ferreiradaselva <ferreiradase...@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___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Who generate the headers?

2017-12-02 Thread Philipp Kerling
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:
> 
> 1. 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.

> 2. 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
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Who generate the headers?

2017-12-02 Thread 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.

The questions:

1. 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`?

2. Is there some header generator available, anywhere, that is recommended?

Best regards,
Felipe Ferreira da Silva___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel