<p dir="ltr"><br>
On Apr 29, 2015 3:30 AM, "Pekka Paalanen" <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
><br>
> On Wed, 29 Apr 2015 12:50:48 +0300<br>
> Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>> wrote:<br>
><br>
> > 2015-04-29 12:13 GMT+03:00 Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>>:<br>
> > > On Tue, 28 Apr 2015 22:57:16 +0300<br>
> > > Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>> wrote:<br>
> > ><br>
> > >> wayland-client.h and wayland-server.h include the protocol headers generated<br>
> > >> at build time. This means that a libwayland user cannot generate and use<br>
> > >> protocol code created from a wayland.xml newer than the installed libwayand,<br>
> > >> because it is not possible to only include the API header.<br>
> > >> This commit adds wayland-client-core.h and wayland-server-core.h which do not<br>
> > >> include the protocol headers and any deprecated code.<br>
> > >> ---<br>
> > >><br>
> > >> v2: move the deprecated api back to wayland-server.h<br>
> > >><br>
> > >>  Makefile.am               |   2 +<br>
> > >>  src/wayland-client-core.h | 180 +++++++++++++++++++++<br>
> > >>  src/wayland-client.h      | 155 +-----------------<br>
> > >>  src/wayland-server-core.h | 405 ++++++++++++++++++++++++++++++++++++++++++++++<br>
> > >>  src/wayland-server.h      | 377 +-----------------------------------------<br>
> > >>  5 files changed, 592 insertions(+), 527 deletions(-)<br>
> > >>  create mode 100644 src/wayland-client-core.h<br>
> > >>  create mode 100644 src/wayland-server-core.h<br>
> > >><br>
> > >> diff --git a/Makefile.am b/Makefile.am<br>
> > >> index 0fccf86..a8a0a56 100644<br>
> > >> --- a/Makefile.am<br>
> > >> +++ b/Makefile.am<br>
> > >> @@ -21,7 +21,9 @@ noinst_LTLIBRARIES = <a href="http://libwayland-util.la">libwayland-util.la</a><br>
> > >>  include_HEADERS =                            \<br>
> > >>       src/wayland-util.h                      \<br>
> > >>       src/wayland-server.h                    \<br>
> > >> +     src/wayland-server-core.h               \<br>
> > >>       src/wayland-client.h                    \<br>
> > >> +     src/wayland-client-core.h               \<br>
> > >>       src/wayland-egl.h                       \<br>
> > >>       src/wayland-version.h<br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > > you also have to fix doc/doxygen/Makefile.am, otherwise we miss all the<br>
> > > documentation that has been moved into the -core.h files.<br>
> > ><br>
> > > That fixed, this is<br>
> > > Reviewed-by: Pekka Paalanen <<a href="mailto:pekka.paalanen@collabora.co.uk">pekka.paalanen@collabora.co.uk</a>><br>
> > ><br>
> > > I do find the "wayland-client/server-core.h" in the title a bit<br>
> > > confusing, to me it reads as server-core.h in directory<br>
> > > wayland-client. "introduce wayland-client-core.h and<br>
> > > wayland-server-core.h"?<br>
> > ><br>
> > > Would be also nice to mention the language bindings use case in the<br>
> > > commit message, I think that is a more important case than updating<br>
> > > wayland.xml. After all, wayland.xml is installed with libwayland, so<br>
> > > they should always be in sync.<br>
> ><br>
> > Well, my use case is exactly to use a wayland.xml different than the<br>
> > one installed ;). I'll mention that, though.<br>
> ><br>
> > ><br>
> > > Do we have any project already using the new headers and the new<br>
> > > --include-core-only option? We should have that before 1.8 final is<br>
> > > released, so we have also tested the new way.<br>
> ><br>
> > No, I hacked up some tests but nothing upstreamable. I'll see to make<br>
> > weston use them.<br>
><br>
> It does not have to be Weston, as long as there is something to test<br>
> with. So no rush.<br>
><br>
> > > It also occurred to me that it would be nice to install Wayland headers<br>
> > > into a wayland/ sub-directory, but that's another story.<br>
> > ><br>
> > > And I suppose we don't want to actually push people away from the old<br>
> > > headers if they work fine, right?<br>
> ><br>
> > Maybe not push people but i don't think saying that using the new ones<br>
> > is preferred would be a bad idea actually. In exchange for having to<br>
> > include one more header you get a nice logical separation between<br>
> > library and protocol api and you do not ned to change a lot of code if<br>
> > in the future you need to separate them.<br>
><br>
> Right. I was pondering between adding nothing, adding a comment "you<br>
> know this is old, right?" in the old headers, and adding a #warn in the<br>
> old headers.</p>
<p dir="ltr">I don't know that it much matters.</p>
<p dir="ltr">In any case, this all looks good to me.  I haven't looked that hard at the generator changes but the header split is</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">> Maybe a comment to the effect of what you said would be nice?<br>
><br>
><br>
> Thanks,<br>
> pq<br>
</p>