From 63ef078ada36bc1e13446d4f626123ecc0d679cb Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 16 Jul 2019 23:34:14 +0300 Subject: [PATCH] libweston: Migrate functions that operate on 'weston_output' into backend header Signed-off-by: Marius Vlad --- compositor/screen-share.c | 1 + include/libweston/libweston.h | 22 ---------------------- libweston/backend.h | 31 +++++++++++++++++++++++++++++++ libweston/compositor.c | 1 + libweston/libinput-device.c | 1 + libweston/screenshooter.c | 1 + libweston/zoom.c | 1 + 7 files changed, 36 insertions(+), 22 deletions(-) diff --git a/compositor/screen-share.c b/compositor/screen-share.c index 3e502817..1fbc6e7e 100644 --- a/compositor/screen-share.c +++ b/compositor/screen-share.c @@ -41,6 +41,7 @@ #include #include +#include "backend.h" #include "libweston-internal.h" #include "weston.h" #include "shared/helpers.h" diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 7f977cbb..09639745 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -1732,15 +1732,9 @@ weston_layer_mask_is_infinite(struct weston_layer *layer); /* An invalid flag in presented_flags to catch logic errors. */ #define WP_PRESENTATION_FEEDBACK_INVALID (1U << 31) -void -weston_output_finish_frame(struct weston_output *output, - const struct timespec *stamp, - uint32_t presented_flags); void weston_output_schedule_repaint(struct weston_output *output); void -weston_output_damage(struct weston_output *output); -void weston_compositor_schedule_repaint(struct weston_compositor *compositor); void weston_compositor_damage_all(struct weston_compositor *compositor); @@ -1925,28 +1919,16 @@ void weston_compositor_exit_with_code(struct weston_compositor *compositor, int exit_code); void -weston_output_init_zoom(struct weston_output *output); -void weston_output_update_zoom(struct weston_output *output); void weston_output_activate_zoom(struct weston_output *output, struct weston_seat *seat); -void -weston_output_move(struct weston_output *output, int x, int y); - void weston_output_add_destroy_listener(struct weston_output *output, struct wl_listener *listener); struct wl_listener * weston_output_get_destroy_listener(struct weston_output *output, wl_notify_func_t notify); -void -weston_output_release(struct weston_output *output); -void -weston_output_transform_coordinate(struct weston_output *output, - double device_x, double device_y, - double *x, double *y); - int weston_compositor_set_xkb_rule_names(struct weston_compositor *ec, struct xkb_rule_names *names); @@ -2028,10 +2010,6 @@ weston_surface_set_color(struct weston_surface *surface, void weston_surface_destroy(struct weston_surface *surface); -int -weston_output_mode_set_native(struct weston_output *output, - struct weston_mode *mode, - int32_t scale); int weston_output_mode_switch_to_temporary(struct weston_output *output, struct weston_mode *mode, diff --git a/libweston/backend.h b/libweston/backend.h index 79cdbb21..c19bd635 100644 --- a/libweston/backend.h +++ b/libweston/backend.h @@ -57,5 +57,36 @@ weston_head_set_physical_size(struct weston_head *head, void weston_head_set_subpixel(struct weston_head *head, enum wl_output_subpixel sp); +/* weston_output */ + +void +weston_output_init(struct weston_output *output, + struct weston_compositor *compositor, + const char *name); +void +weston_output_damage(struct weston_output *output); + +void +weston_output_move(struct weston_output *output, int x, int y); + +void +weston_output_release(struct weston_output *output); + +void +weston_output_init_zoom(struct weston_output *output); + +void +weston_output_finish_frame(struct weston_output *output, + const struct timespec *stamp, + uint32_t presented_flags); +int +weston_output_mode_set_native(struct weston_output *output, + struct weston_mode *mode, + int32_t scale); +void +weston_output_transform_coordinate(struct weston_output *output, + double device_x, double device_y, + double *x, double *y); + #endif diff --git a/libweston/compositor.c b/libweston/compositor.c index 444b4064..9a69b9ad 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -72,6 +72,7 @@ #include #include #include "pixel-formats.h" +#include "backend.h" #include "libweston-internal.h" /** diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c index 6941a5c4..9a084cbf 100644 --- a/libweston/libinput-device.c +++ b/libweston/libinput-device.c @@ -39,6 +39,7 @@ #include #include +#include "backend.h" #include "libweston-internal.h" #include "libinput-device.h" #include "shared/helpers.h" diff --git a/libweston/screenshooter.c b/libweston/screenshooter.c index 8c4eda3e..8952b397 100644 --- a/libweston/screenshooter.c +++ b/libweston/screenshooter.c @@ -38,6 +38,7 @@ #include #include "shared/helpers.h" #include "shared/timespec-util.h" +#include "backend.h" #include "libweston-internal.h" #include "wcap/wcap-decode.h" diff --git a/libweston/zoom.c b/libweston/zoom.c index ac8f1f30..87e98e8a 100644 --- a/libweston/zoom.c +++ b/libweston/zoom.c @@ -31,6 +31,7 @@ #include #include +#include "backend.h" #include "libweston-internal.h" #include "text-cursor-position-server-protocol.h" #include "shared/helpers.h"