1 | /* GDK - The GIMP Drawing Kit |
2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | /* |
19 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
20 | * file for a list of people on the GTK+ Team. See the ChangeLog |
21 | * files for a list of changes. These files are distributed with |
22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
23 | */ |
24 | |
25 | #ifndef __GDK_WINDOW_H__ |
26 | #define __GDK_WINDOW_H__ |
27 | |
28 | #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) |
29 | #error "Only <gdk/gdk.h> can be included directly." |
30 | #endif |
31 | |
32 | #include <gdk/gdkversionmacros.h> |
33 | #include <gdk/gdktypes.h> |
34 | #include <gdk/gdkdrawingcontext.h> |
35 | #include <gdk/gdkevents.h> |
36 | #include <gdk/gdkframeclock.h> |
37 | |
38 | G_BEGIN_DECLS |
39 | |
40 | typedef struct _GdkGeometry GdkGeometry; |
41 | typedef struct _GdkWindowAttr GdkWindowAttr; |
42 | typedef struct _GdkWindowRedirect GdkWindowRedirect; |
43 | |
44 | /** |
45 | * GdkWindowWindowClass: |
46 | * @GDK_INPUT_OUTPUT: window for graphics and events |
47 | * @GDK_INPUT_ONLY: window for events only |
48 | * |
49 | * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. |
50 | * Such windows receive events and are also displayed on screen. |
51 | * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other |
52 | * windows in order to trap or filter the events. You can’t draw on |
53 | * @GDK_INPUT_ONLY windows. |
54 | */ |
55 | typedef enum |
56 | { |
57 | GDK_INPUT_OUTPUT, /*< nick=input-output >*/ |
58 | GDK_INPUT_ONLY /*< nick=input-only >*/ |
59 | } GdkWindowWindowClass; |
60 | |
61 | /** |
62 | * GdkWindowType: |
63 | * @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire |
64 | * screen, and is created by the window system |
65 | * @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow) |
66 | * @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry) |
67 | * @GDK_WINDOW_TEMP: override redirect temporary window (used to implement |
68 | * #GtkMenu) |
69 | * @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new()) |
70 | * @GDK_WINDOW_OFFSCREEN: offscreen window (see |
71 | * [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18 |
72 | * @GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually |
73 | * tied to a toplevel, and is moved/stacked with it. Currently this window |
74 | * type is only implemented in Wayland. Since 3.14 |
75 | * |
76 | * Describes the kind of window. |
77 | */ |
78 | typedef enum |
79 | { |
80 | GDK_WINDOW_ROOT, |
81 | GDK_WINDOW_TOPLEVEL, |
82 | GDK_WINDOW_CHILD, |
83 | GDK_WINDOW_TEMP, |
84 | GDK_WINDOW_FOREIGN, |
85 | GDK_WINDOW_OFFSCREEN, |
86 | GDK_WINDOW_SUBSURFACE |
87 | } GdkWindowType; |
88 | |
89 | /** |
90 | * GdkWindowAttributesType: |
91 | * @GDK_WA_TITLE: Honor the title field |
92 | * @GDK_WA_X: Honor the X coordinate field |
93 | * @GDK_WA_Y: Honor the Y coordinate field |
94 | * @GDK_WA_CURSOR: Honor the cursor field |
95 | * @GDK_WA_VISUAL: Honor the visual field |
96 | * @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields |
97 | * @GDK_WA_NOREDIR: Honor the override_redirect field |
98 | * @GDK_WA_TYPE_HINT: Honor the type_hint field |
99 | * |
100 | * Used to indicate which fields in the #GdkWindowAttr struct should be honored. |
101 | * For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr, |
102 | * pass @GDK_WA_X | @GDK_WA_CURSOR” to gdk_window_new(). Fields in |
103 | * #GdkWindowAttr not covered by a bit in this enum are required; for example, |
104 | * the @width/@height, @wclass, and @window_type fields are required, they have |
105 | * no corresponding flag in #GdkWindowAttributesType. |
106 | */ |
107 | typedef enum |
108 | { |
109 | GDK_WA_TITLE = 1 << 1, |
110 | GDK_WA_X = 1 << 2, |
111 | GDK_WA_Y = 1 << 3, |
112 | GDK_WA_CURSOR = 1 << 4, |
113 | GDK_WA_VISUAL = 1 << 5, |
114 | GDK_WA_WMCLASS = 1 << 6, |
115 | GDK_WA_NOREDIR = 1 << 7, |
116 | GDK_WA_TYPE_HINT = 1 << 8 |
117 | } GdkWindowAttributesType; |
118 | |
119 | /* Size restriction enumeration. |
120 | */ |
121 | /** |
122 | * GdkWindowHints: |
123 | * @GDK_HINT_POS: indicates that the program has positioned the window |
124 | * @GDK_HINT_MIN_SIZE: min size fields are set |
125 | * @GDK_HINT_MAX_SIZE: max size fields are set |
126 | * @GDK_HINT_BASE_SIZE: base size fields are set |
127 | * @GDK_HINT_ASPECT: aspect ratio fields are set |
128 | * @GDK_HINT_RESIZE_INC: resize increment fields are set |
129 | * @GDK_HINT_WIN_GRAVITY: window gravity field is set |
130 | * @GDK_HINT_USER_POS: indicates that the window’s position was explicitly set |
131 | * by the user |
132 | * @GDK_HINT_USER_SIZE: indicates that the window’s size was explicitly set by |
133 | * the user |
134 | * |
135 | * Used to indicate which fields of a #GdkGeometry struct should be paid |
136 | * attention to. Also, the presence/absence of @GDK_HINT_POS, |
137 | * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't |
138 | * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set |
139 | * automatically by #GtkWindow if you call gtk_window_move(). |
140 | * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user |
141 | * specified a size/position using a --geometry command-line argument; |
142 | * gtk_window_parse_geometry() automatically sets these flags. |
143 | */ |
144 | typedef enum |
145 | { |
146 | GDK_HINT_POS = 1 << 0, |
147 | GDK_HINT_MIN_SIZE = 1 << 1, |
148 | GDK_HINT_MAX_SIZE = 1 << 2, |
149 | GDK_HINT_BASE_SIZE = 1 << 3, |
150 | GDK_HINT_ASPECT = 1 << 4, |
151 | GDK_HINT_RESIZE_INC = 1 << 5, |
152 | GDK_HINT_WIN_GRAVITY = 1 << 6, |
153 | GDK_HINT_USER_POS = 1 << 7, |
154 | GDK_HINT_USER_SIZE = 1 << 8 |
155 | } GdkWindowHints; |
156 | |
157 | /* The next two enumeration values current match the |
158 | * Motif constants. If this is changed, the implementation |
159 | * of gdk_window_set_decorations/gdk_window_set_functions |
160 | * will need to change as well. |
161 | */ |
162 | /** |
163 | * GdkWMDecoration: |
164 | * @GDK_DECOR_ALL: all decorations should be applied. |
165 | * @GDK_DECOR_BORDER: a frame should be drawn around the window. |
166 | * @GDK_DECOR_RESIZEH: the frame should have resize handles. |
167 | * @GDK_DECOR_TITLE: a titlebar should be placed above the window. |
168 | * @GDK_DECOR_MENU: a button for opening a menu should be included. |
169 | * @GDK_DECOR_MINIMIZE: a minimize button should be included. |
170 | * @GDK_DECOR_MAXIMIZE: a maximize button should be included. |
171 | * |
172 | * These are hints originally defined by the Motif toolkit. |
173 | * The window manager can use them when determining how to decorate |
174 | * the window. The hint must be set before mapping the window. |
175 | */ |
176 | typedef enum |
177 | { |
178 | GDK_DECOR_ALL = 1 << 0, |
179 | GDK_DECOR_BORDER = 1 << 1, |
180 | GDK_DECOR_RESIZEH = 1 << 2, |
181 | GDK_DECOR_TITLE = 1 << 3, |
182 | = 1 << 4, |
183 | GDK_DECOR_MINIMIZE = 1 << 5, |
184 | GDK_DECOR_MAXIMIZE = 1 << 6 |
185 | } GdkWMDecoration; |
186 | |
187 | /** |
188 | * GdkWMFunction: |
189 | * @GDK_FUNC_ALL: all functions should be offered. |
190 | * @GDK_FUNC_RESIZE: the window should be resizable. |
191 | * @GDK_FUNC_MOVE: the window should be movable. |
192 | * @GDK_FUNC_MINIMIZE: the window should be minimizable. |
193 | * @GDK_FUNC_MAXIMIZE: the window should be maximizable. |
194 | * @GDK_FUNC_CLOSE: the window should be closable. |
195 | * |
196 | * These are hints originally defined by the Motif toolkit. The window manager |
197 | * can use them when determining the functions to offer for the window. The |
198 | * hint must be set before mapping the window. |
199 | */ |
200 | typedef enum |
201 | { |
202 | GDK_FUNC_ALL = 1 << 0, |
203 | GDK_FUNC_RESIZE = 1 << 1, |
204 | GDK_FUNC_MOVE = 1 << 2, |
205 | GDK_FUNC_MINIMIZE = 1 << 3, |
206 | GDK_FUNC_MAXIMIZE = 1 << 4, |
207 | GDK_FUNC_CLOSE = 1 << 5 |
208 | } GdkWMFunction; |
209 | |
210 | /* Currently, these are the same values numerically as in the |
211 | * X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints() |
212 | * will need fixing. |
213 | */ |
214 | /** |
215 | * GdkGravity: |
216 | * @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner. |
217 | * @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge. |
218 | * @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner. |
219 | * @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge. |
220 | * @GDK_GRAVITY_CENTER: the reference point is at the center of the window. |
221 | * @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge. |
222 | * @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner. |
223 | * @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge. |
224 | * @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner. |
225 | * @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the |
226 | * window itself, ignoring window manager decorations. |
227 | * |
228 | * Defines the reference point of a window and the meaning of coordinates |
229 | * passed to gtk_window_move(). See gtk_window_move() and the "implementation |
230 | * notes" section of the |
231 | * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) |
232 | * specification for more details. |
233 | */ |
234 | typedef enum |
235 | { |
236 | GDK_GRAVITY_NORTH_WEST = 1, |
237 | GDK_GRAVITY_NORTH, |
238 | GDK_GRAVITY_NORTH_EAST, |
239 | GDK_GRAVITY_WEST, |
240 | GDK_GRAVITY_CENTER, |
241 | GDK_GRAVITY_EAST, |
242 | GDK_GRAVITY_SOUTH_WEST, |
243 | GDK_GRAVITY_SOUTH, |
244 | GDK_GRAVITY_SOUTH_EAST, |
245 | GDK_GRAVITY_STATIC |
246 | } GdkGravity; |
247 | |
248 | |
249 | /** |
250 | * GdkWindowEdge: |
251 | * @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner. |
252 | * @GDK_WINDOW_EDGE_NORTH: the top edge. |
253 | * @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner. |
254 | * @GDK_WINDOW_EDGE_WEST: the left edge. |
255 | * @GDK_WINDOW_EDGE_EAST: the right edge. |
256 | * @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner. |
257 | * @GDK_WINDOW_EDGE_SOUTH: the lower edge. |
258 | * @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner. |
259 | * |
260 | * Determines a window edge or corner. |
261 | */ |
262 | typedef enum |
263 | { |
264 | GDK_WINDOW_EDGE_NORTH_WEST, |
265 | GDK_WINDOW_EDGE_NORTH, |
266 | GDK_WINDOW_EDGE_NORTH_EAST, |
267 | GDK_WINDOW_EDGE_WEST, |
268 | GDK_WINDOW_EDGE_EAST, |
269 | GDK_WINDOW_EDGE_SOUTH_WEST, |
270 | GDK_WINDOW_EDGE_SOUTH, |
271 | GDK_WINDOW_EDGE_SOUTH_EAST |
272 | } GdkWindowEdge; |
273 | |
274 | /** |
275 | * GdkFullscreenMode: |
276 | * @GDK_FULLSCREEN_ON_CURRENT_MONITOR: Fullscreen on current monitor only. |
277 | * @GDK_FULLSCREEN_ON_ALL_MONITORS: Span across all monitors when fullscreen. |
278 | * |
279 | * Indicates which monitor (in a multi-head setup) a window should span over |
280 | * when in fullscreen mode. |
281 | * |
282 | * Since: 3.8 |
283 | **/ |
284 | typedef enum |
285 | { |
286 | GDK_FULLSCREEN_ON_CURRENT_MONITOR, |
287 | GDK_FULLSCREEN_ON_ALL_MONITORS |
288 | } GdkFullscreenMode; |
289 | |
290 | /** |
291 | * GdkWindowAttr: |
292 | * @title: title of the window (for toplevel windows) |
293 | * @event_mask: event mask (see gdk_window_set_events()) |
294 | * @x: X coordinate relative to parent window (see gdk_window_move()) |
295 | * @y: Y coordinate relative to parent window (see gdk_window_move()) |
296 | * @width: width of window |
297 | * @height: height of window |
298 | * @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible |
299 | * window that receives events) |
300 | * @visual: #GdkVisual for window |
301 | * @window_type: type of window |
302 | * @cursor: cursor for the window (see gdk_window_set_cursor()) |
303 | * @wmclass_name: don’t use (see gtk_window_set_wmclass()) |
304 | * @wmclass_class: don’t use (see gtk_window_set_wmclass()) |
305 | * @override_redirect: %TRUE to bypass the window manager |
306 | * @type_hint: a hint of the function of the window |
307 | * |
308 | * Attributes to use for a newly-created window. |
309 | */ |
310 | struct _GdkWindowAttr |
311 | { |
312 | gchar *title; |
313 | gint event_mask; |
314 | gint x, y; |
315 | gint width; |
316 | gint height; |
317 | GdkWindowWindowClass wclass; |
318 | GdkVisual *visual; |
319 | GdkWindowType window_type; |
320 | GdkCursor *cursor; |
321 | gchar *wmclass_name; |
322 | gchar *wmclass_class; |
323 | gboolean override_redirect; |
324 | GdkWindowTypeHint type_hint; |
325 | }; |
326 | |
327 | /** |
328 | * GdkGeometry: |
329 | * @min_width: minimum width of window (or -1 to use requisition, with |
330 | * #GtkWindow only) |
331 | * @min_height: minimum height of window (or -1 to use requisition, with |
332 | * #GtkWindow only) |
333 | * @max_width: maximum width of window (or -1 to use requisition, with |
334 | * #GtkWindow only) |
335 | * @max_height: maximum height of window (or -1 to use requisition, with |
336 | * #GtkWindow only) |
337 | * @base_width: allowed window widths are @base_width + @width_inc * N where N |
338 | * is any integer (-1 allowed with #GtkWindow) |
339 | * @base_height: allowed window widths are @base_height + @height_inc * N where |
340 | * N is any integer (-1 allowed with #GtkWindow) |
341 | * @width_inc: width resize increment |
342 | * @height_inc: height resize increment |
343 | * @min_aspect: minimum width/height ratio |
344 | * @max_aspect: maximum width/height ratio |
345 | * @win_gravity: window gravity, see gtk_window_set_gravity() |
346 | * |
347 | * The #GdkGeometry struct gives the window manager information about |
348 | * a window’s geometry constraints. Normally you would set these on |
349 | * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow |
350 | * then sets the hints on the #GdkWindow it creates. |
351 | * |
352 | * gdk_window_set_geometry_hints() expects the hints to be fully valid already |
353 | * and simply passes them to the window manager; in contrast, |
354 | * gtk_window_set_geometry_hints() performs some interpretation. For example, |
355 | * #GtkWindow will apply the hints to the geometry widget instead of the |
356 | * toplevel window, if you set a geometry widget. Also, the |
357 | * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and |
358 | * #GtkWindow will substitute the size request of the window or geometry widget. |
359 | * If the minimum size hint is not provided, #GtkWindow will use its requisition |
360 | * as the minimum size. If the minimum size is provided and a geometry widget is |
361 | * set, #GtkWindow will take the minimum size as the minimum size of the |
362 | * geometry widget rather than the entire window. The base size is treated |
363 | * similarly. |
364 | * |
365 | * The canonical use-case for gtk_window_set_geometry_hints() is to get a |
366 | * terminal widget to resize properly. Here, the terminal text area should be |
367 | * the geometry widget; #GtkWindow will then automatically set the base size to |
368 | * the size of other widgets in the terminal window, such as the menubar and |
369 | * scrollbar. Then, the @width_inc and @height_inc fields should be set to the |
370 | * size of one character in the terminal. Finally, the base size should be set |
371 | * to the size of one character. The net effect is that the minimum size of the |
372 | * terminal will have a 1x1 character terminal area, and only terminal sizes on |
373 | * the “character grid” will be allowed. |
374 | * |
375 | * Here’s an example of how the terminal example would be implemented, assuming |
376 | * a terminal area widget called “terminal” and a toplevel window “toplevel”: |
377 | * |
378 | * |[<!-- language="C" --> |
379 | * GdkGeometry hints; |
380 | * |
381 | * hints.base_width = terminal->char_width; |
382 | * hints.base_height = terminal->char_height; |
383 | * hints.min_width = terminal->char_width; |
384 | * hints.min_height = terminal->char_height; |
385 | * hints.width_inc = terminal->char_width; |
386 | * hints.height_inc = terminal->char_height; |
387 | * |
388 | * gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), |
389 | * GTK_WIDGET (terminal), |
390 | * &hints, |
391 | * GDK_HINT_RESIZE_INC | |
392 | * GDK_HINT_MIN_SIZE | |
393 | * GDK_HINT_BASE_SIZE); |
394 | * ]| |
395 | * |
396 | * The other useful fields are the @min_aspect and @max_aspect fields; these |
397 | * contain a width/height ratio as a floating point number. If a geometry widget |
398 | * is set, the aspect applies to the geometry widget rather than the entire |
399 | * window. The most common use of these hints is probably to set @min_aspect and |
400 | * @max_aspect to the same value, thus forcing the window to keep a constant |
401 | * aspect ratio. |
402 | */ |
403 | struct _GdkGeometry |
404 | { |
405 | gint min_width; |
406 | gint min_height; |
407 | gint max_width; |
408 | gint max_height; |
409 | gint base_width; |
410 | gint base_height; |
411 | gint width_inc; |
412 | gint height_inc; |
413 | gdouble min_aspect; |
414 | gdouble max_aspect; |
415 | GdkGravity win_gravity; |
416 | }; |
417 | |
418 | typedef struct _GdkWindowClass GdkWindowClass; |
419 | |
420 | #define GDK_TYPE_WINDOW (gdk_window_get_type ()) |
421 | #define GDK_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow)) |
422 | #define GDK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowClass)) |
423 | #define GDK_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW)) |
424 | #define GDK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW)) |
425 | #define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowClass)) |
426 | |
427 | |
428 | struct _GdkWindowClass |
429 | { |
430 | GObjectClass parent_class; |
431 | |
432 | GdkWindow * (* pick_embedded_child) (GdkWindow *window, |
433 | gdouble x, |
434 | gdouble y); |
435 | |
436 | /* the following 3 signals will only be emitted by offscreen windows */ |
437 | void (* to_embedder) (GdkWindow *window, |
438 | gdouble offscreen_x, |
439 | gdouble offscreen_y, |
440 | gdouble *embedder_x, |
441 | gdouble *embedder_y); |
442 | void (* from_embedder) (GdkWindow *window, |
443 | gdouble embedder_x, |
444 | gdouble embedder_y, |
445 | gdouble *offscreen_x, |
446 | gdouble *offscreen_y); |
447 | cairo_surface_t * (* create_surface) (GdkWindow *window, |
448 | gint width, |
449 | gint height); |
450 | |
451 | /* Padding for future expansion */ |
452 | void (*_gdk_reserved1) (void); |
453 | void (*_gdk_reserved2) (void); |
454 | void (*_gdk_reserved3) (void); |
455 | void (*_gdk_reserved4) (void); |
456 | void (*_gdk_reserved5) (void); |
457 | void (*_gdk_reserved6) (void); |
458 | void (*_gdk_reserved7) (void); |
459 | void (*_gdk_reserved8) (void); |
460 | }; |
461 | |
462 | /* Windows |
463 | */ |
464 | GDK_AVAILABLE_IN_ALL |
465 | GType gdk_window_get_type (void) G_GNUC_CONST; |
466 | GDK_AVAILABLE_IN_ALL |
467 | GdkWindow* gdk_window_new (GdkWindow *parent, |
468 | GdkWindowAttr *attributes, |
469 | gint attributes_mask); |
470 | GDK_AVAILABLE_IN_ALL |
471 | void gdk_window_destroy (GdkWindow *window); |
472 | GDK_AVAILABLE_IN_ALL |
473 | GdkWindowType gdk_window_get_window_type (GdkWindow *window); |
474 | GDK_AVAILABLE_IN_ALL |
475 | gboolean gdk_window_is_destroyed (GdkWindow *window); |
476 | |
477 | GDK_AVAILABLE_IN_ALL |
478 | GdkVisual * gdk_window_get_visual (GdkWindow *window); |
479 | GDK_AVAILABLE_IN_ALL |
480 | GdkScreen * gdk_window_get_screen (GdkWindow *window); |
481 | GDK_AVAILABLE_IN_ALL |
482 | GdkDisplay * gdk_window_get_display (GdkWindow *window); |
483 | #ifndef GDK_MULTIDEVICE_SAFE |
484 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position) |
485 | GdkWindow* gdk_window_at_pointer (gint *win_x, |
486 | gint *win_y); |
487 | #endif /* GDK_MULTIDEVICE_SAFE */ |
488 | GDK_AVAILABLE_IN_ALL |
489 | void gdk_window_show (GdkWindow *window); |
490 | GDK_AVAILABLE_IN_ALL |
491 | void gdk_window_hide (GdkWindow *window); |
492 | GDK_AVAILABLE_IN_ALL |
493 | void gdk_window_withdraw (GdkWindow *window); |
494 | GDK_AVAILABLE_IN_ALL |
495 | void gdk_window_show_unraised (GdkWindow *window); |
496 | GDK_AVAILABLE_IN_ALL |
497 | void gdk_window_move (GdkWindow *window, |
498 | gint x, |
499 | gint y); |
500 | GDK_AVAILABLE_IN_ALL |
501 | void gdk_window_resize (GdkWindow *window, |
502 | gint width, |
503 | gint height); |
504 | GDK_AVAILABLE_IN_ALL |
505 | void gdk_window_move_resize (GdkWindow *window, |
506 | gint x, |
507 | gint y, |
508 | gint width, |
509 | gint height); |
510 | GDK_AVAILABLE_IN_ALL |
511 | void gdk_window_reparent (GdkWindow *window, |
512 | GdkWindow *new_parent, |
513 | gint x, |
514 | gint y); |
515 | GDK_AVAILABLE_IN_ALL |
516 | void gdk_window_raise (GdkWindow *window); |
517 | GDK_AVAILABLE_IN_ALL |
518 | void gdk_window_lower (GdkWindow *window); |
519 | GDK_AVAILABLE_IN_ALL |
520 | void gdk_window_restack (GdkWindow *window, |
521 | GdkWindow *sibling, |
522 | gboolean above); |
523 | GDK_AVAILABLE_IN_ALL |
524 | void gdk_window_focus (GdkWindow *window, |
525 | guint32 timestamp); |
526 | GDK_AVAILABLE_IN_ALL |
527 | void gdk_window_set_user_data (GdkWindow *window, |
528 | gpointer user_data); |
529 | GDK_AVAILABLE_IN_ALL |
530 | void gdk_window_set_override_redirect (GdkWindow *window, |
531 | gboolean override_redirect); |
532 | GDK_AVAILABLE_IN_ALL |
533 | gboolean gdk_window_get_accept_focus (GdkWindow *window); |
534 | GDK_AVAILABLE_IN_ALL |
535 | void gdk_window_set_accept_focus (GdkWindow *window, |
536 | gboolean accept_focus); |
537 | GDK_AVAILABLE_IN_ALL |
538 | gboolean gdk_window_get_focus_on_map (GdkWindow *window); |
539 | GDK_AVAILABLE_IN_ALL |
540 | void gdk_window_set_focus_on_map (GdkWindow *window, |
541 | gboolean focus_on_map); |
542 | GDK_AVAILABLE_IN_ALL |
543 | void gdk_window_add_filter (GdkWindow *window, |
544 | GdkFilterFunc function, |
545 | gpointer data); |
546 | GDK_AVAILABLE_IN_ALL |
547 | void gdk_window_remove_filter (GdkWindow *window, |
548 | GdkFilterFunc function, |
549 | gpointer data); |
550 | GDK_AVAILABLE_IN_ALL |
551 | void gdk_window_scroll (GdkWindow *window, |
552 | gint dx, |
553 | gint dy); |
554 | GDK_AVAILABLE_IN_ALL |
555 | void gdk_window_move_region (GdkWindow *window, |
556 | const cairo_region_t *region, |
557 | gint dx, |
558 | gint dy); |
559 | GDK_AVAILABLE_IN_ALL |
560 | gboolean gdk_window_ensure_native (GdkWindow *window); |
561 | |
562 | /* |
563 | * This allows for making shaped (partially transparent) windows |
564 | * - cool feature, needed for Drag and Drag for example. |
565 | */ |
566 | GDK_AVAILABLE_IN_ALL |
567 | void gdk_window_shape_combine_region (GdkWindow *window, |
568 | const cairo_region_t *shape_region, |
569 | gint offset_x, |
570 | gint offset_y); |
571 | |
572 | /* |
573 | * This routine allows you to quickly take the shapes of all the child windows |
574 | * of a window and use their shapes as the shape mask for this window - useful |
575 | * for container windows that dont want to look like a big box |
576 | * |
577 | * - Raster |
578 | */ |
579 | GDK_AVAILABLE_IN_ALL |
580 | void gdk_window_set_child_shapes (GdkWindow *window); |
581 | |
582 | GDK_DEPRECATED_IN_3_16 |
583 | gboolean gdk_window_get_composited (GdkWindow *window); |
584 | GDK_DEPRECATED_IN_3_16 |
585 | void gdk_window_set_composited (GdkWindow *window, |
586 | gboolean composited); |
587 | |
588 | /* |
589 | * This routine allows you to merge (ie ADD) child shapes to your |
590 | * own window’s shape keeping its current shape and ADDING the child |
591 | * shapes to it. |
592 | * |
593 | * - Raster |
594 | */ |
595 | GDK_AVAILABLE_IN_ALL |
596 | void gdk_window_merge_child_shapes (GdkWindow *window); |
597 | |
598 | GDK_AVAILABLE_IN_ALL |
599 | void gdk_window_input_shape_combine_region (GdkWindow *window, |
600 | const cairo_region_t *shape_region, |
601 | gint offset_x, |
602 | gint offset_y); |
603 | GDK_AVAILABLE_IN_ALL |
604 | void gdk_window_set_child_input_shapes (GdkWindow *window); |
605 | GDK_AVAILABLE_IN_ALL |
606 | void gdk_window_merge_child_input_shapes (GdkWindow *window); |
607 | |
608 | |
609 | GDK_AVAILABLE_IN_3_18 |
610 | void gdk_window_set_pass_through (GdkWindow *window, |
611 | gboolean pass_through); |
612 | GDK_AVAILABLE_IN_3_18 |
613 | gboolean gdk_window_get_pass_through (GdkWindow *window); |
614 | |
615 | /* |
616 | * Check if a window has been shown, and whether all its |
617 | * parents up to a toplevel have been shown, respectively. |
618 | * Note that a window that is_viewable below is not necessarily |
619 | * viewable in the X sense. |
620 | */ |
621 | GDK_AVAILABLE_IN_ALL |
622 | gboolean gdk_window_is_visible (GdkWindow *window); |
623 | GDK_AVAILABLE_IN_ALL |
624 | gboolean gdk_window_is_viewable (GdkWindow *window); |
625 | GDK_AVAILABLE_IN_ALL |
626 | gboolean gdk_window_is_input_only (GdkWindow *window); |
627 | GDK_AVAILABLE_IN_ALL |
628 | gboolean gdk_window_is_shaped (GdkWindow *window); |
629 | |
630 | GDK_AVAILABLE_IN_ALL |
631 | GdkWindowState gdk_window_get_state (GdkWindow *window); |
632 | |
633 | /* Set static bit gravity on the parent, and static |
634 | * window gravity on all children. |
635 | */ |
636 | GDK_DEPRECATED_IN_3_16 |
637 | gboolean gdk_window_set_static_gravities (GdkWindow *window, |
638 | gboolean use_static); |
639 | |
640 | /* GdkWindow */ |
641 | |
642 | /** |
643 | * GdkWindowInvalidateHandlerFunc: |
644 | * @window: a #GdkWindow |
645 | * @region: a #cairo_region_t |
646 | * |
647 | * Whenever some area of the window is invalidated (directly in the |
648 | * window or in a child window) this gets called with @region in |
649 | * the coordinate space of @window. You can use @region to just |
650 | * keep track of the dirty region, or you can actually change |
651 | * @region in case you are doing display tricks like showing |
652 | * a child in multiple places. |
653 | * |
654 | * Since: 3.10 |
655 | */ |
656 | typedef void (*GdkWindowInvalidateHandlerFunc) (GdkWindow *window, |
657 | cairo_region_t *region); |
658 | GDK_AVAILABLE_IN_3_10 |
659 | void gdk_window_set_invalidate_handler (GdkWindow *window, |
660 | GdkWindowInvalidateHandlerFunc handler); |
661 | |
662 | GDK_AVAILABLE_IN_ALL |
663 | gboolean gdk_window_has_native (GdkWindow *window); |
664 | GDK_AVAILABLE_IN_ALL |
665 | void gdk_window_set_type_hint (GdkWindow *window, |
666 | GdkWindowTypeHint hint); |
667 | GDK_AVAILABLE_IN_ALL |
668 | GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window); |
669 | |
670 | GDK_AVAILABLE_IN_ALL |
671 | gboolean gdk_window_get_modal_hint (GdkWindow *window); |
672 | GDK_AVAILABLE_IN_ALL |
673 | void gdk_window_set_modal_hint (GdkWindow *window, |
674 | gboolean modal); |
675 | |
676 | GDK_AVAILABLE_IN_ALL |
677 | void gdk_window_set_skip_taskbar_hint (GdkWindow *window, |
678 | gboolean skips_taskbar); |
679 | GDK_AVAILABLE_IN_ALL |
680 | void (GdkWindow *window, |
681 | gboolean ); |
682 | GDK_AVAILABLE_IN_ALL |
683 | void gdk_window_set_urgency_hint (GdkWindow *window, |
684 | gboolean urgent); |
685 | |
686 | GDK_AVAILABLE_IN_ALL |
687 | void gdk_window_set_geometry_hints (GdkWindow *window, |
688 | const GdkGeometry *geometry, |
689 | GdkWindowHints geom_mask); |
690 | |
691 | GDK_AVAILABLE_IN_ALL |
692 | cairo_region_t *gdk_window_get_clip_region (GdkWindow *window); |
693 | GDK_AVAILABLE_IN_ALL |
694 | cairo_region_t *gdk_window_get_visible_region(GdkWindow *window); |
695 | |
696 | |
697 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame) |
698 | void gdk_window_begin_paint_rect (GdkWindow *window, |
699 | const GdkRectangle *rectangle); |
700 | GDK_AVAILABLE_IN_3_16 |
701 | void gdk_window_mark_paint_from_clip (GdkWindow *window, |
702 | cairo_t *cr); |
703 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame) |
704 | void gdk_window_begin_paint_region (GdkWindow *window, |
705 | const cairo_region_t *region); |
706 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_end_draw_frame) |
707 | void gdk_window_end_paint (GdkWindow *window); |
708 | |
709 | GDK_AVAILABLE_IN_3_22 |
710 | GdkDrawingContext *gdk_window_begin_draw_frame (GdkWindow *window, |
711 | const cairo_region_t *region); |
712 | GDK_AVAILABLE_IN_3_22 |
713 | void gdk_window_end_draw_frame (GdkWindow *window, |
714 | GdkDrawingContext *context); |
715 | |
716 | GDK_DEPRECATED_IN_3_14 |
717 | void gdk_window_flush (GdkWindow *window); |
718 | |
719 | GDK_AVAILABLE_IN_ALL |
720 | void gdk_window_set_title (GdkWindow *window, |
721 | const gchar *title); |
722 | GDK_AVAILABLE_IN_ALL |
723 | void gdk_window_set_role (GdkWindow *window, |
724 | const gchar *role); |
725 | GDK_AVAILABLE_IN_ALL |
726 | void gdk_window_set_startup_id (GdkWindow *window, |
727 | const gchar *startup_id); |
728 | GDK_AVAILABLE_IN_ALL |
729 | void gdk_window_set_transient_for (GdkWindow *window, |
730 | GdkWindow *parent); |
731 | GDK_DEPRECATED_IN_3_4_FOR(gdk_window_set_background_rgba) |
732 | void gdk_window_set_background (GdkWindow *window, |
733 | const GdkColor *color); |
734 | GDK_AVAILABLE_IN_ALL |
735 | void gdk_window_set_background_rgba (GdkWindow *window, |
736 | const GdkRGBA *rgba); |
737 | GDK_AVAILABLE_IN_ALL |
738 | void gdk_window_set_background_pattern (GdkWindow *window, |
739 | cairo_pattern_t *pattern); |
740 | GDK_AVAILABLE_IN_ALL |
741 | cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window); |
742 | |
743 | GDK_AVAILABLE_IN_ALL |
744 | void gdk_window_set_cursor (GdkWindow *window, |
745 | GdkCursor *cursor); |
746 | GDK_AVAILABLE_IN_ALL |
747 | GdkCursor *gdk_window_get_cursor (GdkWindow *window); |
748 | GDK_AVAILABLE_IN_ALL |
749 | void gdk_window_set_device_cursor (GdkWindow *window, |
750 | GdkDevice *device, |
751 | GdkCursor *cursor); |
752 | GDK_AVAILABLE_IN_ALL |
753 | GdkCursor *gdk_window_get_device_cursor (GdkWindow *window, |
754 | GdkDevice *device); |
755 | GDK_AVAILABLE_IN_ALL |
756 | void gdk_window_get_user_data (GdkWindow *window, |
757 | gpointer *data); |
758 | GDK_AVAILABLE_IN_ALL |
759 | void gdk_window_get_geometry (GdkWindow *window, |
760 | gint *x, |
761 | gint *y, |
762 | gint *width, |
763 | gint *height); |
764 | GDK_AVAILABLE_IN_ALL |
765 | int gdk_window_get_width (GdkWindow *window); |
766 | GDK_AVAILABLE_IN_ALL |
767 | int gdk_window_get_height (GdkWindow *window); |
768 | GDK_AVAILABLE_IN_ALL |
769 | void gdk_window_get_position (GdkWindow *window, |
770 | gint *x, |
771 | gint *y); |
772 | GDK_AVAILABLE_IN_ALL |
773 | gint gdk_window_get_origin (GdkWindow *window, |
774 | gint *x, |
775 | gint *y); |
776 | GDK_AVAILABLE_IN_ALL |
777 | void gdk_window_get_root_coords (GdkWindow *window, |
778 | gint x, |
779 | gint y, |
780 | gint *root_x, |
781 | gint *root_y); |
782 | GDK_AVAILABLE_IN_ALL |
783 | void gdk_window_coords_to_parent (GdkWindow *window, |
784 | gdouble x, |
785 | gdouble y, |
786 | gdouble *parent_x, |
787 | gdouble *parent_y); |
788 | GDK_AVAILABLE_IN_ALL |
789 | void gdk_window_coords_from_parent (GdkWindow *window, |
790 | gdouble parent_x, |
791 | gdouble parent_y, |
792 | gdouble *x, |
793 | gdouble *y); |
794 | |
795 | GDK_AVAILABLE_IN_ALL |
796 | void gdk_window_get_root_origin (GdkWindow *window, |
797 | gint *x, |
798 | gint *y); |
799 | GDK_AVAILABLE_IN_ALL |
800 | void gdk_window_get_frame_extents (GdkWindow *window, |
801 | GdkRectangle *rect); |
802 | |
803 | GDK_AVAILABLE_IN_3_10 |
804 | gint gdk_window_get_scale_factor (GdkWindow *window); |
805 | |
806 | #ifndef GDK_MULTIDEVICE_SAFE |
807 | GDK_DEPRECATED_IN_3_0_FOR(gdk_window_get_device_position) |
808 | GdkWindow * gdk_window_get_pointer (GdkWindow *window, |
809 | gint *x, |
810 | gint *y, |
811 | GdkModifierType *mask); |
812 | #endif /* GDK_MULTIDEVICE_SAFE */ |
813 | GDK_AVAILABLE_IN_ALL |
814 | GdkWindow * gdk_window_get_device_position (GdkWindow *window, |
815 | GdkDevice *device, |
816 | gint *x, |
817 | gint *y, |
818 | GdkModifierType *mask); |
819 | GDK_AVAILABLE_IN_3_10 |
820 | GdkWindow * gdk_window_get_device_position_double (GdkWindow *window, |
821 | GdkDevice *device, |
822 | gdouble *x, |
823 | gdouble *y, |
824 | GdkModifierType *mask); |
825 | GDK_AVAILABLE_IN_ALL |
826 | GdkWindow * gdk_window_get_parent (GdkWindow *window); |
827 | GDK_AVAILABLE_IN_ALL |
828 | GdkWindow * gdk_window_get_toplevel (GdkWindow *window); |
829 | |
830 | GDK_AVAILABLE_IN_ALL |
831 | GdkWindow * gdk_window_get_effective_parent (GdkWindow *window); |
832 | GDK_AVAILABLE_IN_ALL |
833 | GdkWindow * gdk_window_get_effective_toplevel (GdkWindow *window); |
834 | |
835 | GDK_AVAILABLE_IN_ALL |
836 | GList * gdk_window_get_children (GdkWindow *window); |
837 | GDK_AVAILABLE_IN_ALL |
838 | GList * gdk_window_peek_children (GdkWindow *window); |
839 | GDK_AVAILABLE_IN_3_10 |
840 | GList * gdk_window_get_children_with_user_data (GdkWindow *window, |
841 | gpointer user_data); |
842 | |
843 | GDK_AVAILABLE_IN_ALL |
844 | GdkEventMask gdk_window_get_events (GdkWindow *window); |
845 | GDK_AVAILABLE_IN_ALL |
846 | void gdk_window_set_events (GdkWindow *window, |
847 | GdkEventMask event_mask); |
848 | GDK_AVAILABLE_IN_ALL |
849 | void gdk_window_set_device_events (GdkWindow *window, |
850 | GdkDevice *device, |
851 | GdkEventMask event_mask); |
852 | GDK_AVAILABLE_IN_ALL |
853 | GdkEventMask gdk_window_get_device_events (GdkWindow *window, |
854 | GdkDevice *device); |
855 | |
856 | GDK_AVAILABLE_IN_ALL |
857 | void gdk_window_set_source_events (GdkWindow *window, |
858 | GdkInputSource source, |
859 | GdkEventMask event_mask); |
860 | GDK_AVAILABLE_IN_ALL |
861 | GdkEventMask gdk_window_get_source_events (GdkWindow *window, |
862 | GdkInputSource source); |
863 | |
864 | GDK_AVAILABLE_IN_ALL |
865 | void gdk_window_set_icon_list (GdkWindow *window, |
866 | GList *pixbufs); |
867 | GDK_AVAILABLE_IN_ALL |
868 | void gdk_window_set_icon_name (GdkWindow *window, |
869 | const gchar *name); |
870 | GDK_AVAILABLE_IN_ALL |
871 | void gdk_window_set_group (GdkWindow *window, |
872 | GdkWindow *leader); |
873 | GDK_AVAILABLE_IN_ALL |
874 | GdkWindow* gdk_window_get_group (GdkWindow *window); |
875 | GDK_AVAILABLE_IN_ALL |
876 | void gdk_window_set_decorations (GdkWindow *window, |
877 | GdkWMDecoration decorations); |
878 | GDK_AVAILABLE_IN_ALL |
879 | gboolean gdk_window_get_decorations (GdkWindow *window, |
880 | GdkWMDecoration *decorations); |
881 | GDK_AVAILABLE_IN_ALL |
882 | void gdk_window_set_functions (GdkWindow *window, |
883 | GdkWMFunction functions); |
884 | |
885 | GDK_AVAILABLE_IN_ALL |
886 | cairo_surface_t * |
887 | gdk_window_create_similar_surface (GdkWindow *window, |
888 | cairo_content_t content, |
889 | int width, |
890 | int height); |
891 | GDK_AVAILABLE_IN_3_10 |
892 | cairo_surface_t * |
893 | gdk_window_create_similar_image_surface (GdkWindow *window, |
894 | cairo_format_t format, |
895 | int width, |
896 | int height, |
897 | int scale); |
898 | |
899 | GDK_AVAILABLE_IN_ALL |
900 | void gdk_window_beep (GdkWindow *window); |
901 | GDK_AVAILABLE_IN_ALL |
902 | void gdk_window_iconify (GdkWindow *window); |
903 | GDK_AVAILABLE_IN_ALL |
904 | void gdk_window_deiconify (GdkWindow *window); |
905 | GDK_AVAILABLE_IN_ALL |
906 | void gdk_window_stick (GdkWindow *window); |
907 | GDK_AVAILABLE_IN_ALL |
908 | void gdk_window_unstick (GdkWindow *window); |
909 | GDK_AVAILABLE_IN_ALL |
910 | void gdk_window_maximize (GdkWindow *window); |
911 | GDK_AVAILABLE_IN_ALL |
912 | void gdk_window_unmaximize (GdkWindow *window); |
913 | GDK_AVAILABLE_IN_ALL |
914 | void gdk_window_fullscreen (GdkWindow *window); |
915 | GDK_AVAILABLE_IN_3_18 |
916 | void gdk_window_fullscreen_on_monitor (GdkWindow *window, |
917 | gint monitor); |
918 | GDK_AVAILABLE_IN_3_8 |
919 | void gdk_window_set_fullscreen_mode (GdkWindow *window, |
920 | GdkFullscreenMode mode); |
921 | GDK_AVAILABLE_IN_3_8 |
922 | GdkFullscreenMode |
923 | gdk_window_get_fullscreen_mode (GdkWindow *window); |
924 | GDK_AVAILABLE_IN_ALL |
925 | void gdk_window_unfullscreen (GdkWindow *window); |
926 | GDK_AVAILABLE_IN_ALL |
927 | void gdk_window_set_keep_above (GdkWindow *window, |
928 | gboolean setting); |
929 | GDK_AVAILABLE_IN_ALL |
930 | void gdk_window_set_keep_below (GdkWindow *window, |
931 | gboolean setting); |
932 | GDK_AVAILABLE_IN_ALL |
933 | void gdk_window_set_opacity (GdkWindow *window, |
934 | gdouble opacity); |
935 | GDK_AVAILABLE_IN_ALL |
936 | void gdk_window_register_dnd (GdkWindow *window); |
937 | |
938 | GDK_AVAILABLE_IN_ALL |
939 | GdkDragProtocol |
940 | gdk_window_get_drag_protocol(GdkWindow *window, |
941 | GdkWindow **target); |
942 | |
943 | GDK_AVAILABLE_IN_ALL |
944 | void gdk_window_begin_resize_drag (GdkWindow *window, |
945 | GdkWindowEdge edge, |
946 | gint button, |
947 | gint root_x, |
948 | gint root_y, |
949 | guint32 timestamp); |
950 | GDK_AVAILABLE_IN_3_4 |
951 | void gdk_window_begin_resize_drag_for_device (GdkWindow *window, |
952 | GdkWindowEdge edge, |
953 | GdkDevice *device, |
954 | gint button, |
955 | gint root_x, |
956 | gint root_y, |
957 | guint32 timestamp); |
958 | GDK_AVAILABLE_IN_ALL |
959 | void gdk_window_begin_move_drag (GdkWindow *window, |
960 | gint button, |
961 | gint root_x, |
962 | gint root_y, |
963 | guint32 timestamp); |
964 | GDK_AVAILABLE_IN_3_4 |
965 | void gdk_window_begin_move_drag_for_device (GdkWindow *window, |
966 | GdkDevice *device, |
967 | gint button, |
968 | gint root_x, |
969 | gint root_y, |
970 | guint32 timestamp); |
971 | |
972 | /* Interface for dirty-region queueing */ |
973 | GDK_AVAILABLE_IN_ALL |
974 | void gdk_window_invalidate_rect (GdkWindow *window, |
975 | const GdkRectangle *rect, |
976 | gboolean invalidate_children); |
977 | GDK_AVAILABLE_IN_ALL |
978 | void gdk_window_invalidate_region (GdkWindow *window, |
979 | const cairo_region_t *region, |
980 | gboolean invalidate_children); |
981 | |
982 | /** |
983 | * GdkWindowChildFunc: |
984 | * @window: a #GdkWindow |
985 | * @user_data: user data |
986 | * |
987 | * A function of this type is passed to gdk_window_invalidate_maybe_recurse(). |
988 | * It gets called for each child of the window to determine whether to |
989 | * recursively invalidate it or now. |
990 | * |
991 | * Returns: %TRUE to invalidate @window recursively |
992 | */ |
993 | typedef gboolean (*GdkWindowChildFunc) (GdkWindow *window, |
994 | gpointer user_data); |
995 | |
996 | GDK_AVAILABLE_IN_ALL |
997 | void gdk_window_invalidate_maybe_recurse (GdkWindow *window, |
998 | const cairo_region_t *region, |
999 | GdkWindowChildFunc child_func, |
1000 | gpointer user_data); |
1001 | GDK_AVAILABLE_IN_ALL |
1002 | cairo_region_t *gdk_window_get_update_area (GdkWindow *window); |
1003 | |
1004 | GDK_AVAILABLE_IN_ALL |
1005 | void gdk_window_freeze_updates (GdkWindow *window); |
1006 | GDK_AVAILABLE_IN_ALL |
1007 | void gdk_window_thaw_updates (GdkWindow *window); |
1008 | |
1009 | GDK_DEPRECATED_IN_3_16 |
1010 | void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window); |
1011 | GDK_DEPRECATED_IN_3_16 |
1012 | void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window); |
1013 | |
1014 | GDK_AVAILABLE_IN_ALL |
1015 | void gdk_window_process_all_updates (void); |
1016 | GDK_AVAILABLE_IN_ALL |
1017 | void gdk_window_process_updates (GdkWindow *window, |
1018 | gboolean update_children); |
1019 | |
1020 | /* Enable/disable flicker, so you can tell if your code is inefficient. */ |
1021 | GDK_AVAILABLE_IN_ALL |
1022 | void gdk_window_set_debug_updates (gboolean setting); |
1023 | |
1024 | GDK_AVAILABLE_IN_ALL |
1025 | void gdk_window_constrain_size (GdkGeometry *geometry, |
1026 | GdkWindowHints flags, |
1027 | gint width, |
1028 | gint height, |
1029 | gint *new_width, |
1030 | gint *new_height); |
1031 | |
1032 | GDK_DEPRECATED_IN_3_8 |
1033 | void gdk_window_enable_synchronized_configure (GdkWindow *window); |
1034 | GDK_DEPRECATED_IN_3_8 |
1035 | void gdk_window_configure_finished (GdkWindow *window); |
1036 | |
1037 | GDK_AVAILABLE_IN_ALL |
1038 | GdkWindow *gdk_get_default_root_window (void); |
1039 | |
1040 | /* Offscreen redirection */ |
1041 | GDK_AVAILABLE_IN_ALL |
1042 | cairo_surface_t * |
1043 | gdk_offscreen_window_get_surface (GdkWindow *window); |
1044 | GDK_AVAILABLE_IN_ALL |
1045 | void gdk_offscreen_window_set_embedder (GdkWindow *window, |
1046 | GdkWindow *embedder); |
1047 | GDK_AVAILABLE_IN_ALL |
1048 | GdkWindow *gdk_offscreen_window_get_embedder (GdkWindow *window); |
1049 | GDK_AVAILABLE_IN_ALL |
1050 | void gdk_window_geometry_changed (GdkWindow *window); |
1051 | |
1052 | /* Multidevice support */ |
1053 | GDK_AVAILABLE_IN_ALL |
1054 | void gdk_window_set_support_multidevice (GdkWindow *window, |
1055 | gboolean support_multidevice); |
1056 | GDK_AVAILABLE_IN_ALL |
1057 | gboolean gdk_window_get_support_multidevice (GdkWindow *window); |
1058 | |
1059 | /* Frame clock */ |
1060 | GDK_AVAILABLE_IN_3_8 |
1061 | GdkFrameClock* gdk_window_get_frame_clock (GdkWindow *window); |
1062 | |
1063 | GDK_AVAILABLE_IN_3_10 |
1064 | void gdk_window_set_opaque_region (GdkWindow *window, |
1065 | cairo_region_t *region); |
1066 | |
1067 | GDK_AVAILABLE_IN_3_12 |
1068 | void gdk_window_set_event_compression (GdkWindow *window, |
1069 | gboolean event_compression); |
1070 | GDK_AVAILABLE_IN_3_12 |
1071 | gboolean gdk_window_get_event_compression (GdkWindow *window); |
1072 | |
1073 | GDK_AVAILABLE_IN_3_12 |
1074 | void gdk_window_set_shadow_width (GdkWindow *window, |
1075 | gint left, |
1076 | gint right, |
1077 | gint top, |
1078 | gint bottom); |
1079 | GDK_AVAILABLE_IN_3_14 |
1080 | gboolean (GdkWindow *window, |
1081 | GdkEvent *event); |
1082 | |
1083 | GDK_AVAILABLE_IN_3_16 |
1084 | GdkGLContext * gdk_window_create_gl_context (GdkWindow *window, |
1085 | GError **error); |
1086 | |
1087 | G_END_DECLS |
1088 | |
1089 | #endif /* __GDK_WINDOW_H__ */ |
1090 | |