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

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

#include <xrt/xrt_app_policy.h>

Inheritance diagram for xrt_app_system:
Collaboration diagram for xrt_app_system:

Static Public Member Functions

static XRT_NONNULL_ALL xrt_result_t xrt_app_system_get_recommended_view_configuration (struct xrt_app_system *xasys, enum xrt_view_type view_type, struct xrt_recommended_view_config *out_recommended_view_config)
 Gets the recommended view configuration for the given view type, if available and supported.
 
static XRT_NONNULL_ALL xrt_result_t xrt_app_system_set_recommended_view_configuration (struct xrt_app_system *xasys, enum xrt_view_type view_type, const struct xrt_recommended_view_config *recommended_view_config)
 Sets the recommended view configuration for the given view type.
 
static XRT_NONNULL_ALL void xrt_app_system_destroy (struct xrt_app_system **xasys_ptr)
 Destroy the application system and its owned objects.
 

Data Fields

Interface Methods

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

To use this interface, see the helper functions.

xrt_result_t(* get_recommended_view_configuration )(struct xrt_app_system *xasys, enum xrt_view_type view_type, struct xrt_recommended_view_config *out_recommended_view_config)
 Gets the recommended view configuration for the given view type, if available and supported.
 
xrt_result_t(* set_recommended_view_configuration )(struct xrt_app_system *xasys, enum xrt_view_type view_type, const struct xrt_recommended_view_config *recommended_view_config)
 Sets the recommended view configuration for the given view type.
 
void(* destroy )(struct xrt_app_system *xasys)
 Destroy the application system and its owned objects.
 

Detailed Description

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

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

See also
xrt_app_instance_create_app_system

Member Function Documentation

◆ xrt_app_system_destroy()

static XRT_NONNULL_ALL void xrt_app_system_destroy ( struct xrt_app_system **  xasys_ptr)
inlinestatic

Destroy the application system and its owned objects.

Note
Code consuming this interface should use xrt_app_system_destroy().
Parameters
xasysPointer to self

Helper for calling through the function pointer.

References destroy.

◆ xrt_app_system_get_recommended_view_configuration()

static XRT_NONNULL_ALL xrt_result_t xrt_app_system_get_recommended_view_configuration ( struct xrt_app_system *  xasys,
enum xrt_view_type  view_type,
struct xrt_recommended_view_config *  out_recommended_view_config 
)
inlinestatic

Gets the recommended view configuration for the given view type, if available and supported.

Only the recommended field is guaranteed to be provided, and max may be left unspecified.

This allows a policy to set a new recommended view configuration for the lifetime of this application.

Parameters
xasysPointer to self
view_typeThe view type to get the recommended view configuration for.
[out]out_recommended_view_configThe recommendation for the client.

Helper for calling through the function pointer.

References get_recommended_view_configuration.

◆ xrt_app_system_set_recommended_view_configuration()

static XRT_NONNULL_ALL xrt_result_t xrt_app_system_set_recommended_view_configuration ( struct xrt_app_system *  xasys,
enum xrt_view_type  view_type,
const struct xrt_recommended_view_config *  recommended_view_config 
)
inlinestatic

Sets the recommended view configuration for the given view type.

Only the recommended field will be meaningfully read by the xrt_app_system.

The callee should push a session event of type XRT_SESSION_EVENT_RECOMMENDED_VIEW_CONFIGURATION_CHANGE when the recommended view configuration changes, so that sessions can react to this change if they want to.

Note
The xrt_app_system may not do verification on the passed configuration, it is up to the callee to not pass invalid data into here.
Parameters
xasysPointer to self
view_typeThe view type to set the recommended view configuration for.
[in]recommended_view_configThe recommended view configuration to set for the given view type.

Helper for calling through the function pointer.

References set_recommended_view_configuration.

Field Documentation

◆ destroy

void(* xrt_app_system::destroy) (struct xrt_app_system *xasys)

Destroy the application system and its owned objects.

Note
Code consuming this interface should use xrt_app_system_destroy().
Parameters
xasysPointer to self

Referenced by b_app_system::b_app_system_init(), and xrt_app_system_destroy().

◆ get_recommended_view_configuration

xrt_result_t(* xrt_app_system::get_recommended_view_configuration) (struct xrt_app_system *xasys, enum xrt_view_type view_type, struct xrt_recommended_view_config *out_recommended_view_config)

Gets the recommended view configuration for the given view type, if available and supported.

Only the recommended field is guaranteed to be provided, and max may be left unspecified.

This allows a policy to set a new recommended view configuration for the lifetime of this application.

Parameters
xasysPointer to self
view_typeThe view type to get the recommended view configuration for.
[out]out_recommended_view_configThe recommendation for the client.

Referenced by b_app_system::b_app_system_init(), and xrt_app_system_get_recommended_view_configuration().

◆ set_recommended_view_configuration

xrt_result_t(* xrt_app_system::set_recommended_view_configuration) (struct xrt_app_system *xasys, enum xrt_view_type view_type, const struct xrt_recommended_view_config *recommended_view_config)

Sets the recommended view configuration for the given view type.

Only the recommended field will be meaningfully read by the xrt_app_system.

The callee should push a session event of type XRT_SESSION_EVENT_RECOMMENDED_VIEW_CONFIGURATION_CHANGE when the recommended view configuration changes, so that sessions can react to this change if they want to.

Note
The xrt_app_system may not do verification on the passed configuration, it is up to the callee to not pass invalid data into here.
Parameters
xasysPointer to self
view_typeThe view type to set the recommended view configuration for.
[in]recommended_view_configThe recommended view configuration to set for the given view type.

Referenced by b_app_system::b_app_system_init(), and xrt_app_system_set_recommended_view_configuration().


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