]> Pileus Git - ~andy/gtk/blob - gdk/gdkwindowimpl.h
Ensure that we're properly hiding impl window if one of its parent non-impl windows...
[~andy/gtk] / gdk / gdkwindowimpl.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 #ifndef __GDK_WINDOW_IMPL_H__
28 #define __GDK_WINDOW_IMPL_H__
29
30 #include <gdk/gdkwindow.h>
31
32 G_BEGIN_DECLS
33
34 #define GDK_TYPE_WINDOW_IMPL           (gdk_window_impl_get_type ())
35 #define GDK_WINDOW_IMPL(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImpl))
36 #define GDK_IS_WINDOW_IMPL(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_WINDOW_IMPL))
37 #define GDK_WINDOW_IMPL_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImplIface))
38
39 typedef struct _GdkWindowImpl       GdkWindowImpl;      /* dummy */
40 typedef struct _GdkWindowImplIface  GdkWindowImplIface;
41
42 struct _GdkWindowImplIface
43 {
44   GTypeInterface g_iface;
45
46   void         (* show)                 (GdkWindow       *window);
47   void         (* hide)                 (GdkWindow       *window);
48   void         (* withdraw)             (GdkWindow       *window);
49   void         (* raise)                (GdkWindow       *window);
50   void         (* lower)                (GdkWindow       *window);
51
52   void         (* move_resize)          (GdkWindow       *window,
53                                          gboolean         with_move,
54                                          gint             x,
55                                          gint             y,
56                                          gint             width,
57                                          gint             height);
58   void         (* set_background)       (GdkWindow       *window,
59                                          const GdkColor  *color);
60   void         (* set_back_pixmap)      (GdkWindow       *window,
61                                          GdkPixmap       *pixmap);
62
63   GdkEventMask (* get_events)           (GdkWindow       *window);
64   void         (* set_events)           (GdkWindow       *window,
65                                          GdkEventMask     event_mask);
66   
67   gboolean     (* reparent)             (GdkWindow       *window,
68                                          GdkWindow       *new_parent,
69                                          gint             x,
70                                          gint             y);
71   
72   void         (* set_cursor)           (GdkWindow       *window,
73                                          GdkCursor       *cursor);
74
75   void         (* get_geometry)         (GdkWindow       *window,
76                                          gint            *x,
77                                          gint            *y,
78                                          gint            *width,
79                                          gint            *height,
80                                          gint            *depth);
81   gint         (* get_origin)           (GdkWindow       *window,
82                                          gint            *x,
83                                          gint            *y);
84   gint         (* get_deskrelative_origin) (GdkWindow       *window,
85                                          gint            *x,
86                                          gint            *y);
87
88   void         (* shape_combine_region) (GdkWindow       *window,
89                                          const GdkRegion *shape_region,
90                                          gint             offset_x,
91                                          gint             offset_y);
92   void         (* input_shape_combine_region) (GdkWindow       *window,
93                                                const GdkRegion *shape_region,
94                                                gint             offset_x,
95                                                gint             offset_y);
96
97   gboolean     (* set_static_gravities) (GdkWindow       *window,
98                                          gboolean         use_static);
99
100   /* Called before processing updates for a window. This gives the windowing
101    * layer a chance to save the region for later use in avoiding duplicate
102    * exposes. The return value indicates whether the function has a saved
103    * the region; if the result is TRUE, then the windowing layer is responsible
104    * for destroying the region later.
105    */
106   gboolean     (* queue_antiexpose)     (GdkWindow       *window,
107                                          GdkRegion       *update_area);
108   void         (* queue_translation)    (GdkWindow       *window,
109                                          GdkRegion       *area,
110                                          gint            dx,
111                                          gint            dy);
112
113 /* Called to do the windowing system specific part of gdk_window_destroy(),
114  *
115  * window: The window being destroyed
116  * recursing: If TRUE, then this is being called because a parent
117  *            was destroyed. This generally means that the call to the windowing system
118  *            to destroy the window can be omitted, since it will be destroyed as a result
119  *            of the parent being destroyed. Unless @foreign_destroy
120  *            
121  * foreign_destroy: If TRUE, the window or a parent was destroyed by some external 
122  *            agency. The window has already been destroyed and no windowing
123  *            system calls should be made. (This may never happen for some
124  *            windowing systems.)
125  */
126   void         (* destroy)              (GdkWindow       *window,
127                                          gboolean         recursing,
128                                          gboolean         foreign_destroy);
129 };
130
131 /* Interface Functions */
132 GType gdk_window_impl_get_type (void) G_GNUC_CONST;
133
134 /* private definitions from gdkwindow.h */
135
136 struct _GdkWindowRedirect
137 {
138   GdkWindowObject *redirected;
139   GdkDrawable *pixmap;
140
141   gint src_x;
142   gint src_y;
143   gint dest_x;
144   gint dest_y;
145   gint width;
146   gint height;
147
148   GdkRegion *damage;
149   guint damage_idle;
150 };
151
152 G_END_DECLS
153
154 #endif /* __GDK_WINDOW_IMPL_H__ */