VGamepad PC
The Windows app for the virtual game controller.
Loading...
Searching...
No Matches
mouseSim.hpp File Reference

Simulates mouse input in Windows. More...

#include <windows.h>
Include dependency graph for mouseSim.hpp:
This graph shows which files directly or indirectly include this file:

Macros

#define WIN32_LEAN_AND_MEAN
 

Functions

void moveMouseToPosition (int x, int y)
 Move the mouse to the specified coordinates.
 
void moveMouseByOffset (int x, int y)
 Move the mouse by the specified offset.
 
void singleClick ()
 Simulate a single left click.
 
void doubleClick ()
 
void leftClick ()
 Simulate a left click.
 
void rightClick ()
 
void middleClick ()
 
void scrollUp ()
 
void scrollDown ()
 

Detailed Description

Simulates mouse input in Windows.

Note
Do not include this file directly. Use simulate.hpp instead.

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Function Documentation

◆ doubleClick()

void doubleClick ( )

◆ leftClick()

void leftClick ( )

Simulate a left click.

Note
Repeated calls to this function may result in a double click. Use singleClick() if you want to avoid this.
See also
singleClick()

◆ middleClick()

void middleClick ( )

◆ moveMouseByOffset()

void moveMouseByOffset ( int x,
int y )

Move the mouse by the specified offset.

Parameters
xfrom 0 to screen width
yfrom 0 to screen height

◆ moveMouseToPosition()

void moveMouseToPosition ( int x,
int y )

Move the mouse to the specified coordinates.

Parameters
xfrom 0 to screen width
yfrom 0 to screen height

◆ rightClick()

void rightClick ( )

◆ scrollDown()

void scrollDown ( )

◆ scrollUp()

void scrollUp ( )

◆ singleClick()

void singleClick ( )

Simulate a single left click.

Note
This function will sleep for the double click time.