Varjo Native SDK
Varjo_events.h
Go to the documentation of this file.
1 // Copyright 2019-2022 Varjo Technologies Oy. All rights reserved.
2 
3 #ifndef VARJO_EVENTS_H
4 #define VARJO_EVENTS_H
5 
6 #include "Varjo_types.h"
7 #include "Varjo_types_mr.h"
9 
10 #if defined __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef int64_t varjo_EventType;
21  0x6;
31 
32 #define VARJO_LAST_EVENT varjo_EventType_VisibilityMeshChange
33 
34 typedef int8_t varjo_ButtonId;
36 
37 typedef int64_t varjo_TrackingStatus;
41 
42 typedef int64_t varjo_HeadsetStatus;
45 
46 typedef int64_t varjo_DisplayStatus;
50 
51 typedef int64_t varjo_MRDeviceStatus;
54 
57  int64_t timestamp;
58 };
59 
62 };
63 
67 };
68 
71 };
72 
75 };
76 
79 };
80 
83 };
84 
87 };
88 
91 };
92 
95 };
96 
99 };
100 
103 };
104 
107 };
108 
111 };
112 
114  uint32_t viewIndex;
115 };
116 
119  struct varjo_EventButton button;
133 };
134 
138 struct varjo_Event {
139  struct varjo_EventHeader header;
140  union varjo_EventData data;
141 };
142 
143 
144 #if defined __cplusplus
145 }
146 #endif
147 
148 #endif // VARJO_EVENTS_H
varjo_TrackingStatus
int64_t varjo_TrackingStatus
Definition: Varjo_events.h:37
varjo_EventData::button
struct varjo_EventButton button
Button event data.
Definition: Varjo_events.h:119
varjo_HeadsetStatus_Disconnected
static const varjo_HeadsetStatus varjo_HeadsetStatus_Disconnected
Headset is disconnected.
Definition: Varjo_events.h:44
varjo_EventTextureSizeChange
Definition: Varjo_events.h:109
varjo_ButtonId_Application
static const varjo_ButtonId varjo_ButtonId_Application
Button ID for application button on the headset.
Definition: Varjo_events.h:35
varjo_EventButton::buttonId
varjo_ButtonId buttonId
Id of the button.
Definition: Varjo_events.h:66
varjo_DisplayStatus_ContextNotFound
static const varjo_DisplayStatus varjo_DisplayStatus_ContextNotFound
Context display is not found.
Definition: Varjo_events.h:47
varjo_DisplayStatus
int64_t varjo_DisplayStatus
Definition: Varjo_events.h:46
varjo_EventMRCameraPropertyChange::type
varjo_CameraPropertyType type
Changed property. Value can be queried with varjo_MRGetCameraPropertyMode and varjo_MRGetCameraProper...
Definition: Varjo_events.h:98
varjo_EventForeground
Definition: Varjo_events.h:77
VARJORUNTIME_DEPRECATED
#define VARJORUNTIME_DEPRECATED
Definition: Varjo_export.h:25
varjo_EventHeadsetStandbyStatus::onStandby
varjo_Bool onStandby
True if there are no consumers e.g. headset, analytics window and mirror view in VarjoBase of rendere...
Definition: Varjo_events.h:82
varjo_EventTrackingStatus::status
varjo_TrackingStatus status
Current tracking status.
Definition: Varjo_events.h:70
varjo_EventMRDeviceStatus
Definition: Varjo_events.h:93
varjo_EventHeadsetStatus::status
varjo_HeadsetStatus status
Current headset status.
Definition: Varjo_events.h:74
varjo_EventType_HeadsetStatus
static const varjo_EventType varjo_EventType_HeadsetStatus
Event for headset connection and disconnection.
Definition: Varjo_events.h:18
varjo_EventDataStreamStart::streamId
varjo_StreamId streamId
Stream id.
Definition: Varjo_events.h:102
varjo_EventType
int64_t varjo_EventType
Definition: Varjo_events.h:14
varjo_EventData::foreground
struct varjo_EventForeground foreground
Foreground status event data.
Definition: Varjo_events.h:126
varjo_DisplayStatus_AllDisplaysFound
static const varjo_DisplayStatus varjo_DisplayStatus_AllDisplaysFound
All displays found.
Definition: Varjo_events.h:49
varjo_CameraPropertyType
int64_t varjo_CameraPropertyType
Camera property types that can be accessed to control video pass through cameras.
Definition: Varjo_types_mr.h:97
varjo_TrackingStatus_Disconnected
static const varjo_TrackingStatus varjo_TrackingStatus_Disconnected
Tracking disconnected.
Definition: Varjo_events.h:40
varjo_EventDataStreamStop::streamId
varjo_StreamId streamId
Stream id.
Definition: Varjo_events.h:106
varjo_HeadsetStatus_Connected
static const varjo_HeadsetStatus varjo_HeadsetStatus_Connected
Headset is connected.
Definition: Varjo_events.h:43
varjo_HeadsetStatus
int64_t varjo_HeadsetStatus
Definition: Varjo_events.h:42
varjo_EventStandbyStatus
Definition: Varjo_events.h:85
varjo_TrackingStatus_Lost
static const varjo_TrackingStatus varjo_TrackingStatus_Lost
No tracking data available.
Definition: Varjo_events.h:39
varjo_EventType_StandbyStatus
static const varjo_EventType varjo_EventType_StandbyStatus
Event for changes in standby status.
Definition: Varjo_events.h:22
varjo_EventTrackingStatus
Definition: Varjo_events.h:69
varjo_Bool
int32_t varjo_Bool
Definition: Varjo_types.h:140
varjo_Event::header
struct varjo_EventHeader header
Event header.
Definition: Varjo_events.h:139
varjo_EventType_TextureSizeChange
static const varjo_EventType varjo_EventType_TextureSizeChange
Event emitted when a texture size has changed.
Definition: Varjo_events.h:28
varjo_ButtonId
int8_t varjo_ButtonId
Definition: Varjo_events.h:34
varjo_EventVisibility::visible
varjo_Bool visible
Current visibility.
Definition: Varjo_events.h:61
varjo_EventData::standbyStatus
struct varjo_EventStandbyStatus standbyStatus
Standby status event data.
Definition: Varjo_events.h:125
varjo_EventData::mrDeviceStatus
struct varjo_EventMRDeviceStatus mrDeviceStatus
Mixed reality device status event data.
Definition: Varjo_events.h:127
varjo_EventHeadsetStandbyStatus
Definition: Varjo_events.h:81
varjo_Event::data
union varjo_EventData data
Event data.
Definition: Varjo_events.h:140
varjo_EventType_MRChromaKeyConfigChange
static const varjo_EventType varjo_EventType_MRChromaKeyConfigChange
Event emitted when chroma key configuration has changed.
Definition: Varjo_events.h:29
varjo_EventForeground::isForeground
varjo_Bool isForeground
Is the session on foreground.
Definition: Varjo_events.h:78
varjo_EventType_VisibilityMeshChange
static const varjo_EventType varjo_EventType_VisibilityMeshChange
Event emitted when occlusion/visibility mesh has changed.
Definition: Varjo_events.h:30
varjo_MRDeviceStatus_Connected
static const varjo_MRDeviceStatus varjo_MRDeviceStatus_Connected
Mixed reality capable device is connected.
Definition: Varjo_events.h:52
varjo_EventData::visibilityMeshChange
struct varjo_EventVisibilityMeshChange visibilityMeshChange
Visibility mesh change data.
Definition: Varjo_events.h:132
varjo_EventMRDeviceStatus::status
varjo_MRDeviceStatus status
Is there a mixed reality capable device connected.
Definition: Varjo_events.h:94
varjo_EventData::dataStreamStop
struct varjo_EventDataStreamStop dataStreamStop
Data stream stop event data.
Definition: Varjo_events.h:130
Varjo_types_mr.h
varjo_EventData::headsetStatus
struct varjo_EventHeadsetStatus headsetStatus
Headset status event data.
Definition: Varjo_events.h:121
varjo_TrackingStatus_Ok
static const varjo_TrackingStatus varjo_TrackingStatus_Ok
Tracking is ok.
Definition: Varjo_events.h:38
varjo_EventData::trackingStatus
struct varjo_EventTrackingStatus trackingStatus
Tracking status event data.
Definition: Varjo_events.h:120
varjo_EventData
Definition: Varjo_events.h:117
varjo_EventButton
Definition: Varjo_events.h:64
varjo_EventHeadsetStatus
Definition: Varjo_events.h:73
varjo_Event
Event struct used for all the events by the event system.
Definition: Varjo_events.h:138
Varjo_types_datastream.h
varjo_EventData::dataStreamStart
struct varjo_EventDataStreamStart dataStreamStart
Data stream start event data.
Definition: Varjo_events.h:129
varjo_EventButton::pressed
varjo_Bool pressed
Is the button pressed down.
Definition: Varjo_events.h:65
varjo_EventHeader
Definition: Varjo_events.h:55
varjo_EventData::textureSizeChange
struct varjo_EventTextureSizeChange textureSizeChange
Texture size change data.
Definition: Varjo_events.h:131
varjo_EventHeader::timestamp
int64_t timestamp
Timestamp of the time when the event was issued.
Definition: Varjo_events.h:57
Varjo_types.h
varjo_EventData::displayStatus
struct varjo_EventDisplayStatus displayStatus
Display status event data.
Definition: Varjo_events.h:122
varjo_EventType_MRCameraPropertyChange
static const varjo_EventType varjo_EventType_MRCameraPropertyChange
Event sent right after a camera property (e.g. exposure mode) change.
Definition: Varjo_events.h:25
varjo_EventType_Foreground
static const varjo_EventType varjo_EventType_Foreground
Event for when application goes to background or foreground.
Definition: Varjo_events.h:23
varjo_EventTextureSizeChange::typeMask
varjo_TextureSize_Type_Mask typeMask
Bitmask of changed texture size types.
Definition: Varjo_events.h:110
varjo_EventData::mrCameraPropertyChange
struct varjo_EventMRCameraPropertyChange mrCameraPropertyChange
Camera property change event data.
Definition: Varjo_events.h:128
varjo_EventVisibilityMeshChange
Definition: Varjo_events.h:113
varjo_StreamId
int64_t varjo_StreamId
Stream ID to identify a data stream configuration.
Definition: Varjo_types_datastream.h:114
varjo_EventType_TrackingStatus
static const varjo_EventType varjo_EventType_TrackingStatus
Event that is received when there's a change in positional tracking state.
Definition: Varjo_events.h:17
varjo_EventHeader::type
varjo_EventType type
Type of the event.
Definition: Varjo_events.h:56
varjo_EventStandbyStatus::onStandby
varjo_Bool onStandby
True if there are no consumers e.g. headset, analytics window and mirror view in VarjoBase of rendere...
Definition: Varjo_events.h:86
varjo_DisplayStatus_FocusNotFound
static const varjo_DisplayStatus varjo_DisplayStatus_FocusNotFound
Focus display is not found.
Definition: Varjo_events.h:48
varjo_EventType_MRDeviceStatus
static const varjo_EventType varjo_EventType_MRDeviceStatus
Event for determining whether mixed reality capable device is connected.
Definition: Varjo_events.h:24
varjo_EventData::headsetStandbyStatus
VARJORUNTIME_DEPRECATED struct varjo_EventHeadsetStandbyStatus headsetStandbyStatus
Headset standby status event data.
Definition: Varjo_events.h:123
varjo_EventDisplayStatus::status
varjo_DisplayStatus status
Current display status.
Definition: Varjo_events.h:90
varjo_EventType_DataStreamStop
static const varjo_EventType varjo_EventType_DataStreamStop
Event emitted when a data stream has stopped.
Definition: Varjo_events.h:27
varjo_EventVisibility
Definition: Varjo_events.h:60
varjo_EventType_Button
static const varjo_EventType varjo_EventType_Button
Button event that is received when a button is pressed or released.
Definition: Varjo_events.h:16
varjo_TextureSize_Type_Mask
int64_t varjo_TextureSize_Type_Mask
Definition: Varjo_types.h:548
varjo_EventData::visibility
struct varjo_EventVisibility visibility
Visibility event data.
Definition: Varjo_events.h:118
varjo_EventType_DisplayStatus
static const varjo_EventType varjo_EventType_DisplayStatus
Event for changes in headset display connections. Eg. if cables are unplugged.
Definition: Varjo_events.h:19
varjo_EventType_HeadsetStandbyStatus
static VARJORUNTIME_DEPRECATED const varjo_EventType varjo_EventType_HeadsetStandbyStatus
Event for changes in standby status.
Definition: Varjo_events.h:20
varjo_EventVisibilityMeshChange::viewIndex
uint32_t viewIndex
viewIndex for which visibility/occlusion mesh is changed and should be re-queried.
Definition: Varjo_events.h:114
varjo_EventDataStreamStop
Definition: Varjo_events.h:105
varjo_MRDeviceStatus
int64_t varjo_MRDeviceStatus
Definition: Varjo_events.h:51
varjo_EventDisplayStatus
Definition: Varjo_events.h:89
varjo_MRDeviceStatus_Disconnected
static const varjo_MRDeviceStatus varjo_MRDeviceStatus_Disconnected
Mixed reality capable device is disconnected.
Definition: Varjo_events.h:53
varjo_EventType_Visibility
static const varjo_EventType varjo_EventType_Visibility
Visibility event received when application being shown / hidden.
Definition: Varjo_events.h:15
varjo_EventMRCameraPropertyChange
Definition: Varjo_events.h:97
varjo_EventType_DataStreamStart
static const varjo_EventType varjo_EventType_DataStreamStart
Event emitted when a data stream has started.
Definition: Varjo_events.h:26
varjo_EventDataStreamStart
Definition: Varjo_events.h:101