summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index 80593ce..6e6ca46 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -9,49 +9,49 @@
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 "odevice_abstractmobiledevice.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#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 40#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
41#define OD_IO(type,number) OD_IOC(0,type,number,0) 41#define OD_IO(type,number) OD_IOC(0,type,number,0)
42#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 42#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
43#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 43#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
44#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 44#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
45 45
46// Audio 46// Audio
47#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 47#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
48 48
49#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 49#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
50#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 50#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
51 51
52#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 52#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
53#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 53#define SHARP_BUZ_KEYSOUND 2 /* key sound */
54#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ 54#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
55 55
56#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) 56#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
57#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) 57#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
@@ -70,71 +70,70 @@
70 70
71// Rotation and Power Management 71// Rotation and Power Management
72#define SHARP_IOCTL_GET_ROTATION 0x413c 72#define SHARP_IOCTL_GET_ROTATION 0x413c
73 73
74#define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) 74#define APM_IOCGEVTSRC OD_IOR( 'A', 203, int )
75#define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) 75#define APM_IOCSEVTSRC OD_IORW( 'A', 204, int )
76#define APM_EVT_POWER_BUTTON (1 << 0) 76#define APM_EVT_POWER_BUTTON (1 << 0)
77 77
78// Brightness Embedix 78// Brightness Embedix
79#define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" 79#define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl"
80#define SHARP_FL_IOCTL_ON 1 80#define SHARP_FL_IOCTL_ON 1
81#define SHARP_FL_IOCTL_OFF 2 81#define SHARP_FL_IOCTL_OFF 2
82#define SHARP_FL_IOCTL_STEP_CONTRAST 100 82#define SHARP_FL_IOCTL_STEP_CONTRAST 100
83#define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 83#define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101
84#define SHARP_FL_IOCTL_GET_STEP 102 84#define SHARP_FL_IOCTL_GET_STEP 102
85 85
86// Vesa Standard 86// Vesa Standard
87 #define FB_BLANK_UNBLANK 0 87 #define FB_BLANK_UNBLANK 0
88 #define FB_BLANK_POWERDOWN 4 88 #define FB_BLANK_POWERDOWN 4
89 89
90namespace Opie { 90namespace Opie {
91namespace Core { 91namespace Core {
92namespace Internal { 92namespace Internal {
93 93
94class Zaurus : public ODevice 94class Zaurus : public OAbstractMobileDevice
95{ 95{
96 protected: 96 protected:
97 virtual void init(const QString&); 97 virtual void init(const QString&);
98 virtual void initButtons(); 98 virtual void initButtons();
99 99
100 public: 100 public:
101 virtual bool setDisplayBrightness( int b ); 101 virtual bool setDisplayBrightness( int b );
102 virtual bool setDisplayStatus( bool on ); 102 virtual bool setDisplayStatus( bool on );
103 virtual int displayBrightnessResolution() const; 103 virtual int displayBrightnessResolution() const;
104 104
105 virtual void playAlarmSound(); 105 virtual void playAlarmSound();
106 virtual void playKeySound(); 106 virtual void playKeySound();
107 virtual void playTouchSound(); 107 virtual void playTouchSound();
108 108
109 virtual QValueList <OLed> ledList() const; 109 virtual QValueList <OLed> ledList() const;
110 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 110 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
111 virtual OLedState ledState( OLed led ) const; 111 virtual OLedState ledState( OLed led ) const;
112 virtual bool setLedState( OLed led, OLedState st ); 112 virtual bool setLedState( OLed led, OLedState st );
113 113
114 virtual bool hasHingeSensor() const; 114 virtual bool hasHingeSensor() const;
115 virtual OHingeStatus readHingeSensor() const; 115 virtual OHingeStatus readHingeSensor() const;
116 116
117 virtual bool suspend();
118 virtual Transformation rotation() const; 117 virtual Transformation rotation() const;
119 virtual ODirection direction() const; 118 virtual ODirection direction() const;
120 119
121 protected: 120 protected:
122 virtual void buzzer( int snd ); 121 virtual void buzzer( int snd );
123 122
124 OLedState m_leds[1]; 123 OLedState m_leds[1];
125 bool m_embedix; 124 bool m_embedix;
126}; 125};
127 126
128struct z_button { 127struct z_button {
129 Qt::Key code; 128 Qt::Key code;
130 char *utext; 129 char *utext;
131 char *pix; 130 char *pix;
132 char *fpressedservice; 131 char *fpressedservice;
133 char *fpressedaction; 132 char *fpressedaction;
134 char *fheldservice; 133 char *fheldservice;
135 char *fheldaction; 134 char *fheldaction;
136}; 135};
137} 136}
138} 137}
139} 138}
140#endif 139#endif