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.h8
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
@@ -24,73 +24,77 @@
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
48using namespace Opie;
49 48
49namespace Opie {
50namespace Core {
51namespace Private {
50class Zaurus : public ODevice 52class 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
86struct z_button { 88struct 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