author | zecke <zecke> | 2004-02-19 20:29:53 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-19 20:29:53 (UTC) |
commit | f6f89c9fad356f91f1ad63402757335f7fb4fed2 (patch) (unidiff) | |
tree | 9646358fb1b6bdec12fa29971936cbe63ad8f06b /libopie/odevice.h | |
parent | c2eb77f6b8933b02bd8bd59ec7325da0bfc956cb (diff) | |
download | opie-f6f89c9fad356f91f1ad63402757335f7fb4fed2.zip opie-f6f89c9fad356f91f1ad63402757335f7fb4fed2.tar.gz opie-f6f89c9fad356f91f1ad63402757335f7fb4fed2.tar.bz2 |
Restore binary compatibility and make use of the virtual_hook
Yeah it is ugly... but will work for libopie...
Now onto libopie2! development
-rw-r--r-- | libopie/odevice.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 791d358..fc41079 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -189,18 +189,18 @@ public: | |||
189 | QString vendorString ( ) const; | 189 | QString vendorString ( ) const; |
190 | OVendor vendor ( ) const; | 190 | OVendor vendor ( ) const; |
191 | 191 | ||
192 | QString systemString ( ) const; | 192 | QString systemString ( ) const; |
193 | OSystem system ( ) const; | 193 | OSystem system ( ) const; |
194 | 194 | ||
195 | QString systemVersionString ( ) const; | 195 | QString systemVersionString ( ) const; |
196 | 196 | ||
197 | virtual Transformation rotation ( ) const; | 197 | /*virtual*/ Transformation rotation ( ) const; |
198 | virtual ODirection direction ( ) const; | 198 | /*virtual*/ ODirection direction ( ) const; |
199 | 199 | ||
200 | // system | 200 | // system |
201 | 201 | ||
202 | virtual bool setSoftSuspend ( bool on ); | 202 | virtual bool setSoftSuspend ( bool on ); |
203 | virtual bool suspend ( ); | 203 | virtual bool suspend ( ); |
204 | 204 | ||
205 | virtual bool setDisplayStatus ( bool on ); | 205 | virtual bool setDisplayStatus ( bool on ); |
206 | virtual bool setDisplayBrightness ( int brightness ); | 206 | virtual bool setDisplayBrightness ( int brightness ); |
@@ -224,18 +224,18 @@ public: | |||
224 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 224 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
225 | virtual OLedState ledState ( OLed led ) const; | 225 | virtual OLedState ledState ( OLed led ) const; |
226 | virtual bool setLedState ( OLed led, OLedState st ); | 226 | virtual bool setLedState ( OLed led, OLedState st ); |
227 | 227 | ||
228 | virtual bool hasLightSensor ( ) const; | 228 | virtual bool hasLightSensor ( ) const; |
229 | virtual int readLightSensor ( ); | 229 | virtual int readLightSensor ( ); |
230 | virtual int lightSensorResolution ( ) const; | 230 | virtual int lightSensorResolution ( ) const; |
231 | 231 | ||
232 | virtual bool hasHingeSensor ( ) const; | 232 | /*virtual*/ bool hasHingeSensor ( ) const; |
233 | virtual OHingeStatus readHingeSensor ( ); | 233 | /*virtual*/ OHingeStatus readHingeSensor ( ); |
234 | 234 | ||
235 | const QStrList &allowedCpuFrequencies() const; | 235 | const QStrList &allowedCpuFrequencies() const; |
236 | bool setCurrentCpuFrequency(uint index); | 236 | bool setCurrentCpuFrequency(uint index); |
237 | 237 | ||
238 | /** | 238 | /** |
239 | * Returns the available buttons on this device. The number and location | 239 | * Returns the available buttons on this device. The number and location |
240 | * of buttons will vary depending on the device. Button numbers will be assigned | 240 | * of buttons will vary depending on the device. Button numbers will be assigned |
241 | * by the device manufacturer and will be from most preferred button to least preffered | 241 | * by the device manufacturer and will be from most preferred button to least preffered |
@@ -273,14 +273,30 @@ signals: | |||
273 | 273 | ||
274 | private slots: | 274 | private slots: |
275 | void systemMessage ( const QCString &, const QByteArray & ); | 275 | void systemMessage ( const QCString &, const QByteArray & ); |
276 | 276 | ||
277 | protected: | 277 | protected: |
278 | void reloadButtonMapping ( ); | 278 | void reloadButtonMapping ( ); |
279 | /* ugly virtual hook */ | 279 | /* ugly virtual hook */ |
280 | virtual void virtual_hook( int id, void* data ); | 280 | virtual void virtual_hook( int id, void* data ); |
281 | |||
282 | protected: | ||
283 | enum { VIRTUAL_ROTATION = 0x200, VIRTUAL_DIRECTION, | ||
284 | VIRTUAL_HAS_HINGE, VIRTUAL_HINGE }; | ||
285 | struct VirtRotation { | ||
286 | Transformation trans; | ||
287 | }; | ||
288 | struct VirtDirection { | ||
289 | ODirection direct; | ||
290 | }; | ||
291 | struct VirtHasHinge { | ||
292 | bool hasHinge; | ||
293 | }; | ||
294 | struct VirtHingeStatus { | ||
295 | OHingeStatus hingeStat; | ||
296 | }; | ||
281 | }; | 297 | }; |
282 | 298 | ||
283 | } | 299 | } |
284 | 300 | ||
285 | #endif | 301 | #endif |
286 | 302 | ||