diff options
author | Kristian Høgsberg <krh@redhat.com> | 2009-09-18 09:49:21 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2009-09-18 17:05:50 -0400 |
commit | ecf65fe0411403d57d6d2418782bd741b6d9e034 (patch) | |
tree | fba5c99720e45c9d6701b69a9475209dbda52985 /wayland-client.c | |
parent | 59fa346ac9a5a3244af1aae0d13bd3d56f84c4b8 (diff) |
Implement user_data for surface
Not sure if we need more than one piece of user_data per surface.
And this should be a general feature of any proxy object.
Diffstat (limited to 'wayland-client.c')
-rw-r--r-- | wayland-client.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/wayland-client.c b/wayland-client.c index 3c977b2..e60d028 100644 --- a/wayland-client.c +++ b/wayland-client.c @@ -64,6 +64,7 @@ struct wl_proxy { struct wl_object base; struct wl_display *display; struct wl_list listener_list; + void *user_data; }; struct wl_compositor { @@ -618,3 +619,15 @@ wl_surface_damage(struct wl_surface *surface, wl_proxy_marshal(&surface->proxy, WL_SURFACE_DAMAGE, x, y, width, height); } + +WL_EXPORT void +wl_surface_set_user_data(struct wl_surface *surface, void *user_data) +{ + surface->proxy.user_data = user_data; +} + +WL_EXPORT void * +wl_surface_get_user_data(struct wl_surface *surface) +{ + return surface->proxy.user_data; +} |