Details
eyevec_add_test_item_group()
Adds an item group with specified id. An item group serves as a container for multiple text or image items.
EyeVecResult eyevec_add_test_item_group(EyeVec* eyevec,
int id);
eyevec_add_text_test_item()
Adds an empty text item with specified id. If groupid
≥ 0 then the new text
item will be a child of that item group.
Use eyevec_set_text_test_item() etc. to set the text item’s attributes.
EyeVecResult eyevec_add_text_test_item(EyeVec* eyevec,
int id, int groupid);
eyevec_add_image_test_item()
Adds an empty image item with specified id. If groupid
≥ 0 then the new
image item will be a child of that item group.
Use eyevec_set_image_test_item() etc. to set the image item’s attributes.
EyeVecResult eyevec_add_image_test_item(EyeVec* eyevec,
int id, int groupid);
eyevec_remove_test_item()
Removes specified test item if id
≥ 0, otherwise removes all test items.
EyeVecResult eyevec_remove_test_item(EyeVec* eyevec,
int id);
eyevec_get_text_test_item()
Returns text item string [UTF-8].
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.
Optionally use
eyevec_get_pending_string()
to retrieve the string in two steps.
EyeVecResult eyevec_get_text_test_item(const EyeVec* eyevec,
int id, char* buf, size_t bufsize, size_t* size);
eyevec_set_text_test_item()
Sets text item string [UTF-8]. The markup
flag must be set if the string
should be interpreted as containing
(Pango style) markup.
EyeVecResult eyevec_set_text_test_item(EyeVec* eyevec,
int id, const char* txt, bool markup);
eyevec_get_text_test_item_color()
Returns text item color [ARGB].
EyeVecResult eyevec_get_text_test_item_color(const EyeVec* eyevec,
int id, uint32_t* rgb);
eyevec_set_text_test_item_color()
Set text item color [ARGB].
EyeVecResult eyevec_set_text_test_item_color(EyeVec* eyevec,
int id, uint32_t rgb);
eyevec_get_text_test_item_font_family()
Returns text item font family [ASCII].
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_text_test_item_font_family(const EyeVec* eyevec,
int id, char* buf, size_t bufsize, size_t* size);
eyevec_set_text_test_item_font_family()
Set text item font family [ASCII].
EyeVecResult eyevec_set_text_test_item_font_family(EyeVec* eyevec,
int id, const char* family);
eyevec_get_text_test_item_font_size()
Returns text item font size [deg].
EyeVecResult eyevec_get_text_test_item_font_size(const EyeVec* eyevec,
int id, double* deg);
eyevec_set_text_test_item_font_size()
Set text item font size [deg].
EyeVecResult eyevec_set_text_test_item_font_size(EyeVec* eyevec,
int id, double deg);
eyevec_get_text_test_item_font_style()
Returns text item font style.
EyeVecResult eyevec_get_text_test_item_font_style(const EyeVec* eyevec,
int id, EyeVecFontStyle* style);
eyevec_set_text_test_item_font_style()
Sets text item font style.
EyeVecResult eyevec_set_text_test_item_font_style(EyeVec* eyevec,
int id, EyeVecFontStyle style);
eyevec_get_text_test_item_font_weight()
Returns text item font weight.
EyeVecResult eyevec_get_text_test_item_font_weight(const EyeVec* eyevec,
int id, EyeVecFontWeight* weight);
eyevec_set_text_test_item_font_weight()
Sets text item font weight.
EyeVecResult eyevec_set_text_test_item_font_weight(EyeVec* eyevec,
int id, EyeVecFontWeight weight);
eyevec_get_text_test_item_line_width()
Returns text item line width as fraction of screen width.
EyeVecResult eyevec_get_text_test_item_line_width(const EyeVec* eyevec,
int id, double* width);
eyevec_set_text_test_item_line_width()
Sets text item line width as fraction of screen width. This defines the width beyond which wrapping will occur.
EyeVecResult eyevec_set_text_test_item_line_width(EyeVec* eyevec,
int id, double width);
eyevec_get_text_test_item_hor_alignment()
Returns text item horizontal alignment relative to the text item x-position.
EyeVecResult eyevec_get_text_test_item_hor_alignment(const EyeVec* eyevec,
int id, EyeVecAlignment* align);
eyevec_set_text_test_item_hor_alignment()
Sets text item horizontal alignment relative to the text item x-position.
Note, for RTL scripts use EYEVEC_ALIGN_END instead of EYEVEC_ALIGN_BEGIN and vice versa.
EyeVecResult eyevec_set_text_test_item_hor_alignment(EyeVec* eyevec,
int id, EyeVecAlignment align);
eyevec_get_text_test_item_ver_alignment()
Returns text item vertical alignment relative to the text item y-position.
EyeVecResult eyevec_get_text_test_item_ver_alignment(const EyeVec* eyevec,
int id, EyeVecAlignment* align);
eyevec_set_text_test_item_ver_alignment()
Sets text item vertical alignment relative to the text item y-position.
EyeVecResult eyevec_set_text_test_item_ver_alignment(EyeVec* eyevec,
int id, EyeVecAlignment align);
eyevec_get_text_test_item_text_alignment()
Returns text item text alignment within the text item’s bounding box.
EyeVecResult eyevec_get_text_test_item_text_alignment(const EyeVec* eyevec,
int id, EyeVecAlignment* align);
eyevec_set_text_test_item_text_alignment()
Sets text item text alignment within the text item’s bounding box.
EyeVecResult eyevec_set_text_test_item_text_alignment(EyeVec* eyevec,
int id, EyeVecAlignment align);
eyevec_get_text_test_item_line_spacing()
Returns text item line spacing as fraction of font size.
EyeVecResult eyevec_get_text_test_item_line_spacing(const EyeVec* eyevec,
int id, double* spacing);
eyevec_set_text_test_item_line_spacing()
Sets text item line spacing as fraction of font size. This refers to the empty space between the text lines.
EyeVecResult eyevec_set_text_test_item_line_spacing(EyeVec* eyevec,
int id, double spacing);
eyevec_get_text_test_item_bounding_box_mode()
Returns text item bounding box drawing mode (bitmask).
EyeVecResult eyevec_get_text_test_item_bounding_box_mode(const EyeVec* eyevec,
int id, uint32_t* flags);
eyevec_set_text_test_item_bounding_box_mode()
Sets text item bounding box drawing mode (bitmask). When enabled this will show a bounding box for each word in the text item. Word being defined as a sequence of non-whitespace characters.
Options (or-able):
0x10: show bounding boxes
0x01: include leading space
0x02: include trailing space
0x04: include vertical space
EyeVecResult eyevec_set_text_test_item_bounding_box_mode(EyeVec* eyevec,
int id, uint32_t flags);
eyevec_get_image_test_item()
Returns image item filename.
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_image_test_item(const EyeVec* eyevec,
int id, char* buf, size_t bufsize, size_t* size);
eyevec_set_image_test_item()
Sets image item filename.
EyeVecResult eyevec_set_image_test_item(EyeVec* eyevec,
int id, const char* fn);
eyevec_get_image_test_item_size()
Returns image item size as fraction of screen size.
EyeVecResult eyevec_get_image_test_item_size(const EyeVec* eyevec,
int id, double* width, double* height);
eyevec_set_image_test_item_size()
Sets image item size.
A width
> 0 means scale image width to fraction of screen width.
A width
< 0 means auto-scale with height
(if specified) to maintain image
aspect ratio.
A 0 width
means use image width as defined by image file.
A height
> 0 means scale image height to fraction of screen height.
A height
< 0 means auto-scale with width
(if specified) to maintain image
aspect ratio.
A 0 height
means use image height as defined by image file.
EyeVecResult eyevec_set_image_test_item_size(EyeVec* eyevec,
int id, double width, double height);
eyevec_get_test_item_position()
Returns test item position as fraction of screen size.
EyeVecResult eyevec_get_test_item_position(const EyeVec* eyevec,
int id, double* x, double* y);
eyevec_set_test_item_position()
Sets test item position as fraction of screen size.
EyeVecResult eyevec_set_test_item_position(EyeVec* eyevec,
int id, double x, double y);
eyevec_get_test_item_visible()
Returns whether a test item is marked visible.
EyeVecResult eyevec_get_test_item_visible(const EyeVec* eyevec,
int id, bool* visible);
eyevec_set_test_item_visible()
Marks a test item visible or invisible.
Test item visibility depends on whether the implicitly created top-level item
group is enabled or not. The top-level item group can only be enabled when the
eye-tracker mode is
EYEVEC_TRACKER_MODE_DATA or above.
To enable it call eyevec_show_test_item(0, true)
. To disable it call
eyevec_show_test_item(0, false)
.
Note, the top-level item group does not have an id; we use 0 to refer to it.
EyeVecResult eyevec_set_test_item_visible(EyeVec* eyevec,
int id, bool visible);
eyevec_start_test_item()
Starts test item presentation at specified time [µs]. Specify a duration > 0 to make the presention last for the given duration [µs].
This function should only be called if the the test window is shown and the eye-tracker mode is EYEVEC_TRACKER_MODE_DATA or above. To start the implicitly created top-level item group call this function with an id value ≤ 0.
EyeVecResult eyevec_start_test_item(EyeVec* eyevec,
int id, int64_t time, int dur);
eyevec_stop_test_item()
Stop running test item presentation at specified time [µs].
This function should only be called if the the test window is shown and the eye-tracker mode is EYEVEC_TRACKER_MODE_DATA or above. To stop the implicitly created top-level item group call this function with an id value ≤ 0.
EyeVecResult eyevec_stop_test_item(EyeVec* eyevec,
int id, int64_t time);
eyevec_abort_test_item()
Aborts running test item presentation.
This function should only be called if the the test window is shown and the eye-tracker mode is EYEVEC_TRACKER_MODE_DATA or above. To abort the implicitly created top-level item group call this function with an id value ≤ 0.
EyeVecResult eyevec_abort_test_item(EyeVec* eyevec,
int id);