Details

eyevec_create()

Creates an idle EyeVec object.

EyeVec* eyevec_create(void);

eyevec_destroy()

Destroys specified EyeVec object.

Calls eyevec_cleanup() if necessary.

void eyevec_destroy(EyeVec* eyevec);

eyevec_create_waitable()

Creates a waitable event queue descriptor/handle.

Use eyevec_get_waitable() to retrieve the descriptor/handle.

If used, this function should be called before eyevec_initialize().

Note, functions eyevec_create_waitable() and eyevec_create_thread() are mutually exclusive.

EyeVecResult eyevec_create_waitable(EyeVec* eyevec);

eyevec_destroy_waitable()

Destroys the current waitable data event descriptor/handle.

If used, this function should be called after eyevec_cleanup().

EyeVecResult eyevec_destroy_waitable(EyeVec* eyevec);

eyevec_create_thread()

Creates the event queue monitoring thread that will dispatch received events to provided callback funtions.

If used, this function should be called before eyevec_initialize().

Note, functions eyevec_create_thread() and eyevec_create_waitable() are mutually exclusive.

EyeVecResult eyevec_create_thread(EyeVec* eyevec,
    EyeVecModeChangeEventCallback modeeventcb,
    EyeVecDisplayEventCallback displaydatacb,
    EyeVecEyeSampleEventCallback eyesamplecb,
    EyeVecBlinkEventCallback blinkeventcb,
    EyeVecSaccadeEventCallback saccadeeventcb,
    EyeVecFixationEventCallback fixationeventcb,
    EyeVecTestItemEventCallback testitemeventcb,
    void* clientdata);

eyevec_destroy_thread()

Destroys the event queue monitoring thread.

If used, this function should be called after eyevec_cleanup().

EyeVecResult eyevec_destroy_thread(EyeVec* eyevec);

eyevec_initialize()

Opens communication with the EyeVec server application.

EyeVecResult eyevec_initialize(EyeVec* eyevec,
    bool control);

eyevec_cleanup()

Closes communication with the EyeVec server application.

EyeVecResult eyevec_cleanup(EyeVec* eyevec);

eyevec_server_running()

Returns true if server application is running.

bool eyevec_server_running(const EyeVec* eyevec);

eyevec_get_error()

Returns result of latest function executed.

EyeVecResult eyevec_get_error(const EyeVec* eyevec);

eyevec_get_vendor()

Returns the EyeVec vendor name.

const char* eyevec_get_vendor(void);

eyevec_get_sdk_version()

Returns the EyeVec SDK version as a packed version value.

Use EYEVEC_DECOMPOSE_VERSION_MAJOR(), EYEVEC_DECOMPOSE_VERSION_MINOR() and EYEVEC_DECOMPOSE_VERSION_TINY() to decompose into major, minor and tiny version numbers.

uint32_t eyevec_get_sdk_version(void);

eyevec_get_runtime_version()

Returns the EyeVec runtime version as a packed version value.

Use EYEVEC_DECOMPOSE_VERSION_MAJOR(), EYEVEC_DECOMPOSE_VERSION_MINOR() and EYEVEC_DECOMPOSE_VERSION_TINY() to decompose into major, minor and tiny version numbers.

uint32_t eyevec_get_runtime_version(const EyeVec* eyevec);

eyevec_ping()

Tests communication with EyeVec server application.

EyeVecResult eyevec_ping(EyeVec* eyevec);

eyevec_get_test_screen_info()

Retrieves the test screen size and refresh interval.

EyeVecResult eyevec_get_test_screen_info(EyeVec* eyevec,
    EyeVecTestScreenInfo* testscreeninfo);

eyevec_set_test_screen_info()

Sets the test screen size and refresh interval.

If eyevec_initialize() was called with control=false then this function must be called before entering the setup mode or data mode. If eyevec_initialize() was called with control=true then this function should not be called.

EyeVecResult eyevec_set_test_screen_info(EyeVec* eyevec,
    const EyeVecTestScreenInfo* testscreeninfo);

eyevec_get_show_gui_on_setup_mode()

Returns the show-gui-on-setup-mode flag.

EyeVecResult eyevec_get_show_gui_on_setup_mode(const EyeVec* eyevec,
    bool* b);

eyevec_set_show_gui_on_setup_mode()

Sets/clears the show-gui-on-setup-mode flag. If set, the control window will be shown when entering setup mode.

