1 /* GDK - The GIMP Drawing Kit
4 * Copyright 1995-2011 Red Hat Inc.
6 * Benjamin Otte <otte@gnome.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 #define GDK_DISABLE_DEPRECATION_WARNINGS
26 #include "gdkdisplay.h"
28 #include "gdkwindow.h"
32 * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no
33 * timestamp is available.
35 * Ungrabs the pointer on the default display, if it is grabbed by this
38 * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
42 gdk_pointer_ungrab (guint32 time)
44 gdk_display_pointer_ungrab (gdk_display_get_default (), time);
48 * gdk_pointer_is_grabbed:
50 * Returns %TRUE if the pointer on the default display is currently
51 * grabbed by this application.
53 * Note that this does not take the inmplicit pointer grab on button
54 * presses into account.
56 * Return value: %TRUE if the pointer is currently grabbed by this application.
58 * Deprecated: 3.0: Use gdk_display_device_is_grabbed() instead.
61 gdk_pointer_is_grabbed (void)
63 return gdk_display_pointer_is_grabbed (gdk_display_get_default ());
67 * gdk_keyboard_ungrab:
68 * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no
69 * timestamp is available.
71 * Ungrabs the keyboard on the default display, if it is grabbed by this
74 * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
78 gdk_keyboard_ungrab (guint32 time)
80 gdk_display_keyboard_ungrab (gdk_display_get_default (), time);
84 * gdk_window_at_pointer:
85 * @win_x: (out) (allow-none): return location for origin of the window under the pointer
86 * @win_y: (out) (allow-none): return location for origin of the window under the pointer
88 * Obtains the window underneath the mouse pointer, returning the
89 * location of that window in @win_x, @win_y. Returns %NULL if the
90 * window under the mouse pointer is not known to GDK (if the window
91 * belongs to another application and a #GdkWindow hasn't been created
92 * for it with gdk_window_foreign_new())
94 * NOTE: For multihead-aware widgets or applications use
95 * gdk_display_get_window_at_pointer() instead.
97 * Return value: (transfer none): window under the mouse pointer
99 * Deprecated: 3.0: Use gdk_device_get_window_at_position() instead.
102 gdk_window_at_pointer (gint *win_x,
105 return gdk_display_get_window_at_pointer (gdk_display_get_default (), win_x, win_y);