35 struct wthp_blob_factory;
38 struct wthp_compositor;
39 struct wthp_farstream;
40 struct wthp_farstream_remote;
51 #ifndef WALTHAM_CLIENT_H 52 #define WALTHAM_CLIENT_H 55 void (*error) (
struct wth_display * wth_display,
struct wth_object * object_id, uint32_t code,
const char * message);
56 void (*delete_id) (
struct wth_display * wth_display, uint32_t id);
57 void (*server_version) (
struct wth_display * wth_display, uint32_t server_version);
61 wth_display_set_listener(
struct wth_display *
self,
const struct wth_display_listener *funcs,
void *user_data)
63 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
67 void (*global) (
struct wthp_registry * wthp_registry, uint32_t name,
const char * interface, uint32_t version);
68 void (*global_remove) (
struct wthp_registry * wthp_registry, uint32_t name);
72 wthp_registry_set_listener(
struct wthp_registry *
self,
const struct wthp_registry_listener *funcs,
void *user_data)
74 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
78 void (*done) (
struct wthp_callback * wthp_callback, uint32_t callback_data);
82 wthp_callback_set_listener(
struct wthp_callback *
self,
const struct wthp_callback_listener *funcs,
void *user_data)
84 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
88 void (*format) (
struct wthp_blob_factory * wthp_blob_factory, uint32_t format);
92 wthp_blob_factory_set_listener(
struct wthp_blob_factory *
self,
const struct wthp_blob_factory_listener *funcs,
void *user_data)
94 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
98 void (*complete) (
struct wthp_buffer * wthp_buffer, uint32_t serial);
102 wthp_buffer_set_listener(
struct wthp_buffer *
self,
const struct wthp_buffer_listener *funcs,
void *user_data)
104 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
108 void (*enter) (
struct wthp_surface * wthp_surface,
struct wthp_output * output);
109 void (*leave) (
struct wthp_surface * wthp_surface,
struct wthp_output * output);
113 wthp_surface_set_listener(
struct wthp_surface *
self,
const struct wthp_surface_listener *funcs,
void *user_data)
115 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
119 void (*capabilities) (
struct wthp_seat * wthp_seat, uint32_t capabilities);
120 void (*name) (
struct wthp_seat * wthp_seat,
const char * name);
124 wthp_seat_set_listener(
struct wthp_seat *
self,
const struct wthp_seat_listener *funcs,
void *user_data)
126 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
130 void (*enter) (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface, wth_fixed_t surface_x, wth_fixed_t surface_y);
131 void (*leave) (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface);
132 void (*motion) (
struct wthp_pointer * wthp_pointer, uint32_t time, wth_fixed_t surface_x, wth_fixed_t surface_y);
133 void (*button) (
struct wthp_pointer * wthp_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state);
134 void (*axis) (
struct wthp_pointer * wthp_pointer, uint32_t time, uint32_t axis, wth_fixed_t value);
135 void (*frame) (
struct wthp_pointer * wthp_pointer);
136 void (*axis_source) (
struct wthp_pointer * wthp_pointer, uint32_t axis_source);
137 void (*axis_stop) (
struct wthp_pointer * wthp_pointer, uint32_t time, uint32_t axis);
138 void (*axis_discrete) (
struct wthp_pointer * wthp_pointer, uint32_t axis, int32_t discrete);
142 wthp_pointer_set_listener(
struct wthp_pointer *
self,
const struct wthp_pointer_listener *funcs,
void *user_data)
144 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
148 void (*keymap) (
struct wthp_keyboard * wthp_keyboard, uint32_t format, uint32_t keymap_sz,
void * keymap);
149 void (*enter) (
struct wthp_keyboard * wthp_keyboard, uint32_t serial,
struct wthp_surface * surface,
struct wth_array * keys);
150 void (*leave) (
struct wthp_keyboard * wthp_keyboard, uint32_t serial,
struct wthp_surface * surface);
151 void (*key) (
struct wthp_keyboard * wthp_keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state);
152 void (*modifiers) (
struct wthp_keyboard * wthp_keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
153 void (*repeat_info) (
struct wthp_keyboard * wthp_keyboard, int32_t rate, int32_t delay);
157 wthp_keyboard_set_listener(
struct wthp_keyboard *
self,
const struct wthp_keyboard_listener *funcs,
void *user_data)
159 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
163 void (*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);
164 void (*up) (
struct wthp_touch * wthp_touch, uint32_t serial, uint32_t time, int32_t id);
165 void (*motion) (
struct wthp_touch * wthp_touch, uint32_t time, int32_t id, wth_fixed_t x, wth_fixed_t y);
166 void (*frame) (
struct wthp_touch * wthp_touch);
167 void (*cancel) (
struct wthp_touch * wthp_touch);
171 wthp_touch_set_listener(
struct wthp_touch *
self,
const struct wthp_touch_listener *funcs,
void *user_data)
173 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
177 void (*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);
178 void (*mode) (
struct wthp_output * wthp_output, uint32_t flags, int32_t width, int32_t height, int32_t refresh);
179 void (*done) (
struct wthp_output * wthp_output);
180 void (*scale) (
struct wthp_output * wthp_output, int32_t factor);
184 wthp_output_set_listener(
struct wthp_output *
self,
const struct wthp_output_listener *funcs,
void *user_data)
186 wth_object_set_listener((
struct wth_object *)
self, (
void (**)(
void)) funcs, user_data);
190 void (*port) (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t port);
191 void (*codec_answer) (
struct wthp_farstream_remote * wthp_farstream_remote,
const char * list);
192 void (*error) (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t code,
const char * message);
196 wth_display_free(
struct wth_display *
self)
202 wth_display_client_version (
struct wth_display * wth_display, uint32_t client_version);
204 struct wthp_callback *
205 wth_display_sync (
struct wth_display * wth_display);
207 struct wthp_registry *
208 wth_display_get_registry (
struct wth_display * wth_display);
211 wthp_registry_free(
struct wthp_registry *
self)
217 wthp_registry_destroy (
struct wthp_registry * wthp_registry);
220 wthp_registry_bind (
struct wthp_registry * wthp_registry, uint32_t name,
const char * interface, uint32_t version);
223 wthp_callback_free(
struct wthp_callback *
self)
229 wthp_compositor_free(
struct wthp_compositor *
self)
234 struct wthp_surface *
235 wthp_compositor_create_surface (
struct wthp_compositor * wthp_compositor);
238 wthp_compositor_create_region (
struct wthp_compositor * wthp_compositor);
241 wthp_blob_factory_free(
struct wthp_blob_factory *
self)
247 wthp_blob_factory_create_buffer (
struct wthp_blob_factory * wthp_blob_factory, uint32_t data_sz,
void * data, int32_t width, int32_t height, int32_t stride, uint32_t format);
250 wthp_buffer_free(
struct wthp_buffer *
self)
256 wthp_buffer_destroy (
struct wthp_buffer * wthp_buffer);
259 wthp_surface_free(
struct wthp_surface *
self)
265 wthp_surface_destroy (
struct wthp_surface * wthp_surface);
268 wthp_surface_attach (
struct wthp_surface * wthp_surface,
struct wthp_buffer * buffer, int32_t x, int32_t y);
271 wthp_surface_damage (
struct wthp_surface * wthp_surface, int32_t x, int32_t y, int32_t width, int32_t height);
273 struct wthp_callback *
274 wthp_surface_frame (
struct wthp_surface * wthp_surface);
277 wthp_surface_set_opaque_region (
struct wthp_surface * wthp_surface,
struct wthp_region * region);
280 wthp_surface_set_input_region (
struct wthp_surface * wthp_surface,
struct wthp_region * region);
283 wthp_surface_commit (
struct wthp_surface * wthp_surface);
286 wthp_surface_set_buffer_transform (
struct wthp_surface * wthp_surface, int32_t transform);
289 wthp_surface_set_buffer_scale (
struct wthp_surface * wthp_surface, int32_t scale);
292 wthp_surface_damage_buffer (
struct wthp_surface * wthp_surface, int32_t x, int32_t y, int32_t width, int32_t height);
295 wthp_seat_free(
struct wthp_seat *
self)
300 struct wthp_pointer *
301 wthp_seat_get_pointer (
struct wthp_seat * wthp_seat);
303 struct wthp_keyboard *
304 wthp_seat_get_keyboard (
struct wthp_seat * wthp_seat);
307 wthp_seat_get_touch (
struct wthp_seat * wthp_seat);
310 wthp_seat_release (
struct wthp_seat * wthp_seat);
313 wthp_pointer_free(
struct wthp_pointer *
self)
319 wthp_pointer_set_cursor (
struct wthp_pointer * wthp_pointer, uint32_t serial,
struct wthp_surface * surface, int32_t hotspot_x, int32_t hotspot_y);
322 wthp_pointer_release (
struct wthp_pointer * wthp_pointer);
325 wthp_keyboard_free(
struct wthp_keyboard *
self)
331 wthp_keyboard_release (
struct wthp_keyboard * wthp_keyboard);
334 wthp_touch_free(
struct wthp_touch *
self)
340 wthp_touch_release (
struct wthp_touch * wthp_touch);
343 wthp_output_free(
struct wthp_output *
self)
349 wthp_region_free(
struct wthp_region *
self)
355 wthp_region_destroy (
struct wthp_region * wthp_region);
358 wthp_region_add (
struct wthp_region * wthp_region, int32_t x, int32_t y, int32_t width, int32_t height);
361 wthp_region_subtract (
struct wthp_region * wthp_region, int32_t x, int32_t y, int32_t width, int32_t height);
364 wthp_farstream_free(
struct wthp_farstream *
self)
370 wthp_farstream_destroy (
struct wthp_farstream * wthp_farstream);
372 struct wthp_farstream_remote *
373 wthp_farstream_connect (
struct wthp_farstream * wthp_farstream, uint32_t port);
376 wthp_farstream_remote_free(
struct wthp_farstream_remote *
self)
382 wthp_farstream_remote_destroy (
struct wthp_farstream_remote * wthp_farstream_remote);
385 wthp_farstream_remote_codec_offer (
struct wthp_farstream_remote * wthp_farstream_remote,
const char * list);
388 wthp_farstream_remote_create_buffer (
struct wthp_farstream_remote * wthp_farstream_remote, uint32_t frame_id);
Definition: waltham-client.h:107
Definition: waltham-client.h:129
Definition: waltham-client.h:77
Definition: waltham-client.h:189
Definition: waltham-client.h:118
Definition: waltham-client.h:176
Definition: waltham-client.h:87
Definition: waltham-client.h:66
void wth_object_delete(struct wth_object *object)
Destroy a protocol object.
A generic Waltham protocol object representation (a proxy)
Definition: waltham-util.h:64
Definition: waltham-client.h:97
Definition: waltham-client.h:54
Waltham generic protocol object interface.
Utility classes, functions, and macros.
Definition: waltham-client.h:147
Definition: waltham-client.h:162