Monado OpenXR Runtime
xrt_session Struct Reference

The XRT representation of XrSession, this object does not have all of the functionality of a session, most are partitioned to the session level compositor object. More...

#include <xrt/xrt_session.h>

Inheritance diagram for xrt_session:
Collaboration diagram for xrt_session:

Public Member Functions

static XRT_CHECK_RESULT xrt_result_t xrt_session_poll_events (struct xrt_session *xs, union xrt_session_event *out_xse)
 Poll a single event from this session, if no event is available then the type of the event will be XRT_SESSION_EVENT_NONE. More...
 
static void xrt_session_destroy (struct xrt_session **xs_ptr)
 Destroy an xrt_session - helper function. More...
 

Data Fields

xrt_result_t(* poll_events )(struct xrt_session *xs, union xrt_session_event *out_xse)
 Poll a single event from this session, if no event is available then the type of the event will be XRT_SESSION_EVENT_NONE. More...
 
void(* destroy )(struct xrt_session *xs)
 Destroy the session, must be destroyed after the native compositor. More...
 

Detailed Description

The XRT representation of XrSession, this object does not have all of the functionality of a session, most are partitioned to the session level compositor object.

Often this is xrt_compositor_native, note that interface may also be a system level object depending in implementor.

Member Function Documentation

◆ xrt_session_destroy()

static void xrt_session_destroy ( struct xrt_session **  xs_ptr)
inline

Destroy an xrt_session - helper function.

Parameters
[in,out]xsd_ptrA pointer to the xrt_session struct pointer.

Will destroy the system if *xs_ptr is not NULL. Will then set *xs_ptr to NULL.

References destroy.

◆ xrt_session_poll_events()

static XRT_CHECK_RESULT xrt_result_t xrt_session_poll_events ( struct xrt_session xs,
union xrt_session_event out_xse 
)
inline

Poll a single event from this session, if no event is available then the type of the event will be XRT_SESSION_EVENT_NONE.

Parameters
xsPointer to self
[out]out_xseEvent to be returned.

Helper for calling through the function pointer.

References poll_events.

Field Documentation

◆ destroy

void(* xrt_session::destroy) (struct xrt_session *xs)

Destroy the session, must be destroyed after the native compositor.

Code consuming this interface should use xrt_session_destroy.

Parameters
xsPointer to self

Referenced by xrt_session_destroy().

◆ poll_events

xrt_result_t(* xrt_session::poll_events) (struct xrt_session *xs, union xrt_session_event *out_xse)

Poll a single event from this session, if no event is available then the type of the event will be XRT_SESSION_EVENT_NONE.

Parameters
xsPointer to self
[out]out_xseEvent to be returned.

Referenced by u_session::u_session_create(), and xrt_session_poll_events().


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