mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
cursor: add wlr_cursor_set_buffer()
A saner replacement for wlr_cursor_set_image(): - Takes a wlr_buffer instead of numerous parameters and a hardcoded format. - The scale is not used to filter outputs. - A ref to the buffer is kept to apply it to new outputs.
This commit is contained in:
parent
bb91787b5f
commit
71c87ff4b8
2 changed files with 64 additions and 2 deletions
|
|
@ -147,6 +147,15 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
|
|||
int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
|
||||
int32_t hotspot_y, float scale);
|
||||
|
||||
/**
|
||||
* Set the cursor buffer.
|
||||
*
|
||||
* The buffer is used on all outputs and is scaled accordingly. The hotspot is
|
||||
* expressed in logical coordinates. A NULL buffer hides the cursor.
|
||||
*/
|
||||
void wlr_cursor_set_buffer(struct wlr_cursor *cur, struct wlr_buffer *buffer,
|
||||
int32_t hotspot_x, int32_t hotspot_y, float scale);
|
||||
|
||||
/**
|
||||
* Hide the cursor image.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue