Skip to main content

ghostty_key_encoder_new

Function ghostty_key_encoder_new 

Source
pub unsafe extern "C" fn ghostty_key_encoder_new(
    allocator: *const GhosttyAllocator,
    encoder: *mut GhosttyKeyEncoder_ptr,
) -> GhosttyResult
Expand description

Create a new key encoder instance.

Creates a new key encoder with default options. The encoder can be configured using ghostty_key_encoder_setopt() and must be freed using ghostty_key_encoder_free() when no longer needed.

@param allocator Pointer to the allocator to use for memory management, or NULL to use the default allocator @param encoder Pointer to store the created encoder handle @return GHOSTTY_SUCCESS on success, or an error code on failure

@ingroup key