mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
shm: Add shm_buffer getters for width and height
This commit is contained in:
parent
0a9cd16f6a
commit
7ba218c9f8
2 changed files with 22 additions and 0 deletions
|
|
@ -291,3 +291,19 @@ wl_shm_buffer_get_format(struct wl_buffer *buffer_base)
|
|||
|
||||
return buffer->format;
|
||||
}
|
||||
|
||||
WL_EXPORT uint32_t
|
||||
wl_shm_buffer_get_width(struct wl_buffer *buffer_base)
|
||||
{
|
||||
struct wl_shm_buffer *buffer = (struct wl_shm_buffer *) buffer_base;
|
||||
|
||||
return buffer->base.width;
|
||||
}
|
||||
|
||||
WL_EXPORT uint32_t
|
||||
wl_shm_buffer_get_height(struct wl_buffer *buffer_base)
|
||||
{
|
||||
struct wl_shm_buffer *buffer = (struct wl_shm_buffer *) buffer_base;
|
||||
|
||||
return buffer->base.height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue