Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUIInputMedia.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUIINPUTMEDIA__H_
11#define GUIINPUTMEDIA__H_
12
13#include "eC_Semaphore.h"
14#include "eC_Types.h"
15#include "eC_TList_doubleLinked.h"
16
17#include "GUIComponentManager.h"
18
20#define GETINPUTMEDIA CGUIComponentManager::GetInstance().GetInputMedia()
21
22class CGUI;
23class CGUIObject;
24class CGUIEvent;
25
30{
31 friend class CGUIComponentManager;
32
33public:
36 {
37 ROTATION_0,
38 ROTATION_90,
39 ROTATION_180,
40 ROTATION_270
41 };
42
45 {
46 Polling,
47 Callback
48 };
49
50public:
53 static void DeleteInstance();
54
62 CGUIEvent* GetEvent(eC_UInt uiIdleTime);
63
67 void AddEvent(CGUIEvent* pkEvent);
68
71 virtual void PollEvent() {}
72
79 virtual void StopIdle();
80
84 void SetRotation(const Rotation_t& eRotation);
85
90
95 void SetDebugMode(const eC_Bool& bDebugMode);
96
100 eC_Bool GetDebugMode() const;
101
107 virtual void SetSize(const eC_Int& iSizeX, const eC_Int& iSizeY);
108
113 virtual void GetSize(eC_Int& riSizeX, eC_Int& riSizeY) const;
114
119 virtual void SetOffset(const eC_Int& iOffsetX, const eC_Int& iOffsetY);
120
125 virtual void GetOffset(eC_Int& riOffsetX, eC_Int& riOffsetY) const;
126
130 virtual void SetMultipleTouches(const eC_Bool& bMultipleTouches);
131
135 virtual eC_Bool GetMulitpleTouches() const;
136
140 void SetSleepInterval(const eC_UInt& uiInterval);
141
145 eC_UInt GetSleepInterval() const;
146
150 void SetMaxEventThreshold(const eC_UInt& uiMaxEventThreshold);
151
155 eC_UInt GetMaxEventThreshold() const;
156
160 void SetMinEventThreshold(const eC_UInt& uiMinEventThreshold);
161
165 eC_UInt GetMinEventThreshold() const;
166
171
172protected:
178 CGUIInputMedia(const eC_Bool& bQueuedEvents = false, const AcquisitionType_t& eType = Polling);
179
183
184protected:
185 eC_UInt m_uiIdleTime;
186 eC_Bool m_bStopIdle;
187
189
190 eC_Bool m_bDebugMode;
191
192 eC_Int m_iSizeX;
193 eC_Int m_iSizeY;
194
195 eC_Int m_iOffsetX;
196 eC_Int m_iOffsetY;
197
199
201
202private:
205 CGUIInputMedia(const CGUIInputMedia& kSource);
206
209 CGUIInputMedia& operator=(const CGUIInputMedia& kSource);
210
211private:
212 eC_Bool m_bQueuedEvents;
213 eC_Semaphore m_kEventListSemaphore;
215 eC_UInt m_uiMaxEventThreshold;
216 eC_UInt m_uiMinEventThreshold;
217
218 CGUIEvent* m_pkLastEvent;
219
220 eC_Bool m_bIgnoreEvents;
221
222 AcquisitionType_t m_eType;
223};
224
225#endif
central component-manager
Definition: GUIComponentManager.h:62
Base class for Guiliani Events.
Definition: GUIEvent.h:26
GUI base class for any Guiliani application.
Definition: GUI.h:39
Definition: GUIInputMedia.h:30
void SetSleepInterval(const eC_UInt &uiInterval)
virtual void GetSize(eC_Int &riSizeX, eC_Int &riSizeY) const
CGUIInputMedia(const eC_Bool &bQueuedEvents=false, const AcquisitionType_t &eType=Polling)
void AddEvent(CGUIEvent *pkEvent)
eC_Bool m_bStopIdle
stop idle when waiting for events
Definition: GUIInputMedia.h:186
virtual void PollEvent()
Definition: GUIInputMedia.h:71
AcquisitionType_t
how events are collected
Definition: GUIInputMedia.h:45
eC_Int m_iOffsetY
y-offset
Definition: GUIInputMedia.h:196
CGUIEvent * GetEvent(eC_UInt uiIdleTime)
eC_Int m_iOffsetX
x-offset
Definition: GUIInputMedia.h:195
eC_UInt m_uiIdleTime
maximum time to spend
Definition: GUIInputMedia.h:185
virtual void SetSize(const eC_Int &iSizeX, const eC_Int &iSizeY)
void SetDebugMode(const eC_Bool &bDebugMode)
eC_UInt GetMinEventThreshold() const
Rotation_t
rotation of input-device
Definition: GUIInputMedia.h:36
virtual void SetOffset(const eC_Int &iOffsetX, const eC_Int &iOffsetY)
void SetRotation(const Rotation_t &eRotation)
virtual void SetMultipleTouches(const eC_Bool &bMultipleTouches)
Rotation_t GetRotation() const
static void DeleteInstance()
eC_UInt m_uiSleepInterval
sleep interval
Definition: GUIInputMedia.h:198
virtual ~CGUIInputMedia()
eC_Int m_iSizeY
height
Definition: GUIInputMedia.h:193
eC_Bool GetDebugMode() const
void SetMaxEventThreshold(const eC_UInt &uiMaxEventThreshold)
virtual eC_Bool GetMulitpleTouches() const
eC_Int m_iSizeX
width
Definition: GUIInputMedia.h:192
eC_Bool m_bMultipleTouches
supports multiple touches
Definition: GUIInputMedia.h:200
CGUIEvent * RetrieveEvent()
virtual void GetOffset(eC_Int &riOffsetX, eC_Int &riOffsetY) const
eC_UInt GetMaxEventThreshold() const
eC_Bool m_bDebugMode
debug-mode for input-device
Definition: GUIInputMedia.h:190
void SetMinEventThreshold(const eC_UInt &uiMinEventThreshold)
Rotation_t m_eRotation
current rotation used for input-device
Definition: GUIInputMedia.h:188
eC_UInt GetSleepInterval() const
virtual void StopIdle()
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:81