Reorganize libweston source files
The amount of code in libweston has grown and will grow more, there are files that could use splitting. The separation between public and private API is not obvious at a glance.
- Move public installed headers into a new sub-directory to make them stand out.
- The directory shall be
libweston/include/libweston/
, with include directory pointing tolibweston/include/
. - Install public headers into
${incdir}/libweston-$MAJOR/libweston/
while pkg-config points includedir to${incdir}/libweston-$MAJOR/
. - This means both weston (
main.c
et al.) and third party users need to start doing#include <libweston/compositor.h>
instead of#include <compositor.h>
. This should help avoiding name conflicts better, not that any have been reported.
- The directory shall be
- Move GL-renderer into a new sub-directory. The HDR work (e.g. !132 (merged)) needs to add more files and
gl-renderer.c
could use splitting in the future. - Move every backend into a new sub-directory. Some backends have files that could use splitting, and for consistency move them all.
- Build files (
libinput-*.c
,libbacklight.c
) used by multiple backends into static libs and do not move them.
- Build files (
- Start separating backend and private things out of
compositor.h
. - Rename backend headers to
backend-*.h
.
Should any of the installed headers be renamed in addition to moving them under libweston/
? Now would be a good time when we are breaking all users anyway.
Should libweston-desktop.h
be available under #include <libweston-desktop/desktop.h>
or something?