|
NXWidgets
1.19
|
#include <ckeyboard.hxx>
Public Member Functions | |
| CKeyboard (NXWidgets::CNxServer *server) | |
| ~CKeyboard (void) | |
| bool | start (void) |
Private Types | |
| enum | EListenerState { LISTENER_NOTRUNNING = 0, LISTENER_STARTED, LISTENER_RUNNING, LISTENER_STOPREQUESTED, LISTENER_TERMINATED, LISTENER_FAILED } |
Private Member Functions | |
| int | open (void) |
| int | session (void) |
Static Private Member Functions | |
| static FAR void * | listener (FAR void *arg) |
Private Attributes | |
| NXWidgets::CNxServer * | m_server |
| int | m_kbdFd |
| pthread_t | m_thread |
| enum EListenerState | m_state |
| sem_t | m_waitSem |
The CKeyboard class provides the the calibration window and obtains callibration data.
Definition at line 68 of file ckeyboard.hxx.
|
private |
The state of the listener thread.
Definition at line 75 of file ckeyboard.hxx.
| CKeyboard::CKeyboard | ( | NXWidgets::CNxServer * | server | ) |
CKeyboard Constructor
| server. | An instance of the NX server. This will be needed for injecting mouse data. |
Definition at line 71 of file ckeyboard.cxx.
| CKeyboard::~CKeyboard | ( | void | ) |
CKeyboard Destructor
Definition at line 86 of file ckeyboard.cxx.
|
staticprivate |
The keyboard listener thread. This is the entry point of a thread that listeners for and dispatches keyboard events to the NX server. It simply opens the keyboard device (using CKeyboard::open()) and executes the session (via CKeyboard::session()).
If an errors while reading from the keyboard device AND we are configured to use a USB keyboard, then this function will wait for the USB keyboard to be re-connected.
| arg. | The CKeyboard 'this' pointer cast to a void*. |
Definition at line 325 of file ckeyboard.cxx.
|
inlineprivate |
Open the keyboard device. Not very interesting for the case of standard device but much more interesting for a USB keyboard device that may disappear when the keyboard is disconnect but later reappear when the keyboard is reconnected. In this case, this function will not return until the keyboard device was successfully opened (or until an irrecoverable error occurs.
Opens the keyboard device specified by CONFIG_NXWM_KEYBOARD_DEVPATH.
Definition at line 174 of file ckeyboard.cxx.
|
inlineprivate |
This is the heart of the keyboard listener thread. It contains the actual logic that listeners for and dispatches keyboard events to the NX server.
This is the heart of the keyboard listener thread. It contains the actual logic that listeners for and dispatches keyboard events to the NX server.
Definition at line 247 of file ckeyboard.cxx.
| bool CKeyboard::start | ( | void | ) |
Start the keyboard listener thread.
Definition at line 112 of file ckeyboard.cxx.
|
private |
File descriptor of the opened keyboard device
Definition at line 90 of file ckeyboard.hxx.
|
private |
CKeyboard state dataThe current NX server
Definition at line 89 of file ckeyboard.hxx.
|
private |
The state of the listener thread
Definition at line 92 of file ckeyboard.hxx.
|
private |
The listener thread ID
Definition at line 91 of file ckeyboard.hxx.
|
private |
Used to synchronize with the listener thread
Definition at line 93 of file ckeyboard.hxx.
1.8.13