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