summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_simpad.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp56
1 files changed, 2 insertions, 54 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 82dce10..a2cd419 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -29,3 +29,3 @@
29 29
30#include "odevice.h" 30#include "odevice_simpad.h"
31 31
@@ -55,57 +55,5 @@
55 55
56#ifndef ARRAY_SIZE
57#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
58#endif
59
60// _IO and friends are only defined in kernel headers ...
61
62#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
63
64#define OD_IO(type,number) OD_IOC(0,type,number,0)
65#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
66#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
67#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
68
69using namespace Opie; 56using namespace Opie;
70 57
71class SIMpad : public ODevice, public QWSServer::KeyboardFilter 58struct s_button simpad_buttons [] = {
72{
73 protected:
74 virtual void init();
75 virtual void initButtons();
76
77 public:
78 virtual bool setSoftSuspend( bool soft );
79 virtual bool suspend();
80
81 virtual bool setDisplayStatus( bool on );
82 virtual bool setDisplayBrightness( int b );
83 virtual int displayBrightnessResolution() const;
84
85 virtual void alarmSound();
86
87 virtual QValueList <OLed> ledList() const;
88 virtual QValueList <OLedState> ledStateList( OLed led ) const;
89 virtual OLedState ledState( OLed led ) const;
90 virtual bool setLedState( OLed led, OLedState st );
91
92 protected:
93 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat );
94 virtual void timerEvent( QTimerEvent *te );
95
96 int m_power_timer;
97
98 OLedState m_leds [1];
99};
100
101struct s_button {
102 uint model;
103 Qt::Key code;
104 char *utext;
105 char *pix;
106 char *fpressedservice;
107 char *fpressedaction;
108 char *fheldservice;
109 char *fheldaction;
110} simpad_buttons [] = {
111 { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, 59 { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus,