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