2 * gdkdisplay-broadway.h
4 * Copyright 2001 Sun Microsystems Inc.
6 * Erwann Chenede <erwann.chenede@sun.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __GDK_BROADWAY_DISPLAY__
23 #define __GDK_BROADWAY_DISPLAY__
25 #include "gdkdisplayprivate.h"
27 #include "gdkwindow.h"
28 #include "gdkinternals.h"
34 typedef struct _GdkBroadwayDisplay GdkBroadwayDisplay;
35 typedef struct _GdkBroadwayDisplayClass GdkBroadwayDisplayClass;
37 typedef struct BroadwayInput BroadwayInput;
39 #define GDK_TYPE_BROADWAY_DISPLAY (gdk_broadway_display_get_type())
40 #define GDK_BROADWAY_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplay))
41 #define GDK_BROADWAY_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplayClass))
42 #define GDK_IS_BROADWAY_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_DISPLAY))
43 #define GDK_IS_BROADWAY_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_DISPLAY))
44 #define GDK_BROADWAY_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplayClass))
50 } BroadwayInputBaseMsg;
53 BroadwayInputBaseMsg base;
54 guint32 mouse_window_id; /* The real window, not taking grabs into account */
55 guint32 event_window_id;
61 } BroadwayInputPointerMsg;
64 BroadwayInputPointerMsg pointer;
66 } BroadwayInputCrossingMsg;
69 BroadwayInputPointerMsg pointer;
71 } BroadwayInputButtonMsg;
74 BroadwayInputPointerMsg pointer;
76 } BroadwayInputScrollMsg;
79 BroadwayInputBaseMsg base;
82 } BroadwayInputKeyMsg;
85 BroadwayInputBaseMsg base;
87 } BroadwayInputGrabReply;
90 BroadwayInputBaseMsg base;
96 } BroadwayInputConfigureNotify;
99 BroadwayInputBaseMsg base;
102 } BroadwayInputScreenResizeNotify;
105 BroadwayInputBaseMsg base;
107 } BroadwayInputDeleteNotify;
110 BroadwayInputBaseMsg base;
111 BroadwayInputPointerMsg pointer;
112 BroadwayInputCrossingMsg crossing;
113 BroadwayInputButtonMsg button;
114 BroadwayInputScrollMsg scroll;
115 BroadwayInputKeyMsg key;
116 BroadwayInputGrabReply grab_reply;
117 BroadwayInputConfigureNotify configure_notify;
118 BroadwayInputDeleteNotify delete_notify;
119 BroadwayInputScreenResizeNotify screen_resize_notify;
122 struct _GdkBroadwayDisplay
124 GdkDisplay parent_instance;
125 GdkScreen *default_screen;
131 GSource *event_source;
132 GdkWindow *mouse_in_toplevel;
133 int last_x, last_y; /* in root coords */
135 GdkWindow *real_mouse_in_toplevel; /* Not affected by grabs */
137 /* Keyboard related information */
140 /* drag and drop information */
141 GdkDragContext *current_dest_drag;
144 /* input GdkDevice list */
145 GList *input_devices;
147 /* The offscreen window that has the pointer in it (if any) */
148 GdkWindow *active_offscreen_window;
150 GSocketService *service;
151 BroadwayOutput *output;
152 guint32 saved_serial;
153 guint64 last_seen_time;
154 BroadwayInput *input;
155 GList *input_messages;
156 guint process_input_idle;
158 /* Explicit pointer grabs: */
159 GdkWindow *pointer_grab_window;
160 guint32 pointer_grab_time;
161 gboolean pointer_grab_owner_events;
163 /* Future data, from the currently queued events */
166 GdkModifierType future_state;
167 int future_mouse_in_toplevel;
170 struct _GdkBroadwayDisplayClass
172 GdkDisplayClass parent_class;
175 GType gdk_broadway_display_get_type (void);
179 #endif /* __GDK_BROADWAY_DISPLAY__ */