author | mickeyl <mickeyl> | 2004-01-13 18:32:19 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-13 18:32:19 (UTC) |
commit | 061ccf5b9d384b1f24d203e96f1f04ccf1dcf133 (patch) (unidiff) | |
tree | ec1fc064f001edba92e58116cdc35fc909b5cdd6 /libopie2/opiecore/device/odevice_ramses.cpp | |
parent | 59f7fa0a480bf921a67ad42fc1fe018b1be44192 (diff) | |
download | opie-061ccf5b9d384b1f24d203e96f1f04ccf1dcf133.zip opie-061ccf5b9d384b1f24d203e96f1f04ccf1dcf133.tar.gz opie-061ccf5b9d384b1f24d203e96f1f04ccf1dcf133.tar.bz2 |
- rewrite device detection
- cleanup
- split odevice stuff into header and cpp files
- Note for next buildsystem: Don't link all header files but distinguish
between public and private headers, e.g. odevice.h is public while
odevice_ipaq.h is private.
Diffstat (limited to 'libopie2/opiecore/device/odevice_ramses.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index a90c3a0..5bcf6a9 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp | |||
@@ -28,5 +28,5 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "odevice.h" | 30 | #include "odevice_ramses.h" |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
@@ -54,51 +54,5 @@ | |||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #ifndef ARRAY_SIZE | 56 | struct r_button ramses_buttons [] = { |
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 | |||
69 | using namespace Opie; | ||
70 | |||
71 | class Ramses : public ODevice, public QWSServer::KeyboardFilter | ||
72 | { | ||
73 | protected: | ||
74 | virtual void init(); | ||
75 | |||
76 | public: | ||
77 | virtual bool setSoftSuspend( bool soft ); | ||
78 | virtual bool suspend(); | ||
79 | |||
80 | virtual bool setDisplayStatus( bool on ); | ||
81 | virtual bool setDisplayBrightness( int b ); | ||
82 | virtual int displayBrightnessResolution() const; | ||
83 | virtual bool setDisplayContrast( int b ); | ||
84 | virtual int displayContrastResolution() const; | ||
85 | |||
86 | protected: | ||
87 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | ||
88 | virtual void timerEvent ( QTimerEvent *te ); | ||
89 | |||
90 | int m_power_timer; | ||
91 | }; | ||
92 | |||
93 | struct r_button { | ||
94 | uint model; | ||
95 | Qt::Key code; | ||
96 | char *utext; | ||
97 | char *pix; | ||
98 | char *fpressedservice; | ||
99 | char *fpressedaction; | ||
100 | char *fheldservice; | ||
101 | char *fheldaction; | ||
102 | } ramses_buttons [] = { | ||
103 | { Model_Ramses_MNCI, | 57 | { Model_Ramses_MNCI, |
104 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 58 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |