tagging release
[dasher.git] / Src / DasherCore / DasherInput.h
blob54b68c1b682ea66b3b205f14e5544bce8ad1e7eb
1 // DasherInput.h
2 //
3 // Copyright (c) 2005 Phil Cowans
5 #ifndef __DasherInput_h__
6 #define __DasherInput_h__
8 #include "DasherTypes.h"
9 #include "DasherModule.h"
11 namespace Dasher {
12 class CDasherInput;
13 class CDasherInterfaceBase;
15 /// \defgroup Input Input devices
16 /// \{
17 class Dasher::CDasherInput : public CDasherModule {
19 public:
21 CDasherInput(Dasher::CEventHandler * pEventHandler, CSettingsStore * pSettingsStore, ModuleID_t iID, int iType, const char *szName)
22 : CDasherModule(pEventHandler, pSettingsStore, iID, iType, szName) {};
24 /// Set the maximum values for each of the coordinates. Minimum
25 /// values are assumed to be zero for now
26 virtual void SetMaxCoordinates(int iN, myint * iDasherMax) {};
28 /// Fill pCoordinates with iN coordinate values, return 0 if the
29 /// values were in screen coordinates or 1 if the values were in
30 /// Dasher coordinates.
31 virtual int GetCoordinates(int iN, myint * pCoordinates) = 0;
33 /// Get the number of co-ordinates that this device supplies
34 ///
35 virtual int GetCoordinateCount() = 0;
37 /// Activate the device. If a helper thread needs to be started in
38 /// order to listen for input then do it here.
39 virtual void Activate() {};
41 /// Deactivate the device. Please don't hold on to any significant
42 /// resources (eg helper threads) after deactivation.
43 virtual void Deactivate() {};
45 /// Handle key down events
46 ///
47 virtual void KeyDown(int iTime, int iId) {};
49 ///
50 /// Handle key up events
51 virtual void KeyUp(int iTime, int iId) {};
53 /// \}
54 #endif