1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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.
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.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
31 #ifndef __GDK_WINDOW_H__
32 #define __GDK_WINDOW_H__
34 #include <gdk/gdkdrawable.h>
35 #include <gdk/gdktypes.h>
36 #include <gdk/gdkevents.h>
40 typedef struct _GdkGeometry GdkGeometry;
41 typedef struct _GdkWindowAttr GdkWindowAttr;
42 typedef struct _GdkPointerHooks GdkPointerHooks;
43 typedef struct _GdkWindowRedirect GdkWindowRedirect;
47 * @GDK_INPUT_OUTPUT: window for graphics and events
48 * @GDK_INPUT_ONLY: window for events only
50 * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect.
51 * Such windows receive events and are also displayed on screen.
52 * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other
53 * windows in order to trap or filter the events. You can't draw on
54 * @GDK_INPUT_ONLY windows.
64 * @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire
65 * screen, and is created by the window system
66 * @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow)
67 * @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry)
68 * @GDK_WINDOW_TEMP: override redirect temporary window (used to implement
70 * @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
71 * @GDK_WINDOW_OFFSCREEN: offscreen window (see
72 * <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
74 * Describes the kind of window.
87 * GdkWindowAttributesType:
88 * @GDK_WA_TITLE: Honor the title field
89 * @GDK_WA_X: Honor the X coordinate field
90 * @GDK_WA_Y: Honor the Y coordinate field
91 * @GDK_WA_CURSOR: Honor the cursor field
92 * @GDK_WA_VISUAL: Honor the visual field
93 * @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields
94 * @GDK_WA_NOREDIR: Honor the override_redirect field
95 * @GDK_WA_TYPE_HINT: Honor the type_hint field
97 * Used to indicate which fields in the #GdkWindowAttr struct should be honored.
98 * For example, if you filled in the "cursor" and "x" fields of #GdkWindowAttr,
99 * pass "@GDK_WA_X | @GDK_WA_CURSOR" to gdk_window_new(). Fields in
100 * #GdkWindowAttr not covered by a bit in this enum are required; for example,
101 * the @width/@height, @wclass, and @window_type fields are required, they have
102 * no corresponding flag in #GdkWindowAttributesType.
106 GDK_WA_TITLE = 1 << 1,
109 GDK_WA_CURSOR = 1 << 4,
110 GDK_WA_VISUAL = 1 << 5,
111 GDK_WA_WMCLASS = 1 << 6,
112 GDK_WA_NOREDIR = 1 << 7,
113 GDK_WA_TYPE_HINT = 1 << 8
114 } GdkWindowAttributesType;
116 /* Size restriction enumeration.
120 * @GDK_HINT_POS: indicates that the program has positioned the window
121 * @GDK_HINT_MIN_SIZE: min size fields are set
122 * @GDK_HINT_MAX_SIZE: max size fields are set
123 * @GDK_HINT_BASE_SIZE: base size fields are set
124 * @GDK_HINT_ASPECT: aspect ratio fields are set
125 * @GDK_HINT_RESIZE_INC: resize increment fields are set
126 * @GDK_HINT_WIN_GRAVITY: window gravity field is set
127 * @GDK_HINT_USER_POS: indicates that the window's position was explicitly set
129 * @GDK_HINT_USER_SIZE: indicates that the window's size was explicitly set by
132 * Used to indicate which fields of a #GdkGeometry struct should be paid
133 * attention to. Also, the presence/absence of @GDK_HINT_POS,
134 * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't
135 * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set
136 * automatically by #GtkWindow if you call gtk_window_move().
137 * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user
138 * specified a size/position using a --geometry command-line argument;
139 * gtk_window_parse_geometry() automatically sets these flags.
143 GDK_HINT_POS = 1 << 0,
144 GDK_HINT_MIN_SIZE = 1 << 1,
145 GDK_HINT_MAX_SIZE = 1 << 2,
146 GDK_HINT_BASE_SIZE = 1 << 3,
147 GDK_HINT_ASPECT = 1 << 4,
148 GDK_HINT_RESIZE_INC = 1 << 5,
149 GDK_HINT_WIN_GRAVITY = 1 << 6,
150 GDK_HINT_USER_POS = 1 << 7,
151 GDK_HINT_USER_SIZE = 1 << 8
157 * @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
158 * @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
159 * @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
160 * this hint only for torn-off menus, see #GtkTearoffMenuItem.
161 * @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
162 * @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
163 * screen during application startup.
164 * @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
165 * toolbars or dialogs.
166 * @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
167 * @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
169 * @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
170 * @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
171 * e.g. a context menu.
172 * @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
173 * @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a "bubble"
174 * that belongs to a status icon.
175 * @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
176 * @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
178 * These are hints for the window manager that indicate what type of function
179 * the window has. The window manager can use this when determining decoration
180 * and behaviour of the window. The hint must be set before mapping the window.
183 * <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
184 * Window Manager Hints</ulink> specification for more details about
189 GDK_WINDOW_TYPE_HINT_NORMAL,
190 GDK_WINDOW_TYPE_HINT_DIALOG,
191 GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
192 GDK_WINDOW_TYPE_HINT_TOOLBAR,
193 GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
194 GDK_WINDOW_TYPE_HINT_UTILITY,
195 GDK_WINDOW_TYPE_HINT_DOCK,
196 GDK_WINDOW_TYPE_HINT_DESKTOP,
197 GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
198 GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
199 GDK_WINDOW_TYPE_HINT_TOOLTIP,
200 GDK_WINDOW_TYPE_HINT_NOTIFICATION,
201 GDK_WINDOW_TYPE_HINT_COMBO,
202 GDK_WINDOW_TYPE_HINT_DND
205 /* The next two enumeration values current match the
206 * Motif constants. If this is changed, the implementation
207 * of gdk_window_set_decorations/gdk_window_set_functions
208 * will need to change as well.
212 * @GDK_DECOR_ALL: all decorations should be applied.
213 * @GDK_DECOR_BORDER: a frame should be drawn around the window.
214 * @GDK_DECOR_RESIZEH: the frame should have resize handles.
215 * @GDK_DECOR_TITLE: a titlebar should be placed above the window.
216 * @GDK_DECOR_MENU: a button for opening a menu should be included.
217 * @GDK_DECOR_MINIMIZE: a minimize button should be included.
218 * @GDK_DECOR_MAXIMIZE: a maximize button should be included.
220 * These are hints originally defined by the Motif toolkit.
221 * The window manager can use them when determining how to decorate
222 * the window. The hint must be set before mapping the window.
226 GDK_DECOR_ALL = 1 << 0,
227 GDK_DECOR_BORDER = 1 << 1,
228 GDK_DECOR_RESIZEH = 1 << 2,
229 GDK_DECOR_TITLE = 1 << 3,
230 GDK_DECOR_MENU = 1 << 4,
231 GDK_DECOR_MINIMIZE = 1 << 5,
232 GDK_DECOR_MAXIMIZE = 1 << 6
237 * @GDK_FUNC_ALL: all functions should be offered.
238 * @GDK_FUNC_RESIZE: the window should be resizable.
239 * @GDK_FUNC_MOVE: the window should be movable.
240 * @GDK_FUNC_MINIMIZE: the window should be minimizable.
241 * @GDK_FUNC_MAXIMIZE: the window should be maximizable.
242 * @GDK_FUNC_CLOSE: the window should be closable.
244 * These are hints originally defined by the Motif toolkit. The window manager
245 * can use them when determining the functions to offer for the window. The
246 * hint must be set before mapping the window.
250 GDK_FUNC_ALL = 1 << 0,
251 GDK_FUNC_RESIZE = 1 << 1,
252 GDK_FUNC_MOVE = 1 << 2,
253 GDK_FUNC_MINIMIZE = 1 << 3,
254 GDK_FUNC_MAXIMIZE = 1 << 4,
255 GDK_FUNC_CLOSE = 1 << 5
258 /* Currently, these are the same values numerically as in the
259 * X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
264 * @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner.
265 * @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge.
266 * @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner.
267 * @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge.
268 * @GDK_GRAVITY_CENTER: the reference point is at the center of the window.
269 * @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge.
270 * @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner.
271 * @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge.
272 * @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner.
273 * @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the
274 * window itself, ignoring window manager decorations.
276 * Defines the reference point of a window and the meaning of coordinates
277 * passed to gtk_window_move(). See gtk_window_move() and the "implementation
278 * notes" section of the
279 * <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
280 * Window Manager Hints</ulink> specification for more details.
284 GDK_GRAVITY_NORTH_WEST = 1,
286 GDK_GRAVITY_NORTH_EAST,
290 GDK_GRAVITY_SOUTH_WEST,
292 GDK_GRAVITY_SOUTH_EAST,
299 * @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner.
300 * @GDK_WINDOW_EDGE_NORTH: the top edge.
301 * @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner.
302 * @GDK_WINDOW_EDGE_WEST: the left edge.
303 * @GDK_WINDOW_EDGE_EAST: the right edge.
304 * @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner.
305 * @GDK_WINDOW_EDGE_SOUTH: the lower edge.
306 * @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner.
308 * Determines a window edge or corner.
312 GDK_WINDOW_EDGE_NORTH_WEST,
313 GDK_WINDOW_EDGE_NORTH,
314 GDK_WINDOW_EDGE_NORTH_EAST,
315 GDK_WINDOW_EDGE_WEST,
316 GDK_WINDOW_EDGE_EAST,
317 GDK_WINDOW_EDGE_SOUTH_WEST,
318 GDK_WINDOW_EDGE_SOUTH,
319 GDK_WINDOW_EDGE_SOUTH_EAST
324 * @title: title of the window (for toplevel windows)
325 * @event_mask: event mask (see gdk_window_set_events())
326 * @x: X coordinate relative to parent window (see gdk_window_move())
327 * @y: Y coordinate relative to parent window (see gdk_window_move())
328 * @width: width of window
329 * @height: height of window
330 * @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible
331 * window that receives events)
332 * @visual: #GdkVisual for window
333 * @window_type: type of window
334 * @cursor: cursor for the window (see gdk_window_set_cursor())
335 * @wmclass_name: don't use (see gtk_window_set_wmclass())
336 * @wmclass_class: don't use (see gtk_window_set_wmclass())
337 * @override_redirect: %TRUE to bypass the window manager
338 * @type_hint: a hint of the function of the window
340 * Attributes to use for a newly-created window.
342 struct _GdkWindowAttr
349 GdkWindowClass wclass;
351 GdkWindowType window_type;
354 gchar *wmclass_class;
355 gboolean override_redirect;
356 GdkWindowTypeHint type_hint;
361 * @min_width: minimum width of window (or -1 to use requisition, with
363 * @min_height: minimum height of window (or -1 to use requisition, with
365 * @max_width: maximum width of window (or -1 to use requisition, with
367 * @max_height: maximum height of window (or -1 to use requisition, with
369 * @base_width: allowed window widths are @base_width + @width_inc * N where N
370 * is any integer (-1 allowed with #GtkWindow)
371 * @base_height: allowed window widths are @base_height + @height_inc * N where
372 * N is any integer (-1 allowed with #GtkWindow)
373 * @width_inc: width resize increment
374 * @height_inc: height resize increment
375 * @min_aspect: minimum width/height ratio
376 * @max_aspect: maximum width/height ratio
377 * @win_gravity: window gravity, see gtk_window_set_gravity()
379 * The #GdkGeometry struct gives the window manager information about
380 * a window's geometry constraints. Normally you would set these on
381 * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
382 * then sets the hints on the #GdkWindow it creates.
384 * gdk_window_set_geometry_hints() expects the hints to be fully valid already
385 * and simply passes them to the window manager; in contrast,
386 * gtk_window_set_geometry_hints() performs some interpretation. For example,
387 * #GtkWindow will apply the hints to the geometry widget instead of the
388 * toplevel window, if you set a geometry widget. Also, the
389 * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and
390 * #GtkWindow will substitute the size request of the window or geometry widget.
391 * If the minimum size hint is not provided, #GtkWindow will use its requisition
392 * as the minimum size. If the minimum size is provided and a geometry widget is
393 * set, #GtkWindow will take the minimum size as the minimum size of the
394 * geometry widget rather than the entire window. The base size is treated
397 * The canonical use-case for gtk_window_set_geometry_hints() is to get a
398 * terminal widget to resize properly. Here, the terminal text area should be
399 * the geometry widget; #GtkWindow will then automatically set the base size to
400 * the size of other widgets in the terminal window, such as the menubar and
401 * scrollbar. Then, the @width_inc and @height_inc fields should be set to the
402 * size of one character in the terminal. Finally, the base size should be set
403 * to the size of one character. The net effect is that the minimum size of the
404 * terminal will have a 1x1 character terminal area, and only terminal sizes on
405 * the "character grid" will be allowed.
407 * Here's an example of how the terminal example would be implemented, assuming
408 * a terminal area widget called "terminal" and a toplevel window "toplevel":
410 * <informalexample><programlisting><![CDATA[
413 * hints.base_width = terminal->char_width;
414 * hints.base_height = terminal->char_height;
415 * hints.min_width = terminal->char_width;
416 * hints.min_height = terminal->char_height;
417 * hints.width_inc = terminal->char_width;
418 * hints.height_inc = terminal->char_height;
420 * gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
421 * GTK_WIDGET (terminal),
423 * GDK_HINT_RESIZE_INC |
424 * GDK_HINT_MIN_SIZE |
425 * GDK_HINT_BASE_SIZE);
426 * ]]></programlisting></informalexample>
428 * The other useful fields are the @min_aspect and @max_aspect fields; these
429 * contain a width/height ratio as a floating point number. If a geometry widget
430 * is set, the aspect applies to the geometry widget rather than the entire
431 * window. The most common use of these hints is probably to set @min_aspect and
432 * @max_aspect to the same value, thus forcing the window to keep a constant
447 GdkGravity win_gravity;
452 * @get_pointer: Obtains the current pointer position and modifier state.
453 * The position is given in coordinates relative to the window containing
454 * the pointer, which is returned in @window.
455 * @window_at_pointer: Obtains the window underneath the mouse pointer,
456 * returning the location of that window in @win_x, @win_y. Returns %NULL
457 * if the window under the mouse pointer is not known to GDK (for example,
458 * belongs to another application).
460 * A table of pointers to functions for getting quantities related to
461 * the current pointer position. GDK has one global table of this type,
462 * which can be set using gdk_set_pointer_hooks().
464 * This is only useful for such low-level tools as an event recorder.
465 * Applications should never have any reason to use this facility
467 struct _GdkPointerHooks
469 GdkWindow* (*get_pointer) (GdkWindow *window,
472 GdkModifierType *mask);
473 GdkWindow* (*window_at_pointer) (GdkScreen *screen, /* unused */
478 typedef struct _GdkWindowObject GdkWindowObject;
479 typedef struct _GdkWindowObjectClass GdkWindowObjectClass;
481 #define GDK_TYPE_WINDOW (gdk_window_object_get_type ())
482 #define GDK_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow))
483 #define GDK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowObjectClass))
484 #define GDK_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW))
485 #define GDK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
486 #define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass))
489 struct _GdkWindowObjectClass
491 GdkDrawableClass parent_class;
496 GType gdk_window_object_get_type (void) G_GNUC_CONST;
497 GdkWindow* gdk_window_new (GdkWindow *parent,
498 GdkWindowAttr *attributes,
499 gint attributes_mask);
500 void gdk_window_destroy (GdkWindow *window);
501 GdkWindowType gdk_window_get_window_type (GdkWindow *window);
502 gboolean gdk_window_is_destroyed (GdkWindow *window);
504 GdkVisual * gdk_window_get_visual (GdkWindow *window);
505 GdkScreen * gdk_window_get_screen (GdkWindow *window);
506 GdkDisplay * gdk_window_get_display (GdkWindow *window);
507 #ifndef GDK_MULTIDEVICE_SAFE
508 GdkWindow* gdk_window_at_pointer (gint *win_x,
510 #endif /* GDK_MULTIDEVICE_SAFE */
511 void gdk_window_show (GdkWindow *window);
512 void gdk_window_hide (GdkWindow *window);
513 void gdk_window_withdraw (GdkWindow *window);
514 void gdk_window_show_unraised (GdkWindow *window);
515 void gdk_window_move (GdkWindow *window,
518 void gdk_window_resize (GdkWindow *window,
521 void gdk_window_move_resize (GdkWindow *window,
526 void gdk_window_reparent (GdkWindow *window,
527 GdkWindow *new_parent,
530 void gdk_window_raise (GdkWindow *window);
531 void gdk_window_lower (GdkWindow *window);
532 void gdk_window_restack (GdkWindow *window,
535 void gdk_window_focus (GdkWindow *window,
537 void gdk_window_set_user_data (GdkWindow *window,
539 void gdk_window_set_override_redirect (GdkWindow *window,
540 gboolean override_redirect);
541 gboolean gdk_window_get_accept_focus (GdkWindow *window);
542 void gdk_window_set_accept_focus (GdkWindow *window,
543 gboolean accept_focus);
544 gboolean gdk_window_get_focus_on_map (GdkWindow *window);
545 void gdk_window_set_focus_on_map (GdkWindow *window,
546 gboolean focus_on_map);
547 void gdk_window_add_filter (GdkWindow *window,
548 GdkFilterFunc function,
550 void gdk_window_remove_filter (GdkWindow *window,
551 GdkFilterFunc function,
553 void gdk_window_scroll (GdkWindow *window,
556 void gdk_window_move_region (GdkWindow *window,
557 const cairo_region_t *region,
560 gboolean gdk_window_ensure_native (GdkWindow *window);
563 * This allows for making shaped (partially transparent) windows
564 * - cool feature, needed for Drag and Drag for example.
566 void gdk_window_shape_combine_region (GdkWindow *window,
567 const cairo_region_t *shape_region,
572 * This routine allows you to quickly take the shapes of all the child windows
573 * of a window and use their shapes as the shape mask for this window - useful
574 * for container windows that dont want to look like a big box
578 void gdk_window_set_child_shapes (GdkWindow *window);
580 gboolean gdk_window_get_composited (GdkWindow *window);
581 void gdk_window_set_composited (GdkWindow *window,
582 gboolean composited);
585 * This routine allows you to merge (ie ADD) child shapes to your
586 * own window's shape keeping its current shape and ADDING the child
591 void gdk_window_merge_child_shapes (GdkWindow *window);
593 void gdk_window_input_shape_combine_region (GdkWindow *window,
594 const cairo_region_t *shape_region,
597 void gdk_window_set_child_input_shapes (GdkWindow *window);
598 void gdk_window_merge_child_input_shapes (GdkWindow *window);
602 * Check if a window has been shown, and whether all its
603 * parents up to a toplevel have been shown, respectively.
604 * Note that a window that is_viewable below is not necessarily
605 * viewable in the X sense.
607 gboolean gdk_window_is_visible (GdkWindow *window);
608 gboolean gdk_window_is_viewable (GdkWindow *window);
609 gboolean gdk_window_is_input_only (GdkWindow *window);
610 gboolean gdk_window_is_shaped (GdkWindow *window);
612 GdkWindowState gdk_window_get_state (GdkWindow *window);
614 /* Set static bit gravity on the parent, and static
615 * window gravity on all children.
617 gboolean gdk_window_set_static_gravities (GdkWindow *window,
618 gboolean use_static);
620 /* Functions to create/lookup windows from their native equivalents */
621 #ifndef GDK_MULTIHEAD_SAFE
622 GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid);
623 GdkWindow* gdk_window_lookup (GdkNativeWindow anid);
625 GdkWindow *gdk_window_foreign_new_for_display (GdkDisplay *display,
626 GdkNativeWindow anid);
627 GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display,
628 GdkNativeWindow anid);
633 gboolean gdk_window_has_native (GdkWindow *window);
634 void gdk_window_set_type_hint (GdkWindow *window,
635 GdkWindowTypeHint hint);
636 GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
638 gboolean gdk_window_get_modal_hint (GdkWindow *window);
639 void gdk_window_set_modal_hint (GdkWindow *window,
642 void gdk_window_set_skip_taskbar_hint (GdkWindow *window,
643 gboolean skips_taskbar);
644 void gdk_window_set_skip_pager_hint (GdkWindow *window,
645 gboolean skips_pager);
646 void gdk_window_set_urgency_hint (GdkWindow *window,
649 void gdk_window_set_geometry_hints (GdkWindow *window,
650 const GdkGeometry *geometry,
651 GdkWindowHints geom_mask);
652 void gdk_set_sm_client_id (const gchar *sm_client_id);
654 void gdk_window_begin_paint_rect (GdkWindow *window,
655 const GdkRectangle *rectangle);
656 void gdk_window_begin_paint_region (GdkWindow *window,
657 const cairo_region_t *region);
658 void gdk_window_end_paint (GdkWindow *window);
659 void gdk_window_flush (GdkWindow *window);
661 void gdk_window_set_title (GdkWindow *window,
663 void gdk_window_set_role (GdkWindow *window,
665 void gdk_window_set_startup_id (GdkWindow *window,
666 const gchar *startup_id);
667 void gdk_window_set_transient_for (GdkWindow *window,
669 void gdk_window_set_background (GdkWindow *window,
670 const GdkColor *color);
671 void gdk_window_set_background_pattern (GdkWindow *window,
672 cairo_pattern_t *pattern);
673 cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
675 void gdk_window_set_cursor (GdkWindow *window,
677 GdkCursor *gdk_window_get_cursor (GdkWindow *window);
678 void gdk_window_set_device_cursor (GdkWindow *window,
681 GdkCursor *gdk_window_get_device_cursor (GdkWindow *window,
683 void gdk_window_get_user_data (GdkWindow *window,
685 void gdk_window_get_geometry (GdkWindow *window,
691 int gdk_window_get_width (GdkWindow *window);
692 int gdk_window_get_height (GdkWindow *window);
693 void gdk_window_get_position (GdkWindow *window,
696 gint gdk_window_get_origin (GdkWindow *window,
699 void gdk_window_get_root_coords (GdkWindow *window,
704 void gdk_window_coords_to_parent (GdkWindow *window,
709 void gdk_window_coords_from_parent (GdkWindow *window,
715 void gdk_window_get_root_origin (GdkWindow *window,
718 void gdk_window_get_frame_extents (GdkWindow *window,
721 #ifndef GDK_MULTIDEVICE_SAFE
722 GdkWindow* gdk_window_get_pointer (GdkWindow *window,
725 GdkModifierType *mask);
726 #endif /* GDK_MULTIDEVICE_SAFE */
727 GdkWindow * gdk_window_get_device_position (GdkWindow *window,
731 GdkModifierType *mask);
732 GdkWindow * gdk_window_get_parent (GdkWindow *window);
733 GdkWindow * gdk_window_get_toplevel (GdkWindow *window);
735 GdkWindow * gdk_window_get_effective_parent (GdkWindow *window);
736 GdkWindow * gdk_window_get_effective_toplevel (GdkWindow *window);
738 GList * gdk_window_get_children (GdkWindow *window);
739 GList * gdk_window_peek_children (GdkWindow *window);
740 GdkEventMask gdk_window_get_events (GdkWindow *window);
741 void gdk_window_set_events (GdkWindow *window,
742 GdkEventMask event_mask);
743 void gdk_window_set_device_events (GdkWindow *window,
745 GdkEventMask event_mask);
746 GdkEventMask gdk_window_get_device_events (GdkWindow *window,
749 void gdk_window_set_icon_list (GdkWindow *window,
751 void gdk_window_set_icon_name (GdkWindow *window,
753 void gdk_window_set_group (GdkWindow *window,
755 GdkWindow* gdk_window_get_group (GdkWindow *window);
756 void gdk_window_set_decorations (GdkWindow *window,
757 GdkWMDecoration decorations);
758 gboolean gdk_window_get_decorations (GdkWindow *window,
759 GdkWMDecoration *decorations);
760 void gdk_window_set_functions (GdkWindow *window,
761 GdkWMFunction functions);
764 gdk_window_create_similar_surface (GdkWindow *window,
765 cairo_content_t content,
769 void gdk_window_beep (GdkWindow *window);
770 void gdk_window_iconify (GdkWindow *window);
771 void gdk_window_deiconify (GdkWindow *window);
772 void gdk_window_stick (GdkWindow *window);
773 void gdk_window_unstick (GdkWindow *window);
774 void gdk_window_maximize (GdkWindow *window);
775 void gdk_window_unmaximize (GdkWindow *window);
776 void gdk_window_fullscreen (GdkWindow *window);
777 void gdk_window_unfullscreen (GdkWindow *window);
778 void gdk_window_set_keep_above (GdkWindow *window,
780 void gdk_window_set_keep_below (GdkWindow *window,
782 void gdk_window_set_opacity (GdkWindow *window,
784 void gdk_window_register_dnd (GdkWindow *window);
786 void gdk_window_begin_resize_drag (GdkWindow *window,
792 void gdk_window_begin_move_drag (GdkWindow *window,
798 /* Interface for dirty-region queueing */
799 void gdk_window_invalidate_rect (GdkWindow *window,
800 const GdkRectangle *rect,
801 gboolean invalidate_children);
802 void gdk_window_invalidate_region (GdkWindow *window,
803 const cairo_region_t *region,
804 gboolean invalidate_children);
807 * GdkWindowChildFunc:
808 * @window: a #GdkWindow
809 * @user_data: user data
811 * A function of this type is passed to gdk_window_invalidate_maybe_recurse().
812 * It gets called for each child of the window to determine whether to
813 * recursively invalidate it or now.
815 * Returns: %TRUE to invalidate @window recursively
817 typedef gboolean (*GdkWindowChildFunc) (GdkWindow *window,
820 void gdk_window_invalidate_maybe_recurse (GdkWindow *window,
821 const cairo_region_t *region,
822 GdkWindowChildFunc child_func,
824 cairo_region_t *gdk_window_get_update_area (GdkWindow *window);
826 void gdk_window_freeze_updates (GdkWindow *window);
827 void gdk_window_thaw_updates (GdkWindow *window);
829 void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
830 void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window);
832 void gdk_window_process_all_updates (void);
833 void gdk_window_process_updates (GdkWindow *window,
834 gboolean update_children);
836 /* Enable/disable flicker, so you can tell if your code is inefficient. */
837 void gdk_window_set_debug_updates (gboolean setting);
839 void gdk_window_constrain_size (GdkGeometry *geometry,
846 void gdk_window_enable_synchronized_configure (GdkWindow *window);
847 void gdk_window_configure_finished (GdkWindow *window);
849 #if !defined (GDK_MULTIHEAD_SAFE) && !defined (GDK_MULTIDEVICE_SAFE)
850 GdkPointerHooks *gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
851 #endif /* !GDK_MULTIHEAD_SAFE && !GDK_MULTIDEVICE_SAFE */
853 GdkWindow *gdk_get_default_root_window (void);
855 /* Offscreen redirection */
857 gdk_offscreen_window_get_surface (GdkWindow *window);
858 void gdk_offscreen_window_set_embedder (GdkWindow *window,
859 GdkWindow *embedder);
860 GdkWindow *gdk_offscreen_window_get_embedder (GdkWindow *window);
861 void gdk_window_geometry_changed (GdkWindow *window);
863 /* Multidevice support */
864 void gdk_window_set_support_multidevice (GdkWindow *window,
865 gboolean support_multidevice);
866 gboolean gdk_window_get_support_multidevice (GdkWindow *window);
870 #endif /* __GDK_WINDOW_H__ */