mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 21:40:29 +00:00
vt: expose cursor_style via terminal_get
Add cursor_style to TerminalData, returning the current SGR style of the cursor (the style applied to newly printed characters) as a GhosttyStyle. Refactor the C style conversion helpers: replace the standalone convertStyle and convertColor functions with fromStyle and fromColor initializers on the Style and Color extern structs respectively.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <ghostty/vt/types.h>
|
||||
#include <ghostty/vt/allocator.h>
|
||||
#include <ghostty/vt/modes.h>
|
||||
#include <ghostty/vt/style.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -208,6 +209,15 @@ typedef enum {
|
||||
* Output type: GhosttyTerminalScrollbar *
|
||||
*/
|
||||
GHOSTTY_TERMINAL_DATA_SCROLLBAR = 9,
|
||||
|
||||
/**
|
||||
* The current SGR style of the cursor.
|
||||
*
|
||||
* This is the style that will be applied to newly printed characters.
|
||||
*
|
||||
* Output type: GhosttyStyle *
|
||||
*/
|
||||
GHOSTTY_TERMINAL_DATA_CURSOR_STYLE = 10,
|
||||
} GhosttyTerminalData;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user