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_poll_events (struct xrt_app_system *xasys, struct xrt_app_system_event *out_xasyse)
 Poll a single event from this app system, if no event is available then the type of the event will be XRT_APP_SYSTEM_EVENT_NONE.
 
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 this application, 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(* poll_events )(struct xrt_app_system *xasys, struct xrt_app_system_event *out_xasyse)
 Poll a single event from this app system, if no event is available then the type of the event will be XRT_APP_SYSTEM_EVENT_NONE.
 
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 this application, 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.

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_poll_events()

static XRT_NONNULL_ALL xrt_result_t xrt_app_system_poll_events ( struct xrt_app_system *  xasys,
struct xrt_app_system_event *  out_xasyse 
)
inlinestatic

Poll a single event from this app system, if no event is available then the type of the event will be XRT_APP_SYSTEM_EVENT_NONE.

Parameters
xasysPointer to self
[out]out_xasyseEvent to be returned.

Helper for calling through the function pointer.

References poll_events.

◆ 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 this application, for the given view type.

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.

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().

◆ poll_events

xrt_result_t(* xrt_app_system::poll_events) (struct xrt_app_system *xasys, struct xrt_app_system_event *out_xasyse)

Poll a single event from this app system, if no event is available then the type of the event will be XRT_APP_SYSTEM_EVENT_NONE.

Parameters
xasysPointer to self
[out]out_xasyseEvent to be returned.

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

◆ 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 this application, for the given view type.

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: