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