[PATCH weston 15/25] libweston: unexport weston_{pointer, keyboard, touch}_{create, destroy}()

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 23 12:00:55 UTC 2018


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

We have weston_seat_{init,release}_{pointer,keyboard,touch}() as the
backend-facing API. There is no need to expose the create/destroy
functions which have been for internal use only for quite a long time.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 libweston/compositor.h | 12 ------------
 libweston/input.c      | 12 ++++++------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/libweston/compositor.h b/libweston/compositor.h
index 27daf76a..b992b7eb 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -526,10 +526,6 @@ weston_pointer_motion_to_abs(struct weston_pointer *pointer,
 			     struct weston_pointer_motion_event *event,
 			     wl_fixed_t *x, wl_fixed_t *y);
 
-struct weston_pointer *
-weston_pointer_create(struct weston_seat *seat);
-void
-weston_pointer_destroy(struct weston_pointer *pointer);
 void
 weston_pointer_send_motion(struct weston_pointer *pointer,
 			   const struct timespec *time,
@@ -574,10 +570,6 @@ weston_pointer_set_default_grab(struct weston_pointer *pointer,
 void
 weston_pointer_constraint_destroy(struct weston_pointer_constraint *constraint);
 
-struct weston_keyboard *
-weston_keyboard_create(void);
-void
-weston_keyboard_destroy(struct weston_keyboard *keyboard);
 void
 weston_keyboard_set_focus(struct weston_keyboard *keyboard,
 			  struct weston_surface *surface);
@@ -606,10 +598,6 @@ weston_keyboard_send_modifiers(struct weston_keyboard *keyboard,
 			       uint32_t mods_latched,
 			       uint32_t mods_locked, uint32_t group);
 
-struct weston_touch *
-weston_touch_create(void);
-void
-weston_touch_destroy(struct weston_touch *touch);
 void
 weston_touch_set_focus(struct weston_touch *touch,
 		       struct weston_view *view);
diff --git a/libweston/input.c b/libweston/input.c
index db710da3..bd7a9167 100644
--- a/libweston/input.c
+++ b/libweston/input.c
@@ -1198,7 +1198,7 @@ weston_pointer_reset_state(struct weston_pointer *pointer)
 static void
 weston_pointer_handle_output_destroy(struct wl_listener *listener, void *data);
 
-WL_EXPORT struct weston_pointer *
+static struct weston_pointer *
 weston_pointer_create(struct weston_seat *seat)
 {
 	struct weston_pointer *pointer;
@@ -1237,7 +1237,7 @@ weston_pointer_create(struct weston_seat *seat)
 	return pointer;
 }
 
-WL_EXPORT void
+static void
 weston_pointer_destroy(struct weston_pointer *pointer)
 {
 	struct weston_pointer_client *pointer_client, *tmp;
@@ -1271,7 +1271,7 @@ weston_pointer_set_default_grab(struct weston_pointer *pointer,
 			&default_pointer_grab_interface;
 }
 
-WL_EXPORT struct weston_keyboard *
+static struct weston_keyboard *
 weston_keyboard_create(void)
 {
 	struct weston_keyboard *keyboard;
@@ -1297,7 +1297,7 @@ weston_keyboard_create(void)
 static void
 weston_xkb_info_destroy(struct weston_xkb_info *xkb_info);
 
-WL_EXPORT void
+static void
 weston_keyboard_destroy(struct weston_keyboard *keyboard)
 {
 	struct wl_resource *resource;
@@ -1330,7 +1330,7 @@ weston_touch_reset_state(struct weston_touch *touch)
 	touch->num_tp = 0;
 }
 
-WL_EXPORT struct weston_touch *
+static struct weston_touch *
 weston_touch_create(void)
 {
 	struct weston_touch *touch;
@@ -1355,7 +1355,7 @@ weston_touch_create(void)
 	return touch;
 }
 
-WL_EXPORT void
+static void
 weston_touch_destroy(struct weston_touch *touch)
 {
 	struct wl_resource *resource;
-- 
2.16.1



More information about the wayland-devel mailing list