Functions | |
void | evas_pointer_output_xy_get (Evas *e, int *x, int *y) |
This function returns the current known pointer co-ordinates. | |
void | evas_pointer_canvas_xy_get (Evas *e, Evas_Coord *x, Evas_Coord *y) |
This function returns the current known pointer co-ordinates. | |
int | evas_pointer_button_down_mask_get (Evas *e) |
Returns a bitmask with the mouse buttons currently pressed, set to 1. | |
Evas_Bool | evas_pointer_inside_get (Evas *e) |
Returns whether the mouse pointer is logically inside the canvas. |
|
Returns a bitmask with the mouse buttons currently pressed, set to 1.
A canvas by default begins with no mouse buttons being pressed and only calls to evas_event_feed_mouse_down(), evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and evas_event_feed_mouse_up_data() will alter that. The least significant bit corresponds to the first mouse button (button 1) and the most significant bit corresponds to the last mouse button (button 32).
If Example: 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); } |
|
This function returns the current known pointer co-ordinates.
x and y to contain these co-ordinates. If e is not a valid canvas the results of this function are undefined.Example: 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); |
|
Returns whether the mouse pointer is logically inside the canvas.
A return value of 1 indicates the mouse is logically inside the canvas, and 0 implies it is logically outside the canvas. A canvas begins with the mouse being assumed outside (0).
If Example: extern Evas *evas; if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); else printf("Mouse is out!\n"); |
|
This function returns the current known pointer co-ordinates.
x and y to contain these co-ordinates. If e is not a valid canvas the results of this function are undefined.Example: 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); |