Add support for server-side language bindings

Graphics / Wayland / Wayland - Jason Ekstrand [jlekstrand.net] - 19 August 2013 18:23 UTC

This commit adds support for server-side languages bindings. This is done in two ways:

1. Adding a wl_resource_set_dispatcher function that corresponds to wl_resource_set_interface. The only difference between the two functions is that the new version takes a dispatcher along with the implementation, data, and destructor. This allows for runtime calling of native language functions for callbacks instead of having to generate function pointers.

2. Adding versions of wl_resource_post_event and wl_resource_queue_event that take an array of wl_argument instead of a variable argument list. This allows for easier run-time argument conversion and removes the need for libffi-based calling of variadic functions.

c440909 Add support for server-side language bindings
src/connection.c | 9 ++++++-
src/wayland-private.h | 14 +++-------
src/wayland-server.c | 72 ++++++++++++++++++++++++++++++++++++++++---------
src/wayland-server.h | 10 +++++++
src/wayland-util.h | 40 +++++++++++++++++++++++++++
5 files changed, 120 insertions(+), 25 deletions(-)

Upstream: cgit.freedesktop.org


  • Share