]> Pileus Git - ~andy/gtk/blob - gdk/gdkdeprecated.c
notebook: restore previous behaviour wrt. unparenting of tab labels
[~andy/gtk] / gdk / gdkdeprecated.c
1 /* GDK - The GIMP Drawing Kit
2  * gdkdeprecated.c
3  * 
4  * Copyright 1995-2011 Red Hat Inc.
5  *
6  * Benjamin Otte <otte@gnome.org>
7  *
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.
12  *
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.
17  *
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/>.
20  */
21
22 #define GDK_DISABLE_DEPRECATION_WARNINGS
23
24 #include "config.h"
25
26 #include "gdkdisplay.h"
27
28 /**
29  * gdk_pointer_ungrab:
30  * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no 
31  *  timestamp is available.
32  *
33  * Ungrabs the pointer on the default display, if it is grabbed by this 
34  * application.
35  *
36  * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
37  *             instead.
38  **/
39 void
40 gdk_pointer_ungrab (guint32 time)
41 {
42   gdk_display_pointer_ungrab (gdk_display_get_default (), time);
43 }
44
45 /**
46  * gdk_pointer_is_grabbed:
47  * 
48  * Returns %TRUE if the pointer on the default display is currently 
49  * grabbed by this application.
50  *
51  * Note that this does not take the inmplicit pointer grab on button
52  * presses into account.
53  *
54  * Return value: %TRUE if the pointer is currently grabbed by this application.
55  *
56  * Deprecated: 3.0: Use gdk_display_device_is_grabbed() instead.
57  **/
58 gboolean
59 gdk_pointer_is_grabbed (void)
60 {
61   return gdk_display_pointer_is_grabbed (gdk_display_get_default ());
62 }
63
64 /**
65  * gdk_keyboard_ungrab:
66  * @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no
67  *        timestamp is available.
68  * 
69  * Ungrabs the keyboard on the default display, if it is grabbed by this 
70  * application.
71  *
72  * Deprecated: 3.0: Use gdk_device_ungrab(), together with gdk_device_grab()
73  *             instead.
74  **/
75 void
76 gdk_keyboard_ungrab (guint32 time)
77 {
78   gdk_display_keyboard_ungrab (gdk_display_get_default (), time);
79 }
80
81 /**
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
85  *
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())
91  *
92  * NOTE: For multihead-aware widgets or applications use
93  * gdk_display_get_window_at_pointer() instead.
94  *
95  * Return value: (transfer none): window under the mouse pointer
96  *
97  * Deprecated: 3.0: Use gdk_device_get_window_at_position() instead.
98  **/
99 GdkWindow*
100 gdk_window_at_pointer (gint *win_x,
101                        gint *win_y)
102 {
103   return gdk_display_get_window_at_pointer (gdk_display_get_default (), win_x, win_y);
104 }
105