X-Plane Remote Access Plugin and Client Library
Classes | Public Member Functions | Protected Member Functions | Private Types | Static Private Member Functions | Private Attributes | Friends | List of all members
xplra::HotkeyHandler Class Reference

#include <HotkeyHandler.h>

Classes

class  Hotkeys
 

Public Member Functions

 HotkeyHandler ()
 
void registerHotkeys (Hotkeys *hotkeys)
 
void unregisterHotkeys (Hotkeys *hotkeys)
 

Protected Member Functions

bool handleKey (char c, XPLMKeyFlags flags, char virtualKey)
 

Private Types

typedef std::list< Hotkeys * > hotkeySets_t
 

Static Private Member Functions

static int keyCallback (char c, XPLMKeyFlags flags, char virtualKey, void *refCon)
 

Private Attributes

hu::varadiistvan::scpl::Mutex mutex
 
hotkeySets_t hotkeySets
 

Friends

class Hotkeys
 

Detailed Description

The handler for hotkeys.

Definition at line 58 of file HotkeyHandler.h.

Member Typedef Documentation

◆ hotkeySets_t

typedef std::list<Hotkeys*> xplra::HotkeyHandler::hotkeySets_t
private

Type for the the list of hotkey sets.

Definition at line 122 of file HotkeyHandler.h.

Constructor & Destructor Documentation

◆ HotkeyHandler()

HotkeyHandler::HotkeyHandler ( )

Construct the hotkey handler.

Definition at line 111 of file HotkeyHandler.cc.

Member Function Documentation

◆ handleKey()

bool HotkeyHandler::handleKey ( char  c,
XPLMKeyFlags  flags,
char  virtualKey 
)
protected

Handle the given hotkey code.

Returns
true if the hotkey was handled, false otherwise.

Definition at line 136 of file HotkeyHandler.cc.

◆ keyCallback()

int HotkeyHandler::keyCallback ( char  c,
XPLMKeyFlags  flags,
char  virtualKey,
void *  refCon 
)
staticprivate

The callback function receiving the keypresses.

Definition at line 102 of file HotkeyHandler.cc.

◆ registerHotkeys()

void HotkeyHandler::registerHotkeys ( Hotkeys hotkeys)

Register the given set of hotkeys.

Definition at line 118 of file HotkeyHandler.cc.

◆ unregisterHotkeys()

void HotkeyHandler::unregisterHotkeys ( Hotkeys hotkeys)

Unregister the given set of hotkeys.

Definition at line 127 of file HotkeyHandler.cc.

Member Data Documentation

◆ hotkeySets

hotkeySets_t xplra::HotkeyHandler::hotkeySets
private

The list of hotkey sets.

Definition at line 138 of file HotkeyHandler.h.

◆ mutex

hu::varadiistvan::scpl::Mutex xplra::HotkeyHandler::mutex
private

Mutex to protect some common data structures.

Definition at line 133 of file HotkeyHandler.h.


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