[gtk+] API: gdk: Remove gdk_display_set_device_hooks()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: gdk: Remove gdk_display_set_device_hooks()
- Date: Mon, 3 Jan 2011 15:56:18 +0000 (UTC)
commit d72d19d247965fb5561c1d1ce35533102461a67d
Author: Benjamin Otte <otte redhat com>
Date: Mon Jan 3 16:49:13 2011 +0100
API: gdk: Remove gdk_display_set_device_hooks()
There's no usecase for them, so remove them before we have to commit to
keeping an API.
Make the hooks private for now, actually removing them will come in
followup patches.
docs/reference/gdk/gdk3-sections.txt | 2 -
gdk/gdk.symbols | 1 -
gdk/gdkdisplay.c | 31 ------------------------
gdk/gdkdisplay.h | 43 ----------------------------------
gdk/gdkdisplayprivate.h | 22 +++++++++++++++++
5 files changed, 22 insertions(+), 77 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index ec5128e..459c1c2 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -126,8 +126,6 @@ gdk_display_set_double_click_distance
gdk_display_get_pointer
gdk_display_list_devices
gdk_display_get_window_at_pointer
-GdkDisplayDeviceHooks
-gdk_display_set_device_hooks
gdk_display_warp_pointer
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 5f5fa66..9fb4b63 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -116,7 +116,6 @@ gdk_display_pointer_is_grabbed
gdk_display_pointer_ungrab
gdk_display_put_event
gdk_display_request_selection_notification
-gdk_display_set_device_hooks
gdk_display_set_double_click_distance
gdk_display_set_double_click_time
gdk_display_store_clipboard
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index b83f100..71bc00e 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -620,37 +620,6 @@ _gdk_display_enable_motion_hints (GdkDisplay *display,
}
/**
- * gdk_display_set_device_hooks:
- * @display: a #GdkDisplay.
- * @new_hooks: (allow-none): a table of pointers to functions for getting quantities related
- * to all devices position, or %NULL to restore the default table.
- *
- * This function allows for hooking into the operation of getting the current location of any
- * #GdkDevice on a particular #GdkDisplay. This is only useful for such low-level tools as
- * an event recorder. Applications should never have any reason to use this facility.
- *
- * Returns: (transfer none): The previous device hook table.
- *
- * Since: 3.0
- **/
-GdkDisplayDeviceHooks *
-gdk_display_set_device_hooks (GdkDisplay *display,
- const GdkDisplayDeviceHooks *new_hooks)
-{
- const GdkDisplayDeviceHooks *result;
-
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- result = display->device_hooks;
-
- if (new_hooks)
- display->device_hooks = new_hooks;
- else
- display->device_hooks = &default_device_hooks;
-
- return (GdkDisplayDeviceHooks *) result;
-}
-
-/**
* gdk_display_get_pointer:
* @display: a #GdkDisplay
* @screen: (allow-none): location to store the screen that the
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index 1b320d0..af77909 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -41,46 +41,6 @@ G_BEGIN_DECLS
#define GDK_DISPLAY_OBJECT(object) GDK_DISPLAY(object)
#endif
-typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
-
-/**
- * GdkDisplayDeviceHooks:
- * @get_device_state: Obtains the current position and modifier state for
- * @device. The position is given in coordinates relative to the window
- * containing the pointer, which is returned in @window.
- * @window_get_device_position: Obtains the window underneath the device
- * position. Current device position and modifier state are returned in
- * @x, @y and @mask. The position is given in coordinates relative to
- * @window.
- * @window_at_device_position: Obtains the window underneath the device
- * position, returning the location of that window in @win_x, @win_y.
- * Returns %NULL if the window under the mouse pointer is not known to
- * GDK (for example, belongs to another application).
- *
- * A table of pointers to functions for getting quantities related to
- * the current device position. Each #GdkDisplay has a table of this type,
- * which can be set using gdk_display_set_device_hooks().
- */
-struct _GdkDisplayDeviceHooks
-{
- void (* get_device_state) (GdkDisplay *display,
- GdkDevice *device,
- GdkScreen **screen,
- gint *x,
- gint *y,
- GdkModifierType *mask);
- GdkWindow * (* window_get_device_position) (GdkDisplay *display,
- GdkDevice *device,
- GdkWindow *window,
- gint *x,
- gint *y,
- GdkModifierType *mask);
- GdkWindow * (* window_at_device_position) (GdkDisplay *display,
- GdkDevice *device,
- gint *win_x,
- gint *win_y);
-};
-
GType gdk_display_get_type (void) G_GNUC_CONST;
GdkDisplay *gdk_display_open (const gchar *display_name);
@@ -149,9 +109,6 @@ void gdk_display_warp_pointer (GdkDisplay *disp
#endif /* GDK_DISABLE_DEPRECATED */
#endif /* GDK_MULTIDEVICE_SAFE */
-GdkDisplayDeviceHooks *gdk_display_set_device_hooks (GdkDisplay *display,
- const GdkDisplayDeviceHooks *new_hooks);
-
GdkDisplay *gdk_display_open_default_libgtk_only (void);
gboolean gdk_display_supports_cursor_alpha (GdkDisplay *display);
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 2662eee..ceea86b 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -31,6 +31,28 @@ G_BEGIN_DECLS
#define GDK_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass))
+typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
+
+struct _GdkDisplayDeviceHooks
+{
+ void (* get_device_state) (GdkDisplay *display,
+ GdkDevice *device,
+ GdkScreen **screen,
+ gint *x,
+ gint *y,
+ GdkModifierType *mask);
+ GdkWindow * (* window_get_device_position) (GdkDisplay *display,
+ GdkDevice *device,
+ GdkWindow *window,
+ gint *x,
+ gint *y,
+ GdkModifierType *mask);
+ GdkWindow * (* window_at_device_position) (GdkDisplay *display,
+ GdkDevice *device,
+ gint *win_x,
+ gint *win_y);
+};
+
typedef struct _GdkDisplayClass GdkDisplayClass;
/* Tracks information about the keyboard grab on this display */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]