libghostty: expose mouse_tracking terminal data option

#11706

Add a new GHOSTTY_TERMINAL_DATA_MOUSE_TRACKING option to the
ghostty_terminal_get API. This returns true if any mouse tracking
mode is active (X10, normal, button, or any-event), replacing the
need for consumers to loop over four separate mode queries.
This commit is contained in:
Mitchell Hashimoto
2026-03-21 20:09:29 -07:00
parent 1775c312ae
commit 47bfde3286
2 changed files with 66 additions and 1 deletions

View File

@@ -221,6 +221,16 @@ typedef enum {
* Output type: GhosttyStyle *
*/
GHOSTTY_TERMINAL_DATA_CURSOR_STYLE = 10,
/**
* Whether any mouse tracking mode is active.
*
* Returns true if any of the mouse tracking modes (X10, normal, button,
* or any-event) are enabled.
*
* Output type: bool *
*/
GHOSTTY_TERMINAL_DATA_MOUSE_TRACKING = 11,
} GhosttyTerminalData;
/**