Tscope5
|
Definitions of mouse functions. More...
Go to the source code of this file.
Functions | |
Response registration | |
The mouse can be used as a response device. See timer.c for more information about response registration. | |
int | ts5_define_mouse_button (int button) |
Define a mouse button as a response button. More... | |
int | ts5_get_num_mouse_buttons () |
Get the number of buttons available on the mouse. More... | |
Mouse GUI functions | |
void | ts5_show_mouse () |
Make the mouse cursor visible on the active display. More... | |
void | ts5_hide_mouse () |
Make the mouse cursor invisible on the active display. More... | |
void | ts5_set_mouse_position (double x, double y) |
Move the mouse pointer to position (x,y). More... | |
void | ts5_get_mouse_position (double *x, double *y) |
Get the horizontal and vertical position of the mouse pointer. More... | |
double | ts5_get_mouse_x () |
Get the horizontal position of the mouse pointer. More... | |
double | ts5_get_mouse_y () |
Get the vertical position of the mouse pointer. More... | |
void | ts5_draw_mouse_button (double x, double y) |
Draw a mouse button and wait for a click. More... | |
Definitions of mouse functions.
Definition in file mouse.c.
int ts5_define_mouse_button | ( | int | button | ) |
Define a mouse button as a response button.
button | Number of the button (buttons are counted from 1). |
Give a positive number if you want to monitor button press events, a negative number if you want to monitor button release events.
int ts5_get_num_mouse_buttons | ( | ) |
void ts5_show_mouse | ( | ) |
void ts5_hide_mouse | ( | ) |
void ts5_set_mouse_position | ( | double | x, |
double | y | ||
) |
void ts5_get_mouse_position | ( | double * | x, |
double * | y | ||
) |
double ts5_get_mouse_x | ( | ) |
double ts5_get_mouse_y | ( | ) |
void ts5_draw_mouse_button | ( | double | x, |
double | y | ||
) |
Draw a mouse button and wait for a click.
x | Horizontal position of the button on the active display. |
y | Vertical position of the button on the active display. |
The button color cannot be changed by the user. From version 0.6 onwards it changes with every new release of Tscope5. This way (almost) every Tscope5 program will have a built-in visual check of the up-to-dateness of your experiment computer.
Here is the list of version/color combinations: