diff options
| author | Jason Ekstrand <jason@jlekstrand.net> | 2015-11-12 13:53:15 -0600 |
|---|---|---|
| committer | Derek Foreman <derekf@osg.samsung.com> | 2016-01-19 13:58:50 -0600 |
| commit | 557032e36cf5c45ec1a827f2ec49bdcce3833e80 (patch) | |
| tree | 1dfb1cd68d7362f6f958d419132415660a9448ce /src/wayland-client-core.h | |
| parent | tests: Test that one can fetch the protocol error after EPIPE (diff) | |
| download | wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar.gz wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar.bz2 wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar.lz wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar.xz wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.tar.zst wayland-557032e36cf5c45ec1a827f2ec49bdcce3833e80.zip | |
Track protocol object versions inside wl_proxy.
This provides a standardized mechanism for tracking protocol object
versions in client code. The wl_display object is created with version 1.
Every time an object is created from within wl_registry_bind, it gets the
bound version. Every other time an object is created, it simply inherits
it's version from the parent object that created it.
(comments and minor reformatting added
by Derek Foreman <derekf@osg.samsung.com>)
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Second trivial commit squashed into this one:
Authored by Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
(it's literally one of code and a lot of comments)
This sets wl_display's version (for proxy version query purposes)
to 0. Any proxy created with unversioned API (this happens when
a client compiled with old headers links against new wayland)
will inherit this 0.
This gives us a way for new libraries linked by old clients to
realize they can't know a proxy's version.
wl_display's version being unqueryable (always returning 0) is
an acceptable side effect, since it's a special object you can't
bind specific versions of anyway.
Second half:
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/wayland-client-core.h')
| -rw-r--r-- | src/wayland-client-core.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h index a729395..91f7e7b 100644 --- a/src/wayland-client-core.h +++ b/src/wayland-client-core.h @@ -139,9 +139,21 @@ wl_proxy_marshal_constructor(struct wl_proxy *proxy, ...); struct wl_proxy * +wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + ...); +struct wl_proxy * wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface); +struct wl_proxy * +wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + union wl_argument *args, + const struct wl_interface *interface, + uint32_t version); void wl_proxy_destroy(struct wl_proxy *proxy); @@ -165,6 +177,9 @@ void * wl_proxy_get_user_data(struct wl_proxy *proxy); uint32_t +wl_proxy_get_version(struct wl_proxy *proxy); + +uint32_t wl_proxy_get_id(struct wl_proxy *proxy); const char * |
