Public Member Functions

INexDevice Class Reference

Interface describing a device (mouse or keyboard) More...

#include <INexDevice.h>

List of all members.

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.

Detailed Description

Interface describing a device (mouse or keyboard)


Constructor & Destructor Documentation

virtual INexDevice::~INexDevice (  ) [inline, virtual]
{ }

Member Function Documentation

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.

Parameters:
[out]eventReturn
Precondition:
An event must be available. Use hasEvent() or waitEvent() to ensure this
Returns:
Standard error codes, see NexErrorCode
virtual NexDeviceType INexDevice::getType (  ) [pure virtual]

Gets the type of device represented by this device object.

Returns:
The device type
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.

Returns:
True if an event can immediately be retrieved with getEvent(), false otherwise.
virtual void INexDevice::release (  ) [pure virtual]

Releases the mouse device.

virtual NexErrorCode INexDevice::waitEvent (  ) [pure virtual]

Blocks calling thread while waiting for an event.

Returns:
Standard error codes, see NexErrorCode

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations Enumerator Defines