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"
30 * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no
31 * timestamp is available.
33 * Ungrabs the pointer on the default display, if it is grabbed by this
36 * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
40 gdk_pointer_ungrab (guint32 time)
42 gdk_display_pointer_ungrab (gdk_display_get_default (), time);
46 * gdk_pointer_is_grabbed:
48 * Returns %TRUE if the pointer on the default display is currently
49 * grabbed by this application.
51 * Note that this does not take the inmplicit pointer grab on button
52 * presses into account.
54 * Return value: %TRUE if the pointer is currently grabbed by this application.
56 * Deprecated: 3.0: Use gdk_display_device_is_grabbed() instead.
59 gdk_pointer_is_grabbed (void)
61 return gdk_display_pointer_is_grabbed (gdk_display_get_default ());
65 * gdk_keyboard_ungrab:
66 * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no
67 * timestamp is available.
69 * Ungrabs the keyboard on the default display, if it is grabbed by this
72 * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
76 gdk_keyboard_ungrab (guint32 time)
78 gdk_display_keyboard_ungrab (gdk_display_get_default (), time);
82 * gdk_window_at_pointer:
83 * @win_x: (out) (allow-none): return location for origin of the window under the pointer
84 * @win_y: (out) (allow-none): return location for origin of the window under the pointer
86 * Obtains the window underneath the mouse pointer, returning the
87 * location of that window in @win_x, @win_y. Returns %NULL if the
88 * window under the mouse pointer is not known to GDK (if the window
89 * belongs to another application and a #GdkWindow hasn't been created
90 * for it with gdk_window_foreign_new())
92 * NOTE: For multihead-aware widgets or applications use
93 * gdk_display_get_window_at_pointer() instead.
95 * Return value: (transfer none): window under the mouse pointer
97 * Deprecated: 3.0: Use gdk_device_get_window_at_position() instead.
100 gdk_window_at_pointer (gint *win_x,
103 return gdk_display_get_window_at_pointer (gdk_display_get_default (), win_x, win_y);