API: gdk: Remove gdk_display_set_pointer_hooks()

Its usecase was GERD - http://testbit.eu/~timj/historic/gerd/ - and that
project is long since dead.

I couldn't find any app using it after asking around and googling either.
This commit is contained in:
Benjamin Otte 2011-01-03 16:34:48 +01:00
parent 36a15720b1
commit ff1ad99dce
4 changed files with 0 additions and 191 deletions

View File

@ -126,8 +126,6 @@ gdk_display_set_double_click_distance
gdk_display_get_pointer
gdk_display_list_devices
gdk_display_get_window_at_pointer
GdkDisplayPointerHooks
gdk_display_set_pointer_hooks
GdkDisplayDeviceHooks
gdk_display_set_device_hooks
gdk_display_warp_pointer

View File

@ -119,7 +119,6 @@ gdk_display_request_selection_notification
gdk_display_set_device_hooks
gdk_display_set_double_click_distance
gdk_display_set_double_click_time
gdk_display_set_pointer_hooks
gdk_display_store_clipboard
gdk_display_supports_clipboard_persistence
gdk_display_supports_composite

View File

@ -71,37 +71,6 @@ enum {
static void gdk_display_dispose (GObject *object);
static void gdk_display_finalize (GObject *object);
static void multihead_get_device_state (GdkDisplay *display,
GdkDevice *device,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
static GdkWindow * multihead_window_get_device_position (GdkDisplay *display,
GdkDevice *device,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask);
static GdkWindow * multihead_window_at_device_position (GdkDisplay *display,
GdkDevice *device,
gint *win_x,
gint *win_y);
static void multihead_default_get_pointer (GdkDisplay *display,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
static GdkWindow * multihead_default_window_get_pointer (GdkDisplay *display,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask);
static GdkWindow * multihead_default_window_at_pointer (GdkDisplay *display,
gint *win_x,
gint *win_y);
static GdkWindow *gdk_window_real_window_get_device_position (GdkDisplay *display,
GdkDevice *device,
@ -129,20 +98,6 @@ static const GdkDisplayDeviceHooks default_device_hooks = {
gdk_display_real_get_window_at_device_position
};
static const GdkDisplayDeviceHooks multihead_pointer_hooks = {
multihead_get_device_state,
multihead_window_get_device_position,
multihead_window_at_device_position
};
static const GdkDisplayPointerHooks multihead_default_pointer_hooks = {
multihead_default_get_pointer,
multihead_default_window_get_pointer,
multihead_default_window_at_pointer
};
static const GdkDisplayPointerHooks *multihead_current_pointer_hooks = &multihead_default_pointer_hooks;
G_DEFINE_TYPE (GdkDisplay, gdk_display, G_TYPE_OBJECT)
static void
@ -831,37 +786,6 @@ gdk_display_get_window_at_pointer (GdkDisplay *display,
return gdk_device_get_window_at_position (display->core_pointer, win_x, win_y);
}
static void
multihead_get_device_state (GdkDisplay *display,
GdkDevice *device,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask)
{
multihead_current_pointer_hooks->get_pointer (display, screen, x, y, mask);
}
static GdkWindow *
multihead_window_get_device_position (GdkDisplay *display,
GdkDevice *device,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask)
{
return multihead_current_pointer_hooks->window_get_pointer (display, window, x, y, mask);
}
static GdkWindow *
multihead_window_at_device_position (GdkDisplay *display,
GdkDevice *device,
gint *win_x,
gint *win_y)
{
return multihead_current_pointer_hooks->window_at_pointer (display, win_x, win_y);
}
static void
gdk_display_real_get_device_state (GdkDisplay *display,
GdkDevice *device,
@ -888,76 +812,6 @@ gdk_display_real_get_device_state (GdkDisplay *display,
*screen = gdk_window_get_screen (root);
}
static void
multihead_default_get_pointer (GdkDisplay *display,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask)
{
gdk_display_real_get_device_state (display, display->core_pointer,
screen, x, y, mask);
}
static GdkWindow *
multihead_default_window_get_pointer (GdkDisplay *display,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask)
{
return gdk_window_real_window_get_device_position (display,
display->core_pointer,
window, x, y, mask);
}
static GdkWindow *
multihead_default_window_at_pointer (GdkDisplay *display,
gint *win_x,
gint *win_y)
{
return gdk_display_real_get_window_at_device_position (display,
display->core_pointer,
win_x, win_y);
}
/**
* gdk_display_set_pointer_hooks:
* @display: a #GdkDisplay
* @new_hooks: (allow-none): a table of pointers to functions for getting
* quantities related to the current pointer position,
* or %NULL to restore the default table.
*
* This function allows for hooking into the operation
* of getting the current location of the pointer on a particular
* display. This is only useful for such low-level tools as an
* event recorder. Applications should never have any
* reason to use this facility.
*
* Return value: (transfer none): the previous pointer hook table
*
* Since: 2.2
*
* Deprecated: 3.0: Use gdk_display_set_device_hooks() instead.
**/
GdkDisplayPointerHooks *
gdk_display_set_pointer_hooks (GdkDisplay *display,
const GdkDisplayPointerHooks *new_hooks)
{
const GdkDisplayPointerHooks *result = multihead_current_pointer_hooks;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
if (new_hooks)
multihead_current_pointer_hooks = new_hooks;
else
multihead_current_pointer_hooks = &multihead_default_pointer_hooks;
gdk_display_set_device_hooks (display, &multihead_pointer_hooks);
return (GdkDisplayPointerHooks *)result;
}
static void
generate_grab_broken_event (GdkWindow *window,
GdkDevice *device,

View File

@ -41,48 +41,8 @@ G_BEGIN_DECLS
#define GDK_DISPLAY_OBJECT(object) GDK_DISPLAY(object)
#endif
typedef struct _GdkDisplayPointerHooks GdkDisplayPointerHooks;
typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
/**
* GdkDisplayPointerHooks:
* @get_pointer: Obtains the current pointer position and modifier state.
* The position is given in coordinates relative to the screen containing
* the pointer, which is returned in @screen.
* @window_get_pointer: Obtains the window underneath the mouse pointer.
* Current pointer position and modifier state are returned in @x, @y and
* @mask. The position is given in coordinates relative to @window.
* @window_at_pointer: Obtains the window underneath the mouse pointer,
* 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 pointer position. Each #GdkDisplay has a table of this type,
* which can be set using gdk_display_set_pointer_hooks().
*
* This is only useful for such low-level tools as an event recorder.
* Applications should never have any reason to use this facility
*
* Since: 2.2
*/
struct _GdkDisplayPointerHooks
{
void (*get_pointer) (GdkDisplay *display,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow* (*window_get_pointer) (GdkDisplay *display,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow* (*window_at_pointer) (GdkDisplay *display,
gint *win_x,
gint *win_y);
};
/**
* GdkDisplayDeviceHooks:
* @get_device_state: Obtains the current position and modifier state for
@ -186,8 +146,6 @@ void gdk_display_warp_pointer (GdkDisplay *disp
GdkScreen *screen,
gint x,
gint y);
GdkDisplayPointerHooks *gdk_display_set_pointer_hooks (GdkDisplay *display,
const GdkDisplayPointerHooks *new_hooks);
#endif /* GDK_DISABLE_DEPRECATED */
#endif /* GDK_MULTIDEVICE_SAFE */