Monado OpenXR Runtime
Loading...
Searching...
No Matches
xrt_app_instance Interface Reference

This interface acts as a way to store per-application policy for xrt_instance. More...

#include <xrt/xrt_app_policy.h>

Inheritance diagram for xrt_app_instance:
Collaboration diagram for xrt_app_instance:

Static Public Member Functions

static XRT_NONNULL_ALL xrt_result_t xrt_app_instance_create_app_system (struct xrt_app_instance *xainst, struct xrt_system *xsys, struct xrt_app_system **out_xasys)
 Creates an application system from the passed system.
 
static XRT_NONNULL_ALL void xrt_app_instance_destroy (struct xrt_app_instance **xainst_ptr)
 Destroy the application instance and its owned objects.
 

Data Fields

Interface Methods

All implementations of the xrt_app_instance interface must populate all these function pointers with their implementation methods.

To use this interface, see the helper functions.

xrt_result_t(* create_app_system )(struct xrt_app_instance *xainst, struct xrt_system *xsys, struct xrt_app_system **out_xasys)
 Creates an application system from the passed system.
 
void(* destroy )(struct xrt_app_instance *xainst)
 Destroy the application instance and its owned objects.
 

Detailed Description

This interface acts as a way to store per-application policy for xrt_instance.

Only a single one of these should be created per application (aka XrInstance, in OpenXR terminology).

See also
xrt_instance
xrt_instance_create_app_instance

Member Function Documentation

◆ xrt_app_instance_create_app_system()

static XRT_NONNULL_ALL xrt_result_t xrt_app_instance_create_app_system ( struct xrt_app_instance xainst,
struct xrt_system xsys,
struct xrt_app_system **  out_xasys 
)
inlinestatic

Creates an application system from the passed system.

All xrt_app_system instances created by this function are expected to be destroyed before the xrt_app_instance is destroyed.

Note
Code consuming this interface should use xrt_app_instance_create_app_system()
Parameters
xainstPointer to self
xsysPointer to system to wrap.
[out]out_xasysReturn of application system, required.

Helper for calling through the function pointer.

References create_app_system.

◆ xrt_app_instance_destroy()

static XRT_NONNULL_ALL void xrt_app_instance_destroy ( struct xrt_app_instance **  xainst_ptr)
inlinestatic

Destroy the application instance and its owned objects.

Code consuming this interface should use xrt_app_instance_destroy().

Parameters
xainstPointer to self

Helper for calling through the function pointer.

References destroy.

Field Documentation

◆ create_app_system

xrt_result_t(* xrt_app_instance::create_app_system) (struct xrt_app_instance *xainst, struct xrt_system *xsys, struct xrt_app_system **out_xasys)

Creates an application system from the passed system.

All xrt_app_system instances created by this function are expected to be destroyed before the xrt_app_instance is destroyed.

Note
Code consuming this interface should use xrt_app_instance_create_app_system()
Parameters
xainstPointer to self
xsysPointer to system to wrap.
[out]out_xasysReturn of application system, required.

Referenced by b_app_instance::b_app_instance_init(), and xrt_app_instance_create_app_system().

◆ destroy

void(* xrt_app_instance::destroy) (struct xrt_app_instance *xainst)

Destroy the application instance and its owned objects.

Code consuming this interface should use xrt_app_instance_destroy().

Parameters
xainstPointer to self

Referenced by b_app_instance::b_app_instance_init(), and xrt_app_instance_destroy().


The documentation for this interface was generated from the following file: