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