···116116#define XRT_MAX_DEVICE_BLEND_MODES 3
117117118118/*!
119119+ * Special flags for creating passthrough.
120120+ */
121121+enum xrt_passthrough_create_flags
122122+{
123123+ //! Start the passthrough on creation
124124+ XRT_PASSTHROUGH_IS_RUNNING_AT_CREATION = (1 << 0),
125125+ //! Our compositor just ignores this bit.
126126+ XRT_PASSTHROUGH_LAYER_DEPTH = (1 << 1),
127127+};
128128+129129+/*!
130130+ * Specify additional state change behavior.
131131+ */
132132+enum xrt_passthrough_state
133133+{
134134+ //! Passthrough system requires reinitialization.
135135+ XRT_PASSTHROUGH_STATE_CHANGED_REINIT_REQUIRED_BIT = (1 << 0),
136136+ //! Non-recoverable error has occurred.
137137+ XRT_PASSTHROUGH_STATE_CHANGED_NON_RECOVERABLE_ERROR_BIT = (1 << 1),
138138+ //! A recoverable error has occurred.
139139+ XRT_PASSTHROUGH_STATE_CHANGED_RECOVERABLE_ERROR_BIT = (1 << 2),
140140+ //! The runtime has recovered from a previous error and is functioning normally.
141141+ XRT_PASSTHROUGH_STATE_CHANGED_RESTORED_ERROR_BIT = (1 << 3),
142142+};
143143+144144+/*!
145145+ * Specify the kind of passthrough behavior the layer provides.
146146+ */
147147+enum xrt_passthrough_purpose_flags
148148+{
149149+ //! Fullscreen layer
150150+ XRT_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION = (1 << 0),
151151+ //! Projected layer.
152152+ XRT_PASSTHROUGH_LAYER_PURPOSE_PROJECTED = (1 << 1),
153153+ //! Provided by XR_FB_passthrough_keyboard_hands
154154+ XRT_PASSTHROUGH_LAYER_PURPOSE_TRACKED_KEYBOARD_HANDS = 1000203001,
155155+ //! Provided by XR_FB_passthrough_keyboard_hands
156156+ XRT_PASSTHROUGH_LAYER_PURPOSE_TRACKED_KEYBOARD_MASKED_HANDS = 1000203002,
157157+};
158158+159159+/*!
119160 * Which distortion model does the device expose,
120161 * used both as a bitfield and value.
121162 */
+13
src/xrt/include/xrt/xrt_session.h
···58585959 //! The performance of the session has changed
6060 XRT_SESSION_EVENT_PERFORMANCE_CHANGE = 7,
6161+6262+ //! The passthrough state of the session has changed
6363+ XRT_SESSION_EVENT_PASSTHRU_STATE_CHANGE = 8,
6164};
62656366/*!
···153156};
154157155158/*!
159159+ * Passthrough state change event.
160160+ */
161161+struct xrt_session_event_passthrough_state_change
162162+{
163163+ enum xrt_session_event_type type;
164164+ enum xrt_passthrough_state state;
165165+};
166166+167167+/*!
156168 * Union of all session events, used to return multiple events through one call.
157169 * Each event struct must start with a @ref xrt_session_event_type field.
158170 *
···168180 struct xrt_session_event_display_refresh_rate_change display;
169181 struct xrt_session_event_reference_space_change_pending ref_change;
170182 struct xrt_session_event_perf_change performance;
183183+ struct xrt_session_event_passthrough_state_change passthru;
171184};
172185173186/*!