diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_cursor.h | 9 | ||||
-rw-r--r-- | include/wlr/types/wlr_xcursor_manager.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index 06ae2f1f..f3c7e970 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -14,6 +14,7 @@ #include <wlr/types/wlr_output.h> struct wlr_input_device; +struct wlr_xcursor_manager; /** * wlr_cursor implements the behavior of the "cursor", that is, the image on the @@ -147,6 +148,14 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels, int32_t hotspot_y, float scale); /** + * Set the cursor image from an XCursor theme. + * + * The image will be loaded from the struct wlr_xcursor_manager. + */ +void wlr_cursor_set_xcursor(struct wlr_cursor *cur, + struct wlr_xcursor_manager *manager, const char *name); + +/** * Set the cursor surface. The surface can be committed to update the cursor * image. The surface position is subtracted from the hotspot. A NULL surface * commit hides the cursor. diff --git a/include/wlr/types/wlr_xcursor_manager.h b/include/wlr/types/wlr_xcursor_manager.h index f7781ca6..7d7b19ab 100644 --- a/include/wlr/types/wlr_xcursor_manager.h +++ b/include/wlr/types/wlr_xcursor_manager.h @@ -62,6 +62,8 @@ struct wlr_xcursor *wlr_xcursor_manager_get_xcursor( * scale factors. struct wlr_cursor will take over from this point and ensure * the correct cursor is used on each output, assuming a * struct wlr_output_layout is attached to it. + * + * Deprecated: wlr_cursor_set_xcursor() should be used instead. */ void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager, const char *name, struct wlr_cursor *cursor); |