WL_EVENT_ERROR = 0x08
};
-struct wl_event_loop;
-struct wl_event_source;
typedef int (*wl_event_loop_fd_func_t)(int fd, uint32_t mask, void *data);
typedef int (*wl_event_loop_timer_func_t)(void *data);
typedef int (*wl_event_loop_signal_func_t)(int signal_number, void *data);
void
wl_event_source_check(struct wl_event_source *source);
-
int
wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout);
int
wl_event_loop_get_fd(struct wl_event_loop *loop);
-struct wl_client;
-struct wl_display;
struct wl_listener;
-struct wl_resource;
-struct wl_global;
+
typedef void (*wl_notify_func_t)(struct wl_listener *listener, void *data);
void
wl_event_loop_add_destroy_listener(struct wl_event_loop *loop,
- struct wl_listener * listener);
+ struct wl_listener *listener);
struct wl_listener *
-wl_event_loop_get_destroy_listener(
- struct wl_event_loop *loop,
+wl_event_loop_get_destroy_listener(struct wl_event_loop *loop,
wl_notify_func_t notify);
struct wl_display *
void
wl_display_flush_clients(struct wl_display *display);
+struct wl_client;
+
typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data,
uint32_t version, uint32_t id);
wl_resource_queue_event(struct wl_resource *resource,
uint32_t opcode, ...);
-void wl_resource_queue_event_array(struct wl_resource *resource,
- uint32_t opcode, union wl_argument *args);
+void
+wl_resource_queue_event_array(struct wl_resource *resource,
+ uint32_t opcode, union wl_argument *args);
/* msg is a printf format string, variable args are its args. */
void
wl_resource_post_error(struct wl_resource *resource,
- uint32_t code, const char *msg, ...)
- __attribute__ ((format (printf, 3, 4)));
+ uint32_t code, const char *msg, ...) WL_PRINTF(3, 4);
-void wl_resource_post_no_memory(struct wl_resource *resource);
+void
+wl_resource_post_no_memory(struct wl_resource *resource);
struct wl_display *
wl_client_get_display(struct wl_client *client);
wl_resource_create(struct wl_client *client,
const struct wl_interface *interface,
int version, uint32_t id);
+
void
wl_resource_set_implementation(struct wl_resource *resource,
const void *implementation,
void *data,
wl_resource_destroy_func_t destroy);
+
void
wl_resource_set_dispatcher(struct wl_resource *resource,
wl_dispatcher_func_t dispatcher,
void
wl_resource_destroy(struct wl_resource *resource);
+
uint32_t
wl_resource_get_id(struct wl_resource *resource);
+
struct wl_list *
wl_resource_get_link(struct wl_resource *resource);
+
struct wl_resource *
wl_resource_from_link(struct wl_list *resource);
+
struct wl_resource *
wl_resource_find_for_client(struct wl_list *list, struct wl_client *client);
+
struct wl_client *
wl_resource_get_client(struct wl_resource *resource);
+
void
wl_resource_set_user_data(struct wl_resource *resource, void *data);
+
void *
wl_resource_get_user_data(struct wl_resource *resource);
+
int
wl_resource_get_version(struct wl_resource *resource);
+
void
wl_resource_set_destructor(struct wl_resource *resource,
wl_resource_destroy_func_t destroy);
+
int
wl_resource_instance_of(struct wl_resource *resource,
const struct wl_interface *interface,
void
wl_resource_add_destroy_listener(struct wl_resource *resource,
- struct wl_listener * listener);
+ struct wl_listener *listener);
+
struct wl_listener *
wl_resource_get_destroy_listener(struct wl_resource *resource,
wl_notify_func_t notify);
resource = tmp, \
tmp = wl_resource_from_link(wl_resource_get_link(resource)->next))
-struct wl_shm_pool;
-struct wl_shm_buffer;
+struct wl_shm_buffer *
+wl_shm_buffer_get(struct wl_resource *resource);
void
wl_shm_buffer_begin_access(struct wl_shm_buffer *buffer);
void
wl_shm_buffer_end_access(struct wl_shm_buffer *buffer);
-struct wl_shm_buffer *
-wl_shm_buffer_get(struct wl_resource *resource);
-
void *
wl_shm_buffer_get_data(struct wl_shm_buffer *buffer);
uint32_t id, int32_t width, int32_t height,
int32_t stride, uint32_t format) WL_DEPRECATED;
-void wl_log_set_handler_server(wl_log_func_t handler);
+void
+wl_log_set_handler_server(wl_log_func_t handler);
#ifdef __cplusplus
}