EyeVecResult eyevec_set_show_gui_on_setup_mode(EyeVec* eyevec,
    bool b);

eyevec_get_show_gui_on_data_mode()

Returns the show-gui-on-data-mode flag.

EyeVecResult eyevec_get_show_gui_on_data_mode(const EyeVec* eyevec,
    bool* b);

eyevec_set_show_gui_on_data_mode()

Sets/clears the show-gui-on-data-mode flag.

If set the control window (with minimalistic content) will be shown when entering data mode. If not set, the control window will be hiddden unless it was explicitly shown using eyevec_show_control_window().

EyeVecResult eyevec_set_show_gui_on_data_mode(EyeVec* eyevec,
    bool b);

eyevec_show_control_window()

Shows control window if not yet done.

EyeVecResult eyevec_show_control_window(EyeVec* eyevec);

eyevec_hide_control_window()

Hides control window if currently shown.

EyeVecResult eyevec_hide_control_window(EyeVec* eyevec);

eyevec_is_control_window_shown()

Returns true if control window is currently shown.

EyeVecResult eyevec_is_control_window_shown(const EyeVec* eyevec,
    bool* b);

eyevec_get_use_test_window_in_setup_mode()

Returns the use-test-window-in-setup-mode flag.

EyeVecResult eyevec_get_use_test_window_in_setup_mode(const EyeVec* eyevec,
    bool* b);

eyevec_set_use_test_window_in_setup_mode()

Sets/clears the use-test-window-in-setup-mode flag.

If set, the test window will be used for target presentations in setup mode. If cleared, the target presentation is to be done by the client application.

EyeVecResult eyevec_set_use_test_window_in_setup_mode(EyeVec* eyevec,
    bool b);

eyevec_get_use_test_window_in_data_mode()

Returns the use-test-window-in-data-mode flag.

EyeVecResult eyevec_get_use_test_window_in_data_mode(const EyeVec* eyevec,
    bool* b);

eyevec_set_use_test_window_in_data_mode()

Sets/clears the use-test-window-in-data-mode flag.

If set, the test window will be used for target presentations in data mode. If cleared, the target presentation is to be done by the client application.

EyeVecResult eyevec_set_use_test_window_in_data_mode(EyeVec* eyevec,
    bool b);

eyevec_show_test_window()

Shows test window if not yet done.

EyeVecResult eyevec_show_test_window(EyeVec* eyevec);

eyevec_hide_test_window()

Hides test window if currently shown.

EyeVecResult eyevec_hide_test_window(EyeVec* eyevec);

eyevec_is_test_window_shown()

Returns true if test window is currently shown.

EyeVecResult eyevec_is_test_window_shown(const EyeVec* eyevec,
    bool* b);

eyevec_open()

Opens the device if not yet open.

EyeVecResult eyevec_open(EyeVec* eyevec);

eyevec_close()

Closes the device if currently open.

EyeVecResult eyevec_close(EyeVec* eyevec);

eyevec_is_open()

Returns true if the device is currently open.

bool eyevec_is_open(const EyeVec* eyevec);

eyevec_is_simulated()

Returns true if the device is opened in simulate mode.

bool eyevec_is_simulated(const EyeVec* eyevec);

eyevec_get_model()

Retrieves the device model (e.g. "EyeVec R2-1k") in specified character buffer and returns the required buffer capacity in bytes (minus the null terminator).

If specified bufsize is too small (i.e. < required size + 1) the data stored in the buffer will be truncated. Returned string will always be null-terminated.

size_t eyevec_get_model(const EyeVec* eyevec,
    char* buf, size_t bufsize);

eyevec_get_serial()

Retrieves the device serial number (e.g. "R2-25A204034") in specified character buffer and returns the required buffer capacity in bytes (minus the null terminator).

If specified bufsize is too small (i.e. < required size + 1) the data stored in the buffer will be truncated. Returned string will always be null-terminated.

size_t eyevec_get_serial(const EyeVec* eyevec,
    char* buf, size_t bufsize);

eyevec_get_camera()

Retrieves device camera’s serial number (e.g. "1234567890") in specified character buffer and returns the required buffer capacity in bytes (minus the null terminator).

If specified bufsize is too small (i.e. < required size + 1) the data stored in the buffer will be truncated. Returned string will always be null-terminated.

size_t eyevec_get_camera(const EyeVec* eyevec,
    char* buf, size_t bufsize);

eyevec_enter_idle_mode()

