Diffstat (limited to 'libopie2/opiecore/okeyfilter.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/okeyfilter.h | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/libopie2/opiecore/okeyfilter.h b/libopie2/opiecore/okeyfilter.h index 3f9f744..a65bc48 100644 --- a/libopie2/opiecore/okeyfilter.h +++ b/libopie2/opiecore/okeyfilter.h | |||
@@ -44,34 +44,62 @@ namespace Internal { | |||
44 | * keyfilters of software. | 44 | * keyfilters of software. |
45 | * @short a keyfilter proxy | 45 | * @short a keyfilter proxy |
46 | * @see QWSServer::KeyboardFilter | 46 | * @see QWSServer::KeyboardFilter |
47 | * @author Rajko Albrecht | 47 | * @author Rajko Albrecht |
48 | * @version 1.0 | 48 | * @version 1.0 |
49 | */ | 49 | */ |
50 | class OKeyFilter:public QWSServer::KeyboardFilter | 50 | class OKeyFilter |
51 | { | 51 | { |
52 | friend class Opie::Core::ODevice; | 52 | friend class Opie::Core::ODevice; |
53 | friend class Opie::Core::Internal::iPAQ; | 53 | friend class Opie::Core::Internal::iPAQ; |
54 | friend class Opie::Core::Internal::SIMpad; | 54 | friend class Opie::Core::Internal::SIMpad; |
55 | 55 | ||
56 | static QValueList<QWSServer::KeyboardFilter*> filterList; | ||
57 | static QValueList<QWSServer::KeyboardFilter*> preFilterList; | ||
58 | |||
59 | OKeyFilter(); | ||
60 | OKeyFilter(const OKeyFilter&):QWSServer::KeyboardFilter(){}; | ||
61 | |||
62 | protected: | 56 | protected: |
63 | void addPreHandler(QWSServer::KeyboardFilter*); | 57 | /** |
64 | void remPreHandler(QWSServer::KeyboardFilter*); | 58 | * Protected constructor - generate class via inst() |
59 | * @see inst() | ||
60 | */ | ||
61 | OKeyFilter(); | ||
62 | /** | ||
63 | * Protected constructor - generate class via inst() | ||
64 | * @see inst() | ||
65 | */ | ||
66 | OKeyFilter(const OKeyFilter&){}; | ||
67 | /** | ||
68 | * Append filter to the primary list. | ||
69 | * This is only allowed for friend classes from odevice | ||
70 | * @param aFilter a filter to append | ||
71 | * @see addHandler | ||
72 | */ | ||
73 | virtual void addPreHandler(QWSServer::KeyboardFilter*aFilter)=0; | ||
74 | /** | ||
75 | * Remove the specified filter from list and give back ownership. | ||
76 | * This is only allowed for friend classes from odevice | ||
77 | * @param aFilter a filter to remove | ||
78 | * @see remHandler | ||
79 | */ | ||
80 | virtual void remPreHandler(QWSServer::KeyboardFilter*aFilter)=0; | ||
65 | 81 | ||
66 | public: | 82 | public: |
67 | virtual ~OKeyFilter(); | 83 | virtual ~OKeyFilter(); |
68 | virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | 84 | /** |
69 | 85 | * Append filter to the secondary list. | |
70 | void addHandler(QWSServer::KeyboardFilter*); | 86 | * @param aFilter a filter to append |
71 | void remHandler(QWSServer::KeyboardFilter*); | 87 | * @see addPreHandler |
88 | */ | ||
89 | virtual void addHandler(QWSServer::KeyboardFilter*)=0; | ||
90 | /** | ||
91 | * Remove the specified filter from list and give back ownership. | ||
92 | * @param aFilter a filter to remove | ||
93 | * @see remPreHandler | ||
94 | */ | ||
95 | virtual void remHandler(QWSServer::KeyboardFilter*)=0; | ||
72 | 96 | ||
97 | /** | ||
98 | * Returns a handler to an instance of OKeyFilter | ||
99 | * @return a pointer to a working OKeyFilter | ||
100 | */ | ||
73 | static OKeyFilter*inst(); | 101 | static OKeyFilter*inst(); |
74 | }; | 102 | }; |
75 | 103 | ||
76 | } | 104 | } |
77 | } | 105 | } |