summaryrefslogtreecommitdiff
path: root/gdk/gdkdisplay.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-12-27 18:45:39 +0100
committerBenjamin Otte <otte@redhat.com>2010-12-27 18:46:41 +0100
commit97469915489704d28a9d85c3e6ad698f73b203f3 (patch)
tree24552c5f090cea3d92e5bb4dfa301090559162f9 /gdk/gdkdisplay.c
parent0c285341a959ddbaad4ecc75e5f1a1ad66c5274e (diff)
downloadgtk+-97469915489704d28a9d85c3e6ad698f73b203f3.tar.gz
API: gdk: Make gdk_display_get_window_at_device_position() a device API
It's now called gdk_device_get_window_at_position(). It doesn't make sense to keep device-specific API part of the display.
Diffstat (limited to 'gdk/gdkdisplay.c')
-rw-r--r--gdk/gdkdisplay.c43
1 files changed, 2 insertions, 41 deletions
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index e7f7fc57e8..fdd98604ba 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -697,45 +697,6 @@ _gdk_display_enable_motion_hints (GdkDisplay *display,
}
/**
- * gdk_display_get_window_at_device_position:
- * @display: a #GdkDisplay.
- * @device: pointer #GdkDevice to query info to.
- * @win_x: (out) (allow-none): return location for the X coordinate of the device location,
- * relative to the window origin, or %NULL.
- * @win_y: (out) (allow-none): return location for the Y coordinate of the device location,
- * relative to the window origin, or %NULL.
- *
- * Obtains the window underneath @device, returning the location of the device in @win_x and @win_y. Returns
- * %NULL if the window tree under @device is not known to GDK (for example, belongs to another application).
- *
- * Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
- *
- * Since: 3.0
- **/
-GdkWindow *
-gdk_display_get_window_at_device_position (GdkDisplay *display,
- GdkDevice *device,
- gint *win_x,
- gint *win_y)
-{
- gint tmp_x, tmp_y;
- GdkWindow *window;
-
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
- g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
-
- window = display->device_hooks->window_at_device_position (display, device, &tmp_x, &tmp_y);
-
- if (win_x)
- *win_x = tmp_x;
- if (win_y)
- *win_y = tmp_y;
-
- return window;
-}
-
-/**
* gdk_display_set_device_hooks:
* @display: a #GdkDisplay.
* @new_hooks: (allow-none): a table of pointers to functions for getting quantities related
@@ -890,7 +851,7 @@ gdk_window_real_window_get_device_position (GdkDisplay *display,
*
* Since: 2.2
*
- * Deprecated: 3.0: Use gdk_display_get_window_at_device_position() instead.
+ * Deprecated: 3.0: Use gdk_device_get_window_at_position() instead.
**/
GdkWindow *
gdk_display_get_window_at_pointer (GdkDisplay *display,
@@ -899,7 +860,7 @@ gdk_display_get_window_at_pointer (GdkDisplay *display,
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return gdk_display_get_window_at_device_position (display, display->core_pointer, win_x, win_y);
+ return gdk_device_get_window_at_position (display->core_pointer, win_x, win_y);
}
static void