From 0bf92fff058caab7ed3e13a5d488a629b4ac9a46 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 1 Jan 2022 13:56:50 +0100 Subject: term: add term_set_user_mouse_cursor() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function allows setting a custom mouse cursor. This is done by adding a ‘char*’ member to the term struct. When it is non-NULL, we *always* use that pointer (the exception being when the pointer is hidden), while the pointer is over the grid. This is instead of the hand/beam pointers we otherwise would use. --- terminal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index e42c94fc..187a5187 100644 --- a/terminal.h +++ b/terminal.h @@ -342,6 +342,7 @@ struct terminal { enum keypad_keys keypad_keys_mode; enum mouse_tracking mouse_tracking; enum mouse_reporting mouse_reporting; + char *mouse_user_cursor; /* For OSC-22 */ tll(int) tab_stops; @@ -771,6 +772,7 @@ void term_mouse_motion( bool term_mouse_grabbed(const struct terminal *term, const struct seat *seat); void term_xcursor_update(struct terminal *term); void term_xcursor_update_for_seat(struct terminal *term, struct seat *seat); +void term_set_user_mouse_cursor(struct terminal *term, const char *cursor); void term_set_window_title(struct terminal *term, const char *title); void term_flash(struct terminal *term, unsigned duration_ms); -- cgit v1.3