Tizen Native API
|
Functions | |
void | evas_pointer_output_xy_get (const Evas *e, int *x, int *y) |
Gets the current known pointer co-ordinates. | |
void | evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) |
Gets the current known pointer co-ordinates. | |
int | evas_pointer_button_down_mask_get (const Evas *e) |
Gets a bitmask with the mouse buttons currently pressed, set to 1 . | |
Eina_Bool | evas_pointer_inside_get (const Evas *e) |
Checks whether the mouse pointer is logically inside the canvas. |
This group provides functions that deal with the status of the pointer (mouse cursor).
int evas_pointer_button_down_mask_get | ( | const Evas * | e | ) |
Gets a bitmask with the mouse buttons currently pressed, set to 1
.
1
that correspond to a mouse button being depressed. This limits Evas to mouse devices with a maximum of 32 buttons, but that is generally in excess of any host system's pointing device abilities.extern Evas *evas; int button_mask, i; button_mask = evas_pointer_button_down_mask_get(evas); printf("Buttons currently pressed:\n"); for (i = 0; i < 32; i++) { if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1); }
[in] | e | The pointer to the Evas canvas |
void evas_pointer_canvas_xy_get | ( | const Evas * | e, |
Evas_Coord * | x, | ||
Evas_Coord * | y | ||
) |
Gets the current known pointer co-ordinates.
This function returns the current known canvas unit co-ordinates of the mouse pointer and sets the contents of the Evas_Coords pointed to by x and y to contain these co-ordinates. If e is not a valid canvas the results of this function are undefined.
extern Evas *evas; Evas_Coord mouse_x, mouse_y; evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y);
[in] | e | The pointer to the Evas Canvas |
[out] | x | The pointer to a Evas_Coord to be filled in |
[out] | y | The pointer to a Evas_Coord to be filled in |
Eina_Bool evas_pointer_inside_get | ( | const Evas * | e | ) |
Checks whether the mouse pointer is logically inside the canvas.
0
or 1
.1
indicates the mouse is logically inside the canvas, and 0
implies it is logically outside the canvas.extern Evas *evas; if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); else printf("Mouse is out!\n");
[in] | e | The pointer to the Evas Canvas |
void evas_pointer_output_xy_get | ( | const Evas * | e, |
int * | x, | ||
int * | y | ||
) |
Gets the current known pointer co-ordinates.
This function returns the current known screen or output co-ordinates of the mouse pointer and sets the contents of the integers pointed to by x and y to contain these co-ordinates. If e is not a valid canvas the results of this function are undefined.
extern Evas *evas; int mouse_x, mouse_y; evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y);
[in] | e | The pointer to the Evas Canvas |
[out] | x | The pointer to an integer to be filled in |
[out] | y | The pointer to an integer to be filled in |