Enters idle mode provided the device is in setup mode or data mode.

EyeVecResult eyevec_enter_idle_mode(EyeVec* eyevec);

eyevec_enter_setup_mode()

Enters setup mode provided the device is in idle mode or data mode.

EyeVecResult eyevec_enter_setup_mode(EyeVec* eyevec);

eyevec_enter_data_mode()

Enters data mode provided the device is in idle mode or setup mode.

If proceed is set the mode change event will report an exit status of EYEVEC_EXIT_STATUS_OK, otherwise it will be EYEVEC_EXIT_STATUS_NONE.

EyeVecResult eyevec_enter_data_mode(EyeVec* eyevec,
    bool proceed);

eyevec_open_data_file()

Opens a new EyeVec data file and writes the file header.

The content bitmask defines which optional data may be included in the data file. See EyeVecDataFileContentFlags.

EyeVecResult eyevec_open_data_file(EyeVec* eyevec,
    const char* fn, uint32_t content);

eyevec_close_data_file()

Closes current EyeVec data file if applicable.

Optionally the file is deleted (only if a write error has occured and the file would therefore be invalid).

EyeVecResult eyevec_close_data_file(EyeVec* eyevec,
    bool unlinkiferror);

eyevec_is_data_file_open()

Returns true if the data file is open (i.e. writing is enabled).

EyeVecResult eyevec_is_data_file_open(const EyeVec* eyevec,
    bool* b);

eyevec_get_data_file_name()

Returns data file name if currently open.

Yields the required buffer capacity in bytes (minus the null terminator). If specified bufsize is too small (i.e. < required size + 1) the data stored in the buffer will be truncated. Returned string will always be null-terminated.

EyeVecResult eyevec_get_data_file_name(const EyeVec* eyevec,
    char* buf, size_t bufsize, size_t* size);

eyevec_get_data_file_error()

Returns true if writing to data file failed.

EyeVecResult eyevec_get_data_file_error(const EyeVec* eyevec,
    bool* b);

eyevec_add_data_file_message()

Adds a message record to the data file, provided the data file is open and output is enabled.

The msgtype string must be in ASCII. The msgtext string must be in UTF-8 (includes ASCII).

EyeVecResult eyevec_add_data_file_message(EyeVec* eyevec,
    int64_t t, const char* msgtype, const char* msgtext);

eyevec_start_baseline()

Starts baseline measurement.

EyeVecResult eyevec_start_baseline(EyeVec* eyevec,
    bool* presenttarget);

eyevec_drop_baseline()

Drops the current baseline data.

EyeVecResult eyevec_drop_baseline(EyeVec* eyevec);

eyevec_start_calibration()

Starts calibration procedure.

After a successful calibration an initial eye-vector to gaze position mapping function is selected from the set of possible gaze mapping functions (polynomials).

EyeVecResult eyevec_start_calibration(EyeVec* eyevec,
    bool* presenttarget);

eyevec_drop_calibration()

Drops latest calibration or all calibrations.

EyeVecResult eyevec_drop_calibration(EyeVec* eyevec,
    bool all);

eyevec_start_validation()

Starts validation procedure.

On a successful validation (with checkonly=false) the entire set of possible gaze mapping functions will be evaluated and the one that yields the lowest error will be selected.

EyeVecResult eyevec_start_validation(EyeVec* eyevec,
    bool* presenttarget, bool checkonly);

eyevec_drop_validation()

Drops current validation results.

This will reselect the initial post-calibration gaze mapping function.

EyeVecResult eyevec_drop_validation(EyeVec* eyevec);

eyevec_start_drift_check()

Starts drift-check procedure.

On a successful drift-check a gaze offset adjustment will be performed if auto-apply-drift-correction is set. If this setting is not set, then eyevec_apply_drift_check_gaze_offset() should be called explicitly if desired.

EyeVecResult eyevec_start_drift_check(EyeVec* eyevec,
    double x, double y, bool* presenttarget);

eyevec_drop_drift_check()

Drops current drift-check results and drift-correction gaze offset.

EyeVecResult eyevec_drop_drift_check(EyeVec* eyevec);

eyevec_apply_drift_check_gaze_offset()

Applies gaze offset as produced by the latest drift-check provided the offset is considered acceptable (i.e. has status good, fair or poor, or optionally bad).

EyeVecResult eyevec_apply_drift_check_gaze_offset(EyeVec* eyevec,
    bool acceptbad);

