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, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index 4250356..4314aff 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -1,60 +1,60 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 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; version 2 of the License.
12     ._= =}       : or (at your option) any later version. 12     ._= =}       :
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 "odevice_abstractmobiledevice.h" 33#include "odevice_abstractmobiledevice.h"
34 34
35/* QT */ 35/* QT */
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37 37
38#ifndef ARRAY_SIZE 38#ifndef ARRAY_SIZE
39#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 39#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
40#endif 40#endif
41 41
42// _IO and friends are only defined in kernel headers ... 42// _IO and friends are only defined in kernel headers ...
43#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 43#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
44#define OD_IO(type,number) OD_IOC(0,type,number,0) 44#define OD_IO(type,number) OD_IOC(0,type,number,0)
45#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 45#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
46#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 46#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
47#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 47#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
48 48
49// Audio 49// Audio
50#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 50#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
51 51
52#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 52#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
53#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 53#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
54 54
55#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 55#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
56#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 56#define SHARP_BUZ_KEYSOUND 2 /* key sound */
57#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ 57#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
58 58
59#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) 59#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
60#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) 60#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
@@ -80,65 +80,66 @@
80 80
81// Brightness Embedix 81// Brightness Embedix
82#define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" 82#define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl"
83#define SHARP_FL_IOCTL_ON 1 83#define SHARP_FL_IOCTL_ON 1
84#define SHARP_FL_IOCTL_OFF 2 84#define SHARP_FL_IOCTL_OFF 2
85#define SHARP_FL_IOCTL_STEP_CONTRAST 100 85#define SHARP_FL_IOCTL_STEP_CONTRAST 100
86#define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 86#define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101
87#define SHARP_FL_IOCTL_GET_STEP 102 87#define SHARP_FL_IOCTL_GET_STEP 102
88 88
89// Vesa Standard 89// Vesa Standard
90#define FB_BLANK_UNBLANK 0 90#define FB_BLANK_UNBLANK 0
91#define FB_BLANK_POWERDOWN 4 91#define FB_BLANK_POWERDOWN 4
92 92
93namespace Opie { 93namespace Opie {
94namespace Core { 94namespace Core {
95namespace Internal { 95namespace Internal {
96 96
97class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter 97class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter
98{ 98{
99 protected: 99 protected:
100 virtual void init(const QString&); 100 virtual void init(const QString&);
101 virtual void initButtons(); 101 virtual void initButtons();
102 102
103 public: 103 public:
104 virtual bool setDisplayBrightness( int b ); 104 virtual bool setDisplayBrightness( int b );
105 virtual bool setDisplayStatus( bool on ); 105 virtual bool setDisplayStatus( bool on );
106 virtual int displayBrightnessResolution() const; 106 virtual int displayBrightnessResolution() const;
107 107
108 virtual void playAlarmSound(); 108 virtual void playAlarmSound();
109 virtual void playKeySound(); 109 virtual void playKeySound();
110 virtual void playTouchSound(); 110 virtual void playTouchSound();
111 111
112 virtual QValueList <OLed> ledList() const; 112 virtual QValueList <OLed> ledList() const;
113 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 113 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
114 virtual OLedState ledState( OLed led ) const; 114 virtual OLedState ledState( OLed led ) const;
115 virtual bool setLedState( OLed led, OLedState st ); 115 virtual bool setLedState( OLed led, OLedState st );
116 116
117 virtual bool hasHingeSensor() const; 117 virtual bool hasHingeSensor() const;
118 virtual OHingeStatus readHingeSensor() const; 118 virtual OHingeStatus readHingeSensor() const;
119 119
120 virtual Transformation rotation() const; 120 virtual Transformation rotation() const;
121 virtual ODirection direction() const; 121 virtual ODirection direction() const;
122 virtual bool suspend(); 122 virtual bool suspend();
123 123
124 protected: 124 protected:
125 virtual void buzzer( int snd ); 125 virtual void buzzer( int snd );
126 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); 126 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat );
127 127
128 QString m_backlightdev;
128 OLedState m_leds[1]; 129 OLedState m_leds[1];
129 bool m_embedix; 130 bool m_embedix;
130}; 131};
131 132
132struct z_button { 133struct z_button {
133 Qt::Key code; 134 Qt::Key code;
134 char *utext; 135 char *utext;
135 char *pix; 136 char *pix;
136 char *fpressedservice; 137 char *fpressedservice;
137 char *fpressedaction; 138 char *fpressedaction;
138 char *fheldservice; 139 char *fheldservice;
139 char *fheldaction; 140 char *fheldaction;
140}; 141};
141} 142}
142} 143}
143} 144}
144#endif 145#endif