libusb_hotplug_callback_fn typedef

libusb_hotplug_callback_fn = Pointer<NativeFunction<dynamic Function(Pointer<libusb_context>, Pointer<libusb_device>, Int32, Pointer<Void>)>>

\ingroup libusb_hotplug Hotplug callback function type. When requesting hotplug event notifications, you pass a pointer to a callback function of this type.

This callback may be called by an internal event thread and as such it is recommended the callback do minimal processing before returning.

libusb will call this function later, when a matching event had happened on a matching device. See \ref libusb_hotplug for more information.

It is safe to call either libusb_hotplug_register_callback() or libusb_hotplug_deregister_callback() from within a callback function.

Since version 1.0.16, \ref LIBUSB_API_VERSION >= 0x01000102

\param ctx context of this notification \param device libusb_device this event occurred on \param event event that occurred \param user_data user data provided when this callback was registered \returns bool whether this callback is finished processing events. returning 1 will cause this callback to be deregistered

Implementation

typedef libusb_hotplug_callback_fn = ffi.Pointer<
    ffi.NativeFunction<
        pkg_ffi.Int Function(ffi.Pointer<libusb_context>,
            ffi.Pointer<libusb_device>, ffi.Int32, ffi.Pointer<ffi.Void>)>>;