term: add term_set_user_mouse_cursor()

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.
This commit is contained in:
Daniel Eklöf 2022-01-01 13:56:50 +01:00
parent e4f9dc7d58
commit 0bf92fff05
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 17 additions and 0 deletions

View file

@ -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);