Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h new file mode 100644 index 0000000..baf7215 --- a/dev/null +++ b/libopie2/opiecore/device/odevice_ipaq.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | ||
4 | =. | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | */ | ||
29 | |||
30 | #ifndef ODEVICE_IPAQ | ||
31 | #define ODEVICE_IPAQ | ||
32 | |||
33 | #include "odevice.h" | ||
34 | |||
35 | /* QT */ | ||
36 | #include <qwindowsystem_qws.h> | ||
37 | |||
38 | using namespace Opie; | ||
39 | |||
40 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter | ||
41 | { | ||
42 | |||
43 | protected: | ||
44 | virtual void init(); | ||
45 | virtual void initButtons(); | ||
46 | |||
47 | public: | ||
48 | virtual bool setSoftSuspend( bool soft ); | ||
49 | |||
50 | virtual bool setDisplayBrightness( int b ); | ||
51 | virtual int displayBrightnessResolution() const; | ||
52 | |||
53 | virtual void alarmSound(); | ||
54 | |||
55 | virtual QValueList <OLed> ledList() const; | ||
56 | virtual QValueList <OLedState> ledStateList( OLed led ) const; | ||
57 | virtual OLedState ledState( OLed led ) const; | ||
58 | virtual bool setLedState( OLed led, OLedState st ); | ||
59 | |||
60 | virtual bool hasLightSensor() const; | ||
61 | virtual int readLightSensor(); | ||
62 | virtual int lightSensorResolution() const; | ||
63 | |||
64 | protected: | ||
65 | virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | ||
66 | virtual void timerEvent( QTimerEvent *te ); | ||
67 | |||
68 | int m_power_timer; | ||
69 | |||
70 | OLedState m_leds [2]; | ||
71 | }; | ||
72 | |||
73 | struct i_button { | ||
74 | uint model; | ||
75 | Qt::Key code; | ||
76 | char *utext; | ||
77 | char *pix; | ||
78 | char *fpressedservice; | ||
79 | char *fpressedaction; | ||
80 | char *fheldservice; | ||
81 | char *fheldaction; | ||
82 | }; | ||
83 | |||
84 | #endif | ||