Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index f5c5172..ffb648f 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -1,96 +1,100 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef ODEVICE_ZAURUS | 30 | #ifndef ODEVICE_ZAURUS |
31 | #define ODEVICE_ZAURUS | 31 | #define ODEVICE_ZAURUS |
32 | 32 | ||
33 | #include <opie2/odevice.h> | 33 | #include <opie2/odevice.h> |
34 | 34 | ||
35 | #ifndef ARRAY_SIZE | 35 | #ifndef ARRAY_SIZE |
36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | // _IO and friends are only defined in kernel headers ... | 39 | // _IO and friends are only defined in kernel headers ... |
40 | 40 | ||
41 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 41 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) |
42 | 42 | ||
43 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | 43 | #define OD_IO(type,number) OD_IOC(0,type,number,0) |
44 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | 44 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) |
45 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | 45 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) |
46 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | 46 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
47 | 47 | ||
48 | using namespace Opie; | ||
49 | 48 | ||
49 | namespace Opie { | ||
50 | namespace Core { | ||
51 | namespace Private { | ||
50 | class Zaurus : public ODevice | 52 | class Zaurus : public ODevice |
51 | { | 53 | { |
52 | 54 | ||
53 | protected: | 55 | protected: |
54 | virtual void init(); | 56 | virtual void init(); |
55 | virtual void initButtons(); | 57 | virtual void initButtons(); |
56 | 58 | ||
57 | public: | 59 | public: |
58 | virtual bool setSoftSuspend ( bool soft ); | 60 | virtual bool setSoftSuspend ( bool soft ); |
59 | 61 | ||
60 | virtual bool setDisplayBrightness ( int b ); | 62 | virtual bool setDisplayBrightness ( int b ); |
61 | virtual int displayBrightnessResolution() const; | 63 | virtual int displayBrightnessResolution() const; |
62 | 64 | ||
63 | virtual void playAlarmSound(); | 65 | virtual void playAlarmSound(); |
64 | virtual void playKeySound(); | 66 | virtual void playKeySound(); |
65 | virtual void playTouchSound(); | 67 | virtual void playTouchSound(); |
66 | 68 | ||
67 | virtual QValueList <OLed> ledList() const; | 69 | virtual QValueList <OLed> ledList() const; |
68 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 70 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
69 | virtual OLedState ledState( OLed led ) const; | 71 | virtual OLedState ledState( OLed led ) const; |
70 | virtual bool setLedState( OLed led, OLedState st ); | 72 | virtual bool setLedState( OLed led, OLedState st ); |
71 | 73 | ||
72 | virtual bool hasHingeSensor() const; | 74 | virtual bool hasHingeSensor() const; |
73 | virtual OHingeStatus readHingeSensor(); | 75 | virtual OHingeStatus readHingeSensor(); |
74 | 76 | ||
75 | virtual bool suspend(); | 77 | virtual bool suspend(); |
76 | virtual Transformation rotation() const; | 78 | virtual Transformation rotation() const; |
77 | virtual ODirection direction() const; | 79 | virtual ODirection direction() const; |
78 | 80 | ||
79 | protected: | 81 | protected: |
80 | virtual void buzzer ( int snd ); | 82 | virtual void buzzer ( int snd ); |
81 | 83 | ||
82 | OLedState m_leds [1]; | 84 | OLedState m_leds [1]; |
83 | bool m_embedix; | 85 | bool m_embedix; |
84 | }; | 86 | }; |
85 | 87 | ||
86 | struct z_button { | 88 | struct z_button { |
87 | Qt::Key code; | 89 | Qt::Key code; |
88 | char *utext; | 90 | char *utext; |
89 | char *pix; | 91 | char *pix; |
90 | char *fpressedservice; | 92 | char *fpressedservice; |
91 | char *fpressedaction; | 93 | char *fpressedaction; |
92 | char *fheldservice; | 94 | char *fheldservice; |
93 | char *fheldaction; | 95 | char *fheldaction; |
94 | }; | 96 | }; |
95 | 97 | } | |
98 | } | ||
99 | } | ||
96 | #endif | 100 | #endif |