eyevec_apply_explicit_gaze_offset()

Applies gaze offset calculated from specified target position [logical] and corresponding gaze positions [logical], provided the resulting offsets are in acceptable range (i.e. the error in degrees for each detectable eye must be ≤ poor-drift-check-gaze-error or optionally ≤ bad-drift-check-gaze-error).

EyeVecResult eyevec_apply_explicit_gaze_offset(EyeVec* eyevec,
    double tgtx, double tgty, double gazex[2], double gazey[2], bool acceptbad);

eyevec_abort_procedure()

Aborts running baseline, calibration, validation or drift-check or recording ASAP.

EyeVecResult eyevec_abort_procedure(EyeVec* eyevec);

eyevec_start_recording()

Starts recording gaze analysis events and eye samples (if enabled) provided the device is in data mode.

EyeVecResult eyevec_start_recording(EyeVec* eyevec);

eyevec_stop_recording()

Stops recording gaze analysis events and eye samples if currently running.

EyeVecResult eyevec_stop_recording(EyeVec* eyevec);

eyevec_get_baseline_status()

Returns current baseline status.

0: no baseline measurement performed,
-1: baseline measurement in progress,
1: baseline measurement done

EyeVecResult eyevec_get_baseline_status(const EyeVec* eyevec,
    int* status);

eyevec_get_calibration_status()

Returns current calibration status.

0: no calibration performed,
-1: calibration in progress,
1: calibration done

EyeVecResult eyevec_get_calibration_status(const EyeVec* eyevec,
    int* status);

eyevec_get_validation_status()

Returns current validation status.

0: no validation performed,
-1: validation in progress,
1: validation done

EyeVecResult eyevec_get_validation_status(const EyeVec* eyevec,
    int* status);

eyevec_get_drift_check_status()

Returns current drift-check status.

0: no drift-check performed,
-1: drift-check in progress,
1: drift-check done

EyeVecResult eyevec_get_drift_check_status(const EyeVec* eyevec,
    int* status);

eyevec_get_baseline_result()

Retrieves current baseline result (for display purposes).

If no data is available the result object’s havedata field will be false.

EyeVecResult eyevec_get_baseline_result(const EyeVec* eyevec,
    EyeVecBaselineResult* result);

eyevec_get_calibration_result()

Retrieves current (i.e. latest successful) calibration result (for display purposes).

If no data is available the result object’s havedata field will be false.

EyeVecResult eyevec_get_calibration_result(const EyeVec* eyevec,
    EyeVecCalibrationResult* result);

eyevec_get_validation_result()

Retrieves latest validation result (for display purposes).

If no data is available the result object’s havedata field will be false.

EyeVecResult eyevec_get_validation_result(const EyeVec* eyevec,
    EyeVecValidationResult* result);

eyevec_get_drift_check_result()

Retrieves latest drift-check result (for display purposes).

If no data is available the result object’s havedata field will be false.

EyeVecResult eyevec_get_drift_check_result(const EyeVec* eyevec,
    EyeVecDriftCheckResult* result);

eyevec_get_calibration_point_result()

Retrieves specified calibration point result for current calibration (for display purposes).

If no data is available or the point index is out of range the result object’s havedata field will be false.

EyeVecResult eyevec_get_calibration_point_result(const EyeVec* eyevec,
    int i, EyeVecCalibrationPointResult* result);

eyevec_get_validation_point_result()

Retrieves specified validation point result for latest validation (for display purposes).

If no data is available or the point index is out of range the result object’s havedata field will be false.

EyeVecResult eyevec_get_validation_point_result(const EyeVec* eyevec,
    int i, EyeVecValidationPointResult* result);

eyevec_get_drift_check_point_result()

Retrieves drift-check point result for latest drift-check (for display purposes).

If no data is available the result object’s havedata field will be false.

EyeVecResult eyevec_get_drift_check_point_result(const EyeVec* eyevec,
    EyeVecDriftCheckPointResult* result);

eyevec_trigger_target()

Triggers end of phase 2 of target presention if self-paced by key press.

EyeVecResult eyevec_trigger_target(EyeVec* eyevec,
    bool* ok);

eyevec_trigger_target_by_click()

Triggers end of phase 2 of target presention if self-paced by mouse click.

EyeVecResult eyevec_trigger_target_by_click(EyeVec* eyevec,
    double x, double y, double r, bool* ok);

