aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-06-23 20:03:58 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-07-02 22:42:37 +0000
commit71c87ff4b8b6a4bf080273255a25685270389fd6 (patch)
tree1d63639525dddae133a269e715ae463d209d78b6 /include
parentbb91787b5f0fb0993bb84f0a2aa9202183e579ff (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_cursor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index a4c2e731..96059255 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -148,6 +148,15 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
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.
*/
void wlr_cursor_unset_image(struct wlr_cursor *cur);