#[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
eventargument must be a dora event received throughdora_next_event. The event must be still valid, i.e., not freed yet. The returnedout_ptrmust not be used after freeing theevent, since it points directly into the event’s memory. -
Note:
Out_ptris not a null-terminated string. The length of the string is given byout_len.