Interface describing a device (mouse or keyboard) More...
#include <INexDevice.h>
Public Member Functions | |
virtual | ~INexDevice () |
virtual NexDeviceType | getType ()=0 |
Gets the type of device represented by this device object. | |
virtual NexErrorCode | waitEvent ()=0 |
Blocks calling thread while waiting for an event. | |
virtual NexErrorCode | getEvent (NexEvent *eventReturn)=0 |
Gets an event from the event queue. | |
virtual bool | hasEvent ()=0 |
Tests if there is an event waiting for this device. | |
virtual void | disableEvents ()=0 |
Disables the generation of new events by this device. | |
virtual void | enableEvents ()=0 |
Enables the generation of new events by this device. | |
virtual void | release ()=0 |
Releases the mouse device. |
Interface describing a device (mouse or keyboard)
virtual INexDevice::~INexDevice | ( | ) | [inline, virtual] |
{ }
virtual void INexDevice::disableEvents | ( | ) | [pure virtual] |
Disables the generation of new events by this device.
Events in the queue are not removed automatically. If events are already disabled, this has no effect.
Unplug and reattachment events can't be disabled and are generated even if this function is called.
virtual void INexDevice::enableEvents | ( | ) | [pure virtual] |
Enables the generation of new events by this device.
By default, events are enabled. If events are already enabled, this has no effect.
virtual NexErrorCode INexDevice::getEvent | ( | NexEvent * | eventReturn ) | [pure virtual] |
Gets an event from the event queue.
[out] | eventReturn |
virtual NexDeviceType INexDevice::getType | ( | ) | [pure virtual] |
Gets the type of device represented by this device object.
virtual bool INexDevice::hasEvent | ( | ) | [pure virtual] |
Tests if there is an event waiting for this device.
This should not be used to poll until an event happens, as this wastes CPU time. Use waitEvent() in that case.
virtual void INexDevice::release | ( | ) | [pure virtual] |
Releases the mouse device.
virtual NexErrorCode INexDevice::waitEvent | ( | ) | [pure virtual] |
Blocks calling thread while waiting for an event.