Monado OpenXR Runtime
|
An object handling a collection of callbacks for the Android lifecycle. More...
#include <android/android_lifecycle_callbacks.h>
Public Member Functions | |
android_lifecycle_callbacks (xrt_instance_android *xinst_android) | |
struct android_lifecycle_callbacks * | android_lifecycle_callbacks_create (struct xrt_instance_android *xinst_android) |
Create an android_lifecycle_callbacks object. More... | |
void | android_lifecycle_callbacks_destroy (struct android_lifecycle_callbacks **ptr_callbacks) |
Destroy an android_lifecycle_callbacks object. More... | |
int | android_lifecycle_callbacks_register_callback (struct android_lifecycle_callbacks *alc, xrt_android_lifecycle_event_handler_t callback, enum xrt_android_lifecycle_event event_mask, void *userdata) |
Register a lifecycle event callback. More... | |
int | android_lifecycle_callbacks_remove_callback (struct android_lifecycle_callbacks *alc, xrt_android_lifecycle_event_handler_t callback, enum xrt_android_lifecycle_event event_mask, void *userdata) |
Remove a lifecycle event callback that matches the supplied parameters. More... | |
Data Fields | |
xrt_instance_android * | instance_android |
GenericCallbacks< xrt_android_lifecycle_event_handler_t, enum xrt_android_lifecycle_event > | callback_collection |
ActivityLifecycleListener | listener {} |
An object handling a collection of callbacks for the Android lifecycle.
struct android_lifecycle_callbacks * android_lifecycle_callbacks_create | ( | struct xrt_instance_android * | xinst_android | ) |
Create an android_lifecycle_callbacks object.
xinst_android | The instance that will be passed to all callbacks. |
void android_lifecycle_callbacks_destroy | ( | struct android_lifecycle_callbacks ** | ptr_callbacks | ) |
Destroy an android_lifecycle_callbacks object.
References wrap::org::freedesktop::monado::auxiliary::ActivityLifecycleListener::unregisterCallback().
Referenced by android_instance_base::android_instance_base_cleanup().
int android_lifecycle_callbacks_register_callback | ( | struct android_lifecycle_callbacks * | alc, |
xrt_android_lifecycle_event_handler_t | callback, | ||
enum xrt_android_lifecycle_event | event_mask, | ||
void * | userdata | ||
) |
Register a lifecycle event callback.
alc | Pointer to self |
callback | Function pointer for callback |
event_mask | bitwise-OR of one or more values from xrt_android_lifecycle_event |
userdata | An opaque pointer for use by the callback. Whatever you pass here will be passed to the callback when invoked. |
References xrt::auxiliary::util::GenericCallbacks< CallbackType, EventBitflagType >::addCallback().
int android_lifecycle_callbacks_remove_callback | ( | struct android_lifecycle_callbacks * | alc, |
xrt_android_lifecycle_event_handler_t | callback, | ||
enum xrt_android_lifecycle_event | event_mask, | ||
void * | userdata | ||
) |
Remove a lifecycle event callback that matches the supplied parameters.
alc | Pointer to self |
callback | Function pointer for callback |
event_mask | bitwise-OR of one or more values from xrt_android_lifecycle_event |
userdata | An opaque pointer for use by the callback, must match the one originally supplied |
References xrt::auxiliary::util::GenericCallbacks< CallbackType, EventBitflagType >::removeCallback().