Skip to main content

GhosttyTerminalDeviceAttributesFn

Type Alias GhosttyTerminalDeviceAttributesFn 

Source
pub type GhosttyTerminalDeviceAttributesFn = Option<unsafe extern "C" fn(terminal: GhosttyTerminal_ptr, userdata: *mut c_void, out_attrs: *mut GhosttyDeviceAttributes) -> bool>;
Expand description

Callback function type for device attributes queries (DA1/DA2/DA3).

Called when the terminal receives a device attributes query (CSI c, CSI > c, or CSI = c). Return true and fill *out_attrs with the response data, or return false to silently ignore the query.

The terminal uses whichever sub-struct (primary, secondary, tertiary) matches the request type, but all three should be filled for simplicity.

@param terminal The terminal handle @param userdata The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA @param[out] out_attrs Pointer to store the device attributes response @return true if attributes were filled, false to ignore the query

@ingroup terminal

Aliased Type§

pub enum GhosttyTerminalDeviceAttributesFn {
    None,
    Some(unsafe extern "C" fn(*mut GhosttyTerminal, *mut c_void, *mut GhosttyDeviceAttributes) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut GhosttyTerminal, *mut c_void, *mut GhosttyDeviceAttributes) -> bool)

Some value of type T.