summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-12-21 21:54:51 -0500
committerKristian Høgsberg <krh@redhat.com>2008-12-21 21:57:45 -0500
commitfb6d68ddbe76d2cf716bf6075e6e1afe2caaea1e (patch)
treedc59edf545e4559f1238f398b7c301091947950f
parentfe831a749421470c6c1c8e842a785d7fc3c4ac9b (diff)
downloadwayland-fb6d68ddbe76d2cf716bf6075e6e1afe2caaea1e.tar.gz
wayland-fb6d68ddbe76d2cf716bf6075e6e1afe2caaea1e.tar.xz
wayland-fb6d68ddbe76d2cf716bf6075e6e1afe2caaea1e.zip
Represent event and method metadata with struct wl_message.
-rw-r--r--wayland-protocol.c10
-rw-r--r--wayland-protocol.h11
-rw-r--r--wayland-system-compositor.c2
-rw-r--r--wayland.c4
4 files changed, 11 insertions, 16 deletions
diff --git a/wayland-protocol.c b/wayland-protocol.c
index 3af3c62..5b20154 100644
--- a/wayland-protocol.c
+++ b/wayland-protocol.c
@@ -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" },
diff --git a/wayland-protocol.h b/wayland-protocol.h
index a5c97c0..f5deea3 100644
--- a/wayland-protocol.h
+++ b/wayland-protocol.h
@@ -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
diff --git a/wayland-system-compositor.c b/wayland-system-compositor.c
index 073386f..69f785c 100644
--- a/wayland-system-compositor.c
+++ b/wayland-system-compositor.c
@@ -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 }
};
diff --git a/wayland.c b/wayland.c
index 45b4fae..48e1513 100644
--- 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;