eyevec_trigger_wakeup()

Triggers the wake-up target if enabled and in attention target phase.

EyeVecResult eyevec_trigger_wakeup(EyeVec* eyevec,
    bool* ok);

eyevec_skip_calibration_point()

Sets skip flag provided we’re in final phase of calibration target presentation.

EyeVecResult eyevec_skip_calibration_point(EyeVec* eyevec);

eyevec_get_target_attention_radius()

Returns attention target disk radius as a fraction of test screen size.

EyeVecResult eyevec_get_target_attention_radius(const EyeVec* eyevec,
    double* r);

eyevec_get_target_radius()

Returns inner target disk radius as a fraction of test screen size.

EyeVecResult eyevec_get_target_radius(const EyeVec* eyevec,
    double* r);

eyevec_get_target_center_radius()

Returns center target disk radius as a fraction of test screen size.

EyeVecResult eyevec_get_target_center_radius(const EyeVec* eyevec,
    double* r);

eyevec_get_target_wakeup_radius()

Returns wake-up target disk radius as a fraction of test screen size.

EyeVecResult eyevec_get_target_wakeup_radius(const EyeVec* eyevec,
    double* r);

eyevec_update_target_state()

Retrieves target presentation information for next display frame.

EyeVecResult eyevec_update_target_state(EyeVec* eyevec,
    int64_t frtime, EyeVecTargetState* targetstate);

eyevec_get_expected_subject_distance_from_screen()

Returns expected subject distance from screen assuming current setup [mm].

This is dimension F in the setup drawing.

EyeVecResult eyevec_get_expected_subject_distance_from_screen(const EyeVec* eyevec,
    double* mm);

eyevec_hor_millimeters_to_degrees()

Calculates horizontal visual angle [deg] corresponding to specified horizontal gaze position on screen [mm], assuming current setup.

Positions left of screen center yield negative angles. Positions right of screen center yield positive angles.

EyeVecResult eyevec_hor_millimeters_to_degrees(const EyeVec* eyevec,
    double x_mm, double* deg);

eyevec_ver_millimeters_to_degrees()

Calculates vertical visual angle [deg] corresponding to specified vertical gaze position on screen [mm], assuming current setup.

Positions above eye-height yield negative angles. Positions below eye height yield positive angles.

EyeVecResult eyevec_ver_millimeters_to_degrees(const EyeVec* eyevec,
    double y_mm, double* deg);

eyevec_hor_degrees_to_millimeters()

Calculates horizontal gaze position on screen [mm] corresponding to specified horizontal visual angle [deg], assuming current setup.

This performs the inverse operation of eyevec_hor_millimeters_to_degrees().

EyeVecResult eyevec_hor_degrees_to_millimeters(const EyeVec* eyevec,
    double x_deg, double* mm);

eyevec_ver_degrees_to_millimeters()

Calculates vertical gaze position on screen [mm] corresponding to specified vertical visual angle [deg], assuming current setup.

This performs the inverse operation of eyevec_ver_millimeters_to_degrees().

EyeVecResult eyevec_ver_degrees_to_millimeters(const EyeVec* eyevec,
    double y_deg, double* mm);

eyevec_hor_span_degrees_to_millimeters()

Calculates horizontal gaze position difference on screen [mm] corresponding to specified horizontal visual angle difference [deg], assuming current setup.

EyeVecResult eyevec_hor_span_degrees_to_millimeters(const EyeVec* eyevec,
    double dx_deg, double refx_deg, double* mm);

eyevec_ver_span_degrees_to_millimeters()

Calculates vertical gaze position difference on screen [mm] corresponding to specified vertical visual angle difference [deg], assuming current setup.

EyeVecResult eyevec_ver_span_degrees_to_millimeters(const EyeVec* eyevec,
    double dy_deg, double refy_deg, double* mm);

eyevec_calc_calibration_screen_margins()

Determines screen margins to be observed on the calibration plane [mm].

EyeVecResult eyevec_calc_calibration_screen_margins(const EyeVec* eyevec,
    double* left_mm, double* right_mm, double* top_mm, double* bottom_mm,
    bool usedefaults, bool usegazelimits);

eyevec_get_user_gain()

Returns camera user gain [dB].

EyeVecResult eyevec_get_user_gain(const EyeVec* eyevec,
    double* db);

eyevec_set_user_gain()

Sets camera user gain [dB].

EyeVecResult eyevec_set_user_gain(EyeVec* eyevec,
    double db);

