pub unsafe extern "C" fn ghostty_mouse_encoder_encode(
encoder: GhosttyMouseEncoder_ptr,
event: GhosttyMouseEvent_ptr,
out_buf: *mut c_char,
out_buf_size: usize,
out_len: *mut usize,
) -> GhosttyResultExpand description
Encode a mouse event into a terminal escape sequence.
Not all mouse events produce output. In such cases this returns GHOSTTY_SUCCESS with out_len set to 0.
If the output buffer is too small, this returns GHOSTTY_OUT_OF_SPACE and out_len contains the required size.
@param encoder The encoder handle, must not be NULL @param event The mouse event to encode, must not be NULL @param out_buf Buffer to write encoded bytes to, or NULL to query required size @param out_buf_size Size of out_buf in bytes @param out_len Pointer to store bytes written (or required bytes on failure) @return GHOSTTY_SUCCESS on success, GHOSTTY_OUT_OF_SPACE if buffer is too small, or another error code
@ingroup mouse