Represent event and method metadata with struct wl_message.
authorKristian Høgsberg <krh@redhat.com>
Mon, 22 Dec 2008 02:54:51 +0000 (21:54 -0500)
committerKristian Høgsberg <krh@redhat.com>
Mon, 22 Dec 2008 02:57:45 +0000 (21:57 -0500)
wayland-protocol.c
wayland-protocol.h
wayland-system-compositor.c
wayland.c

index 3af3c62..5b20154 100644 (file)
@@ -25,7 +25,7 @@
 #include "wayland-util.h"
 #include "wayland-protocol.h"
 
-static const struct wl_event display_events[] = {
+static const struct wl_message display_events[] = {
        { "invalid_object", "u" },
        { "invalid_method", "uu" },
        { "no_memory", "" },
@@ -39,12 +39,12 @@ WL_EXPORT const struct wl_interface wl_display_interface = {
 };
 
 
-static const struct wl_method compositor_methods[] = {
+static const struct wl_message compositor_methods[] = {
        { "create_surface", "n" },
        { "commit", "u" }
 };
 
-static const struct wl_event compositor_events[] = {
+static const struct wl_message compositor_events[] = {
        { "acknowledge", "uu" },
        { "frame", "uu" }
 };
@@ -56,7 +56,7 @@ WL_EXPORT const struct wl_interface wl_compositor_interface = {
 };
 
 
-static const struct wl_method surface_methods[] = {
+static const struct wl_message surface_methods[] = {
        { "destroy", "" },
        { "attach", "uuuuo" },
        { "map", "iiii" },
@@ -71,7 +71,7 @@ WL_EXPORT const struct wl_interface wl_surface_interface = {
 };
 
 
-static const struct wl_event input_device_events[] = {
+static const struct wl_message input_device_events[] = {
        { "motion", "iiii" },
        { "button", "uuiiii" },
        { "key", "uu" },
index a5c97c0..f5deea3 100644 (file)
@@ -30,24 +30,19 @@ struct wl_argument {
        void *data;
 };
 
-struct wl_method {
+struct wl_message {
        const char *name;
        const char *signature;
        const void **types;
 };
 
-struct wl_event {
-       const char *name;
-       const char *signature;
-};
-
 struct wl_interface {
        const char *name;
        int version;
        int method_count;
-       const struct wl_method *methods;
+       const struct wl_message *methods;
        int event_count;
-       const struct wl_event *events;
+       const struct wl_message *events;
 };
 
 #define WL_DISPLAY_INVALID_OBJECT      0
index 073386f..69f785c 100644 (file)
@@ -145,7 +145,7 @@ screenshooter_shoot(struct wl_client *client, struct screenshooter *shooter)
        gdk_pixbuf_save(pixbuf, filename, "png", &error, NULL);
 }
 
-static const struct wl_method screenshooter_methods[] = {
+static const struct wl_message screenshooter_methods[] = {
        { "shoot", "", NULL }
 };
 
index 45b4fae..48e1513 100644 (file)
--- a/wayland.c
+++ b/wayland.c
@@ -70,7 +70,7 @@ static void
 wl_client_vmarshal(struct wl_client *client, struct wl_object *sender,
                   uint32_t opcode, va_list ap)
 {
-       const struct wl_event *event;
+       const struct wl_message *event;
        struct wl_object *object;
        uint32_t args[32], length, *p, size;
        const char *s;
@@ -125,7 +125,7 @@ static void
 wl_client_demarshal(struct wl_client *client, struct wl_object *target,
                    uint32_t opcode, size_t size)
 {
-       const struct wl_method *method;
+       const struct wl_message *method;
        ffi_type *types[20];
        ffi_cif cif;
        uint32_t *p, result;