eyevec_inc_user_gain()

Increments camera user gain by 0.1 dB.

EyeVecResult eyevec_inc_user_gain(EyeVec* eyevec,
    double* db);

eyevec_dec_user_gain()

Decrements camera user gain by 0.1 dB.

EyeVecResult eyevec_dec_user_gain(EyeVec* eyevec,
    double* db);

eyevec_get_user_gamma()

Returns current user gamma value.

EyeVecResult eyevec_get_user_gamma(const EyeVec* eyevec,
    double* g);

eyevec_set_user_gamma()

Sets user gamma value.

EyeVecResult eyevec_set_user_gamma(EyeVec* eyevec,
    double g);

eyevec_inc_user_gamma()

Increments user gamma value by 0.01.

EyeVecResult eyevec_inc_user_gamma(EyeVec* eyevec,
    double* g);

eyevec_dec_user_gamma()

Decrements user gamma value by 0.01.

EyeVecResult eyevec_dec_user_gamma(EyeVec* eyevec,
    double* g);

eyevec_get_eye_data_enabled()

Returns the eye-data-enabled bitmask defining whether and when eye sample records will be sent and/or saved to file.

See EyeVecEnableSendSaveFlags for defined flags.

uint32_t eyevec_get_eye_data_enabled(const EyeVec* eyevec);

eyevec_set_eye_data_enabled()

Clears/sets the eye-data-enabled bitmask defining whether and when eye sampla records will be sent and/or saved to file.

See EyeVecEnableSendSaveFlags for defined flags.

The clear action will be performed before the set action.

The default value for the eye-data-enabled bitmask is: EYEVEC_ENABLE_SAVE_WHILE_IN_RECORDING_MODE.

EyeVecResult eyevec_set_eye_data_enabled(EyeVec* eyevec,
    uint32_t clr, uint32_t set);

eyevec_get_gaze_events_enabled()

Returns the gaze-events-enabled bitmask defining whether and when gaze event records will be sent and/or saved to file.

See EyeVecEnableSendSaveFlags for defined flags.

uint32_t eyevec_get_gaze_events_enabled(const EyeVec* eyevec);

eyevec_set_gaze_events_enabled()

Clears/sets the gaze-events-enabled bitmask defining whether and when gaze event records will be sent and/or saved to file.

See EyeVecEnableSendSaveFlags for defined flags.

The clear action will be performed before the set action.

The default value for the gaze-events-enabled bitmask is: EYEVEC_ENABLE_SAVE_WHILE_IN_RECORDING_MODE.

EyeVecResult eyevec_set_gaze_events_enabled(EyeVec* eyevec,
    uint32_t clr, uint32_t set);

eyevec_get_display_data_enabled()

Returns true if display data events are enabled.

bool eyevec_get_display_data_enabled(const EyeVec* eyevec);

eyevec_set_display_data_enabled()

Enables or disables display data events.

EyeVecResult eyevec_set_display_data_enabled(EyeVec* eyevec,
    bool enable);

eyevec_request_display_data()

Enables or disables collection of display data and optionally defines which image data to be included in the display data.

See EyeVecImageRequestFlags for imagemask flags, negative means no change.

Once enabled display data will be available about every 16ms.

Use eyevec_lock_display_data() to access the collected display data on demand, or use eyevec_set_display_data_enabled() to get display data events delivered when ready. Choose one option, not both.

EyeVecResult eyevec_request_display_data(EyeVec* eyevec,
    bool enable, int32_t imagemask);

eyevec_lock_display_data()

Locks and returns the display data object provided there is data to be displayed. If there is no display data available ATM NULL is returned (the function does not block).

When done with the display data eyevec_unlock_display_data() must be called. Forgetting to call eyevec_unlock_display_data(), might cause deadlocks.

Note this method is a no-op returning NULL if display data events are enabled. See eyevec_set_display_data_enabled().

const EyeVecDisplayEventData* eyevec_lock_display_data(EyeVec* eyevec);

eyevec_unlock_display_data()

Unlocks the display data object locked using eyevec_lock_display_data().

Do not access display data received by eyevec_lock_display_data() after calling eyevec_unlock_display_data().

EyeVecResult eyevec_unlock_display_data(EyeVec* eyevec);

eyevec_get_waitable()

Linux

Returns the descriptor that can be used in poll(2), select(2) and similar.

Returns -1 if descriptor not available.

