[RFC wayland 0/4] Custom dispatchers via wl_object instead of

Jason Ekstrand jason at jlekstrand.net
Wed Feb 27 19:29:54 PST 2013


This sequence demonstrates how we could implement custom dispatchers via
wl_object instead of wl_interface.  This has the added benefit of not breaking
ABI client-side and only breaking it server-side.  See also:

http://lists.freedesktop.org/archives/wayland-devel/2013-February/007559.html

Following this patch series is a patch to weston so that it will build against
these libwayland patches.  I have left a few bits out of this series such as
alternate versions of wl_resource_post_event and wl_resource_queue_event.
However, while we're trying to nail down exactly how to implement dispatchers,
there's no reason to send those to the list again.

You can also see this on my personal fork of libwayland:

https://github.com/jekstrand/wayland

Jason Ekstrand (4):
  Change wl_closure_invoke to take an opcode instead of an actual
    function pointer
  Add wl_resource_init and use it in libwayland implementations of data
    sharing and SHM
  Add a dispatcher field to wl_object.
  Add null dispatchers to test objects

 src/connection.c         | 29 ++++++++++++++++++++++-------
 src/data-device.c        | 16 ++++------------
 src/wayland-client.c     | 11 +++++++----
 src/wayland-private.h    | 15 ++-------------
 src/wayland-server.c     |  9 ++-------
 src/wayland-server.h     | 17 +++++++++++++++++
 src/wayland-shm.c        | 24 ++++++------------------
 src/wayland-util.h       | 29 ++++++++++++++++++++++++++++-
 tests/connection-test.c  | 17 +++++++++--------
 tests/os-wrappers-test.c |  6 +++---
 10 files changed, 100 insertions(+), 73 deletions(-)

-- 
1.8.1.2



More information about the wayland-devel mailing list