read_dora_input_id

Function read_dora_input_id 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn read_dora_input_id( event: *const (), out_ptr: *mut *const u8, out_len: *mut usize, )
Expand description

Reads out the ID of the given input event.

Writes the out_ptr and out_len with the start pointer and length of the ID string of the input. The ID is guaranteed to be valid UTF-8.

Writes a null pointer and length 0 if the given event is not an input event.

§Safety

  • The event argument must be a dora event received through dora_next_event. The event must be still valid, i.e., not freed yet. The returned out_ptr must not be used after freeing the event, since it points directly into the event’s memory.

  • Note: Out_ptr is not a null-terminated string. The length of the string is given by out_len.