]> Pileus Git - ~andy/gtk/commitdiff
broadway: Break out broadway protocol in its own header
authorAlexander Larsson <alexl@redhat.com>
Thu, 20 Dec 2012 12:07:29 +0000 (13:07 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 27 Dec 2012 21:56:03 +0000 (22:56 +0100)
gdk/broadway/Makefile.am
gdk/broadway/broadway-protocol.h [new file with mode: 0644]
gdk/broadway/gdkbroadway-server.h

index d608b6efff82d806423ed8b4a9f409037c3c0f5f..2352c666fa21bd3ee7cd4e09075926a2316b7c91 100644 (file)
@@ -30,6 +30,7 @@ libgdkbroadwayinclude_HEADERS =       \
 
 libbroadway_la_SOURCES =               \
        gdkbroadway-server.h            \
+       broadway-protocol.h             \
        gdkbroadway-server.c            \
        broadway.h                      \
        broadway.c
diff --git a/gdk/broadway/broadway-protocol.h b/gdk/broadway/broadway-protocol.h
new file mode 100644 (file)
index 0000000..8fd1369
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef __BROADWAY_PROTOCOL_H__
+#define __BROADWAY_PROTOCOL_H__
+
+#include <glib.h>
+
+typedef struct {
+  guint8 type;
+  guint32 serial;
+  guint64 time;
+} BroadwayInputBaseMsg;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  guint32 mouse_window_id; /* The real window, not taking grabs into account */
+  guint32 event_window_id;
+  gint32 root_x;
+  gint32 root_y;
+  gint32 win_x;
+  gint32 win_y;
+  guint32 state;
+} BroadwayInputPointerMsg;
+
+typedef struct {
+  BroadwayInputPointerMsg pointer;
+  guint32 mode;
+} BroadwayInputCrossingMsg;
+
+typedef struct {
+  BroadwayInputPointerMsg pointer;
+  guint32 button;
+} BroadwayInputButtonMsg;
+
+typedef struct {
+  BroadwayInputPointerMsg pointer;
+  gint32 dir;
+} BroadwayInputScrollMsg;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  guint32 mouse_window_id; /* The real window, not taking grabs into account */
+  guint32 state;
+  gint32 key;
+} BroadwayInputKeyMsg;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  gint32 res;
+} BroadwayInputGrabReply;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  gint32 id;
+  gint32 x;
+  gint32 y;
+  gint32 width;
+  gint32 height;
+} BroadwayInputConfigureNotify;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  gint32 width;
+  gint32 height;
+} BroadwayInputScreenResizeNotify;
+
+typedef struct {
+  BroadwayInputBaseMsg base;
+  gint32 id;
+} BroadwayInputDeleteNotify;
+
+typedef union {
+  BroadwayInputBaseMsg base;
+  BroadwayInputPointerMsg pointer;
+  BroadwayInputCrossingMsg crossing;
+  BroadwayInputButtonMsg button;
+  BroadwayInputScrollMsg scroll;
+  BroadwayInputKeyMsg key;
+  BroadwayInputGrabReply grab_reply;
+  BroadwayInputConfigureNotify configure_notify;
+  BroadwayInputDeleteNotify delete_notify;
+  BroadwayInputScreenResizeNotify screen_resize_notify;
+} BroadwayInputMsg;
+
+#endif /* __BROADWAY_PROTOCOL_H__ */
index e9f77425da35753992f575627416787303d53bf6..fdd769ad18a71c1d7f6a2ce3d0c4139197ad0f9a 100644 (file)
@@ -2,6 +2,7 @@
 #define __GDK_BROADWAY_SERVER__
 
 #include <gdk/gdktypes.h>
+#include "broadway-protocol.h"
 
 typedef struct _GdkBroadwayServer GdkBroadwayServer;
 typedef struct _GdkBroadwayServerClass GdkBroadwayServerClass;
@@ -13,82 +14,6 @@ typedef struct _GdkBroadwayServerClass GdkBroadwayServerClass;
 #define GDK_IS_BROADWAY_SERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_SERVER))
 #define GDK_BROADWAY_SERVER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_SERVER, GdkBroadwayServerClass))
 
-typedef struct {
-  guint8 type;
-  guint32 serial;
-  guint64 time;
-} BroadwayInputBaseMsg;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  guint32 mouse_window_id; /* The real window, not taking grabs into account */
-  guint32 event_window_id;
-  gint32 root_x;
-  gint32 root_y;
-  gint32 win_x;
-  gint32 win_y;
-  guint32 state;
-} BroadwayInputPointerMsg;
-
-typedef struct {
-  BroadwayInputPointerMsg pointer;
-  guint32 mode;
-} BroadwayInputCrossingMsg;
-
-typedef struct {
-  BroadwayInputPointerMsg pointer;
-  guint32 button;
-} BroadwayInputButtonMsg;
-
-typedef struct {
-  BroadwayInputPointerMsg pointer;
-  gint32 dir;
-} BroadwayInputScrollMsg;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  guint32 mouse_window_id; /* The real window, not taking grabs into account */
-  guint32 state;
-  gint32 key;
-} BroadwayInputKeyMsg;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  gint32 res;
-} BroadwayInputGrabReply;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  gint32 id;
-  gint32 x;
-  gint32 y;
-  gint32 width;
-  gint32 height;
-} BroadwayInputConfigureNotify;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  gint32 width;
-  gint32 height;
-} BroadwayInputScreenResizeNotify;
-
-typedef struct {
-  BroadwayInputBaseMsg base;
-  gint32 id;
-} BroadwayInputDeleteNotify;
-
-typedef union {
-  BroadwayInputBaseMsg base;
-  BroadwayInputPointerMsg pointer;
-  BroadwayInputCrossingMsg crossing;
-  BroadwayInputButtonMsg button;
-  BroadwayInputScrollMsg scroll;
-  BroadwayInputKeyMsg key;
-  BroadwayInputGrabReply grab_reply;
-  BroadwayInputConfigureNotify configure_notify;
-  BroadwayInputDeleteNotify delete_notify;
-  BroadwayInputScreenResizeNotify screen_resize_notify;
-} BroadwayInputMsg;
 
 GdkBroadwayServer *_gdk_broadway_server_new                      (int                 port,
                                                                  GError            **error);