WVR_EXPORT bool WVR_SetGazeTriggerType(WVR_GazeTriggerType type)

Function to set the gaze trigger type of the application.

bool, true when set successfully.
API Level 2
Effective with Runtime version 2 or higher

How to use

This function is programmed for setup gaze trigger type. If the API level is lower than 2, this function would be disabled.

Here is an example for the function:

#include <wvr/wvr_device.h>

WVR_GazeTriggerType mGazeTriggerType;
mGazeTriggerType = WVR_GetGazeTriggerType();

if (mGazeTriggerType == WVR_GazeTriggerType_Timeout) {
    mGazeTriggerType = WVR_GazeTriggerType_Button;
} else if (mGazeTriggerType == WVR_GazeTriggerType_Button) {
    mGazeTriggerType = WVR_GazeTriggerType_TimeoutButton;
} else if (mGazeTriggerType == WVR_GazeTriggerType_TimeoutButton) {
    mGazeTriggerType = WVR_GazeTriggerType_Timeout;


In this example, it uses WVR_GetGazeTriggerType() to get the value of current gaze trigger type. Then the example sets a value of gaze trigger type by controller button if current gaze trigger type is gaze timeout, otherwise it sets allowing both gaze timeout and controller button if cruurent type is controller button only or it sets gaze timeout only if current type is allowing both gaze timeout and controller button.

After switching gaze trigger type phase, WVR_SetGazeTriggerType() is called to setup gaze trigger type with the value.

enum WVR_GazeTriggerType

The gaze trigger type of the application.


WVR_GazeTriggerType_Timeout = 1

Use timeout to trigger gaze.

WVR_GazeTriggerType_Button = 2

Use button to trigger gaze.

WVR_GazeTriggerType_TimeoutButton = 3

Both timeout and button can trigger gaze.