35 struct wthp_blob_factory;
38 struct wthp_compositor;
39 struct wthp_farstream;
40 struct wthp_farstream_remote;
51 #ifndef WALTHAM_SERVER_H 52 #define WALTHAM_SERVER_H 55 void (*client_version) (
struct wth_display * wth_display, uint32_t client_version);
56 void (*sync) (
struct wth_display * wth_display,
struct wthp_callback * callback);
57 void (*get_registry) (
struct wth_display * wth_display,
struct wthp_registry * registry);
61 wth_display_set_interface(
struct wth_display *
self,
const struct wth_display_interface *funcs,
void *user_data)
63 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
67 void (*destroy) (
struct wthp_registry * wthp_registry);
68 void (*bind) (
struct wthp_registry * wthp_registry, uint32_t name,
struct wth_object * id,
const char * interface, uint32_t version);
72 wthp_registry_set_interface(
struct wthp_registry *
self,
const struct wthp_registry_interface *funcs,
void *user_data)
78 void (*create_surface) (
struct wthp_compositor * wthp_compositor,
struct wthp_surface * id);
79 void (*create_region) (
struct wthp_compositor * wthp_compositor,
struct wthp_region * id);
83 wthp_compositor_set_interface(
struct wthp_compositor *
self,
const struct wthp_compositor_interface *funcs,
void *user_data)
85 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
89 void (*create_buffer) (
struct wthp_blob_factory * wthp_blob_factory,
struct wthp_buffer * buffer, uint32_t data_sz,
void * data, int32_t width, int32_t height, int32_t stride, uint32_t format);
95 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
99 void (*destroy) (
struct wthp_buffer * wthp_buffer);
103 wthp_buffer_set_interface(
struct wthp_buffer *
self,
const struct wthp_buffer_interface *funcs,
void *user_data)
105 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
109 void (*destroy) (
struct wthp_surface * wthp_surface);
110 void (*attach) (
struct wthp_surface * wthp_surface,
struct wthp_buffer * buffer, int32_t x, int32_t y);
111 void (*damage) (
struct wthp_surface * wthp_surface, int32_t x, int32_t y, int32_t width, int32_t height);
112 void (*frame) (
struct wthp_surface * wthp_surface,
struct wthp_callback * callback);
113 void (*set_opaque_region) (
struct wthp_surface * wthp_surface,
struct wthp_region * region);
114 void (*set_input_region) (
struct wthp_surface * wthp_surface,
struct wthp_region * region);
115 void (*commit) (
struct wthp_surface * wthp_surface);
116 void (*set_buffer_transform) (
struct wthp_surface * wthp_surface, int32_t transform);
117 void (*set_buffer_scale) (
struct wthp_surface * wthp_surface, int32_t scale);
118 void (*damage_buffer) (
struct wthp_surface * wthp_surface, int32_t x, int32_t y, int32_t width, int32_t height);
122 wthp_surface_set_interface(
struct wthp_surface *
self,
const struct wthp_surface_interface *funcs,
void *user_data)
124 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
128 void (*get_pointer) (
struct wthp_seat * wthp_seat,
struct wthp_pointer * id);
129 void (*get_keyboard) (
struct wthp_seat * wthp_seat,
struct wthp_keyboard * id);
130 void (*get_touch) (
struct wthp_seat * wthp_seat,
struct wthp_touch * id);
131 void (*release) (
struct wthp_seat * wthp_seat);
135 wthp_seat_set_interface(
struct wthp_seat *
self,
const struct wthp_seat_interface *funcs,
void *user_data)
137 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
141 void (*set_cursor) (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface, int32_t hotspot_x, int32_t hotspot_y);
142 void (*release) (
struct wthp_pointer * wthp_pointer);
146 wthp_pointer_set_interface(
struct wthp_pointer *
self,
const struct wthp_pointer_interface *funcs,
void *user_data)
148 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
152 void (*release) (
struct wthp_keyboard * wthp_keyboard);
156 wthp_keyboard_set_interface(
struct wthp_keyboard *
self,
const struct wthp_keyboard_interface *funcs,
void *user_data)
158 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
162 void (*release) (
struct wthp_touch * wthp_touch);
166 wthp_touch_set_interface(
struct wthp_touch *
self,
const struct wthp_touch_interface *funcs,
void *user_data)
168 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
172 void (*destroy) (
struct wthp_region * wthp_region);
173 void (*add) (
struct wthp_region * wthp_region, int32_t x, int32_t y, int32_t width, int32_t height);
174 void (*subtract) (
struct wthp_region * wthp_region, int32_t x, int32_t y, int32_t width, int32_t height);
178 wthp_region_set_interface(
struct wthp_region *
self,
const struct wthp_region_interface *funcs,
void *user_data)
180 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
184 void (*destroy) (
struct wthp_farstream * wthp_farstream);
185 void (*connect) (
struct wthp_farstream * wthp_farstream, uint32_t port,
struct wthp_farstream_remote * remote);
189 wthp_farstream_set_interface(
struct wthp_farstream *
self,
const struct wthp_farstream_interface *funcs,
void *user_data)
191 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
195 void (*destroy) (
struct wthp_farstream_remote * wthp_farstream_remote);
196 void (*codec_offer) (
struct wthp_farstream_remote * wthp_farstream_remote,
const char * list);
197 void (*create_buffer) (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t frame_id,
struct wthp_buffer * id);
201 wth_display_free(
struct wth_display *
self)
207 wth_display_send_error (
struct wth_display * wth_display,
struct wth_object * object_id, uint32_t code,
const char * message);
210 wth_display_send_delete_id (
struct wth_display * wth_display, uint32_t
id);
213 wth_display_send_server_version (
struct wth_display * wth_display, uint32_t server_version);
216 wthp_registry_free(
struct wthp_registry *
self)
222 wthp_registry_send_global (
struct wthp_registry * wthp_registry, uint32_t name,
const char * interface, uint32_t version);
225 wthp_registry_send_global_remove (
struct wthp_registry * wthp_registry, uint32_t name);
228 wthp_callback_free(
struct wthp_callback *
self)
234 wthp_callback_send_done (
struct wthp_callback * wthp_callback, uint32_t callback_data);
237 wthp_compositor_free(
struct wthp_compositor *
self)
243 wthp_blob_factory_free(
struct wthp_blob_factory *
self)
249 wthp_blob_factory_send_format (
struct wthp_blob_factory * wthp_blob_factory, uint32_t format);
252 wthp_buffer_free(
struct wthp_buffer *
self)
258 wthp_buffer_send_complete (
struct wthp_buffer * wthp_buffer, uint32_t serial);
261 wthp_surface_free(
struct wthp_surface *
self)
267 wthp_surface_send_enter (
struct wthp_surface * wthp_surface,
struct wthp_output * output);
270 wthp_surface_send_leave (
struct wthp_surface * wthp_surface,
struct wthp_output * output);
273 wthp_seat_free(
struct wthp_seat *
self)
279 wthp_seat_send_capabilities (
struct wthp_seat * wthp_seat, uint32_t capabilities);
282 wthp_seat_send_name (
struct wthp_seat * wthp_seat,
const char * name);
285 wthp_pointer_free(
struct wthp_pointer *
self)
291 wthp_pointer_send_enter (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface, wth_fixed_t surface_x, wth_fixed_t surface_y);
294 wthp_pointer_send_leave (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface);
297 wthp_pointer_send_motion (
struct wthp_pointer * wthp_pointer, uint32_t time, wth_fixed_t surface_x, wth_fixed_t surface_y);
300 wthp_pointer_send_button (
struct wthp_pointer * wthp_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state);
303 wthp_pointer_send_axis (
struct wthp_pointer * wthp_pointer, uint32_t time, uint32_t axis, wth_fixed_t value);
306 wthp_pointer_send_frame (
struct wthp_pointer * wthp_pointer);
309 wthp_pointer_send_axis_source (
struct wthp_pointer * wthp_pointer, uint32_t axis_source);
312 wthp_pointer_send_axis_stop (
struct wthp_pointer * wthp_pointer, uint32_t time, uint32_t axis);
315 wthp_pointer_send_axis_discrete (
struct wthp_pointer * wthp_pointer, uint32_t axis, int32_t discrete);
318 wthp_keyboard_free(
struct wthp_keyboard *
self)
324 wthp_keyboard_send_keymap (
struct wthp_keyboard * wthp_keyboard, uint32_t format, uint32_t keymap_sz,
void * keymap);
327 wthp_keyboard_send_enter (
struct wthp_keyboard * wthp_keyboard, uint32_t serial,
struct wthp_surface * surface,
struct wth_array * keys);
330 wthp_keyboard_send_leave (
struct wthp_keyboard * wthp_keyboard, uint32_t serial,
struct wthp_surface * surface);
333 wthp_keyboard_send_key (
struct wthp_keyboard * wthp_keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state);
336 wthp_keyboard_send_modifiers (
struct wthp_keyboard * wthp_keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
339 wthp_keyboard_send_repeat_info (
struct wthp_keyboard * wthp_keyboard, int32_t rate, int32_t delay);
342 wthp_touch_free(
struct wthp_touch *
self)
348 wthp_touch_send_down (
struct wthp_touch * wthp_touch, uint32_t serial, uint32_t time,
struct wthp_surface * surface, int32_t
id, wth_fixed_t x, wth_fixed_t y);
351 wthp_touch_send_up (
struct wthp_touch * wthp_touch, uint32_t serial, uint32_t time, int32_t
id);
354 wthp_touch_send_motion (
struct wthp_touch * wthp_touch, uint32_t time, int32_t
id, wth_fixed_t x, wth_fixed_t y);
357 wthp_touch_send_frame (
struct wthp_touch * wthp_touch);
360 wthp_touch_send_cancel (
struct wthp_touch * wthp_touch);
363 wthp_output_free(
struct wthp_output *
self)
369 wthp_output_send_geometry (
struct wthp_output * wthp_output, int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, int32_t subpixel,
const char * make,
const char * model, int32_t transform);
372 wthp_output_send_mode (
struct wthp_output * wthp_output, uint32_t flags, int32_t width, int32_t height, int32_t refresh);
375 wthp_output_send_done (
struct wthp_output * wthp_output);
378 wthp_output_send_scale (
struct wthp_output * wthp_output, int32_t factor);
381 wthp_region_free(
struct wthp_region *
self)
387 wthp_farstream_free(
struct wthp_farstream *
self)
393 wthp_farstream_remote_free(
struct wthp_farstream_remote *
self)
399 wthp_farstream_remote_send_port (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t port);
402 wthp_farstream_remote_send_codec_answer (
struct wthp_farstream_remote * wthp_farstream_remote,
const char * list);
405 wthp_farstream_remote_send_error (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t code,
const char * message);
Definition: waltham-server.h:77
Definition: waltham-server.h:183
Definition: waltham-server.h:88
Definition: waltham-server.h:161
Definition: waltham-server.h:171
Definition: waltham-server.h:194
Definition: waltham-server.h:98
Definition: waltham-server.h:151
void wth_object_set_listener(struct wth_object *obj, void(**listener)(void), void *user_data)
Set incoming message handlers for a protocol object.
Definition: waltham-server.h:54
Definition: waltham-server.h:66
Definition: waltham-server.h:127
A generic Waltham protocol object representation (a proxy)
Definition: waltham-server.h:108
Definition: waltham-util.h:64
Definition: waltham-server.h:140
Waltham generic protocol object interface.
Utility classes, functions, and macros.