Product SiteDocumentation Site

5.2. Server API

Following is the Wayland library classes for the Server (libwayland-server). Note that most of the procedures are related with IPC, which is the main responsibility of the library.
Methods for the respective classes.
wl_resource_post_event -
void wl_resource_post_event(struct wl_resource *resource, uint32_t opcode,...)
wl_resource_queue_event -
void wl_resource_queue_event(struct wl_resource *resource, uint32_t opcode,...)
wl_resource_post_error -
void wl_resource_post_error(struct wl_resource *resource, uint32_t code, const char *msg,...)
wl_client_flush -
void wl_client_flush(struct wl_client *client)
wl_client_get_display -
struct wl_display* wl_client_get_display(struct wl_client *client)
wl_client_create -
struct wl_client* wl_client_create(struct wl_display *display, int fd)
wl_client_get_credentials -
void wl_client_get_credentials(struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid)
wl_client_get_object -
struct wl_resource* wl_client_get_object(struct wl_client *client, uint32_t id)
wl_client_post_no_memory -
void wl_client_post_no_memory(struct wl_client *client)
wl_resource_post_no_memory -
void wl_resource_post_no_memory(struct wl_resource *resource)
wl_resource_destroy -
void wl_resource_destroy(struct wl_resource *resource)
wl_resource_get_id -
uint32_t wl_resource_get_id(struct wl_resource *resource)
wl_resource_get_link -
struct wl_list* wl_resource_get_link(struct wl_resource *resource)
wl_resource_from_link -
struct wl_resource* wl_resource_from_link(struct wl_list *link)
wl_resource_find_for_client -
struct wl_resource* wl_resource_find_for_client(struct wl_list *list, struct wl_client *client)
wl_resource_get_client -
struct wl_client* wl_resource_get_client(struct wl_resource *resource)
wl_resource_set_user_data -
void wl_resource_set_user_data(struct wl_resource *resource, void *data)
wl_resource_get_user_data -
void* wl_resource_get_user_data(struct wl_resource *resource)
wl_resource_get_version -
int wl_resource_get_version(struct wl_resource *resource)
wl_resource_set_destructor -
void wl_resource_set_destructor(struct wl_resource *resource, wl_resource_destroy_func_t destroy)
wl_resource_instance_of -
int wl_resource_instance_of(struct wl_resource *resource, const struct wl_interface *interface, const void *implementation)
wl_resource_add_destroy_listener -
void wl_resource_add_destroy_listener(struct wl_resource *resource, struct wl_listener *listener)
wl_resource_get_destroy_listener -
struct wl_listener* wl_resource_get_destroy_listener(struct wl_resource *resource, wl_notify_func_t notify)
wl_client_add_destroy_listener -
void wl_client_add_destroy_listener(struct wl_client *client, struct wl_listener *listener)
wl_client_get_destroy_listener -
struct wl_listener* wl_client_get_destroy_listener(struct wl_client *client, wl_notify_func_t notify)
wl_client_destroy -
void wl_client_destroy(struct wl_client *client)
wl_display_create -
struct wl_display* wl_display_create(void)
wl_display_destroy -
void wl_display_destroy(struct wl_display *display)
wl_global_create -
struct wl_global* wl_global_create(struct wl_display *display, const struct wl_interface *interface, int version, void *data, wl_global_bind_func_t bind)
wl_global_destroy -
void wl_global_destroy(struct wl_global *global)
wl_display_get_serial -
uint32_t wl_display_get_serial(struct wl_display *display)
wl_display_next_serial -
uint32_t wl_display_next_serial(struct wl_display *display)
wl_display_get_event_loop -
struct wl_event_loop* wl_display_get_event_loop(struct wl_display *display)
wl_display_terminate -
void wl_display_terminate(struct wl_display *display)
wl_display_run -
void wl_display_run(struct wl_display *display)
wl_display_flush_clients -
void wl_display_flush_clients(struct wl_display *display)
wl_display_add_socket -
int wl_display_add_socket(struct wl_display *display, const char *name)
wl_display_add_destroy_listener -
void wl_display_add_destroy_listener(struct wl_display *display, struct wl_listener *listener)
wl_display_get_destroy_listener -
struct wl_listener* wl_display_get_destroy_listener(struct wl_display *display, wl_notify_func_t notify)
wl_resource_set_implementation -
void wl_resource_set_implementation(struct wl_resource *resource, const void *implementation, void *data, wl_resource_destroy_func_t destroy)
wl_resource_create -
struct wl_resource* wl_resource_create(struct wl_client *client, const struct wl_interface *interface, int version, uint32_t id)
wl_log_set_handler_server -
void wl_log_set_handler_server(wl_log_func_t handler)
wl_client_add_resource -
uint32_t wl_client_add_resource(struct wl_client *client, struct wl_resource *resource) WL_DEPRECATED
wl_client_add_object -
struct wl_resource * wl_client_add_object(struct wl_client *client, const struct wl_interface *interface, const void *implementation, uint32_t id, void *data) WL_DEPRECATED
wl_client_new_object -
struct wl_resource * wl_client_new_object(struct wl_client *client, const struct wl_interface *interface, const void *implementation, void *data) WL_DEPRECATED
wl_display_add_global -
struct wl_global * wl_display_add_global(struct wl_display *display, const struct wl_interface *interface, void *data, wl_global_bind_func_t bind) WL_DEPRECATED
wl_display_remove_global -
void wl_display_remove_global(struct wl_display *display, struct wl_global *global) WL_DEPRECATED