|
Monado OpenXR Runtime
|
Contains handle-related functions and defines only required in a few locations. More...


Go to the source code of this file.
Macros | |
| #define | OXR_ALLOCATE_HANDLE(LOG, OUT, DEBUG, DESTROY, PARENT) |
| Allocates memory for a handle and evaluates to an XrResult. More... | |
| #define | OXR_ALLOCATE_HANDLE_OR_RETURN(LOG, OUT, DEBUG, DESTROY, PARENT) |
| Allocate memory for a handle, returning in case of failure. More... | |
Functions | |
| XrResult | oxr_handle_init (struct oxr_logger *log, struct oxr_handle_base *hb, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent) |
| Initialize a handle holder, and if a parent is specified, update its child list to include this handle. More... | |
| XrResult | oxr_handle_allocate_and_init (struct oxr_logger *log, size_t size, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent, void **out) |
| Allocate some memory for use as a handle, and initialize it as a handle. More... | |
Contains handle-related functions and defines only required in a few locations.
| #define OXR_ALLOCATE_HANDLE | ( | LOG, | |
| OUT, | |||
| DEBUG, | |||
| DESTROY, | |||
| PARENT | |||
| ) |
Allocates memory for a handle and evaluates to an XrResult.
| LOG | pointer to struct oxr_logger |
| OUT | the pointer to handle struct type you already created. |
| DEBUG | Magic per-type debugging constant |
| DESTROY | Handle destructor function |
| PARENT | a parent handle, if any |
Use when you want to do something other than immediately returning in case of failure. If returning immediately is OK, see OXR_ALLOCATE_HANDLE_OR_RETURN().
| #define OXR_ALLOCATE_HANDLE_OR_RETURN | ( | LOG, | |
| OUT, | |||
| DEBUG, | |||
| DESTROY, | |||
| PARENT | |||
| ) |
Allocate memory for a handle, returning in case of failure.
| LOG | pointer to struct oxr_logger |
| OUT | the pointer to handle struct type you already created. |
| DEBUG | Magic per-type debugging constant |
| DESTROY | Handle destructor function |
| PARENT | a parent handle, if any |
Will return an XrResult from the current function if something fails. If that's not OK, see OXR_ALLOCATE_HANDLE().
Referenced by oxr_action_set_create().
| XrResult oxr_handle_allocate_and_init | ( | struct oxr_logger * | log, |
| size_t | size, | ||
| uint64_t | debug, | ||
| oxr_handle_destroyer | destroy, | ||
| struct oxr_handle_base * | parent, | ||
| void ** | out | ||
| ) |
Allocate some memory for use as a handle, and initialize it as a handle.
Mainly for internal use - use OXR_ALLOCATE_HANDLE instead which wraps this.
| XrResult oxr_handle_init | ( | struct oxr_logger * | log, |
| struct oxr_handle_base * | hb, | ||
| uint64_t | debug, | ||
| oxr_handle_destroyer | destroy, | ||
| struct oxr_handle_base * | parent | ||
| ) |
Initialize a handle holder, and if a parent is specified, update its child list to include this handle.
1.8.13