mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-03 09:01:42 -05:00
server: Make wl_object and wl_resource opaque structs
With the work to add wl_resource accessors and port weston to use them, we're ready to make wl_resource and wl_object opaque structs. We keep wl_buffer in the header for EGL stacks to use, but don't expose it by default. In time we'll remove it completely, but for now it provides a transition paths for code that still uses wl_buffer. Reviewed-by: Jason Ekstrand<jason@jlekstrand.net>
This commit is contained in:
parent
2e07587443
commit
d94a8722cb
11 changed files with 57 additions and 42 deletions
|
|
@ -283,6 +283,9 @@ wl_shm_buffer_create(struct wl_client *client,
|
|||
WL_EXPORT struct wl_shm_buffer *
|
||||
wl_shm_buffer_get(struct wl_resource *resource)
|
||||
{
|
||||
if (resource == NULL)
|
||||
return NULL;
|
||||
|
||||
if (wl_resource_instance_of(resource, &wl_buffer_interface,
|
||||
&shm_buffer_interface))
|
||||
return wl_resource_get_user_data(resource);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue