mouse_win.c file
Mouse windows implementation.
Classes
- struct mouse
Functions
-
auto mouse_new(void) -> mouse_
t* - Do nothing, stub.
-
auto mouse_free(mouse_
t* mouse) -> void* - Do nothing, stub.
-
auto mouse_move_relative(mouse_
t* mouse, int x_off, int y_off) -> int - Moves the mouse pointed by
mouseto the offsetsx_offandy_off. -
auto mouse_down(mouse_
t* mouse, int button) -> int - Makes a 'button press' event according to the
mousepointer and thebutton(left or right). -
auto mouse_up(mouse_
t* mouse, int button) -> int - Makes a 'button release' event according to the
mousepointer and thebutton(left or right).
Function documentation
void* mouse_free(mouse_ t* mouse)
Do nothing, stub.
| Parameters | |
|---|---|
| mouse | Mouse structure pointer. |
| Returns | Returns always NULL. |
int mouse_move_relative(mouse_ t* mouse,
int x_off,
int y_off)
Moves the mouse pointed by mouse to the offsets x_off and y_off.
| Parameters | |
|---|---|
| mouse | Mouse structure pointer. |
| x_off | X-coordinate offset. |
| y_off | Y-coordinate offset. |
| Returns | Returns 0 if success, 1 otherwise. |
int mouse_down(mouse_ t* mouse,
int button)
Makes a 'button press' event according to the mouse pointer and the button (left or right).
| Parameters | |
|---|---|
| mouse | Mouse structure pointer. |
| button | Which button was pressed (either MOUSE_BTN_LEFT or MOUSE_BTN_RIGHT). |
| Returns | Returns 0 if success, 1 otherwise. |