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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index 677e29f..bf30bc6 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -24,24 +24,25 @@
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 <qfile.h>
36#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
37 38
38#ifndef ARRAY_SIZE 39#ifndef ARRAY_SIZE
39#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 40#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
40#endif 41#endif
41 42
42// _IO and friends are only defined in kernel headers ... 43// _IO and friends are only defined in kernel headers ...
43#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 44#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) 45#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)) 46#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)) 47#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)) 48#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
@@ -90,24 +91,28 @@
90#define FB_BLANK_UNBLANK 0 91#define FB_BLANK_UNBLANK 0
91#define FB_BLANK_POWERDOWN 4 92#define FB_BLANK_POWERDOWN 4
92 93
93namespace Opie { 94namespace Opie {
94namespace Core { 95namespace Core {
95namespace Internal { 96namespace Internal {
96 97
97class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter 98class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter
98{ 99{
99 protected: 100 protected:
100 virtual void init(const QString&); 101 virtual void init(const QString&);
101 virtual void initButtons(); 102 virtual void initButtons();
103 void initHingeSensor();
104
105 protected slots:
106 void hingeSensorTriggered();
102 107
103 public: 108 public:
104 virtual bool setDisplayBrightness( int b ); 109 virtual bool setDisplayBrightness( int b );
105 virtual bool setDisplayStatus( bool on ); 110 virtual bool setDisplayStatus( bool on );
106 virtual int displayBrightnessResolution() const; 111 virtual int displayBrightnessResolution() const;
107 112
108 virtual void playAlarmSound(); 113 virtual void playAlarmSound();
109 virtual void playKeySound(); 114 virtual void playKeySound();
110 virtual void playTouchSound(); 115 virtual void playTouchSound();
111 116
112 virtual QValueList <OLed> ledList() const; 117 virtual QValueList <OLed> ledList() const;
113 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 118 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
@@ -119,24 +124,25 @@ class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter
119 124
120 virtual Transformation rotation() const; 125 virtual Transformation rotation() const;
121 virtual ODirection direction() const; 126 virtual ODirection direction() const;
122 virtual bool suspend(); 127 virtual bool suspend();
123 128
124 protected: 129 protected:
125 virtual void buzzer( int snd ); 130 virtual void buzzer( int snd );
126 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); 131 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat );
127 132
128 QString m_backlightdev; 133 QString m_backlightdev;
129 OLedState m_leds[1]; 134 OLedState m_leds[1];
130 bool m_embedix; 135 bool m_embedix;
136 QFile m_hinge;
131}; 137};
132 138
133struct z_button { 139struct z_button {
134 Qt::Key code; 140 Qt::Key code;
135 char *utext; 141 char *utext;
136 char *pix; 142 char *pix;
137 char *fpressedservice; 143 char *fpressedservice;
138 char *fpressedaction; 144 char *fpressedaction;
139 char *fheldservice; 145 char *fheldservice;
140 char *fheldaction; 146 char *fheldaction;
141}; 147};
142} 148}