]> Pileus Git - ~andy/gtk/blob - gdk/gdkwindow.h
Bug 539263 – Deprecate gdk_window_get_toplevels
[~andy/gtk] / gdk / gdkwindow.h
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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
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/.
25  */
26
27 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
29 #endif
30
31 #ifndef __GDK_WINDOW_H__
32 #define __GDK_WINDOW_H__
33
34 #include <gdk/gdkdrawable.h>
35 #include <gdk/gdktypes.h>
36 #include <gdk/gdkevents.h>
37
38 G_BEGIN_DECLS
39
40 typedef struct _GdkGeometry           GdkGeometry;
41 typedef struct _GdkWindowAttr         GdkWindowAttr;
42 typedef struct _GdkPointerHooks       GdkPointerHooks;
43 typedef struct _GdkWindowRedirect     GdkWindowRedirect;
44
45 /* Classes of windows.
46  *   InputOutput: Almost every window should be of this type. Such windows
47  *                receive events and are also displayed on screen.
48  *   InputOnly: Used only in special circumstances when events need to be
49  *              stolen from another window or windows. Input only windows
50  *              have no visible output, so they are handy for placing over
51  *              top of a group of windows in order to grab the events (or
52  *              filter the events) from those windows.
53  */
54 typedef enum
55 {
56   GDK_INPUT_OUTPUT,
57   GDK_INPUT_ONLY
58 } GdkWindowClass;
59
60 /* Types of windows.
61  *   Root: There is only 1 root window and it is initialized
62  *         at startup. Creating a window of type GDK_WINDOW_ROOT
63  *         is an error.
64  *   Toplevel: Windows which interact with the window manager.
65  *   Child: Windows which are children of some other type of window.
66  *          (Any other type of window). Most windows are child windows.
67  *   Dialog: A special kind of toplevel window which interacts with
68  *           the window manager slightly differently than a regular
69  *           toplevel window. Dialog windows should be used for any
70  *           transient window.
71  *   Foreign: A window that actually belongs to another application
72  */
73 typedef enum
74 {
75   GDK_WINDOW_ROOT,
76   GDK_WINDOW_TOPLEVEL,
77   GDK_WINDOW_CHILD,
78   GDK_WINDOW_DIALOG,
79   GDK_WINDOW_TEMP,
80   GDK_WINDOW_FOREIGN
81 } GdkWindowType;
82
83 /* Window attribute mask values.
84  *   GDK_WA_TITLE: The "title" field is valid.
85  *   GDK_WA_X: The "x" field is valid.
86  *   GDK_WA_Y: The "y" field is valid.
87  *   GDK_WA_CURSOR: The "cursor" field is valid.
88  *   GDK_WA_COLORMAP: The "colormap" field is valid.
89  *   GDK_WA_VISUAL: The "visual" field is valid.
90  */
91 typedef enum
92 {
93   GDK_WA_TITLE     = 1 << 1,
94   GDK_WA_X         = 1 << 2,
95   GDK_WA_Y         = 1 << 3,
96   GDK_WA_CURSOR    = 1 << 4,
97   GDK_WA_COLORMAP  = 1 << 5,
98   GDK_WA_VISUAL    = 1 << 6,
99   GDK_WA_WMCLASS   = 1 << 7,
100   GDK_WA_NOREDIR   = 1 << 8,
101   GDK_WA_TYPE_HINT = 1 << 9
102 } GdkWindowAttributesType;
103
104 /* Size restriction enumeration.
105  */
106 typedef enum
107 {
108   GDK_HINT_POS         = 1 << 0,
109   GDK_HINT_MIN_SIZE    = 1 << 1,
110   GDK_HINT_MAX_SIZE    = 1 << 2,
111   GDK_HINT_BASE_SIZE   = 1 << 3,
112   GDK_HINT_ASPECT      = 1 << 4,
113   GDK_HINT_RESIZE_INC  = 1 << 5,
114   GDK_HINT_WIN_GRAVITY = 1 << 6,
115   GDK_HINT_USER_POS    = 1 << 7,
116   GDK_HINT_USER_SIZE   = 1 << 8
117 } GdkWindowHints;
118
119
120 /* Window type hints.
121  * These are hints for the window manager that indicate
122  * what type of function the window has. The window manager
123  * can use this when determining decoration and behaviour
124  * of the window. The hint must be set before mapping the
125  * window.
126  *
127  *   Normal: Normal toplevel window
128  *   Dialog: Dialog window
129  *   Menu: Window used to implement a menu.
130  *   Toolbar: Window used to implement toolbars.
131  */
132 typedef enum
133 {
134   GDK_WINDOW_TYPE_HINT_NORMAL,
135   GDK_WINDOW_TYPE_HINT_DIALOG,
136   GDK_WINDOW_TYPE_HINT_MENU,            /* Torn off menu */
137   GDK_WINDOW_TYPE_HINT_TOOLBAR,
138   GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
139   GDK_WINDOW_TYPE_HINT_UTILITY,
140   GDK_WINDOW_TYPE_HINT_DOCK,
141   GDK_WINDOW_TYPE_HINT_DESKTOP,
142   GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU,   /* A drop down menu (from a menubar) */
143   GDK_WINDOW_TYPE_HINT_POPUP_MENU,      /* A popup menu (from right-click) */
144   GDK_WINDOW_TYPE_HINT_TOOLTIP,
145   GDK_WINDOW_TYPE_HINT_NOTIFICATION,
146   GDK_WINDOW_TYPE_HINT_COMBO,
147   GDK_WINDOW_TYPE_HINT_DND
148 } GdkWindowTypeHint;
149
150 /* The next two enumeration values current match the
151  * Motif constants. If this is changed, the implementation
152  * of gdk_window_set_decorations/gdk_window_set_functions
153  * will need to change as well.
154  */
155 typedef enum
156 {
157   GDK_DECOR_ALL         = 1 << 0,
158   GDK_DECOR_BORDER      = 1 << 1,
159   GDK_DECOR_RESIZEH     = 1 << 2,
160   GDK_DECOR_TITLE       = 1 << 3,
161   GDK_DECOR_MENU        = 1 << 4,
162   GDK_DECOR_MINIMIZE    = 1 << 5,
163   GDK_DECOR_MAXIMIZE    = 1 << 6
164 } GdkWMDecoration;
165
166 typedef enum
167 {
168   GDK_FUNC_ALL          = 1 << 0,
169   GDK_FUNC_RESIZE       = 1 << 1,
170   GDK_FUNC_MOVE         = 1 << 2,
171   GDK_FUNC_MINIMIZE     = 1 << 3,
172   GDK_FUNC_MAXIMIZE     = 1 << 4,
173   GDK_FUNC_CLOSE        = 1 << 5
174 } GdkWMFunction;
175
176 /* Currently, these are the same values numerically as in the
177  * X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
178  * will need fixing.
179  */
180 typedef enum
181 {
182   GDK_GRAVITY_NORTH_WEST = 1,
183   GDK_GRAVITY_NORTH,
184   GDK_GRAVITY_NORTH_EAST,
185   GDK_GRAVITY_WEST,
186   GDK_GRAVITY_CENTER,
187   GDK_GRAVITY_EAST,
188   GDK_GRAVITY_SOUTH_WEST,
189   GDK_GRAVITY_SOUTH,
190   GDK_GRAVITY_SOUTH_EAST,
191   GDK_GRAVITY_STATIC
192 } GdkGravity;
193
194
195 typedef enum
196 {
197   GDK_WINDOW_EDGE_NORTH_WEST,
198   GDK_WINDOW_EDGE_NORTH,
199   GDK_WINDOW_EDGE_NORTH_EAST,
200   GDK_WINDOW_EDGE_WEST,
201   GDK_WINDOW_EDGE_EAST,
202   GDK_WINDOW_EDGE_SOUTH_WEST,
203   GDK_WINDOW_EDGE_SOUTH,
204   GDK_WINDOW_EDGE_SOUTH_EAST  
205 } GdkWindowEdge;
206
207 struct _GdkWindowAttr
208 {
209   gchar *title;
210   gint event_mask;
211   gint x, y;
212   gint width;
213   gint height;
214   GdkWindowClass wclass;
215   GdkVisual *visual;
216   GdkColormap *colormap;
217   GdkWindowType window_type;
218   GdkCursor *cursor;
219   gchar *wmclass_name;
220   gchar *wmclass_class;
221   gboolean override_redirect;
222   GdkWindowTypeHint type_hint;
223 };
224
225 struct _GdkGeometry
226 {
227   gint min_width;
228   gint min_height;
229   gint max_width;
230   gint max_height;
231   gint base_width;
232   gint base_height;
233   gint width_inc;
234   gint height_inc;
235   gdouble min_aspect;
236   gdouble max_aspect;
237   GdkGravity win_gravity;
238 };
239
240 struct _GdkPointerHooks 
241 {
242   GdkWindow* (*get_pointer)       (GdkWindow       *window,
243                                    gint            *x,
244                                    gint            *y,
245                                    GdkModifierType *mask);
246   GdkWindow* (*window_at_pointer) (GdkScreen       *screen, /* unused */
247                                    gint            *win_x,
248                                    gint            *win_y);
249 };
250
251 typedef struct _GdkWindowObject GdkWindowObject;
252 typedef struct _GdkWindowObjectClass GdkWindowObjectClass;
253
254 #define GDK_TYPE_WINDOW              (gdk_window_object_get_type ())
255 #define GDK_WINDOW(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow))
256 #define GDK_WINDOW_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowObjectClass))
257 #define GDK_IS_WINDOW(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW))
258 #define GDK_IS_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
259 #define GDK_WINDOW_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass))
260 #define GDK_WINDOW_OBJECT(object)    ((GdkWindowObject *) GDK_WINDOW (object))
261
262 struct _GdkWindowObject
263 {
264   GdkDrawable parent_instance;
265
266   GdkDrawable *impl; /* window-system-specific delegate object */  
267   
268   GdkWindowObject *parent;
269
270   gpointer user_data;
271
272   gint x;
273   gint y;
274   
275   gint extension_events;
276
277   GList *filters;
278   GList *children;
279
280   GdkColor bg_color;
281   GdkPixmap *bg_pixmap;
282   
283   GSList *paint_stack;
284   
285   GdkRegion *update_area;
286   guint update_freeze_count;
287   
288   guint8 window_type;
289   guint8 depth;
290   guint8 resize_count;
291
292   GdkWindowState state;
293   
294   guint guffaw_gravity : 1;
295   guint input_only : 1;
296   guint modal_hint : 1;
297   guint composited : 1;
298   
299   guint destroyed : 2;
300
301   guint accept_focus : 1;
302   guint focus_on_map : 1;
303   guint shaped : 1;
304   
305   GdkEventMask event_mask;
306
307   guint update_and_descendants_freeze_count;
308
309   GdkWindowRedirect *redirect;
310 };
311
312 struct _GdkWindowObjectClass
313 {
314   GdkDrawableClass parent_class;
315 };
316
317 /* Windows
318  */
319 GType         gdk_window_object_get_type       (void) G_GNUC_CONST;
320 GdkWindow*    gdk_window_new                   (GdkWindow     *parent,
321                                                 GdkWindowAttr *attributes,
322                                                 gint           attributes_mask);
323 void          gdk_window_destroy               (GdkWindow     *window);
324 GdkWindowType gdk_window_get_window_type       (GdkWindow     *window);
325 GdkWindow*    gdk_window_at_pointer            (gint          *win_x,
326                                                 gint          *win_y);
327 void          gdk_window_show                  (GdkWindow     *window);
328 void          gdk_window_hide                  (GdkWindow     *window);
329 void          gdk_window_withdraw              (GdkWindow     *window);
330 void          gdk_window_show_unraised         (GdkWindow     *window);
331 void          gdk_window_move                  (GdkWindow     *window,
332                                                 gint           x,
333                                                 gint           y);
334 void          gdk_window_resize                (GdkWindow     *window,
335                                                 gint           width,
336                                                 gint           height);
337 void          gdk_window_move_resize           (GdkWindow     *window,
338                                                 gint           x,
339                                                 gint           y,
340                                                 gint           width,
341                                                 gint           height);
342 void          gdk_window_reparent              (GdkWindow     *window,
343                                                 GdkWindow     *new_parent,
344                                                 gint           x,
345                                                 gint           y);
346 void          gdk_window_clear                 (GdkWindow     *window);
347 void          gdk_window_clear_area            (GdkWindow     *window,
348                                                 gint           x,
349                                                 gint           y,
350                                                 gint           width,
351                                                 gint           height);
352 void          gdk_window_clear_area_e          (GdkWindow     *window,
353                                                 gint           x,
354                                                 gint           y,
355                                                 gint           width,
356                                                 gint           height);
357 void          gdk_window_raise                 (GdkWindow     *window);
358 void          gdk_window_lower                 (GdkWindow     *window);
359 void          gdk_window_focus                 (GdkWindow     *window,
360                                                 guint32        timestamp);
361 void          gdk_window_set_user_data         (GdkWindow     *window,
362                                                 gpointer       user_data);
363 void          gdk_window_set_override_redirect (GdkWindow     *window,
364                                                 gboolean       override_redirect);
365 void          gdk_window_set_accept_focus      (GdkWindow     *window,
366                                                 gboolean       accept_focus);
367 void          gdk_window_set_focus_on_map      (GdkWindow     *window,
368                                                 gboolean       focus_on_map);
369 void          gdk_window_add_filter            (GdkWindow     *window,
370                                                 GdkFilterFunc  function,
371                                                 gpointer       data);
372 void          gdk_window_remove_filter         (GdkWindow     *window,
373                                                 GdkFilterFunc  function,
374                                                 gpointer       data);
375 void          gdk_window_scroll                (GdkWindow     *window,
376                                                 gint           dx,
377                                                 gint           dy);
378 void          gdk_window_move_region           (GdkWindow       *window,
379                                                 const GdkRegion *region,
380                                                 gint             dx,
381                                                 gint             dy);
382
383 /* 
384  * This allows for making shaped (partially transparent) windows
385  * - cool feature, needed for Drag and Drag for example.
386  *  The shape_mask can be the mask
387  *  from gdk_pixmap_create_from_xpm.   Stefan Wille
388  */
389 void gdk_window_shape_combine_mask  (GdkWindow        *window,
390                                      GdkBitmap        *mask,
391                                      gint              x,
392                                      gint              y);
393 void gdk_window_shape_combine_region (GdkWindow       *window,
394                                       const GdkRegion *shape_region,
395                                       gint             offset_x,
396                                       gint             offset_y);
397
398 /*
399  * This routine allows you to quickly take the shapes of all the child windows
400  * of a window and use their shapes as the shape mask for this window - useful
401  * for container windows that dont want to look like a big box
402  * 
403  * - Raster
404  */
405 void gdk_window_set_child_shapes (GdkWindow *window);
406
407 void gdk_window_set_composited   (GdkWindow *window,
408                                   gboolean   composited);
409
410 /*
411  * This routine allows you to merge (ie ADD) child shapes to your
412  * own window's shape keeping its current shape and ADDING the child
413  * shapes to it.
414  * 
415  * - Raster
416  */
417 void gdk_window_merge_child_shapes         (GdkWindow       *window);
418
419 void gdk_window_input_shape_combine_mask   (GdkWindow       *window,
420                                             GdkBitmap       *mask,
421                                             gint             x,
422                                             gint             y);
423 void gdk_window_input_shape_combine_region (GdkWindow       *window,
424                                             const GdkRegion *shape_region,
425                                             gint             offset_x,
426                                             gint             offset_y);
427 void gdk_window_set_child_input_shapes     (GdkWindow       *window);
428 void gdk_window_merge_child_input_shapes   (GdkWindow       *window);
429
430
431 /*
432  * Check if a window has been shown, and whether all its
433  * parents up to a toplevel have been shown, respectively.
434  * Note that a window that is_viewable below is not necessarily
435  * viewable in the X sense.
436  */
437 gboolean gdk_window_is_visible     (GdkWindow *window);
438 gboolean gdk_window_is_viewable    (GdkWindow *window);
439
440 GdkWindowState gdk_window_get_state (GdkWindow *window);
441
442 /* Set static bit gravity on the parent, and static
443  * window gravity on all children.
444  */
445 gboolean gdk_window_set_static_gravities (GdkWindow *window,
446                                           gboolean   use_static);   
447
448 /* Functions to create/lookup windows from their native equivalents */ 
449 #ifndef GDK_MULTIHEAD_SAFE
450 GdkWindow*    gdk_window_foreign_new (GdkNativeWindow anid);
451 GdkWindow*    gdk_window_lookup      (GdkNativeWindow anid);
452 #endif
453 GdkWindow    *gdk_window_foreign_new_for_display (GdkDisplay      *display,
454                                                   GdkNativeWindow  anid);
455 GdkWindow*    gdk_window_lookup_for_display (GdkDisplay      *display,
456                                              GdkNativeWindow  anid);
457
458
459 /* GdkWindow */
460
461 #ifndef GDK_DISABLE_DEPRECATED
462 void          gdk_window_set_hints       (GdkWindow       *window,
463                                           gint             x,
464                                           gint             y,
465                                           gint             min_width,
466                                           gint             min_height,
467                                           gint             max_width,
468                                           gint             max_height,
469                                           gint             flags);
470 #endif
471 void              gdk_window_set_type_hint (GdkWindow        *window,
472                                             GdkWindowTypeHint hint);
473 GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow        *window);
474
475 void          gdk_window_set_modal_hint   (GdkWindow       *window,
476                                            gboolean         modal);
477
478 void gdk_window_set_skip_taskbar_hint (GdkWindow *window,
479                                        gboolean   skips_taskbar);
480 void gdk_window_set_skip_pager_hint   (GdkWindow *window,
481                                        gboolean   skips_pager);
482 void gdk_window_set_urgency_hint      (GdkWindow *window,
483                                        gboolean   urgent);
484
485 void          gdk_window_set_geometry_hints (GdkWindow          *window,
486                                              const GdkGeometry  *geometry,
487                                              GdkWindowHints      geom_mask);
488 void          gdk_set_sm_client_id          (const gchar        *sm_client_id);
489
490 void          gdk_window_begin_paint_rect   (GdkWindow          *window,
491                                              const GdkRectangle *rectangle);
492 void          gdk_window_begin_paint_region (GdkWindow          *window,
493                                              const GdkRegion    *region);
494 void          gdk_window_end_paint          (GdkWindow          *window);
495
496 void          gdk_window_set_title         (GdkWindow     *window,
497                                             const gchar   *title);
498 void          gdk_window_set_role          (GdkWindow       *window,
499                                             const gchar     *role);
500 void          gdk_window_set_startup_id    (GdkWindow       *window,
501                                             const gchar     *startup_id);                                         
502 void          gdk_window_set_transient_for (GdkWindow       *window, 
503                                             GdkWindow       *parent);
504 void          gdk_window_set_background  (GdkWindow       *window,
505                                           const GdkColor  *color);
506 void          gdk_window_set_back_pixmap (GdkWindow       *window,
507                                           GdkPixmap       *pixmap,
508                                           gboolean         parent_relative);
509 void          gdk_window_set_cursor      (GdkWindow       *window,
510                                           GdkCursor       *cursor);
511 void          gdk_window_get_user_data   (GdkWindow       *window,
512                                           gpointer        *data);
513 void          gdk_window_get_geometry    (GdkWindow       *window,
514                                           gint            *x,
515                                           gint            *y,
516                                           gint            *width,
517                                           gint            *height,
518                                           gint            *depth);
519 void          gdk_window_get_position    (GdkWindow       *window,
520                                           gint            *x,
521                                           gint            *y);
522 gint          gdk_window_get_origin      (GdkWindow       *window,
523                                           gint            *x,
524                                           gint            *y);
525
526 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
527 /* Used by gtk_handle_box_button_changed () */
528 gboolean      gdk_window_get_deskrelative_origin (GdkWindow       *window,
529                                           gint            *x,
530                                           gint            *y);
531 #endif
532
533 void          gdk_window_get_root_origin (GdkWindow       *window,
534                                           gint            *x,
535                                           gint            *y);
536 void          gdk_window_get_frame_extents (GdkWindow     *window,
537                                             GdkRectangle  *rect);
538 GdkWindow*    gdk_window_get_pointer     (GdkWindow       *window,
539                                           gint            *x,
540                                           gint            *y,
541                                           GdkModifierType *mask);
542 GdkWindow *   gdk_window_get_parent      (GdkWindow       *window);
543 GdkWindow *   gdk_window_get_toplevel    (GdkWindow       *window);
544
545 GList *       gdk_window_get_children    (GdkWindow       *window);
546 GList *       gdk_window_peek_children   (GdkWindow       *window);
547 GdkEventMask  gdk_window_get_events      (GdkWindow       *window);
548 void          gdk_window_set_events      (GdkWindow       *window,
549                                           GdkEventMask     event_mask);
550
551 void          gdk_window_set_icon_list   (GdkWindow       *window,
552                                           GList           *pixbufs);
553 void          gdk_window_set_icon        (GdkWindow       *window, 
554                                           GdkWindow       *icon_window,
555                                           GdkPixmap       *pixmap,
556                                           GdkBitmap       *mask);
557 void          gdk_window_set_icon_name   (GdkWindow       *window, 
558                                           const gchar     *name);
559 void          gdk_window_set_group       (GdkWindow       *window, 
560                                           GdkWindow       *leader);
561 GdkWindow*    gdk_window_get_group       (GdkWindow       *window);
562 void          gdk_window_set_decorations (GdkWindow       *window,
563                                           GdkWMDecoration  decorations);
564 gboolean      gdk_window_get_decorations (GdkWindow       *window,
565                                           GdkWMDecoration *decorations);
566 void          gdk_window_set_functions   (GdkWindow       *window,
567                                           GdkWMFunction    functions);
568 #if !defined(GDK_MULTIHEAD_SAFE) && !defined(GDK_DISABLE_DEPRECATED)
569 GList *       gdk_window_get_toplevels   (void);
570 #endif
571
572 void          gdk_window_beep            (GdkWindow       *window);
573 void          gdk_window_iconify         (GdkWindow       *window);
574 void          gdk_window_deiconify       (GdkWindow       *window);
575 void          gdk_window_stick           (GdkWindow       *window);
576 void          gdk_window_unstick         (GdkWindow       *window);
577 void          gdk_window_maximize        (GdkWindow       *window);
578 void          gdk_window_unmaximize      (GdkWindow       *window);
579 void          gdk_window_fullscreen      (GdkWindow       *window);
580 void          gdk_window_unfullscreen    (GdkWindow       *window);
581 void          gdk_window_set_keep_above  (GdkWindow       *window,
582                                           gboolean         setting);
583 void          gdk_window_set_keep_below  (GdkWindow       *window,
584                                           gboolean         setting);
585 void          gdk_window_set_opacity     (GdkWindow       *window,
586                                           gdouble          opacity);
587 void          gdk_window_register_dnd    (GdkWindow       *window);
588
589 void gdk_window_begin_resize_drag (GdkWindow     *window,
590                                    GdkWindowEdge  edge,
591                                    gint           button,
592                                    gint           root_x,
593                                    gint           root_y,
594                                    guint32        timestamp);
595 void gdk_window_begin_move_drag   (GdkWindow     *window,
596                                    gint           button,
597                                    gint           root_x,
598                                    gint           root_y,
599                                    guint32        timestamp);
600
601 /* Interface for dirty-region queueing */
602 void       gdk_window_invalidate_rect           (GdkWindow          *window,
603                                                  const GdkRectangle *rect,
604                                                  gboolean            invalidate_children);
605 void       gdk_window_invalidate_region         (GdkWindow          *window,
606                                                  const GdkRegion    *region,
607                                                  gboolean            invalidate_children);
608 void       gdk_window_invalidate_maybe_recurse  (GdkWindow          *window,
609                                                  const GdkRegion    *region,
610                                                  gboolean (*child_func) (GdkWindow *, gpointer),
611                                                  gpointer   user_data);
612 GdkRegion *gdk_window_get_update_area     (GdkWindow    *window);
613
614 void       gdk_window_freeze_updates      (GdkWindow    *window);
615 void       gdk_window_thaw_updates        (GdkWindow    *window);
616
617 void       gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
618 void       gdk_window_thaw_toplevel_updates_libgtk_only   (GdkWindow *window);
619
620 void       gdk_window_process_all_updates (void);
621 void       gdk_window_process_updates     (GdkWindow    *window,
622                                            gboolean      update_children);
623
624 /* Enable/disable flicker, so you can tell if your code is inefficient. */
625 void       gdk_window_set_debug_updates   (gboolean      setting);
626
627 void       gdk_window_constrain_size      (GdkGeometry  *geometry,
628                                            guint         flags,
629                                            gint          width,
630                                            gint          height,
631                                            gint         *new_width,
632                                            gint         *new_height);
633
634 void gdk_window_get_internal_paint_info (GdkWindow    *window,
635                                          GdkDrawable **real_drawable,
636                                          gint         *x_offset,
637                                          gint         *y_offset);
638
639 void gdk_window_enable_synchronized_configure (GdkWindow *window);
640 void gdk_window_configure_finished            (GdkWindow *window);
641
642 #ifndef GDK_MULTIHEAD_SAFE
643 GdkPointerHooks *gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);   
644 #endif /* GDK_MULTIHEAD_SAFE */
645
646 GdkWindow *gdk_get_default_root_window (void);
647
648 void gdk_window_redirect_to_drawable (GdkWindow *window,
649                                       GdkDrawable *drawable,
650                                       gint src_x, gint src_y,
651                                       gint dest_x, gint dest_y,
652                                       gint width, gint height);
653 void gdk_window_remove_redirection   (GdkWindow *window);
654
655 #ifndef GDK_DISABLE_DEPRECATED
656 #define GDK_ROOT_PARENT()             (gdk_get_default_root_window ())
657 #define gdk_window_get_size            gdk_drawable_get_size
658 #define gdk_window_get_type            gdk_window_get_window_type
659 #define gdk_window_get_colormap        gdk_drawable_get_colormap
660 #define gdk_window_set_colormap        gdk_drawable_set_colormap
661 #define gdk_window_get_visual          gdk_drawable_get_visual
662 #define gdk_window_ref                 gdk_drawable_ref
663 #define gdk_window_unref               gdk_drawable_unref
664
665 #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
666    gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
667 #endif /* GDK_DISABLE_DEPRECATED */
668
669 G_END_DECLS
670
671 #endif /* __GDK_WINDOW_H__ */