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
36G_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
45GDK_AVAILABLE_IN_ALL
46GType gdk_display_get_type (void) G_GNUC_CONST;
47GDK_AVAILABLE_IN_ALL
48GdkDisplay *gdk_display_open (const gchar *display_name);
49
50GDK_AVAILABLE_IN_ALL
51const gchar * gdk_display_get_name (GdkDisplay *display);
52
53GDK_DEPRECATED_IN_3_10
54gint gdk_display_get_n_screens (GdkDisplay *display);
55GDK_DEPRECATED_IN_3_20
56GdkScreen * gdk_display_get_screen (GdkDisplay *display,
57 gint screen_num);
58GDK_AVAILABLE_IN_ALL
59GdkScreen * gdk_display_get_default_screen (GdkDisplay *display);
60
61#ifndef GDK_MULTIDEVICE_SAFE
62GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
63void gdk_display_pointer_ungrab (GdkDisplay *display,
64 guint32 time_);
65GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
66void gdk_display_keyboard_ungrab (GdkDisplay *display,
67 guint32 time_);
68GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
69gboolean gdk_display_pointer_is_grabbed (GdkDisplay *display);
70#endif /* GDK_MULTIDEVICE_SAFE */
71
72GDK_AVAILABLE_IN_ALL
73gboolean gdk_display_device_is_grabbed (GdkDisplay *display,
74 GdkDevice *device);
75GDK_AVAILABLE_IN_ALL
76void gdk_display_beep (GdkDisplay *display);
77GDK_AVAILABLE_IN_ALL
78void gdk_display_sync (GdkDisplay *display);
79GDK_AVAILABLE_IN_ALL
80void gdk_display_flush (GdkDisplay *display);
81
82GDK_AVAILABLE_IN_ALL
83void gdk_display_close (GdkDisplay *display);
84GDK_AVAILABLE_IN_ALL
85gboolean gdk_display_is_closed (GdkDisplay *display);
86
87GDK_DEPRECATED_IN_3_0_FOR(gdk_device_manager_list_devices)
88GList * gdk_display_list_devices (GdkDisplay *display);
89
90GDK_AVAILABLE_IN_ALL
91GdkEvent* gdk_display_get_event (GdkDisplay *display);
92GDK_AVAILABLE_IN_ALL
93GdkEvent* gdk_display_peek_event (GdkDisplay *display);
94GDK_AVAILABLE_IN_ALL
95void gdk_display_put_event (GdkDisplay *display,
96 const GdkEvent *event);
97GDK_AVAILABLE_IN_ALL
98gboolean gdk_display_has_pending (GdkDisplay *display);
99
100GDK_AVAILABLE_IN_ALL
101void gdk_display_set_double_click_time (GdkDisplay *display,
102 guint msec);
103GDK_AVAILABLE_IN_ALL
104void gdk_display_set_double_click_distance (GdkDisplay *display,
105 guint distance);
106
107GDK_AVAILABLE_IN_ALL
108GdkDisplay *gdk_display_get_default (void);
109
110#ifndef GDK_MULTIDEVICE_SAFE
111GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_position)
112void gdk_display_get_pointer (GdkDisplay *display,
113 GdkScreen **screen,
114 gint *x,
115 gint *y,
116 GdkModifierType *mask);
117GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position)
118GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display,
119 gint *win_x,
120 gint *win_y);
121GDK_DEPRECATED_IN_3_0_FOR(gdk_device_warp)
122void gdk_display_warp_pointer (GdkDisplay *display,
123 GdkScreen *screen,
124 gint x,
125 gint y);
126#endif /* GDK_MULTIDEVICE_SAFE */
127
128GDK_DEPRECATED_IN_3_16
129GdkDisplay *gdk_display_open_default_libgtk_only (void);
130
131GDK_AVAILABLE_IN_ALL
132gboolean gdk_display_supports_cursor_alpha (GdkDisplay *display);
133GDK_AVAILABLE_IN_ALL
134gboolean gdk_display_supports_cursor_color (GdkDisplay *display);
135GDK_AVAILABLE_IN_ALL
136guint gdk_display_get_default_cursor_size (GdkDisplay *display);
137GDK_AVAILABLE_IN_ALL
138void gdk_display_get_maximal_cursor_size (GdkDisplay *display,
139 guint *width,
140 guint *height);
141
142GDK_AVAILABLE_IN_ALL
143GdkWindow *gdk_display_get_default_group (GdkDisplay *display);
144
145GDK_AVAILABLE_IN_ALL
146gboolean gdk_display_supports_selection_notification (GdkDisplay *display);
147GDK_AVAILABLE_IN_ALL
148gboolean gdk_display_request_selection_notification (GdkDisplay *display,
149 GdkAtom selection);
150
151GDK_AVAILABLE_IN_ALL
152gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display);
153GDK_AVAILABLE_IN_ALL
154void gdk_display_store_clipboard (GdkDisplay *display,
155 GdkWindow *clipboard_window,
156 guint32 time_,
157 const GdkAtom *targets,
158 gint n_targets);
159
160GDK_AVAILABLE_IN_ALL
161gboolean gdk_display_supports_shapes (GdkDisplay *display);
162GDK_AVAILABLE_IN_ALL
163gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
164GDK_DEPRECATED_IN_3_16
165gboolean gdk_display_supports_composite (GdkDisplay *display);
166GDK_AVAILABLE_IN_ALL
167void gdk_display_notify_startup_complete (GdkDisplay *display,
168 const gchar *startup_id);
169
170GDK_DEPRECATED_IN_3_20_FOR(gdk_display_get_default_seat)
171GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
172
173GDK_AVAILABLE_IN_ALL
174GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display);
175
176GDK_AVAILABLE_IN_3_20
177GdkSeat * gdk_display_get_default_seat (GdkDisplay *display);
178
179GDK_AVAILABLE_IN_3_20
180GList * gdk_display_list_seats (GdkDisplay *display);
181
182GDK_AVAILABLE_IN_3_22
183int gdk_display_get_n_monitors (GdkDisplay *display);
184GDK_AVAILABLE_IN_3_22
185GdkMonitor * gdk_display_get_monitor (GdkDisplay *display,
186 int monitor_num);
187GDK_AVAILABLE_IN_3_22
188GdkMonitor * gdk_display_get_primary_monitor (GdkDisplay *display);
189GDK_AVAILABLE_IN_3_22
190GdkMonitor * gdk_display_get_monitor_at_point (GdkDisplay *display,
191 int x,
192 int y);
193GDK_AVAILABLE_IN_3_22
194GdkMonitor * gdk_display_get_monitor_at_window (GdkDisplay *display,
195 GdkWindow *window);
196
197
198G_END_DECLS
199
200#endif /* __GDK_DISPLAY_H__ */
201

source code of include/gtk-3.0/gdk/gdkdisplay.h