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