]> Pileus Git - ~andy/gtk/blob - gdk/gdkwindow.h
Move drawable clip tracking into GdkGC
[~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   GdkColormap *colormap;
335   GdkCursor *cursor;
336   gint8 toplevel_window_type;
337
338   GdkWindowPaint *implicit_paint;
339   
340   cairo_surface_t *cairo_surface;
341 };
342
343 struct _GdkWindowObjectClass
344 {
345   GdkDrawableClass parent_class;
346 };
347
348 /* Windows
349  */
350 GType         gdk_window_object_get_type       (void) G_GNUC_CONST;
351 GdkWindow*    gdk_window_new                   (GdkWindow     *parent,
352                                                 GdkWindowAttr *attributes,
353                                                 gint           attributes_mask);
354 void          gdk_window_destroy               (GdkWindow     *window);
355 GdkWindowType gdk_window_get_window_type       (GdkWindow     *window);
356 GdkWindow*    gdk_window_at_pointer            (gint          *win_x,
357                                                 gint          *win_y);
358 void          gdk_window_show                  (GdkWindow     *window);
359 void          gdk_window_hide                  (GdkWindow     *window);
360 void          gdk_window_withdraw              (GdkWindow     *window);
361 void          gdk_window_show_unraised         (GdkWindow     *window);
362 void          gdk_window_move                  (GdkWindow     *window,
363                                                 gint           x,
364                                                 gint           y);
365 void          gdk_window_resize                (GdkWindow     *window,
366                                                 gint           width,
367                                                 gint           height);
368 void          gdk_window_move_resize           (GdkWindow     *window,
369                                                 gint           x,
370                                                 gint           y,
371                                                 gint           width,
372                                                 gint           height);
373 void          gdk_window_reparent              (GdkWindow     *window,
374                                                 GdkWindow     *new_parent,
375                                                 gint           x,
376                                                 gint           y);
377 void          gdk_window_clear                 (GdkWindow     *window);
378 void          gdk_window_clear_area            (GdkWindow     *window,
379                                                 gint           x,
380                                                 gint           y,
381                                                 gint           width,
382                                                 gint           height);
383 void          gdk_window_clear_area_e          (GdkWindow     *window,
384                                                 gint           x,
385                                                 gint           y,
386                                                 gint           width,
387                                                 gint           height);
388 void          gdk_window_raise                 (GdkWindow     *window);
389 void          gdk_window_lower                 (GdkWindow     *window);
390 void          gdk_window_focus                 (GdkWindow     *window,
391                                                 guint32        timestamp);
392 void          gdk_window_set_user_data         (GdkWindow     *window,
393                                                 gpointer       user_data);
394 void          gdk_window_set_override_redirect (GdkWindow     *window,
395                                                 gboolean       override_redirect);
396 void          gdk_window_set_accept_focus      (GdkWindow     *window,
397                                                 gboolean       accept_focus);
398 void          gdk_window_set_focus_on_map      (GdkWindow     *window,
399                                                 gboolean       focus_on_map);
400 void          gdk_window_add_filter            (GdkWindow     *window,
401                                                 GdkFilterFunc  function,
402                                                 gpointer       data);
403 void          gdk_window_remove_filter         (GdkWindow     *window,
404                                                 GdkFilterFunc  function,
405                                                 gpointer       data);
406 void          gdk_window_scroll                (GdkWindow     *window,
407                                                 gint           dx,
408                                                 gint           dy);
409 void          gdk_window_move_region           (GdkWindow       *window,
410                                                 const GdkRegion *region,
411                                                 gint             dx,
412                                                 gint             dy);
413 void          gdk_window_set_has_native        (GdkWindow       *window,
414                                                 gboolean         has_native);
415
416 /* 
417  * This allows for making shaped (partially transparent) windows
418  * - cool feature, needed for Drag and Drag for example.
419  *  The shape_mask can be the mask
420  *  from gdk_pixmap_create_from_xpm.   Stefan Wille
421  */
422 void gdk_window_shape_combine_mask  (GdkWindow        *window,
423                                      GdkBitmap        *mask,
424                                      gint              x,
425                                      gint              y);
426 void gdk_window_shape_combine_region (GdkWindow       *window,
427                                       const GdkRegion *shape_region,
428                                       gint             offset_x,
429                                       gint             offset_y);
430
431 /*
432  * This routine allows you to quickly take the shapes of all the child windows
433  * of a window and use their shapes as the shape mask for this window - useful
434  * for container windows that dont want to look like a big box
435  * 
436  * - Raster
437  */
438 void gdk_window_set_child_shapes (GdkWindow *window);
439
440 void gdk_window_set_composited   (GdkWindow *window,
441                                   gboolean   composited);
442
443 /*
444  * This routine allows you to merge (ie ADD) child shapes to your
445  * own window's shape keeping its current shape and ADDING the child
446  * shapes to it.
447  * 
448  * - Raster
449  */
450 void gdk_window_merge_child_shapes         (GdkWindow       *window);
451
452 void gdk_window_input_shape_combine_mask   (GdkWindow       *window,
453                                             GdkBitmap       *mask,
454                                             gint             x,
455                                             gint             y);
456 void gdk_window_input_shape_combine_region (GdkWindow       *window,
457                                             const GdkRegion *shape_region,
458                                             gint             offset_x,
459                                             gint             offset_y);
460 void gdk_window_set_child_input_shapes     (GdkWindow       *window);
461 void gdk_window_merge_child_input_shapes   (GdkWindow       *window);
462
463
464 /*
465  * Check if a window has been shown, and whether all its
466  * parents up to a toplevel have been shown, respectively.
467  * Note that a window that is_viewable below is not necessarily
468  * viewable in the X sense.
469  */
470 gboolean gdk_window_is_visible     (GdkWindow *window);
471 gboolean gdk_window_is_viewable    (GdkWindow *window);
472
473 GdkWindowState gdk_window_get_state (GdkWindow *window);
474
475 /* Set static bit gravity on the parent, and static
476  * window gravity on all children.
477  */
478 gboolean gdk_window_set_static_gravities (GdkWindow *window,
479                                           gboolean   use_static);   
480
481 /* Functions to create/lookup windows from their native equivalents */ 
482 #ifndef GDK_MULTIHEAD_SAFE
483 GdkWindow*    gdk_window_foreign_new (GdkNativeWindow anid);
484 GdkWindow*    gdk_window_lookup      (GdkNativeWindow anid);
485 #endif
486 GdkWindow    *gdk_window_foreign_new_for_display (GdkDisplay      *display,
487                                                   GdkNativeWindow  anid);
488 GdkWindow*    gdk_window_lookup_for_display (GdkDisplay      *display,
489                                              GdkNativeWindow  anid);
490
491
492 /* GdkWindow */
493
494 #ifndef GDK_DISABLE_DEPRECATED
495 void          gdk_window_set_hints       (GdkWindow       *window,
496                                           gint             x,
497                                           gint             y,
498                                           gint             min_width,
499                                           gint             min_height,
500                                           gint             max_width,
501                                           gint             max_height,
502                                           gint             flags);
503 #endif
504 void              gdk_window_set_type_hint (GdkWindow        *window,
505                                             GdkWindowTypeHint hint);
506 GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow        *window);
507
508 void          gdk_window_set_modal_hint   (GdkWindow       *window,
509                                            gboolean         modal);
510
511 void gdk_window_set_skip_taskbar_hint (GdkWindow *window,
512                                        gboolean   skips_taskbar);
513 void gdk_window_set_skip_pager_hint   (GdkWindow *window,
514                                        gboolean   skips_pager);
515 void gdk_window_set_urgency_hint      (GdkWindow *window,
516                                        gboolean   urgent);
517
518 void          gdk_window_set_geometry_hints (GdkWindow          *window,
519                                              const GdkGeometry  *geometry,
520                                              GdkWindowHints      geom_mask);
521 void          gdk_set_sm_client_id          (const gchar        *sm_client_id);
522
523 void          gdk_window_begin_paint_rect   (GdkWindow          *window,
524                                              const GdkRectangle *rectangle);
525 void          gdk_window_begin_paint_region (GdkWindow          *window,
526                                              const GdkRegion    *region);
527 void          gdk_window_end_paint          (GdkWindow          *window);
528
529 void          gdk_window_set_title         (GdkWindow     *window,
530                                             const gchar   *title);
531 void          gdk_window_set_role          (GdkWindow       *window,
532                                             const gchar     *role);
533 void          gdk_window_set_startup_id    (GdkWindow       *window,
534                                             const gchar     *startup_id);                                         
535 void          gdk_window_set_transient_for (GdkWindow       *window, 
536                                             GdkWindow       *parent);
537 void          gdk_window_set_background  (GdkWindow       *window,
538                                           const GdkColor  *color);
539 void          gdk_window_set_back_pixmap (GdkWindow       *window,
540                                           GdkPixmap       *pixmap,
541                                           gboolean         parent_relative);
542 void          gdk_window_set_cursor      (GdkWindow       *window,
543                                           GdkCursor       *cursor);
544 void          gdk_window_get_user_data   (GdkWindow       *window,
545                                           gpointer        *data);
546 void          gdk_window_get_geometry    (GdkWindow       *window,
547                                           gint            *x,
548                                           gint            *y,
549                                           gint            *width,
550                                           gint            *height,
551                                           gint            *depth);
552 void          gdk_window_get_position    (GdkWindow       *window,
553                                           gint            *x,
554                                           gint            *y);
555 gint          gdk_window_get_origin      (GdkWindow       *window,
556                                           gint            *x,
557                                           gint            *y);
558
559 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
560 /* Used by gtk_handle_box_button_changed () */
561 gboolean      gdk_window_get_deskrelative_origin (GdkWindow       *window,
562                                           gint            *x,
563                                           gint            *y);
564 #endif
565
566 void          gdk_window_get_root_origin (GdkWindow       *window,
567                                           gint            *x,
568                                           gint            *y);
569 void          gdk_window_get_frame_extents (GdkWindow     *window,
570                                             GdkRectangle  *rect);
571 GdkWindow*    gdk_window_get_pointer     (GdkWindow       *window,
572                                           gint            *x,
573                                           gint            *y,
574                                           GdkModifierType *mask);
575 GdkWindow *   gdk_window_get_parent      (GdkWindow       *window);
576 GdkWindow *   gdk_window_get_toplevel    (GdkWindow       *window);
577
578 GList *       gdk_window_get_children    (GdkWindow       *window);
579 GList *       gdk_window_peek_children   (GdkWindow       *window);
580 GdkEventMask  gdk_window_get_events      (GdkWindow       *window);
581 void          gdk_window_set_events      (GdkWindow       *window,
582                                           GdkEventMask     event_mask);
583
584 void          gdk_window_set_icon_list   (GdkWindow       *window,
585                                           GList           *pixbufs);
586 void          gdk_window_set_icon        (GdkWindow       *window, 
587                                           GdkWindow       *icon_window,
588                                           GdkPixmap       *pixmap,
589                                           GdkBitmap       *mask);
590 void          gdk_window_set_icon_name   (GdkWindow       *window, 
591                                           const gchar     *name);
592 void          gdk_window_set_group       (GdkWindow       *window, 
593                                           GdkWindow       *leader);
594 GdkWindow*    gdk_window_get_group       (GdkWindow       *window);
595 void          gdk_window_set_decorations (GdkWindow       *window,
596                                           GdkWMDecoration  decorations);
597 gboolean      gdk_window_get_decorations (GdkWindow       *window,
598                                           GdkWMDecoration *decorations);
599 void          gdk_window_set_functions   (GdkWindow       *window,
600                                           GdkWMFunction    functions);
601 #if !defined(GDK_MULTIHEAD_SAFE) && !defined(GDK_DISABLE_DEPRECATED)
602 GList *       gdk_window_get_toplevels   (void);
603 #endif
604
605 void          gdk_window_beep            (GdkWindow       *window);
606 void          gdk_window_iconify         (GdkWindow       *window);
607 void          gdk_window_deiconify       (GdkWindow       *window);
608 void          gdk_window_stick           (GdkWindow       *window);
609 void          gdk_window_unstick         (GdkWindow       *window);
610 void          gdk_window_maximize        (GdkWindow       *window);
611 void          gdk_window_unmaximize      (GdkWindow       *window);
612 void          gdk_window_fullscreen      (GdkWindow       *window);
613 void          gdk_window_unfullscreen    (GdkWindow       *window);
614 void          gdk_window_set_keep_above  (GdkWindow       *window,
615                                           gboolean         setting);
616 void          gdk_window_set_keep_below  (GdkWindow       *window,
617                                           gboolean         setting);
618 void          gdk_window_set_opacity     (GdkWindow       *window,
619                                           gdouble          opacity);
620 void          gdk_window_register_dnd    (GdkWindow       *window);
621
622 void gdk_window_begin_resize_drag (GdkWindow     *window,
623                                    GdkWindowEdge  edge,
624                                    gint           button,
625                                    gint           root_x,
626                                    gint           root_y,
627                                    guint32        timestamp);
628 void gdk_window_begin_move_drag   (GdkWindow     *window,
629                                    gint           button,
630                                    gint           root_x,
631                                    gint           root_y,
632                                    guint32        timestamp);
633
634 /* Interface for dirty-region queueing */
635 void       gdk_window_invalidate_rect           (GdkWindow          *window,
636                                                  const GdkRectangle *rect,
637                                                  gboolean            invalidate_children);
638 void       gdk_window_invalidate_region         (GdkWindow          *window,
639                                                  const GdkRegion    *region,
640                                                  gboolean            invalidate_children);
641 void       gdk_window_invalidate_maybe_recurse  (GdkWindow          *window,
642                                                  const GdkRegion    *region,
643                                                  gboolean (*child_func) (GdkWindow *, gpointer),
644                                                  gpointer   user_data);
645 GdkRegion *gdk_window_get_update_area     (GdkWindow    *window);
646
647 void       gdk_window_freeze_updates      (GdkWindow    *window);
648 void       gdk_window_thaw_updates        (GdkWindow    *window);
649
650 void       gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
651 void       gdk_window_thaw_toplevel_updates_libgtk_only   (GdkWindow *window);
652
653 void       gdk_window_process_all_updates (void);
654 void       gdk_window_process_updates     (GdkWindow    *window,
655                                            gboolean      update_children);
656
657 /* Enable/disable flicker, so you can tell if your code is inefficient. */
658 void       gdk_window_set_debug_updates   (gboolean      setting);
659
660 void       gdk_window_constrain_size      (GdkGeometry  *geometry,
661                                            guint         flags,
662                                            gint          width,
663                                            gint          height,
664                                            gint         *new_width,
665                                            gint         *new_height);
666
667 void gdk_window_get_internal_paint_info (GdkWindow    *window,
668                                          GdkDrawable **real_drawable,
669                                          gint         *x_offset,
670                                          gint         *y_offset);
671
672 void gdk_window_enable_synchronized_configure (GdkWindow *window);
673 void gdk_window_configure_finished            (GdkWindow *window);
674
675 #ifndef GDK_MULTIHEAD_SAFE
676 GdkPointerHooks *gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);   
677 #endif /* GDK_MULTIHEAD_SAFE */
678
679 GdkWindow *gdk_get_default_root_window (void);
680
681 /* Offscreen redirection */
682 GdkPixmap *gdk_window_get_offscreen_pixmap   (GdkWindow     *window);
683
684 void       gdk_window_redirect_to_drawable   (GdkWindow     *window,
685                                               GdkDrawable   *drawable,
686                                               gint           src_x,
687                                               gint           src_y,
688                                               gint           dest_x,
689                                               gint           dest_y,
690                                               gint           width,
691                                               gint           height);
692 void       gdk_window_remove_redirection     (GdkWindow     *window);
693
694 void       gdk_window_set_offscreen_hooks    (GdkWindow                    *offscreen_window,
695                                               const GdkOffscreenChildHooks *hooks);
696
697 #ifndef GDK_DISABLE_DEPRECATED
698 #define GDK_ROOT_PARENT()             (gdk_get_default_root_window ())
699 #define gdk_window_get_size            gdk_drawable_get_size
700 #define gdk_window_get_type            gdk_window_get_window_type
701 #define gdk_window_get_colormap        gdk_drawable_get_colormap
702 #define gdk_window_set_colormap        gdk_drawable_set_colormap
703 #define gdk_window_get_visual          gdk_drawable_get_visual
704 #define gdk_window_ref                 gdk_drawable_ref
705 #define gdk_window_unref               gdk_drawable_unref
706
707 #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
708    gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
709 #endif /* GDK_DISABLE_DEPRECATED */
710
711 G_END_DECLS
712
713 #endif /* __GDK_WINDOW_H__ */