Skip to main content

GhosttyTerminalWritePtyFn

Type Alias GhosttyTerminalWritePtyFn 

Source
pub type GhosttyTerminalWritePtyFn = Option<unsafe extern "C" fn(terminal: GhosttyTerminal_ptr, userdata: *mut c_void, data: *const u8, len: usize)>;
Expand description

Callback function type for write_pty.

Called when the terminal needs to write data back to the pty, for example in response to a device status report or mode query. The data is only valid for the duration of the call; callers must copy it if it needs to persist.

@param terminal The terminal handle @param userdata The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA @param data Pointer to the response bytes @param len Length of the response in bytes

@ingroup terminal

Aliased Type§

pub enum GhosttyTerminalWritePtyFn {
    None,
    Some(unsafe extern "C" fn(*mut GhosttyTerminal, *mut c_void, *const u8, usize)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut GhosttyTerminal, *mut c_void, *const u8, usize))

Some value of type T.