SHSelectionCallback typedef

Text selection callback.

Called from a native thread (CGEventTap RunLoop, Windows hook thread, X11 event loop, etc.). The data pointer is valid ONLY for the duration of the callback. Dart MUST copy any needed fields before returning.

Must be registered via sh_set_selection_callback before sh_start.

@param data Selection data. Lifetime = callback duration. Copy immediately.

Implementation

typedef SHSelectionCallback =
    ffi.Pointer<ffi.NativeFunction<SHSelectionCallbackFunction>>;