1 | /* |
2 | * gdkdisplay.h |
3 | * |
4 | * Copyright 2001 Sun Microsystems Inc. |
5 | * |
6 | * Erwann Chenede <erwann.chenede@sun.com> |
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 | #ifndef __GDK_DISPLAY_H__ |
23 | #define __GDK_DISPLAY_H__ |
24 | |
25 | #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) |
26 | #error "Only <gdk/gdk.h> can be included directly." |
27 | #endif |
28 | |
29 | #include <gdk/gdkversionmacros.h> |
30 | #include <gdk/gdktypes.h> |
31 | #include <gdk/gdkevents.h> |
32 | #include <gdk/gdkdevicemanager.h> |
33 | #include <gdk/gdkseat.h> |
34 | #include <gdk/gdkmonitor.h> |
35 | |
36 | G_BEGIN_DECLS |
37 | |
38 | #define GDK_TYPE_DISPLAY (gdk_display_get_type ()) |
39 | #define GDK_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY, GdkDisplay)) |
40 | #define GDK_IS_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY)) |
41 | #ifndef GDK_DISABLE_DEPRECATED |
42 | #define GDK_DISPLAY_OBJECT(object) GDK_DISPLAY(object) |
43 | #endif |
44 | |
45 | GDK_AVAILABLE_IN_ALL |
46 | GType gdk_display_get_type (void) G_GNUC_CONST; |
47 | GDK_AVAILABLE_IN_ALL |
48 | GdkDisplay *gdk_display_open (const gchar *display_name); |
49 | |
50 | GDK_AVAILABLE_IN_ALL |
51 | const gchar * gdk_display_get_name (GdkDisplay *display); |
52 | |
53 | GDK_DEPRECATED_IN_3_10 |
54 | gint gdk_display_get_n_screens (GdkDisplay *display); |
55 | GDK_DEPRECATED_IN_3_20 |
56 | GdkScreen * gdk_display_get_screen (GdkDisplay *display, |
57 | gint screen_num); |
58 | GDK_AVAILABLE_IN_ALL |
59 | GdkScreen * gdk_display_get_default_screen (GdkDisplay *display); |
60 | |
61 | #ifndef GDK_MULTIDEVICE_SAFE |
62 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab) |
63 | void gdk_display_pointer_ungrab (GdkDisplay *display, |
64 | guint32 time_); |
65 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab) |
66 | void gdk_display_keyboard_ungrab (GdkDisplay *display, |
67 | guint32 time_); |
68 | GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed) |
69 | gboolean gdk_display_pointer_is_grabbed (GdkDisplay *display); |
70 | #endif /* GDK_MULTIDEVICE_SAFE */ |
71 | |
72 | GDK_AVAILABLE_IN_ALL |
73 | gboolean gdk_display_device_is_grabbed (GdkDisplay *display, |
74 | GdkDevice *device); |
75 | GDK_AVAILABLE_IN_ALL |
76 | void gdk_display_beep (GdkDisplay *display); |
77 | GDK_AVAILABLE_IN_ALL |
78 | void gdk_display_sync (GdkDisplay *display); |
79 | GDK_AVAILABLE_IN_ALL |
80 | void gdk_display_flush (GdkDisplay *display); |
81 | |
82 | GDK_AVAILABLE_IN_ALL |
83 | void gdk_display_close (GdkDisplay *display); |
84 | GDK_AVAILABLE_IN_ALL |
85 | gboolean gdk_display_is_closed (GdkDisplay *display); |
86 | |
87 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_manager_list_devices) |
88 | GList * gdk_display_list_devices (GdkDisplay *display); |
89 | |
90 | GDK_AVAILABLE_IN_ALL |
91 | GdkEvent* gdk_display_get_event (GdkDisplay *display); |
92 | GDK_AVAILABLE_IN_ALL |
93 | GdkEvent* gdk_display_peek_event (GdkDisplay *display); |
94 | GDK_AVAILABLE_IN_ALL |
95 | void gdk_display_put_event (GdkDisplay *display, |
96 | const GdkEvent *event); |
97 | GDK_AVAILABLE_IN_ALL |
98 | gboolean gdk_display_has_pending (GdkDisplay *display); |
99 | |
100 | GDK_AVAILABLE_IN_ALL |
101 | void gdk_display_set_double_click_time (GdkDisplay *display, |
102 | guint msec); |
103 | GDK_AVAILABLE_IN_ALL |
104 | void gdk_display_set_double_click_distance (GdkDisplay *display, |
105 | guint distance); |
106 | |
107 | GDK_AVAILABLE_IN_ALL |
108 | GdkDisplay *gdk_display_get_default (void); |
109 | |
110 | #ifndef GDK_MULTIDEVICE_SAFE |
111 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_position) |
112 | void gdk_display_get_pointer (GdkDisplay *display, |
113 | GdkScreen **screen, |
114 | gint *x, |
115 | gint *y, |
116 | GdkModifierType *mask); |
117 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position) |
118 | GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display, |
119 | gint *win_x, |
120 | gint *win_y); |
121 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_warp) |
122 | void gdk_display_warp_pointer (GdkDisplay *display, |
123 | GdkScreen *screen, |
124 | gint x, |
125 | gint y); |
126 | #endif /* GDK_MULTIDEVICE_SAFE */ |
127 | |
128 | GDK_DEPRECATED_IN_3_16 |
129 | GdkDisplay *gdk_display_open_default_libgtk_only (void); |
130 | |
131 | GDK_AVAILABLE_IN_ALL |
132 | gboolean gdk_display_supports_cursor_alpha (GdkDisplay *display); |
133 | GDK_AVAILABLE_IN_ALL |
134 | gboolean gdk_display_supports_cursor_color (GdkDisplay *display); |
135 | GDK_AVAILABLE_IN_ALL |
136 | guint gdk_display_get_default_cursor_size (GdkDisplay *display); |
137 | GDK_AVAILABLE_IN_ALL |
138 | void gdk_display_get_maximal_cursor_size (GdkDisplay *display, |
139 | guint *width, |
140 | guint *height); |
141 | |
142 | GDK_AVAILABLE_IN_ALL |
143 | GdkWindow *gdk_display_get_default_group (GdkDisplay *display); |
144 | |
145 | GDK_AVAILABLE_IN_ALL |
146 | gboolean gdk_display_supports_selection_notification (GdkDisplay *display); |
147 | GDK_AVAILABLE_IN_ALL |
148 | gboolean gdk_display_request_selection_notification (GdkDisplay *display, |
149 | GdkAtom selection); |
150 | |
151 | GDK_AVAILABLE_IN_ALL |
152 | gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display); |
153 | GDK_AVAILABLE_IN_ALL |
154 | void gdk_display_store_clipboard (GdkDisplay *display, |
155 | GdkWindow *clipboard_window, |
156 | guint32 time_, |
157 | const GdkAtom *targets, |
158 | gint n_targets); |
159 | |
160 | GDK_AVAILABLE_IN_ALL |
161 | gboolean gdk_display_supports_shapes (GdkDisplay *display); |
162 | GDK_AVAILABLE_IN_ALL |
163 | gboolean gdk_display_supports_input_shapes (GdkDisplay *display); |
164 | GDK_DEPRECATED_IN_3_16 |
165 | gboolean gdk_display_supports_composite (GdkDisplay *display); |
166 | GDK_AVAILABLE_IN_ALL |
167 | void gdk_display_notify_startup_complete (GdkDisplay *display, |
168 | const gchar *startup_id); |
169 | |
170 | GDK_DEPRECATED_IN_3_20_FOR(gdk_display_get_default_seat) |
171 | GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display); |
172 | |
173 | GDK_AVAILABLE_IN_ALL |
174 | GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display); |
175 | |
176 | GDK_AVAILABLE_IN_3_20 |
177 | GdkSeat * gdk_display_get_default_seat (GdkDisplay *display); |
178 | |
179 | GDK_AVAILABLE_IN_3_20 |
180 | GList * gdk_display_list_seats (GdkDisplay *display); |
181 | |
182 | GDK_AVAILABLE_IN_3_22 |
183 | int gdk_display_get_n_monitors (GdkDisplay *display); |
184 | GDK_AVAILABLE_IN_3_22 |
185 | GdkMonitor * gdk_display_get_monitor (GdkDisplay *display, |
186 | int monitor_num); |
187 | GDK_AVAILABLE_IN_3_22 |
188 | GdkMonitor * gdk_display_get_primary_monitor (GdkDisplay *display); |
189 | GDK_AVAILABLE_IN_3_22 |
190 | GdkMonitor * gdk_display_get_monitor_at_point (GdkDisplay *display, |
191 | int x, |
192 | int y); |
193 | GDK_AVAILABLE_IN_3_22 |
194 | GdkMonitor * gdk_display_get_monitor_at_window (GdkDisplay *display, |
195 | GdkWindow *window); |
196 | |
197 | |
198 | G_END_DECLS |
199 | |
200 | #endif /* __GDK_DISPLAY_H__ */ |
201 | |