mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-18 19:11:20 +00:00
support preedit text rendering in core and metal
This commit is contained in:
@@ -18,6 +18,12 @@ cursor: Cursor,
|
||||
/// The terminal data.
|
||||
terminal: *terminal.Terminal,
|
||||
|
||||
/// Dead key state. This will render the current dead key preedit text
|
||||
/// over the cursor. This currently only ever renders a single codepoint.
|
||||
/// Preedit can in theory be multiple codepoints long but that is left as
|
||||
/// a future exercise.
|
||||
preedit: ?Preedit = null,
|
||||
|
||||
/// The devmode data.
|
||||
devmode: ?*const DevMode = null,
|
||||
|
||||
@@ -31,3 +37,14 @@ pub const Cursor = struct {
|
||||
/// cursor ON or OFF.
|
||||
visible: bool = true,
|
||||
};
|
||||
|
||||
/// The pre-edit state. See Surface.preeditCallback for more information.
|
||||
pub const Preedit = struct {
|
||||
/// The codepoint to render as preedit text. We only support single
|
||||
/// codepoint for now. In theory this can be multiple codepoints but
|
||||
/// that is left as a future exercise.
|
||||
///
|
||||
/// This can also be "0" in which case we can know we're in a preedit
|
||||
/// mode but we don't have any preedit text to render.
|
||||
codepoint: u21 = 0,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user