From 7571027f177ec038874ae261d79b672acae1f4ae Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 29 Mar 2019 16:39:12 +0200 Subject: [PATCH] Rename public backend headers The backend headers are renamed from compositor-foo.h to backend-foo.h to better describe their purpose. These headers are public libweston API for each specific backend. The headers will also be used like #include instead of #include to give them a more explicit namespace. Signed-off-by: Pekka Paalanen --- compositor/main.c | 12 ++++++------ .../libweston/backend-drm.h | 0 .../libweston/backend-fbdev.h | 0 .../libweston/backend-headless.h | 0 .../libweston/backend-rdp.h | 0 .../libweston/backend-wayland.h | 0 .../libweston/backend-x11.h | 0 include/libweston/meson.build | 7 +++++++ libweston/compositor-drm.c | 2 +- libweston/compositor-fbdev.c | 2 +- libweston/compositor-headless.c | 2 +- libweston/compositor-rdp.c | 2 +- libweston/compositor-wayland.c | 2 +- libweston/compositor-x11.c | 2 +- libweston/meson.build | 12 ++++++------ remoting/remoting-plugin.c | 2 +- 16 files changed, 26 insertions(+), 19 deletions(-) rename libweston/compositor-drm.h => include/libweston/backend-drm.h (100%) rename libweston/compositor-fbdev.h => include/libweston/backend-fbdev.h (100%) rename libweston/compositor-headless.h => include/libweston/backend-headless.h (100%) rename libweston/compositor-rdp.h => include/libweston/backend-rdp.h (100%) rename libweston/compositor-wayland.h => include/libweston/backend-wayland.h (100%) rename libweston/compositor-x11.h => include/libweston/backend-x11.h (100%) diff --git a/compositor/main.c b/compositor/main.c index 03482c53..9aef9288 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -55,12 +55,12 @@ #include "version.h" #include "weston.h" -#include "compositor-drm.h" -#include "compositor-headless.h" -#include "compositor-rdp.h" -#include "compositor-fbdev.h" -#include "compositor-x11.h" -#include "compositor-wayland.h" +#include +#include +#include +#include +#include +#include #include "windowed-output-api.h" #include "weston-debug.h" #include "../remoting/remoting-plugin.h" diff --git a/libweston/compositor-drm.h b/include/libweston/backend-drm.h similarity index 100% rename from libweston/compositor-drm.h rename to include/libweston/backend-drm.h diff --git a/libweston/compositor-fbdev.h b/include/libweston/backend-fbdev.h similarity index 100% rename from libweston/compositor-fbdev.h rename to include/libweston/backend-fbdev.h diff --git a/libweston/compositor-headless.h b/include/libweston/backend-headless.h similarity index 100% rename from libweston/compositor-headless.h rename to include/libweston/backend-headless.h diff --git a/libweston/compositor-rdp.h b/include/libweston/backend-rdp.h similarity index 100% rename from libweston/compositor-rdp.h rename to include/libweston/backend-rdp.h diff --git a/libweston/compositor-wayland.h b/include/libweston/backend-wayland.h similarity index 100% rename from libweston/compositor-wayland.h rename to include/libweston/backend-wayland.h diff --git a/libweston/compositor-x11.h b/include/libweston/backend-x11.h similarity index 100% rename from libweston/compositor-x11.h rename to include/libweston/backend-x11.h diff --git a/include/libweston/meson.build b/include/libweston/meson.build index 74480838..6e1aee7e 100644 --- a/include/libweston/meson.build +++ b/include/libweston/meson.build @@ -3,3 +3,10 @@ install_headers( 'timeline-object.h', subdir: dir_include_libweston_install ) + +backend_drm_h = files('backend-drm.h') +backend_fbdev_h = files('backend-fbdev.h') +backend_headless_h = files('backend-headless.h') +backend_rdp_h = files('backend-rdp.h') +backend_wayland_h = files('backend-wayland.h') +backend_x11_h = files('backend-x11.h') diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 21ee2c1a..c563a57c 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -51,7 +51,7 @@ #include #include -#include "compositor-drm.h" +#include #include "weston-debug.h" #include "shared/helpers.h" #include "shared/timespec-util.h" diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c index a31ee999..bcda7d0e 100644 --- a/libweston/compositor-fbdev.c +++ b/libweston/compositor-fbdev.c @@ -46,7 +46,7 @@ #include "shared/helpers.h" #include -#include "compositor-fbdev.h" +#include #include "launcher-util.h" #include "pixman-renderer.h" #include "libinput-seat.h" diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c index 098e08e9..2b3137a2 100644 --- a/libweston/compositor-headless.c +++ b/libweston/compositor-headless.c @@ -34,7 +34,7 @@ #include #include -#include "compositor-headless.h" +#include #include "shared/helpers.h" #include "linux-explicit-synchronization.h" #include "pixman-renderer.h" diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c index 8ece5e97..1f39d03c 100644 --- a/libweston/compositor-rdp.c +++ b/libweston/compositor-rdp.c @@ -99,7 +99,7 @@ #include "shared/helpers.h" #include "shared/timespec-util.h" #include -#include "compositor-rdp.h" +#include #include "pixman-renderer.h" #define MAX_FREERDP_FDS 32 diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index 4e225715..9881712a 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -45,7 +45,7 @@ #endif #include -#include "compositor-wayland.h" +#include #include "gl-renderer.h" #include "weston-egl-ext.h" #include "pixman-renderer.h" diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c index d8513b59..903cf137 100644 --- a/libweston/compositor-x11.c +++ b/libweston/compositor-x11.c @@ -51,7 +51,7 @@ #include #include -#include "compositor-x11.h" +#include #include "shared/config-parser.h" #include "shared/helpers.h" #include "shared/image-loader.h" diff --git a/libweston/meson.build b/libweston/meson.build index 1421993b..aaa95fd5 100644 --- a/libweston/meson.build +++ b/libweston/meson.build @@ -249,7 +249,7 @@ if get_option('backend-drm') ) env_modmap += 'drm-backend.so=@0@;'.format(plugin_drm.full_path()) - install_headers('compositor-drm.h', subdir: dir_include_libweston) + install_headers(backend_drm_h, subdir: dir_include_libweston_install) endif @@ -270,7 +270,7 @@ if get_option('backend-headless') install_dir: dir_module_libweston, ) env_modmap += 'headless-backend.so=@0@;'.format(plugin_headless.full_path()) - install_headers('compositor-headless.h', subdir: dir_include_libweston) + install_headers(backend_headless_h, subdir: dir_include_libweston_install) endif @@ -308,7 +308,7 @@ if get_option('backend-rdp') install_dir: dir_module_libweston ) env_modmap += 'rdp-backend.so=@0@;'.format(plugin_rdp.full_path()) - install_headers('compositor-rdp.h', subdir: dir_include_libweston) + install_headers(backend_rdp_h, subdir: dir_include_libweston_install) endif @@ -351,7 +351,7 @@ if get_option('backend-wayland') install_dir: dir_module_libweston ) env_modmap += 'wayland-backend.so=@0@;'.format(plugin_wlwl.full_path()) - install_headers('compositor-wayland.h', subdir: dir_include_libweston) + install_headers(backend_wayland_h, subdir: dir_include_libweston_install) endif @@ -407,7 +407,7 @@ if get_option('backend-x11') ) env_modmap += 'x11-backend.so=@0@;'.format(plugin_x11.full_path()) - install_headers('compositor-x11.h', subdir: dir_include_libweston) + install_headers(backend_x11_h, subdir: dir_include_libweston_install) endif @@ -439,7 +439,7 @@ if get_option('backend-fbdev') ) env_modmap += 'fbdev-backend.so=@0@;'.format(plugin_fbdev.full_path()) - install_headers('compositor-fbdev.h', subdir: dir_include_libweston) + install_headers(backend_fbdev_h, subdir: dir_include_libweston_install) endif diff --git a/remoting/remoting-plugin.c b/remoting/remoting-plugin.c index e99d61e1..00d1ac77 100644 --- a/remoting/remoting-plugin.c +++ b/remoting/remoting-plugin.c @@ -44,7 +44,7 @@ #include #include "remoting-plugin.h" -#include "compositor-drm.h" +#include #include "shared/helpers.h" #include "shared/timespec-util.h"