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