1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Onscreen display areas in the target window system
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GdkWindow is a rectangular region on the screen. It's a low-level object,
10 used to implement high-level objects such as #GtkWidget and #GtkWindow on the
11 GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
12 as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
13 For example, each #GtkButton has a #GdkWindow associated with it.
15 <refsect2 id="COMPOSITED-WINDOWS"><title>Composited Windows</title>
17 Normally, the windowing system takes care of rendering the contents of a child
18 window onto its parent window. This mechanism can be intercepted by calling
19 gdk_window_set_composited() on the child window. For a
20 <firstterm>composited</firstterm> window it is the responsibility of the
21 application to render the window contents at the right spot.
23 <example id="composited-window-example"><title>Composited windows</title>
24 <programlisting><![CDATA[
27 /* The expose event handler for the event box.
29 * This function simply draws a transparency onto a widget on the area
30 * for which it receives expose events. This is intended to give the
31 * event box a "transparent" background.
33 * In order for this to work properly, the widget must have an RGBA
34 * colourmap. The widget should also be set as app-paintable since it
35 * doesn't make sense for GTK+ to draw a background if we are drawing it
36 * (and because GTK+ might actually replace our transparency with its
37 * default background colour).
40 transparent_expose (GtkWidget *widget,
41 GdkEventExpose *event)
45 cr = gdk_cairo_create (widget->window);
46 cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
47 gdk_cairo_region (cr, event->region);
54 /* The expose event handler for the window.
56 * This function performs the actual compositing of the event box onto
57 * the already-existing background of the window at 50% normal opacity.
59 * In this case we do not want app-paintable to be set on the widget
60 * since we want it to draw its own (red) background. Because of this,
61 * however, we must ensure that we use g_signal_connect_after so that
62 * this handler is called after the red has been drawn. If it was
63 * called before then GTK would just blindly paint over our work.
65 * Note: if the child window has children, then you need a cairo 1.6
66 * feature to make this work correctly.
69 window_expose_event (GtkWidget *widget,
70 GdkEventExpose *event)
76 /* get our child (in this case, the event box) */
77 child = gtk_bin_get_child (GTK_BIN (widget));
79 /* create a cairo context to draw to the window */
80 cr = gdk_cairo_create (widget->window);
82 /* the source data is the (composited) event box */
83 gdk_cairo_set_source_pixmap (cr, child->window,
87 /* draw no more than our expose event intersects our child */
88 region = gdk_region_rectangle (&child->allocation);
89 gdk_region_intersect (region, event->region);
90 gdk_cairo_region (cr, region);
93 /* composite, with a 50% opacity */
94 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
95 cairo_paint_with_alpha (cr, 0.5);
104 main (int argc, char **argv)
106 GtkWidget *window, *event, *button;
111 gtk_init (&argc, &argv);
113 /* Make the widgets */
114 button = gtk_button_new_with_label ("A Button");
115 event = gtk_event_box_new ();
116 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
118 /* Put a red background on the window */
119 gdk_color_parse ("red", &red);
120 gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &red);
122 /* Set the colourmap for the event box.
123 * Must be done before the event box is realised.
125 screen = gtk_widget_get_screen (event);
126 rgba = gdk_screen_get_rgba_colormap (screen);
127 gtk_widget_set_colormap (event, rgba);
129 /* Set our event box to have a fully-transparent background
130 * drawn on it. Currently there is no way to simply tell GTK+
131 * that "transparency" is the background colour for a widget.
133 gtk_widget_set_app_paintable (GTK_WIDGET (event), TRUE);
134 g_signal_connect (event, "expose-event",
135 G_CALLBACK (transparent_expose), NULL);
137 /* Put them inside one another */
138 gtk_container_set_border_width (GTK_CONTAINER (window), 10);
139 gtk_container_add (GTK_CONTAINER (window), event);
140 gtk_container_add (GTK_CONTAINER (event), button);
142 /* Realise and show everything */
143 gtk_widget_show_all (window);
145 /* Set the event box GdkWindow to be composited.
146 * Obviously must be performed after event box is realised.
148 gdk_window_set_composited (event->window, TRUE);
150 /* Set up the compositing handler.
151 * Note that we do _after_ so that the normal (red) background is drawn
152 * by gtk before our compositing occurs.
154 g_signal_connect_after (window, "expose-event",
155 G_CALLBACK (window_expose_event), NULL);
162 </programlisting></example>
164 In the example <xref linkend="composited-window-example"/>, a button is
165 placed inside of an event box inside of a window. The event box is
166 set as composited and therefore is no longer automatically drawn to
170 When the contents of the event box change, an expose event is
171 generated on its parent window (which, in this case, belongs to
172 the toplevel #GtkWindow). The expose handler for this widget is
173 responsible for merging the changes back on the screen in the way
177 In our case, we merge the contents with a 50% transparency. We
178 also set the background colour of the window to red. The effect is
179 that the background shows through the button.
182 <refsect2 id="OFFSCREEN-WINDOWS"><title>Offscreen Windows</title>
184 Offscreen windows are more general than composited windows, since they
185 allow not only to modify the rendering of the child window onto its parent,
186 but also to apply coordinate transformations.
189 To integrate an offscreen window into a window hierarchy, one has to call
190 gdk_offscreen_window_set_embedder() and handle a number of signals. The
191 #GdkWindow::pick-embedded-child signal on the embedder window is used to
192 select an offscreen child at given coordinates, and the #GdkWindow::to-embedder
193 and #GdkWindow::from-embedder signals on the offscreen window are used to
194 translate coordinates between the embedder and the offscreen window.
198 For rendering an offscreen window onto its embedder, the contents of the
199 offscreen window are available as a pixmap, via
200 gdk_offscreen_window_get_pixmap().
204 <!-- ##### SECTION See_Also ##### -->
209 <!-- ##### SECTION Stability_Level ##### -->
212 <!-- ##### SECTION Image ##### -->
215 <!-- ##### STRUCT GdkWindow ##### -->
217 An opaque structure representing an onscreen drawable.
218 Pointers to structures of type #GdkPixmap, #GdkBitmap,
219 and #GdkWindow, can often be used interchangeably.
220 The type #GdkDrawable refers generically to any of
225 <!-- ##### SIGNAL GdkWindow::from-embedder ##### -->
230 @gdkwindow: the object which received the signal.
236 <!-- ##### SIGNAL GdkWindow::pick-embedded-child ##### -->
241 @gdkwindow: the object which received the signal.
246 <!-- ##### SIGNAL GdkWindow::to-embedder ##### -->
251 @gdkwindow: the object which received the signal.
257 <!-- ##### ARG GdkWindow:cursor ##### -->
262 <!-- ##### ENUM GdkWindowType ##### -->
264 Describes the kind of window.
267 @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire screen, and is created by the window system
268 @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow)
269 @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry)
270 @GDK_WINDOW_DIALOG: useless/deprecated compatibility type
271 @GDK_WINDOW_TEMP: override redirect temporary window (used to implement #GtkMenu)
272 @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
273 @GDK_WINDOW_OFFSCREEN: offscreen window (see <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
275 <!-- ##### ENUM GdkWindowClass ##### -->
277 @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect.
278 @GDK_INPUT_ONLY windows are invisible; they are used to trap events, but
279 you can't draw on them.
282 @GDK_INPUT_OUTPUT: window for graphics and events
283 @GDK_INPUT_ONLY: window for events only
285 <!-- ##### ENUM GdkWindowHints ##### -->
287 Used to indicate which fields of a #GdkGeometry struct should be paid attention
288 to. Also, the presence/absence of @GDK_HINT_POS, @GDK_HINT_USER_POS, and
289 @GDK_HINT_USER_SIZE is significant, though they don't directly refer to
290 #GdkGeometry fields. @GDK_HINT_USER_POS will be set automatically by #GtkWindow
291 if you call gtk_window_move(). @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE
292 should be set if the user specified a size/position using a --geometry
293 command-line argument; gtk_window_parse_geometry() automatically sets these
297 @GDK_HINT_POS: indicates that the program has positioned the window
298 @GDK_HINT_MIN_SIZE: min size fields are set
299 @GDK_HINT_MAX_SIZE: max size fields are set
300 @GDK_HINT_BASE_SIZE: base size fields are set
301 @GDK_HINT_ASPECT: aspect ratio fields are set
302 @GDK_HINT_RESIZE_INC: resize increment fields are set
303 @GDK_HINT_WIN_GRAVITY: window gravity field is set
304 @GDK_HINT_USER_POS: indicates that the window's position was explicitly set by the user
305 @GDK_HINT_USER_SIZE: indicates that the window's size was explicitly set by the user
307 <!-- ##### STRUCT GdkGeometry ##### -->
309 The #GdkGeometry struct gives the window manager information about
310 a window's geometry constraints. Normally you would set these on
311 the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
312 then sets the hints on the #GdkWindow it creates.
316 gdk_window_set_geometry_hints() expects the hints to be fully valid already and
317 simply passes them to the window manager; in contrast,
318 gtk_window_set_geometry_hints() performs some interpretation. For example,
319 #GtkWindow will apply the hints to the geometry widget instead of the toplevel
320 window, if you set a geometry widget. Also, the
321 @min_width/@min_height/@max_width/@max_height fields may be set to -1, and
322 #GtkWindow will substitute the size request of the window or geometry widget. If
323 the minimum size hint is not provided, #GtkWindow will use its requisition as
324 the minimum size. If the minimum size is provided and a geometry widget is set,
325 #GtkWindow will take the minimum size as the minimum size of the geometry widget
326 rather than the entire window. The base size is treated similarly.
330 The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal
331 widget to resize properly. Here, the terminal text area should be the geometry
332 widget; #GtkWindow will then automatically set the base size to the size of
333 other widgets in the terminal window, such as the menubar and scrollbar. Then,
334 the @width_inc and @height_inc fields should be set to the size of one character
335 in the terminal. Finally, the base size should be set to the size of one
336 character. The net effect is that the minimum size of the terminal
337 will have a 1x1 character terminal area, and only terminal sizes on
338 the "character grid" will be allowed.
342 Here's an example of how the terminal example would be implemented, assuming
343 a terminal area widget called "terminal" and a toplevel window "toplevel":
344 <informalexample><programlisting>
347 hints.base_width = terminal->char_width;
348 hints.base_height = terminal->char_height;
349 hints.min_width = terminal->char_width;
350 hints.min_height = terminal->char_height;
351 hints.width_inc = terminal->char_width;
352 hints.height_inc = terminal->char_height;
354 gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
355 GTK_WIDGET (terminal),
357 GDK_HINT_RESIZE_INC |
360 </programlisting></informalexample>
364 The other useful fields are the @min_aspect and @max_aspect fields; these
365 contain a width/height ratio as a floating point number. If a geometry widget is
366 set, the aspect applies to the geometry widget rather than the entire window.
367 The most common use of these hints is probably to set @min_aspect and
368 @max_aspect to the same value, thus forcing the window to keep a constant aspect
372 @min_width: minimum width of window (or -1 to use requisition, with #GtkWindow only)
373 @min_height: minimum height of window (or -1 to use requisition, with #GtkWindow only)
374 @max_width: maximum width of window (or -1 to use requisition, with #GtkWindow only)
375 @max_height: maximum height of window (or -1 to use requisition, with #GtkWindow only)
376 @base_width: allowed window widths are @base_width + @width_inc * N where N is any integer (-1 allowed with #GtkWindow)
377 @base_height: allowed window widths are @base_height + @height_inc * N where N is any integer (-1 allowed with #GtkWindow)
378 @width_inc: width resize increment
379 @height_inc: height resize increment
380 @min_aspect: minimum width/height ratio
381 @max_aspect: maximum width/height ratio
382 @win_gravity: window gravity, see gtk_window_set_gravity()
384 <!-- ##### ENUM GdkGravity ##### -->
386 Defines the reference point of a window and the meaning of coordinates
387 passed to gtk_window_move(). See gtk_window_move() and the "implementation
388 notes" section of the
389 <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
390 Window Manager Hints</ulink> specification for more details.
393 @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner.
394 @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge.
395 @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner.
396 @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge.
397 @GDK_GRAVITY_CENTER: the reference point is at the center of the window.
398 @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge.
399 @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner.
400 @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge.
401 @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner.
402 @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the
403 window itself, ignoring window manager decorations.
405 <!-- ##### ENUM GdkWindowEdge ##### -->
407 Determines a window edge or corner.
410 @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner.
411 @GDK_WINDOW_EDGE_NORTH: the top edge.
412 @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner.
413 @GDK_WINDOW_EDGE_WEST: the left edge.
414 @GDK_WINDOW_EDGE_EAST: the right edge.
415 @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner.
416 @GDK_WINDOW_EDGE_SOUTH: the lower edge.
417 @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner.
419 <!-- ##### ENUM GdkWindowTypeHint ##### -->
421 These are hints for the window manager that indicate what type of function
422 the window has. The window manager can use this when determining decoration
423 and behaviour of the window. The hint must be set before mapping the window.
427 <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
428 Window Manager Hints</ulink> specification for more details about
432 @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
433 @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
434 @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
435 this hint only for torn-off menus, see #GtkTearoffMenuItem.
436 @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
437 @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
438 screen during application startup.
439 @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
441 @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
442 @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
444 @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
445 @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
447 @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
448 @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a "bubble"
449 that belongs to a status icon.
450 @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
451 @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
453 <!-- ##### STRUCT GdkWindowAttr ##### -->
455 Attributes to use for a newly-created window.
458 @title: title of the window (for toplevel windows)
459 @event_mask: event mask (see gdk_window_set_events())
460 @x: X coordinate relative to parent window (see gdk_window_move())
461 @y: Y coordinate relative to parent window (see gdk_window_move())
462 @width: width of window
463 @height: height of window
464 @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible window that receives events)
465 @visual: #GdkVisual for window
466 @colormap: #GdkColormap for window
467 @window_type: type of window
468 @cursor: cursor for the window (see gdk_window_set_cursor())
469 @wmclass_name: don't use (see gtk_window_set_wmclass())
470 @wmclass_class: don't use (see gtk_window_set_wmclass())
471 @override_redirect: %TRUE to bypass the window manager
472 @type_hint: a hint of the function of the window
474 <!-- ##### ENUM GdkWindowAttributesType ##### -->
476 Used to indicate which fields in the #GdkWindowAttr struct should be
477 honored. For example, if you filled in the "cursor" and "x" fields of
478 #GdkWindowAttr, pass "@GDK_WA_X | @GDK_WA_CURSOR" to gdk_window_new(). Fields
479 in #GdkWindowAttr not covered by a bit in this enum are required; for example,
480 the @width/@height, @wclass, and @window_type fields are required, they have no
481 corresponding flag in #GdkWindowAttributesType.
484 @GDK_WA_TITLE: Honor the title field
485 @GDK_WA_X: Honor the X coordinate field
486 @GDK_WA_Y: Honor the Y coordinate field
487 @GDK_WA_CURSOR: Honor the cursor field
488 @GDK_WA_COLORMAP: Honor the colormap field
489 @GDK_WA_VISUAL: Honor the visual field
490 @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields
491 @GDK_WA_NOREDIR: Honor the override_redirect field
492 @GDK_WA_TYPE_HINT: Honor the type_hint field
494 <!-- ##### FUNCTION gdk_window_new ##### -->
505 <!-- ##### FUNCTION gdk_window_destroy ##### -->
513 <!-- ##### MACRO gdk_window_ref ##### -->
515 Deprecated equivalent of g_object_ref()
521 <!-- ##### MACRO gdk_window_unref ##### -->
523 Deprecated equivalent of g_object_unref()
528 <!-- ##### FUNCTION gdk_window_get_window_type ##### -->
537 <!-- ##### FUNCTION gdk_window_at_pointer ##### -->
547 <!-- ##### FUNCTION gdk_window_show ##### -->
555 <!-- ##### FUNCTION gdk_window_show_unraised ##### -->
563 <!-- ##### FUNCTION gdk_window_hide ##### -->
571 <!-- ##### FUNCTION gdk_window_is_destroyed ##### -->
580 <!-- ##### FUNCTION gdk_window_is_visible ##### -->
589 <!-- ##### FUNCTION gdk_window_is_viewable ##### -->
598 <!-- ##### FUNCTION gdk_window_get_state ##### -->
607 <!-- ##### FUNCTION gdk_window_withdraw ##### -->
615 <!-- ##### FUNCTION gdk_window_iconify ##### -->
623 <!-- ##### FUNCTION gdk_window_deiconify ##### -->
631 <!-- ##### FUNCTION gdk_window_stick ##### -->
639 <!-- ##### FUNCTION gdk_window_unstick ##### -->
647 <!-- ##### FUNCTION gdk_window_maximize ##### -->
655 <!-- ##### FUNCTION gdk_window_unmaximize ##### -->
663 <!-- ##### FUNCTION gdk_window_fullscreen ##### -->
671 <!-- ##### FUNCTION gdk_window_unfullscreen ##### -->
679 <!-- ##### FUNCTION gdk_window_set_keep_above ##### -->
688 <!-- ##### FUNCTION gdk_window_set_keep_below ##### -->
697 <!-- ##### FUNCTION gdk_window_set_opacity ##### -->
706 <!-- ##### FUNCTION gdk_window_set_composited ##### -->
715 <!-- ##### FUNCTION gdk_window_move ##### -->
725 <!-- ##### FUNCTION gdk_window_resize ##### -->
735 <!-- ##### FUNCTION gdk_window_move_resize ##### -->
747 <!-- ##### FUNCTION gdk_window_scroll ##### -->
757 <!-- ##### FUNCTION gdk_window_move_region ##### -->
768 <!-- ##### FUNCTION gdk_window_flush ##### -->
776 <!-- ##### FUNCTION gdk_window_ensure_native ##### -->
785 <!-- ##### FUNCTION gdk_window_reparent ##### -->
796 <!-- ##### FUNCTION gdk_window_clear ##### -->
804 <!-- ##### FUNCTION gdk_window_clear_area ##### -->
816 <!-- ##### FUNCTION gdk_window_clear_area_e ##### -->
828 <!-- ##### MACRO gdk_window_copy_area ##### -->
830 Deprecated equivalent to gdk_draw_drawable(), see that function for docs
833 @drawable: a #GdkDrawable
834 @gc: a #GdkGC sharing the drawable's visual and colormap
835 @x: X position in @drawable where the rectangle should be drawn
836 @y: Y position in @drawable where the rectangle should be drawn
837 @source_drawable: the source #GdkDrawable, which may be the same as @drawable
838 @source_x: X position in @src of rectangle to draw
839 @source_y: Y position in @src of rectangle to draw
840 @width: width of rectangle to draw, or -1 for entire @src width
841 @height: height of rectangle to draw, or -1 for entire @src height
842 <!-- # Unused Parameters # -->
843 @drawable: a #GdkDrawable
844 @xdest: X position in @drawable where the rectangle should be drawn
845 @ydest: Y position in @drawable where the rectangle should be drawn
848 <!-- ##### FUNCTION gdk_window_raise ##### -->
856 <!-- ##### FUNCTION gdk_window_lower ##### -->
864 <!-- ##### FUNCTION gdk_window_restack ##### -->
874 <!-- ##### FUNCTION gdk_window_focus ##### -->
883 <!-- ##### FUNCTION gdk_window_register_dnd ##### -->
885 Registers a window as a potential drop destination.
888 @window: a #GdkWindow.
891 <!-- ##### FUNCTION gdk_window_begin_resize_drag ##### -->
904 <!-- ##### FUNCTION gdk_window_begin_move_drag ##### -->
916 <!-- ##### FUNCTION gdk_window_constrain_size ##### -->
929 <!-- ##### FUNCTION gdk_window_beep ##### -->
937 <!-- ##### FUNCTION gdk_window_begin_paint_rect ##### -->
946 <!-- ##### FUNCTION gdk_window_begin_paint_region ##### -->
955 <!-- ##### FUNCTION gdk_window_end_paint ##### -->
963 <!-- ##### FUNCTION gdk_window_invalidate_rect ##### -->
970 @invalidate_children:
973 <!-- ##### FUNCTION gdk_window_invalidate_region ##### -->
980 @invalidate_children:
983 <!-- ##### FUNCTION gdk_window_invalidate_maybe_recurse ##### -->
990 @GdkWindow *, gpointer:
994 <!-- ##### FUNCTION gdk_window_get_update_area ##### -->
1003 <!-- ##### FUNCTION gdk_window_freeze_updates ##### -->
1011 <!-- ##### FUNCTION gdk_window_thaw_updates ##### -->
1019 <!-- ##### FUNCTION gdk_window_process_all_updates ##### -->
1027 <!-- ##### FUNCTION gdk_window_process_updates ##### -->
1036 <!-- ##### FUNCTION gdk_window_set_debug_updates ##### -->
1044 <!-- ##### FUNCTION gdk_window_get_internal_paint_info ##### -->
1055 <!-- ##### FUNCTION gdk_window_enable_synchronized_configure ##### -->
1063 <!-- ##### FUNCTION gdk_window_configure_finished ##### -->
1071 <!-- ##### FUNCTION gdk_window_set_user_data ##### -->
1080 <!-- ##### FUNCTION gdk_window_set_override_redirect ##### -->
1089 <!-- ##### FUNCTION gdk_window_set_accept_focus ##### -->
1098 <!-- ##### FUNCTION gdk_window_set_focus_on_map ##### -->
1107 <!-- ##### FUNCTION gdk_window_add_filter ##### -->
1117 <!-- ##### FUNCTION gdk_window_remove_filter ##### -->
1127 <!-- ##### USER_FUNCTION GdkFilterFunc ##### -->
1129 Specifies the type of function used to filter native events before they are
1130 converted to GDK events.
1134 When a filter is called, @event is unpopulated, except for
1135 <literal>event->window</literal>. The filter may translate the native
1136 event to a GDK event and store the result in @event, or handle it without
1137 translation. If the filter translates the event and processing should
1138 continue, it should return <literal>GDK_FILTER_TRANSLATE</literal>.
1141 @xevent: the native event to filter.
1142 @event: the GDK event to which the X event will be translated.
1143 @data: user data set when the filter was installed.
1144 @Returns: a #GdkFilterReturn value.
1147 <!-- ##### ENUM GdkFilterReturn ##### -->
1149 Specifies the result of applying a #GdkFilterFunc to a native event.
1152 @GDK_FILTER_CONTINUE: event not handled, continue processing.
1153 @GDK_FILTER_TRANSLATE: native event translated into a GDK event and stored
1154 in the <literal>event</literal> structure that was passed in.
1155 @GDK_FILTER_REMOVE: event handled, terminate processing.
1157 <!-- ##### TYPEDEF GdkXEvent ##### -->
1159 Used to represent native events (<type>XEvent</type>s for the X11
1160 backend, <type>MSG</type>s for Win32).
1164 <!-- ##### FUNCTION gdk_window_shape_combine_mask ##### -->
1175 <!-- ##### FUNCTION gdk_window_shape_combine_region ##### -->
1186 <!-- ##### FUNCTION gdk_window_set_child_shapes ##### -->
1194 <!-- ##### FUNCTION gdk_window_merge_child_shapes ##### -->
1202 <!-- ##### FUNCTION gdk_window_input_shape_combine_mask ##### -->
1213 <!-- ##### FUNCTION gdk_window_input_shape_combine_region ##### -->
1224 <!-- ##### FUNCTION gdk_window_set_child_input_shapes ##### -->
1232 <!-- ##### FUNCTION gdk_window_merge_child_input_shapes ##### -->
1240 <!-- ##### FUNCTION gdk_window_set_static_gravities ##### -->
1250 <!-- ##### FUNCTION gdk_window_set_hints ##### -->
1265 <!-- ##### FUNCTION gdk_window_set_title ##### -->
1274 <!-- ##### FUNCTION gdk_window_set_background ##### -->
1283 <!-- ##### FUNCTION gdk_window_set_back_pixmap ##### -->
1293 <!-- ##### MACRO GDK_PARENT_RELATIVE ##### -->
1295 A special value for <literal>GdkPixmap*</literal> variables, indicating
1296 that the background pixmap for a window should be inherited from the parent
1302 <!-- ##### FUNCTION gdk_window_set_cursor ##### -->
1311 <!-- ##### FUNCTION gdk_window_get_cursor ##### -->
1320 <!-- ##### MACRO gdk_window_set_colormap ##### -->
1322 Deprecated equivalent to gdk_drawable_set_colormap()
1327 <!-- ##### FUNCTION gdk_window_get_user_data ##### -->
1336 <!-- ##### FUNCTION gdk_window_get_geometry ##### -->
1349 <!-- ##### FUNCTION gdk_window_set_geometry_hints ##### -->
1359 <!-- ##### FUNCTION gdk_window_set_icon_list ##### -->
1368 <!-- ##### FUNCTION gdk_window_set_modal_hint ##### -->
1377 <!-- ##### FUNCTION gdk_window_set_type_hint ##### -->
1386 <!-- ##### FUNCTION gdk_window_get_type_hint ##### -->
1395 <!-- ##### FUNCTION gdk_window_set_skip_taskbar_hint ##### -->
1404 <!-- ##### FUNCTION gdk_window_set_skip_pager_hint ##### -->
1413 <!-- ##### FUNCTION gdk_window_set_urgency_hint ##### -->
1422 <!-- ##### FUNCTION gdk_window_get_position ##### -->
1432 <!-- ##### FUNCTION gdk_window_get_root_origin ##### -->
1442 <!-- ##### FUNCTION gdk_window_get_frame_extents ##### -->
1451 <!-- ##### MACRO gdk_window_get_size ##### -->
1453 Deprecated equivalent of gdk_drawable_get_size().
1458 <!-- ##### MACRO gdk_window_get_visual ##### -->
1460 Deprecated equivalent of gdk_drawable_get_visual().
1463 @Returns: the #GdkVisual of the window
1466 <!-- ##### MACRO gdk_window_get_colormap ##### -->
1468 Deprecated equivalent of gdk_drawable_get_colormap().
1471 @Returns: colormap for the window
1474 <!-- ##### MACRO gdk_window_get_type ##### -->
1476 Deprecated equivalent of gdk_drawable_get_type().
1479 @Returns: type of drawable
1482 <!-- ##### FUNCTION gdk_window_get_origin ##### -->
1493 <!-- ##### FUNCTION gdk_window_get_deskrelative_origin ##### -->
1504 <!-- ##### FUNCTION gdk_window_get_root_coords ##### -->
1516 <!-- ##### FUNCTION gdk_window_get_pointer ##### -->
1528 <!-- ##### ENUM GdkModifierType ##### -->
1530 A set of bit-flags to indicate the state of modifier keys and mouse buttons
1531 in various event types. Typical modifier keys are Shift, Control, Meta, Super,
1532 Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
1535 Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
1538 Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
1539 to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK, %GDK_HYPER_MASK
1540 or %GDK_META_MASK in the state field of key events.
1543 @GDK_SHIFT_MASK: the Shift key.
1544 @GDK_LOCK_MASK: a Lock key (depending on the modifier mapping of the
1545 X server this may either be CapsLock or ShiftLock).
1546 @GDK_CONTROL_MASK: the Control key.
1547 @GDK_MOD1_MASK: the fourth modifier key (it depends on the modifier
1548 mapping of the X server which key is interpreted as this modifier, but
1549 normally it is the Alt key).
1550 @GDK_MOD2_MASK: the fifth modifier key (it depends on the modifier
1551 mapping of the X server which key is interpreted as this modifier).
1552 @GDK_MOD3_MASK: the sixth modifier key (it depends on the modifier
1553 mapping of the X server which key is interpreted as this modifier).
1554 @GDK_MOD4_MASK: the seventh modifier key (it depends on the modifier
1555 mapping of the X server which key is interpreted as this modifier).
1556 @GDK_MOD5_MASK: the eighth modifier key (it depends on the modifier
1557 mapping of the X server which key is interpreted as this modifier).
1558 @GDK_BUTTON1_MASK: the first mouse button.
1559 @GDK_BUTTON2_MASK: the second mouse button.
1560 @GDK_BUTTON3_MASK: the third mouse button.
1561 @GDK_BUTTON4_MASK: the fourth mouse button.
1562 @GDK_BUTTON5_MASK: the fifth mouse button.
1563 @GDK_SUPER_MASK: the Super modifier. Since 2.10
1564 @GDK_HYPER_MASK: the Hyper modifier. Since 2.10
1565 @GDK_META_MASK: the Meta modifier. Since 2.10
1566 @GDK_RELEASE_MASK: not used in GDK itself. GTK+ uses it to differentiate
1567 between (keyval, modifiers) pairs from key press and release events.
1568 @GDK_MODIFIER_MASK: a mask covering all modifier types.
1570 <!-- ##### FUNCTION gdk_window_get_parent ##### -->
1579 <!-- ##### FUNCTION gdk_window_get_toplevel ##### -->
1588 <!-- ##### FUNCTION gdk_window_get_children ##### -->
1597 <!-- ##### FUNCTION gdk_window_peek_children ##### -->
1606 <!-- ##### FUNCTION gdk_window_get_events ##### -->
1615 <!-- ##### FUNCTION gdk_window_set_events ##### -->
1624 <!-- ##### FUNCTION gdk_window_set_icon ##### -->
1635 <!-- ##### FUNCTION gdk_window_set_icon_name ##### -->
1644 <!-- ##### FUNCTION gdk_window_set_transient_for ##### -->
1653 <!-- ##### FUNCTION gdk_window_set_role ##### -->
1662 <!-- ##### FUNCTION gdk_window_set_startup_id ##### -->
1671 <!-- ##### FUNCTION gdk_window_set_group ##### -->
1680 <!-- ##### FUNCTION gdk_window_get_group ##### -->
1689 <!-- ##### FUNCTION gdk_window_set_decorations ##### -->
1698 <!-- ##### FUNCTION gdk_window_get_decorations ##### -->
1703 @window: The window to get the decorations from
1704 @decorations: The window decorations will be written here
1705 @Returns: %TRUE if the window has decorations set, %FALSE otherwise.
1708 <!-- ##### ENUM GdkWMDecoration ##### -->
1710 These are hints originally defined by the Motif toolkit.
1711 The window manager can use them when determining how to decorate
1712 the window. The hint must be set before mapping the window.
1715 @GDK_DECOR_ALL: all decorations should be applied.
1716 @GDK_DECOR_BORDER: a frame should be drawn around the window.
1717 @GDK_DECOR_RESIZEH: the frame should have resize handles.
1718 @GDK_DECOR_TITLE: a titlebar should be placed above the window.
1719 @GDK_DECOR_MENU: a button for opening a menu should be included.
1720 @GDK_DECOR_MINIMIZE: a minimize button should be included.
1721 @GDK_DECOR_MAXIMIZE: a maximize button should be included.
1723 <!-- ##### FUNCTION gdk_window_set_functions ##### -->
1732 <!-- ##### ENUM GdkWMFunction ##### -->
1734 These are hints originally defined by the Motif toolkit.
1735 The window manager can use them when determining the functions
1736 to offer for the window.
1737 The hint must be set before mapping the window.
1740 @GDK_FUNC_ALL: all functions should be offered.
1741 @GDK_FUNC_RESIZE: the window should be resizable.
1742 @GDK_FUNC_MOVE: the window should be movable.
1743 @GDK_FUNC_MINIMIZE: the window should be minimizable.
1744 @GDK_FUNC_MAXIMIZE: the window should be maximizable.
1745 @GDK_FUNC_CLOSE: the window should be closable.
1747 <!-- ##### FUNCTION gdk_window_get_toplevels ##### -->
1756 <!-- ##### FUNCTION gdk_get_default_root_window ##### -->
1765 <!-- ##### STRUCT GdkPointerHooks ##### -->
1767 A table of pointers to functions for getting quantities related to
1768 the current pointer position. GDK has one global table of this type,
1769 which can be set using gdk_set_pointer_hooks().
1772 This is only useful for such low-level tools as an event recorder.
1773 Applications should never have any reason to use this facility
1776 @get_pointer: Obtains the current pointer position and modifier state.
1777 The position is given in coordinates relative to the window containing
1778 the pointer, which is returned in @window.
1779 @window_at_pointer: Obtains the window underneath the mouse pointer,
1780 returning the location of that window in @win_x, @win_y. Returns %NULL
1781 if the window under the mouse pointer is not known to GDK (for example,
1782 belongs to another application).
1784 <!-- ##### FUNCTION gdk_set_pointer_hooks ##### -->
1793 <!-- ##### FUNCTION gdk_offscreen_window_get_pixmap ##### -->
1802 <!-- ##### FUNCTION gdk_offscreen_window_set_embedder ##### -->
1811 <!-- ##### FUNCTION gdk_offscreen_window_get_embedder ##### -->
1820 <!-- ##### FUNCTION gdk_window_geometry_changed ##### -->
1828 <!-- ##### FUNCTION gdk_window_redirect_to_drawable ##### -->
1843 <!-- ##### FUNCTION gdk_window_remove_redirection ##### -->
1854 sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")