AntiMicroX
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
WinExtras Class Reference

#include <winextras.h>

Inheritance diagram for WinExtras:
[legend]
Collaboration diagram for WinExtras:
[legend]

Static Public Member Functions

static QString getDisplayString (unsigned int virtualkey)
 
static unsigned int getVirtualKey (QString codestring)
 
static unsigned int correctVirtualKey (unsigned int scancode, unsigned int virtualkey)
 Obtain a more specific virtual key (unsigned int) for a key grab event. More...
 
static unsigned int scancodeFromVirtualKey (unsigned int virtualkey, unsigned int alias=0)
 Convert a virtual key into the corresponding keyboard scan code. More...
 
static QString getForegroundWindowExePath ()
 Check foreground window (window in focus) and obtain the corresponding exe file path. More...
 
static bool containsFileAssociationinRegistry ()
 
static void writeFileAssocationToRegistry ()
 
static void removeFileAssociationFromRegistry ()
 
static bool IsRunningAsAdmin ()
 Check if the application is running with administrative privileges. More...
 
static bool elevateAntiMicro ()
 Attempt to elevate process using runas. More...
 
static void disablePointerPrecision ()
 Temporarily disable "Enhanced Pointer Precision". More...
 
static void enablePointerPrecision ()
 If "Enhanced Pointer Precision" is currently disabled and the setting has not been changed explicitly by the user while the program has been running, re-enable "Enhanced Pointer Precision". Return the mouse behavior to normal. More...
 
static bool isUsingEnhancedPointerPrecision ()
 Used to check if the "Enhance Pointer Precision" Windows option is currently enabled. More...
 
static void grabCurrentPointerPrecision ()
 Get the value of "Enhanced Pointer Precision" when the program first starts. Needed to not override setting if the option has been disabled in Windows by the user. More...
 
static QString getCurrentWindowText ()
 Get the window text of the window currently in focus. More...
 
static bool raiseProcessPriority ()
 
static QPoint getCursorPos ()
 

Static Public Attributes

static const unsigned int EXTENDED_FLAG = 0x100
 

Protected Member Functions

 WinExtras (QObject *parent=0)
 
void populateKnownAliases ()
 

Protected Attributes

QHash< QString, unsigned int > knownAliasesX11SymVK
 
QHash< unsigned int, QString > knownAliasesVKStrings
 

Static Protected Attributes

static WinExtras _instance
 
static int originalMouseAccel = 0
 

Constructor & Destructor Documentation

◆ WinExtras()

WinExtras::WinExtras ( QObject *  parent = 0)
explicitprotected
Here is the call graph for this function:

Member Function Documentation

◆ containsFileAssociationinRegistry()

bool WinExtras::containsFileAssociationinRegistry ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctVirtualKey()

unsigned int WinExtras::correctVirtualKey ( unsigned int  scancode,
unsigned int  virtualkey 
)
static

Obtain a more specific virtual key (unsigned int) for a key grab event.

Parameters
Scancode obtained from a key grab event
Virtualkey obtained from a key grab event
Returns
Corrected virtual key as an unsigned int
Here is the caller graph for this function:

◆ disablePointerPrecision()

void WinExtras::disablePointerPrecision ( )
static

Temporarily disable "Enhanced Pointer Precision".

Here is the caller graph for this function:

◆ elevateAntiMicro()

bool WinExtras::elevateAntiMicro ( )
static

Attempt to elevate process using runas.

Returns
Execution status
Here is the call graph for this function:

◆ enablePointerPrecision()

void WinExtras::enablePointerPrecision ( )
static

If "Enhanced Pointer Precision" is currently disabled and the setting has not been changed explicitly by the user while the program has been running, re-enable "Enhanced Pointer Precision". Return the mouse behavior to normal.

Here is the caller graph for this function:

◆ getCurrentWindowText()

QString WinExtras::getCurrentWindowText ( )
static

Get the window text of the window currently in focus.

Returns
Window title of application in focus.
Here is the caller graph for this function:

◆ getCursorPos()

QPoint WinExtras::getCursorPos ( )
static

◆ getDisplayString()

QString WinExtras::getDisplayString ( unsigned int  virtualkey)
static
Here is the caller graph for this function:

◆ getForegroundWindowExePath()

QString WinExtras::getForegroundWindowExePath ( )
static

Check foreground window (window in focus) and obtain the corresponding exe file path.

Returns
File path of executable
Here is the caller graph for this function:

◆ getVirtualKey()

unsigned int WinExtras::getVirtualKey ( QString  codestring)
static
Here is the caller graph for this function:

◆ grabCurrentPointerPrecision()

void WinExtras::grabCurrentPointerPrecision ( )
static

Get the value of "Enhanced Pointer Precision" when the program first starts. Needed to not override setting if the option has been disabled in Windows by the user.

◆ IsRunningAsAdmin()

bool WinExtras::IsRunningAsAdmin ( )
static

Check if the application is running with administrative privileges.

Returns
Status indicating administrative privileges
Here is the caller graph for this function:

◆ isUsingEnhancedPointerPrecision()

bool WinExtras::isUsingEnhancedPointerPrecision ( )
static

Used to check if the "Enhance Pointer Precision" Windows option is currently enabled.

Returns
Status of "Enhanced Pointer Precision"
Here is the caller graph for this function:

◆ populateKnownAliases()

void WinExtras::populateKnownAliases ( )
protected
Here is the caller graph for this function:

◆ raiseProcessPriority()

bool WinExtras::raiseProcessPriority ( )
static

◆ removeFileAssociationFromRegistry()

void WinExtras::removeFileAssociationFromRegistry ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scancodeFromVirtualKey()

unsigned int WinExtras::scancodeFromVirtualKey ( unsigned int  virtualkey,
unsigned int  alias = 0 
)
static

Convert a virtual key into the corresponding keyboard scan code.

Parameters
Windowsvirtual key
Qtkey alias
Returns
Keyboard scan code as an unsigned int
Here is the caller graph for this function:

◆ writeFileAssocationToRegistry()

void WinExtras::writeFileAssocationToRegistry ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ _instance

WinExtras WinExtras::_instance
staticprotected

◆ EXTENDED_FLAG

const unsigned int WinExtras::EXTENDED_FLAG = 0x100
static

◆ knownAliasesVKStrings

QHash<unsigned int, QString> WinExtras::knownAliasesVKStrings
protected

◆ knownAliasesX11SymVK

QHash<QString, unsigned int> WinExtras::knownAliasesX11SymVK
protected

◆ originalMouseAccel

int WinExtras::originalMouseAccel = 0
staticprotected

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