From 7629f6d5333d823b51924682c24cef90eb124d91 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 28 Jul 2020 16:21:47 +0200 Subject: [PATCH] gdk: Make GdkDevice axis API internal All outside interaction happens through gdk_event_get_axis(), no device poking is necessary, nor axis to array index translations. --- docs/reference/gdk/gdk4-sections.txt | 3 --- gdk/gdkdevice.h | 12 ------------ gdk/gdkinternals.h | 8 +++++++- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 54038d4806..296a517706 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -355,13 +355,11 @@ gdk_device_get_name gdk_device_get_vendor_id gdk_device_get_product_id gdk_device_get_source -gdk_device_get_axis_use gdk_device_get_associated_device gdk_device_list_physical_devices gdk_device_get_device_type gdk_device_get_display gdk_device_get_has_cursor -gdk_device_get_n_axes gdk_device_get_seat gdk_device_get_num_touches gdk_device_get_device_tool @@ -375,7 +373,6 @@ gdk_device_has_bidi_layouts gdk_device_get_surface_at_position GdkTimeCoord -gdk_device_get_axis gdk_device_tool_get_serial diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h index 0b2482ef74..644451a0bf 100644 --- a/gdk/gdkdevice.h +++ b/gdk/gdkdevice.h @@ -106,24 +106,12 @@ gboolean gdk_device_get_has_cursor (GdkDevice *device); GDK_AVAILABLE_IN_ALL GdkInputSource gdk_device_get_source (GdkDevice *device); -GDK_AVAILABLE_IN_ALL -GdkAxisUse gdk_device_get_axis_use (GdkDevice *device, - guint index_); - - GDK_AVAILABLE_IN_ALL GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device, double *win_x, double *win_y); GDK_AVAILABLE_IN_ALL -int gdk_device_get_n_axes (GdkDevice *device); -GDK_AVAILABLE_IN_ALL -gboolean gdk_device_get_axis (GdkDevice *device, - double *axes, - GdkAxisUse use, - double *value); -GDK_AVAILABLE_IN_ALL GdkDisplay * gdk_device_get_display (GdkDevice *device); GDK_AVAILABLE_IN_ALL diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 0a70e407d1..b21c74a55d 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -268,7 +268,13 @@ void gdk_device_ungrab (GdkDevice *device, void gdk_device_get_position (GdkDevice *device, double *x, double *y); - +int gdk_device_get_n_axes (GdkDevice *device); +gboolean gdk_device_get_axis (GdkDevice *device, + double *axes, + GdkAxisUse use, + double *value); +GdkAxisUse gdk_device_get_axis_use (GdkDevice *device, + guint index_); void gdk_surface_get_root_coords (GdkSurface *surface, int x,