Gestro
|
Used to send mouse events. More...
#include <MouseControl.h>
Public Member Functions | |
MouseControl (void) | |
void | click (Display *display, int button, XEvent event) |
void | release (Display *display, int button, XEvent event) |
void | coords (Display *display, int *x, int *y) |
void | move (Display *display, int x, int y) |
void | move_to (Display *display, int x, int y) |
Used to send mouse events.
Definition at line 10 of file MouseControl.h.
MouseControl::MouseControl | ( | void | ) |
Constructor.
Definition at line 5 of file MouseControl.cpp.
void MouseControl::click | ( | Display * | display, |
int | button, | ||
XEvent | event | ||
) |
It sends a mouse click event to the X server
display | The display to use. |
button | The button to click. 1 is left, 2 is middle, 3 is right. |
event | The event to be sent. |
Definition at line 7 of file MouseControl.cpp.
void MouseControl::coords | ( | Display * | display, |
int * | x, | ||
int * | y | ||
) |
It returns the current mouse position
display | The display to use. |
x | The x coordinate of the mouse pointer. |
y | The y coordinate of the mouse pointer. |
Definition at line 53 of file MouseControl.cpp.
void MouseControl::move | ( | Display * | display, |
int | x, | ||
int | y | ||
) |
It moves the mouse pointer relative to current coordinates (not being used)
display | The display to use. |
x | The x coordinate of the mouse pointer. |
y | The y coordinate of the mouse pointer. |
Definition at line 65 of file MouseControl.cpp.
void MouseControl::move_to | ( | Display * | display, |
int | x, | ||
int | y | ||
) |
It moves the mouse to the absolute coordinates
display | The display to use. |
x | The x coordinate of the mouse pointer. |
y | The y coordinate of the mouse pointer. |
Definition at line 71 of file MouseControl.cpp.
void MouseControl::release | ( | Display * | display, |
int | button, | ||
XEvent | event | ||
) |
It releases the mouse button
display | the display to use |
button | The button to press. |
event | the event to send |
Definition at line 33 of file MouseControl.cpp.