|
|
|
@ -44,31 +44,26 @@ struct wl_global { |
|
|
|
|
uint32_t id; |
|
|
|
|
char *interface; |
|
|
|
|
uint32_t version; |
|
|
|
|
struct wl_proxy *proxy; |
|
|
|
|
struct wl_list link; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_proxy { |
|
|
|
|
struct wl_object base; |
|
|
|
|
struct wl_display *display; |
|
|
|
|
struct wl_global_listener { |
|
|
|
|
wl_display_global_func_t handler; |
|
|
|
|
void *data; |
|
|
|
|
struct wl_list link; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_display { |
|
|
|
|
struct wl_proxy proxy; |
|
|
|
|
struct wl_connection *connection; |
|
|
|
|
int fd; |
|
|
|
|
uint32_t id, id_count, next_range; |
|
|
|
|
uint32_t mask; |
|
|
|
|
struct wl_hash *objects; |
|
|
|
|
struct wl_list global_list; |
|
|
|
|
struct wl_list visual_list; |
|
|
|
|
|
|
|
|
|
wl_display_update_func_t update; |
|
|
|
|
void *update_data; |
|
|
|
|
|
|
|
|
|
wl_display_event_func_t event_handler; |
|
|
|
|
void *event_handler_data; |
|
|
|
|
struct wl_listener { |
|
|
|
|
void (**implementation)(void); |
|
|
|
|
void *data; |
|
|
|
|
struct wl_list link; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_output *output; |
|
|
|
|
struct wl_proxy { |
|
|
|
|
struct wl_object base; |
|
|
|
|
struct wl_display *display; |
|
|
|
|
struct wl_list listener_list; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_compositor { |
|
|
|
@ -81,14 +76,42 @@ struct wl_surface { |
|
|
|
|
|
|
|
|
|
struct wl_visual { |
|
|
|
|
struct wl_proxy proxy; |
|
|
|
|
struct wl_list link; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_output { |
|
|
|
|
struct wl_proxy proxy; |
|
|
|
|
struct wl_listener listener; |
|
|
|
|
int32_t width, height; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_input_device { |
|
|
|
|
struct wl_proxy proxy; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct wl_display { |
|
|
|
|
struct wl_proxy proxy; |
|
|
|
|
struct wl_connection *connection; |
|
|
|
|
int fd; |
|
|
|
|
uint32_t id, id_count, next_range; |
|
|
|
|
uint32_t mask; |
|
|
|
|
struct wl_hash *objects; |
|
|
|
|
struct wl_list global_list; |
|
|
|
|
struct wl_listener listener; |
|
|
|
|
struct wl_list global_listener_list; |
|
|
|
|
|
|
|
|
|
struct wl_visual *argb_visual; |
|
|
|
|
struct wl_visual *premultiplied_argb_visual; |
|
|
|
|
struct wl_visual *rgb_visual; |
|
|
|
|
|
|
|
|
|
wl_display_update_func_t update; |
|
|
|
|
void *update_data; |
|
|
|
|
|
|
|
|
|
wl_display_global_func_t global_handler; |
|
|
|
|
void *global_handler_data; |
|
|
|
|
|
|
|
|
|
struct wl_compositor *compositor; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static int |
|
|
|
|
connection_update(struct wl_connection *connection, |
|
|
|
|
uint32_t mask, void *data) |
|
|
|
@ -103,46 +126,117 @@ connection_update(struct wl_connection *connection, |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
output_handle_geometry(struct wl_display *display, |
|
|
|
|
struct wl_output *output, int32_t width, int32_t height) |
|
|
|
|
WL_EXPORT int |
|
|
|
|
wl_object_implements(struct wl_object *object, |
|
|
|
|
const char *interface, int version) |
|
|
|
|
{ |
|
|
|
|
output->width = width; |
|
|
|
|
output->height = height; |
|
|
|
|
return strcmp(object->interface->name, interface) == 0 && |
|
|
|
|
object->interface->version >= version; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct wl_output_listener { |
|
|
|
|
void (*geometry)(struct wl_display *display, |
|
|
|
|
struct wl_output *output, |
|
|
|
|
int32_t width, int32_t height); |
|
|
|
|
}; |
|
|
|
|
WL_EXPORT struct wl_global_listener * |
|
|
|
|
wl_display_add_global_listener(struct wl_display *display, |
|
|
|
|
wl_display_global_func_t handler, void *data) |
|
|
|
|
{ |
|
|
|
|
struct wl_global_listener *listener; |
|
|
|
|
struct wl_global *global; |
|
|
|
|
|
|
|
|
|
static const struct wl_output_listener output_listener = { |
|
|
|
|
output_handle_geometry |
|
|
|
|
}; |
|
|
|
|
listener = malloc(sizeof *listener); |
|
|
|
|
if (listener == NULL) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
add_output(struct wl_display *display, struct wl_global *global) |
|
|
|
|
{ |
|
|
|
|
struct wl_output *output; |
|
|
|
|
listener->handler = handler; |
|
|
|
|
listener->data = data; |
|
|
|
|
wl_list_insert(display->global_listener_list.prev, &listener->link); |
|
|
|
|
|
|
|
|
|
output = malloc(sizeof *output); |
|
|
|
|
if (output == NULL) |
|
|
|
|
return; |
|
|
|
|
/* FIXME: Need a destructor for void *data? */ |
|
|
|
|
|
|
|
|
|
output->proxy.base.interface = &wl_output_interface; |
|
|
|
|
output->proxy.base.implementation = (void(**)(void)) &output_listener; |
|
|
|
|
output->proxy.base.id = global->id; |
|
|
|
|
output->proxy.display = display; |
|
|
|
|
display->output = output; |
|
|
|
|
wl_hash_insert(display->objects, &output->proxy.base); |
|
|
|
|
global = container_of(display->global_list.next, |
|
|
|
|
struct wl_global, link); |
|
|
|
|
while (&global->link != &display->global_list) { |
|
|
|
|
if (global->proxy != NULL) |
|
|
|
|
(*handler)(display, &global->proxy->base, data); |
|
|
|
|
|
|
|
|
|
global = container_of(global->link.next, |
|
|
|
|
struct wl_global, link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return listener; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
|
wl_display_get_geometry(struct wl_display *display, int32_t *width, int32_t *height) |
|
|
|
|
wl_display_remove_global_listener(struct wl_display *display, |
|
|
|
|
struct wl_global_listener *listener) |
|
|
|
|
{ |
|
|
|
|
wl_list_remove(&listener->link); |
|
|
|
|
free(listener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static struct wl_proxy * |
|
|
|
|
wl_proxy_create_for_global(struct wl_display *display, |
|
|
|
|
struct wl_global *global, |
|
|
|
|
const struct wl_interface *interface) |
|
|
|
|
{ |
|
|
|
|
struct wl_proxy *proxy; |
|
|
|
|
struct wl_global_listener *listener; |
|
|
|
|
|
|
|
|
|
proxy = malloc(sizeof *proxy); |
|
|
|
|
if (proxy == NULL) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
proxy->base.interface = interface; |
|
|
|
|
proxy->base.id = global->id; |
|
|
|
|
proxy->display = display; |
|
|
|
|
global->proxy = proxy; |
|
|
|
|
wl_list_init(&proxy->listener_list); |
|
|
|
|
wl_hash_insert(display->objects, &proxy->base); |
|
|
|
|
|
|
|
|
|
listener = container_of(display->global_listener_list.next, |
|
|
|
|
struct wl_global_listener, link); |
|
|
|
|
while (&listener->link != &display->global_listener_list) { |
|
|
|
|
(*listener->handler)(display, &proxy->base, listener->data); |
|
|
|
|
listener = container_of(listener->link.next, |
|
|
|
|
struct wl_global_listener, link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return proxy; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int |
|
|
|
|
wl_proxy_add_listener(struct wl_proxy *proxy, void (**implementation)(void), void *data) |
|
|
|
|
{ |
|
|
|
|
*width = display->output->width; |
|
|
|
|
*height = display->output->height; |
|
|
|
|
struct wl_listener *listener; |
|
|
|
|
|
|
|
|
|
listener = malloc(sizeof *listener); |
|
|
|
|
if (listener == NULL) |
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
listener->implementation = (void (**)(void)) implementation; |
|
|
|
|
listener->data = data; |
|
|
|
|
wl_list_insert(proxy->listener_list.prev, &listener->link); |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) |
|
|
|
|
{ |
|
|
|
|
va_list ap; |
|
|
|
|
|
|
|
|
|
va_start(ap, opcode); |
|
|
|
|
wl_connection_vmarshal(proxy->display->connection, |
|
|
|
|
&proxy->base, opcode, ap, |
|
|
|
|
&proxy->base.interface->methods[opcode]); |
|
|
|
|
va_end(ap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT int |
|
|
|
|
wl_output_add_listener(struct wl_output *output, |
|
|
|
|
const struct wl_output_listener *listener, |
|
|
|
|
void *data) |
|
|
|
|
{ |
|
|
|
|
return wl_proxy_add_listener(&output->proxy, |
|
|
|
|
(void (**)(void)) listener, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
@ -150,66 +244,69 @@ add_visual(struct wl_display *display, struct wl_global *global) |
|
|
|
|
{ |
|
|
|
|
struct wl_visual *visual; |
|
|
|
|
|
|
|
|
|
visual = malloc(sizeof *visual); |
|
|
|
|
if (visual == NULL) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
visual->proxy.base.interface = &wl_visual_interface; |
|
|
|
|
visual->proxy.base.id = global->id; |
|
|
|
|
visual->proxy.base.implementation = NULL; |
|
|
|
|
visual->proxy.display = display; |
|
|
|
|
wl_list_insert(display->visual_list.prev, &visual->link); |
|
|
|
|
wl_hash_insert(display->objects, &visual->proxy.base); |
|
|
|
|
visual = (struct wl_visual *) |
|
|
|
|
wl_proxy_create_for_global(display, global, |
|
|
|
|
&wl_visual_interface); |
|
|
|
|
if (display->argb_visual == NULL) |
|
|
|
|
display->argb_visual = visual; |
|
|
|
|
else if (display->premultiplied_argb_visual == NULL) |
|
|
|
|
display->premultiplied_argb_visual = visual; |
|
|
|
|
else |
|
|
|
|
display->rgb_visual = visual; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT struct wl_visual * |
|
|
|
|
wl_display_get_argb_visual(struct wl_display *display) |
|
|
|
|
{ |
|
|
|
|
return container_of(display->visual_list.next, |
|
|
|
|
struct wl_visual, link); |
|
|
|
|
return display->argb_visual; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT struct wl_visual * |
|
|
|
|
wl_display_get_premultiplied_argb_visual(struct wl_display *display) |
|
|
|
|
{ |
|
|
|
|
return container_of(display->visual_list.next->next, |
|
|
|
|
struct wl_visual, link); |
|
|
|
|
return display->premultiplied_argb_visual; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT struct wl_visual * |
|
|
|
|
wl_display_get_rgb_visual(struct wl_display *display) |
|
|
|
|
{ |
|
|
|
|
/* FIXME: Where's cddar when you need it... */ |
|
|
|
|
return display->rgb_visual; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return container_of(display->visual_list.next->next->next, |
|
|
|
|
struct wl_visual, link); |
|
|
|
|
WL_EXPORT int |
|
|
|
|
wl_input_device_add_listener(struct wl_input_device *input_device, |
|
|
|
|
const struct wl_input_device_listener *listener, |
|
|
|
|
void *data) |
|
|
|
|
{ |
|
|
|
|
return wl_proxy_add_listener(&input_device->proxy, |
|
|
|
|
(void (**)(void)) listener, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
display_handle_invalid_object(struct wl_display *display, |
|
|
|
|
struct wl_object *object, uint32_t id) |
|
|
|
|
display_handle_invalid_object(void *data, |
|
|
|
|
struct wl_display *display, uint32_t id) |
|
|
|
|
{ |
|
|
|
|
fprintf(stderr, "sent request to invalid object\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
display_handle_invalid_method(struct wl_display *display, |
|
|
|
|
struct wl_object *object, |
|
|
|
|
display_handle_invalid_method(void *data,
|
|
|
|
|
struct wl_display *display, |
|
|
|
|
uint32_t id, uint32_t opcode) |
|
|
|
|
{ |
|
|
|
|
fprintf(stderr, "sent invalid request opcode\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
display_handle_no_memory(struct wl_display *display, |
|
|
|
|
struct wl_object *object) |
|
|
|
|
display_handle_no_memory(void *data, |
|
|
|
|
struct wl_display *display) |
|
|
|
|
{ |
|
|
|
|
fprintf(stderr, "server out of memory\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
display_handle_global(struct wl_display *display, |
|
|
|
|
struct wl_object *object, |
|
|
|
|
display_handle_global(void *data, |
|
|
|
|
struct wl_display *display, |
|
|
|
|
uint32_t id, const char *interface, uint32_t version) |
|
|
|
|
{ |
|
|
|
|
struct wl_global *global; |
|
|
|
@ -222,32 +319,41 @@ display_handle_global(struct wl_display *display, |
|
|
|
|
global->interface = strdup(interface); |
|
|
|
|
global->version = version; |
|
|
|
|
wl_list_insert(display->global_list.prev, &global->link); |
|
|
|
|
|
|
|
|
|
if (strcmp(global->interface, "display") == 0) |
|
|
|
|
wl_hash_insert(display->objects, &display->proxy.base); |
|
|
|
|
if (strcmp(global->interface, "visual") == 0) |
|
|
|
|
else if (strcmp(global->interface, "compositor") == 0) |
|
|
|
|
display->compositor = (struct wl_compositor *)
|
|
|
|
|
wl_proxy_create_for_global(display, global, |
|
|
|
|
&wl_compositor_interface); |
|
|
|
|
else if (strcmp(global->interface, "visual") == 0) |
|
|
|
|
add_visual(display, global); |
|
|
|
|
else if (strcmp(global->interface, "output") == 0) |
|
|
|
|
add_output(display, global); |
|
|
|
|
wl_proxy_create_for_global(display, global, |
|
|
|
|
&wl_output_interface); |
|
|
|
|
else if (strcmp(global->interface, "input_device") == 0) |
|
|
|
|
wl_proxy_create_for_global(display, global, |
|
|
|
|
&wl_input_device_interface); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
display_handle_range(struct wl_display *display, |
|
|
|
|
struct wl_object *object, uint32_t range) |
|
|
|
|
display_handle_range(void *data, |
|
|
|
|
struct wl_display *display, uint32_t range) |
|
|
|
|
{ |
|
|
|
|
display->next_range = range; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct wl_display_listener { |
|
|
|
|
void (*invalid_object)(struct wl_display *display, |
|
|
|
|
struct wl_object *object, uint32_t id); |
|
|
|
|
void (*invalid_method)(struct wl_display *display, |
|
|
|
|
struct wl_object *object, |
|
|
|
|
void (*invalid_object)(void *data, |
|
|
|
|
struct wl_display *display, uint32_t id); |
|
|
|
|
void (*invalid_method)(void *data, struct wl_display *display, |
|
|
|
|
uint32_t id, uint32_t opcode); |
|
|
|
|
void (*no_memory)(struct wl_display *display, struct wl_object *object); |
|
|
|
|
void (*global)(struct wl_display *display, struct wl_object *object, |
|
|
|
|
void (*no_memory)(void *data, |
|
|
|
|
struct wl_display *display); |
|
|
|
|
void (*global)(void *data, struct wl_display *display, |
|
|
|
|
uint32_t id, const char *interface, uint32_t version); |
|
|
|
|
void (*range)(struct wl_display *display, |
|
|
|
|
struct wl_object *object, uint32_t range); |
|
|
|
|
void (*range)(void *data, |
|
|
|
|
struct wl_display *display, uint32_t range); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static const struct wl_display_listener display_listener = { |
|
|
|
@ -289,12 +395,15 @@ wl_display_create(const char *name, size_t name_size) |
|
|
|
|
|
|
|
|
|
display->objects = wl_hash_create(); |
|
|
|
|
wl_list_init(&display->global_list); |
|
|
|
|
wl_list_init(&display->visual_list); |
|
|
|
|
wl_list_init(&display->global_listener_list); |
|
|
|
|
|
|
|
|
|
display->proxy.base.interface = &wl_display_interface; |
|
|
|
|
display->proxy.base.implementation = (void(**)(void)) &display_listener; |
|
|
|
|
display->proxy.base.id = 1; |
|
|
|
|
display->proxy.display = display; |
|
|
|
|
wl_list_init(&display->proxy.listener_list); |
|
|
|
|
|
|
|
|
|
display->listener.implementation = (void(**)(void)) &display_listener; |
|
|
|
|
wl_list_insert(display->proxy.listener_list.prev, &display->listener.link); |
|
|
|
|
|
|
|
|
|
display->connection = wl_connection_create(display->fd, |
|
|
|
|
connection_update, |
|
|
|
@ -351,26 +460,37 @@ handle_event(struct wl_display *display, |
|
|
|
|
uint32_t id, uint32_t opcode, uint32_t size) |
|
|
|
|
{ |
|
|
|
|
uint32_t p[32]; |
|
|
|
|
struct wl_object *object; |
|
|
|
|
struct wl_listener *listener; |
|
|
|
|
struct wl_proxy *proxy; |
|
|
|
|
|
|
|
|
|
wl_connection_copy(display->connection, p, size); |
|
|
|
|
if (id == 1) |
|
|
|
|
object = &display->proxy.base; |
|
|
|
|
proxy = &display->proxy; |
|
|
|
|
else |
|
|
|
|
object = wl_hash_lookup(display->objects, id); |
|
|
|
|
|
|
|
|
|
if (object != NULL) |
|
|
|
|
wl_connection_demarshal(display->connection, |
|
|
|
|
size, |
|
|
|
|
display->objects, |
|
|
|
|
object->implementation[opcode], |
|
|
|
|
display, |
|
|
|
|
object,
|
|
|
|
|
&object->interface->events[opcode]); |
|
|
|
|
else if (display->event_handler != NULL) |
|
|
|
|
display->event_handler(display, id, |
|
|
|
|
opcode, size, p + 2, |
|
|
|
|
display->event_handler_data); |
|
|
|
|
proxy = (struct wl_proxy *) wl_hash_lookup(display->objects, id); |
|
|
|
|
|
|
|
|
|
if (proxy != NULL) { |
|
|
|
|
if (wl_list_empty(&proxy->listener_list)) { |
|
|
|
|
printf("proxy found for object %d, opcode %d, but no listeners\n", |
|
|
|
|
id, opcode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
listener = container_of(proxy->listener_list.next, |
|
|
|
|
struct wl_listener, link); |
|
|
|
|
while (&listener->link != &proxy->listener_list) { |
|
|
|
|
|
|
|
|
|
wl_connection_demarshal(display->connection, |
|
|
|
|
size, |
|
|
|
|
display->objects, |
|
|
|
|
listener->implementation[opcode], |
|
|
|
|
listener->data, |
|
|
|
|
&proxy->base,
|
|
|
|
|
&proxy->base.interface->events[opcode]); |
|
|
|
|
|
|
|
|
|
listener = container_of(listener->link.next, |
|
|
|
|
struct wl_listener, link); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
wl_connection_consume(display->connection, size); |
|
|
|
|
} |
|
|
|
@ -403,16 +523,6 @@ wl_display_iterate(struct wl_display *display, uint32_t mask) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
|
wl_display_set_event_handler(struct wl_display *display, |
|
|
|
|
wl_display_event_func_t handler, |
|
|
|
|
void *data) |
|
|
|
|
{ |
|
|
|
|
/* FIXME: This needs something more generic... */ |
|
|
|
|
display->event_handler = handler; |
|
|
|
|
display->event_handler_data = data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT uint32_t |
|
|
|
|
wl_display_allocate_id(struct wl_display *display) |
|
|
|
|
{ |
|
|
|
@ -435,32 +545,16 @@ wl_display_write(struct wl_display *display, const void *data, size_t count) |
|
|
|
|
WL_EXPORT struct wl_compositor * |
|
|
|
|
wl_display_get_compositor(struct wl_display *display) |
|
|
|
|
{ |
|
|
|
|
struct wl_compositor *compositor; |
|
|
|
|
uint32_t id; |
|
|
|
|
|
|
|
|
|
id = wl_display_get_object_id(display, "compositor", 1); |
|
|
|
|
if (id == 0) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
compositor = malloc(sizeof *compositor); |
|
|
|
|
compositor->proxy.base.interface = &wl_compositor_interface; |
|
|
|
|
compositor->proxy.base.id = id; |
|
|
|
|
compositor->proxy.display = display; |
|
|
|
|
|
|
|
|
|
return compositor; |
|
|
|
|
return display->compositor; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) |
|
|
|
|
WL_EXPORT int |
|
|
|
|
wl_compositor_add_listener(struct wl_compositor *compositor, |
|
|
|
|
const struct wl_compositor_listener *listener, |
|
|
|
|
void *data) |
|
|
|
|
{ |
|
|
|
|
va_list ap; |
|
|
|
|
|
|
|
|
|
va_start(ap, opcode); |
|
|
|
|
wl_connection_vmarshal(proxy->display->connection, |
|
|
|
|
&proxy->base, opcode, ap, |
|
|
|
|
&proxy->base.interface->methods[opcode]); |
|
|
|
|
va_end(ap); |
|
|
|
|
|
|
|
|
|
return wl_proxy_add_listener(&compositor->proxy, |
|
|
|
|
(void (**)(void)) listener, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WL_EXPORT struct wl_surface * |
|
|
|
|