The readiness of the descriptor indicates there’s data in the event queue. You should however only use the descriptor as a means to wake-up on data and use eyevec_retrieve_event() to check and read the event if any or use eyevec_is_event_available() to check without reading.

This function can’t be used if the event queue monitoring thread is running. See eyevec_create_thread().

int eyevec_get_waitable(const EyeVec* eyevec);

Windows

Returns the handle that can be used in WaitForSingleObject(), WaitForMultipleObjects() and similar.

Returns NULL if handle not available.

The readiness of the handle indicates there’s data in the event queue. You should however only use the handle as a means to wake-up on data and use eyevec_retrieve_event() to check and read the event if any or use eyevec_is_event_available() to check without reading.

This function can’t be used if the event queue monitoring thread is running. See eyevec_create_thread().

void* eyevec_get_waitable(const EyeVec* eyevec);

eyevec_reset_waitable()

Resets the waitable.

To be called following a wait on the waitable that signalled the waitable’s readiness.

EyeVecResult eyevec_reset_waitable(const EyeVec* eyevec);

eyevec_is_event_available()

Returns true if there’s pending data in the event queue.

This function shouldn’t be used if the event queue monitoring thread is running. See eyevec_create_thread().

bool eyevec_is_event_available(const EyeVec* eyevec);

eyevec_retrieve_event()

If there’s pending data in the event queue, removes the event from the queue and returns a pointer to it.

If there’s no pending data, NULL is returned.

When done with the returned event eyevec_release_event() must be called. The system has a pool of event structs it can use. If you do not release any event records then after about 50ms (@ 1000FPS) there will be no free event records available anymore and events will be dropped.

This function can’t be used if the event queue monitoring thread is running. See eyevec_create_thread().

EyeVecEvent* eyevec_retrieve_event(EyeVec* eyevec);

eyevec_event_id()

Returns the event id of the specified event record.

EyeVecEventId eyevec_event_id(const EyeVecEvent* event);

eyevec_event_time()

Returns the event time of the specified event record [µs].

int64_t eyevec_event_time(const EyeVecEvent* event);

eyevec_mode_event_data()

Returns the mode change event data of the specified event record provided the event id equals EYEVEC_EVENT_MODE_CHANGE.

const EyeVecModeChangeEventData* eyevec_mode_event_data(const EyeVecEvent* event);

eyevec_eye_event_data()

Returns the eye sample event data of the specified event record provided the event id equals EYEVEC_EVENT_EYE_DATA.

const EyeVecEyeSampleEventData* eyevec_eye_event_data(const EyeVecEvent* event);

Returns the blink event data of the specified event record provided the event id equals EYEVEC_EVENT_BLINK_START or EYEVEC_EVENT_BLINK_END or EYEVEC_EVENT_BLINK_UPDATE.

const EyeVecBlinkEventData* eyevec_blink_event_data(const EyeVecEvent* event);

eyevec_saccade_event_data()

Returns the saccade event data of the specified event record provided the event id equals EYEVEC_EVENT_SACCADE_START or EYEVEC_EVENT_SACCADE_END.

const EyeVecSaccadeEventData* eyevec_saccade_event_data(const EyeVecEvent* event);

eyevec_fixation_event_data()

Returns the fixation event data of the specified event record provided the event id equals EYEVEC_EVENT_FIXATION_START or EYEVEC_EVENT_FIXATION_END or EYEVEC_EVENT_FIXATION_UPDATE.

const EyeVecFixationEventData* eyevec_fixation_event_data(const EyeVecEvent* event);

eyevec_test_item_event_data()

Returns the test-item event data of the specified event record provided the event id equals EYEVEC_EVENT_TEST_ITEM_START or EYEVEC_EVENT_TEST_ITEM_END.

const EyeVecFixationEventData* eyevec_fixation_event_data(const EyeVecEvent* event);

eyevec_release_event()

Releases the event record making it available for reuse.

After calling this function the event record should not be accessed anymore.

EyeVecResult eyevec_release_event(EyeVecEvent* event);

eyevec_get_pending_string()

Retrieves a pending character string if available. This function can be called once following any character string getter function call.

This function enables splitting up string retrieval in a size retrieval part and a string data retrieval part.

If bufsize < required size the string will be truncated. If bufsize > required size the string will be null-terminated.

size_t eyevec_get_pending_string(const EyeVec* eyevec,
    char* buf, size_t bufsize);