]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdkwindow-x11.h
75556e00cb957b7e2d2aad6b87780e09b6feaf12
[~andy/gtk] / gdk / x11 / gdkwindow-x11.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_X11_H__
28 #define __GDK_WINDOW_X11_H__
29
30 #include <gdk/x11/gdkdrawable-x11.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36 typedef struct _GdkXPositionInfo    GdkXPositionInfo;
37
38 struct _GdkXPositionInfo
39 {
40   gint x;
41   gint y;
42   gint width;
43   gint height;
44   gint x_offset;                /* Offsets to add to X coordinates within window */
45   gint y_offset;                /*   to get GDK coodinates within window */
46   guint big : 1;
47   guint mapped : 1;
48   guint no_bg : 1;              /* Set when the window background is temporarily
49                                  * unset during resizing and scaling */
50   GdkRectangle clip_rect;       /* visible rectangle of window */
51 };
52
53
54 /* Window implementation for X11
55  */
56
57 typedef struct _GdkWindowImplX11 GdkWindowImplX11;
58 typedef struct _GdkWindowImplX11Class GdkWindowImplX11Class;
59
60 #define GDK_TYPE_WINDOW_IMPL_X11              (gdk_window_impl_x11_get_type ())
61 #define GDK_WINDOW_IMPL_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11))
62 #define GDK_WINDOW_IMPL_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
63 #define GDK_IS_WINDOW_IMPL_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_X11))
64 #define GDK_IS_WINDOW_IMPL_X11_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_X11))
65 #define GDK_WINDOW_IMPL_X11_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
66
67 struct _GdkWindowImplX11
68 {
69   GdkDrawableImplX11 parent_instance;
70
71   gint width;
72   gint height;
73   
74   GdkXPositionInfo position_info;
75
76   /* Set if the window, or any descendent of it, has the focus
77    */
78   guint has_focus : 1;
79
80   /* Set if !window_has_focus, but events are being sent to the
81    * window because the pointer is in it. (Typically, no window
82    * manager is running.
83    */
84   guint has_pointer_focus : 1;
85
86   /* Set if we are requesting these hints */
87   guint skip_taskbar_hint : 1;
88   guint skip_pager_hint : 1;
89   
90   /* We use an extra X window for toplevel windows that we XSetInputFocus()
91    * to in order to avoid getting keyboard events redirected to subwindows
92    * that might not even be part of this app
93    */
94   Window focus_window;
95 };
96  
97 struct _GdkWindowImplX11Class 
98 {
99   GdkDrawableImplX11Class parent_class;
100
101 };
102
103 GType gdk_window_impl_x11_get_type (void);
104
105 #ifdef __cplusplus
106 }
107 #endif /* __cplusplus */
108
109 #endif /* __GDK_WINDOW_X11_H__ */