Gestro
Public Member Functions | List of all members
UbuntuController::MouseControl Class Reference

Used to send mouse events. More...

#include <MouseControl.h>

Collaboration diagram for UbuntuController::MouseControl:
Collaboration graph

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)
 

Detailed Description

Used to send mouse events.

Definition at line 10 of file MouseControl.h.

Constructor & Destructor Documentation

◆ MouseControl()

MouseControl::MouseControl ( void  )

Constructor.

Definition at line 5 of file MouseControl.cpp.

Member Function Documentation

◆ click()

void MouseControl::click ( Display *  display,
int  button,
XEvent  event 
)

It sends a mouse click event to the X server

Parameters
displayThe display to use.
buttonThe button to click. 1 is left, 2 is middle, 3 is right.
eventThe event to be sent.

Definition at line 7 of file MouseControl.cpp.

Here is the caller graph for this function:

◆ coords()

void MouseControl::coords ( Display *  display,
int *  x,
int *  y 
)

It returns the current mouse position

Parameters
displayThe display to use.
xThe x coordinate of the mouse pointer.
yThe y coordinate of the mouse pointer.

Definition at line 53 of file MouseControl.cpp.

Here is the caller graph for this function:

◆ move()

void MouseControl::move ( Display *  display,
int  x,
int  y 
)

It moves the mouse pointer relative to current coordinates (not being used)

Parameters
displayThe display to use.
xThe x coordinate of the mouse pointer.
yThe y coordinate of the mouse pointer.

Definition at line 65 of file MouseControl.cpp.

◆ move_to()

void MouseControl::move_to ( Display *  display,
int  x,
int  y 
)

It moves the mouse to the absolute coordinates

Parameters
displayThe display to use.
xThe x coordinate of the mouse pointer.
yThe y coordinate of the mouse pointer.

Definition at line 71 of file MouseControl.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release()

void MouseControl::release ( Display *  display,
int  button,
XEvent  event 
)

It releases the mouse button

Parameters
displaythe display to use
buttonThe button to press.
eventthe event to send

Definition at line 33 of file MouseControl.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: