Why so many Weston APIs were moved to libweston-internal.h

Marius Vlad marius.vlad at collabora.com
Mon Aug 19 08:45:38 UTC 2019


Hi Xichen,

The main reason for doing this move/split is because, over the years, a
lot of helper API has crawled into libweston, making it quite in large
size and hard to reason about the symbols usefulness. That header was/is
a catch-all for ``where do I put this symbol declaration?''.

The split is an attempt to re-organize a bit the front-facing API which
users can directly use (Weston is a user of libweston -- but others
might also be) and internal API (which is used only internally by
libweston itself).

There's still a bit of work like trying to make some of the symbols
opaque, or have some kind of categorization by class/functionality.
There's also an orthogonal reason behind this as this split/movement of
API is related to the documentation process of the library itself.

Please see the discussion/comments over
https://gitlab.freedesktop.org/wayland/weston/merge_requests/227. It
should provide some insight on matter as well.

On 8/16/19 8:15 PM, Sichem Zhou wrote:
> Hi weston developers,
> 
> I noticed the new weston(since version 6.0.91), it introduced a new
> internal header `libweston-internel.h`. Many useful APIs for compositor
> writers were moved here.
> 
> For example, personally I heavily use temporary binding thus I use
> `weston_binding_destroy` to remove those bindings once their jobs are done.

I myself found that I've migrated a symbol which I needed exposed for
Weston so I had to put back in to the public API.

> 
> Right now I can still declare those functions but once those API are
> internal, they are subjected to changes or removal thus breaks the linkage
> for compositor writers. I am wondering Is it possible to move those
> functions back to public?

Yes, of course, if that's the case, please submit a MR for those symbols
which you think are useful.

> 
> Regards,
> Xichen
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 

-- 
Marius Vlad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190819/eb404001/attachment.sig>


More information about the wayland-devel mailing list