Tobii Pro SDK C API
eye_tracking_modes.c
#include <stdio.h>
void eye_tracking_modes_example(TobiiResearchEyeTracker* eyetracker) {
char* initial_eye_tracking_mode;
TobiiResearchStatus status = tobii_research_get_eye_tracking_mode(eyetracker, &initial_eye_tracking_mode);
printf("The eye tracker's initial eye tracking mode is %s with status %i.\n", initial_eye_tracking_mode, status);
{
TobiiResearchEyeTrackingModes* all_eye_tracking_modes = NULL;
size_t i = 0;
status = tobii_research_get_all_eye_tracking_modes(eyetracker, &all_eye_tracking_modes);
for (; i < all_eye_tracking_modes->mode_count; i++) {
status = tobii_research_set_eye_tracking_mode(eyetracker, all_eye_tracking_modes->modes[i]);
printf("Eye tracking mode set to %s with status %i.\n", all_eye_tracking_modes->modes[i], status);
}
status = tobii_research_set_eye_tracking_mode(eyetracker, initial_eye_tracking_mode);
printf("Eye tracking mode reset to %s with status %i.\n", initial_eye_tracking_mode, status);
tobii_research_free_string(initial_eye_tracking_mode);
tobii_research_free_eye_tracking_modes(all_eye_tracking_modes);
}
}