-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 16 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 2 |
4 files changed, 22 insertions, 11 deletions
@@ -1,161 +1,161 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
9 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) | 9 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) |
10 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) | 10 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) |
11 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) | 11 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) |
12 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) | 12 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) |
13 | * ZSafe: Made UI conform to Opie standards (drw) | 13 | * ZSafe: Made UI conform to Opie standards (drw) |
14 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) | 14 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) |
15 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) | 15 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) |
16 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) | 16 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) |
17 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) | 17 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) |
18 | * Opie-smb: Added Opie front end for Samba (ljp) | 18 | * Opie-smb: Added Opie front end for Samba (ljp) |
19 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) | 19 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) |
20 | 20 | ||
21 | |||
22 | Fixed Bugs | 21 | Fixed Bugs |
23 | ---------- | 22 | ---------- |
24 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) | 23 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) |
25 | - We actually suspend the complete Opie now in that case. | 24 | - We actually suspend the complete Opie now in that case. |
26 | * #1384 - Battery status updated improperly when charging (skyhusker) | 25 | * #1384 - Battery status updated improperly when charging (skyhusker) |
27 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 26 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
28 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) | 27 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) |
29 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 28 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
30 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) | 29 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) |
31 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) | 30 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) |
32 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) | 31 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) |
33 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 32 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
34 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 33 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
35 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) | 34 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) |
36 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 35 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
37 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 36 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
38 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 37 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
39 | * #1679 - Security PIN plugin is QVGA sized (hrw) | 38 | * #1679 - Security PIN plugin is QVGA sized (hrw) |
40 | * #1682 - Properly resize tab control in OTabWidget (drw) | 39 | * #1682 - Properly resize tab control in OTabWidget (drw) |
41 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 40 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) |
42 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 41 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
43 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 42 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
44 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) | 43 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) |
45 | * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) | 44 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) |
46 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 45 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
47 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | 46 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) |
48 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 47 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
49 | * n.a. - remove hardcoded font size from netsystemtime (hrw) | 48 | * n.a. - remove hardcoded font size from netsystemtime (hrw) |
50 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) | 49 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) |
51 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) | 50 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) |
52 | 51 | ||
53 | 52 | ||
54 | Internal | 53 | Internal |
55 | -------- | 54 | -------- |
56 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 55 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
57 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 56 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
58 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 57 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
59 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 58 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
60 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 59 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
61 | * libopienet: Miscellaneous API cleanups (mickeyl) | 60 | * libopienet: Miscellaneous API cleanups (mickeyl) |
62 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 61 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
63 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) | 62 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) |
63 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) | ||
64 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) | 64 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) |
65 | * fix / optimize number of scanned directories. (ljp) | 65 | * Fix / Optimize number of scanned directories (ljp) |
66 | 66 | ||
67 | 2005-03-25Opie 1.2.0 | 67 | 2005-03-25Opie 1.2.0 |
68 | 68 | ||
69 | Fixed Bugs | 69 | Fixed Bugs |
70 | ---------- | 70 | ---------- |
71 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 71 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
72 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 72 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
73 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 73 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
74 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 74 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
75 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 75 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
76 | 76 | ||
77 | 2005-03-20Opie 1.2.0-rc1 | 77 | 2005-03-20Opie 1.2.0-rc1 |
78 | 78 | ||
79 | 79 | ||
80 | New Features | 80 | New Features |
81 | ------------ | 81 | ------------ |
82 | * Launcher: Support a static background pixmap (mickeyl) | 82 | * Launcher: Support a static background pixmap (mickeyl) |
83 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 83 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
84 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 84 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
85 | * Added hi-res inline images for large resolution devices (drw) | 85 | * Added hi-res inline images for large resolution devices (drw) |
86 | * Improved launcher icons for consistency (ar) | 86 | * Improved launcher icons for consistency (ar) |
87 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 87 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
88 | 88 | ||
89 | Fixed Bugs | 89 | Fixed Bugs |
90 | ---------- | 90 | ---------- |
91 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 91 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
92 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 92 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
93 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 93 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
94 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 94 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
95 | * #1482 - Fix double '/' in paths (zecke) | 95 | * #1482 - Fix double '/' in paths (zecke) |
96 | * #1536 - Autosave of custom locations in opie backup (ar) | 96 | * #1536 - Autosave of custom locations in opie backup (ar) |
97 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 97 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
98 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 98 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
99 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 99 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
100 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 100 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
101 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 101 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
102 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 102 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
103 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 103 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
104 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 104 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
105 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 105 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
106 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 106 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
107 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 107 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
108 | * #1604 - Checkbook crashed on startup (drw) | 108 | * #1604 - Checkbook crashed on startup (drw) |
109 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 109 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
110 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 110 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
111 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 111 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
112 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 112 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
113 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 113 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
114 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 114 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
115 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 115 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
116 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 116 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
117 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 117 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
118 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 118 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
119 | 119 | ||
120 | Internal | 120 | Internal |
121 | -------- | 121 | -------- |
122 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 122 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
123 | * Killed the need for weak symbols in QtE (zecke) | 123 | * Killed the need for weak symbols in QtE (zecke) |
124 | * Added optional building libqpe without inline images (mickeyl) | 124 | * Added optional building libqpe without inline images (mickeyl) |
125 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 125 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
126 | 126 | ||
127 | 2005-02-03Opie 1.1.9 | 127 | 2005-02-03Opie 1.1.9 |
128 | 128 | ||
129 | New Features | 129 | New Features |
130 | ------------ | 130 | ------------ |
131 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 131 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
132 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 132 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
133 | * Usability enhancements in OpieIRC (skyhusker) | 133 | * Usability enhancements in OpieIRC (skyhusker) |
134 | 134 | ||
135 | Fixed Bugs | 135 | Fixed Bugs |
136 | ---------- | 136 | ---------- |
137 | * #1501 - Fixed bug in todo sql backend (eilers) | 137 | * #1501 - Fixed bug in todo sql backend (eilers) |
138 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 138 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
139 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 139 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
140 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 140 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
141 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 141 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
142 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 142 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
143 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 143 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
144 | 144 | ||
145 | Internal | 145 | Internal |
146 | -------- | 146 | -------- |
147 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 147 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
148 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 148 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
149 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 149 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
150 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 150 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
151 | * Build tree cleanups (mickeyl) | 151 | * Build tree cleanups (mickeyl) |
152 | 152 | ||
153 | 2004-11-26Opie 1.1.8 | 153 | 2004-11-26Opie 1.1.8 |
154 | 154 | ||
155 | New Features | 155 | New Features |
156 | ------------ | 156 | ------------ |
157 | * PackageManager supports installation of local ipkg files (drw) | 157 | * PackageManager supports installation of local ipkg files (drw) |
158 | * PackageManager supports linking of applications to root (drw) | 158 | * PackageManager supports linking of applications to root (drw) |
159 | * PackageManager supports src/gz feeds (drw,wimpie) | 159 | * PackageManager supports src/gz feeds (drw,wimpie) |
160 | * Added a syslog information tab to sysinfo (mickeyl) | 160 | * Added a syslog information tab to sysinfo (mickeyl) |
161 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 161 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 76cf97d..0eed1c9 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -1,182 +1,183 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
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_H_ | 30 | #ifndef ODEVICE_H_ |
31 | #define ODEVICE_H_ | 31 | #define ODEVICE_H_ |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/odevicebutton.h> | 34 | #include <opie2/odevicebutton.h> |
35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ | 35 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qnamespace.h> | 38 | #include <qnamespace.h> |
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | #include <qstring.h> | 40 | #include <qstring.h> |
41 | 41 | ||
42 | 42 | ||
43 | #include <qstrlist.h> | 43 | #include <qstrlist.h> |
44 | #include <qwindowsystem_qws.h> | 44 | #include <qwindowsystem_qws.h> |
45 | 45 | ||
46 | 46 | ||
47 | class Sound; | 47 | class Sound; |
48 | 48 | ||
49 | namespace Opie{ | 49 | namespace Opie{ |
50 | namespace Core{ | 50 | namespace Core{ |
51 | 51 | ||
52 | class ODeviceData; | 52 | class ODeviceData; |
53 | /** | 53 | /** |
54 | * The available devices | 54 | * The available devices |
55 | */ | 55 | */ |
56 | enum OModel { | 56 | enum OModel { |
57 | Model_Unknown, // = 0 | 57 | Model_Unknown, // = 0 |
58 | 58 | ||
59 | Model_Series_Mask = 0xffff0000, | 59 | Model_Series_Mask = 0xffff0000, |
60 | 60 | ||
61 | Model_iPAQ = ( 1 << 16 ), | 61 | Model_iPAQ = ( 1 << 16 ), |
62 | 62 | ||
63 | Model_iPAQ_All = ( Model_iPAQ | 0xffff ), | 63 | Model_iPAQ_All = ( Model_iPAQ | 0xffff ), |
64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), | 64 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), |
65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), | 65 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), |
66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ), | 66 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ), |
67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ), | 67 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ), |
68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ), | 68 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ), |
69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ), | 69 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ), |
70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), | 70 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), |
71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), | 71 | Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), |
72 | 72 | ||
73 | Model_Jornada = ( 6 << 16 ), | 73 | Model_Jornada = ( 6 << 16 ), |
74 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), | 74 | Model_Jornada_56x = ( Model_Jornada | 0x0001 ), |
75 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), | 75 | Model_Jornada_720 = ( Model_Jornada | 0x0002 ), |
76 | 76 | ||
77 | Model_Zaurus = ( 2 << 16 ), | 77 | Model_Zaurus = ( 2 << 16 ), |
78 | 78 | ||
79 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), | 79 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), |
80 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), | 80 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), |
81 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), | 81 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), |
82 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), | 82 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), |
83 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), | 83 | Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), |
84 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), | 84 | Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), |
85 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), | 85 | Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), |
86 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), | 86 | Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), |
87 | Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), | ||
87 | 88 | ||
88 | Model_SIMpad = ( 3 << 16 ), | 89 | Model_SIMpad = ( 3 << 16 ), |
89 | 90 | ||
90 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), | 91 | Model_SIMpad_All = ( Model_SIMpad | 0xffff ), |
91 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), | 92 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), |
92 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), | 93 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), |
93 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), | 94 | Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), |
94 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), | 95 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), |
95 | 96 | ||
96 | Model_Ramses = ( 4 << 16 ), | 97 | Model_Ramses = ( 4 << 16 ), |
97 | 98 | ||
98 | Model_Ramses_All = ( Model_Ramses | 0xffff ), | 99 | Model_Ramses_All = ( Model_Ramses | 0xffff ), |
99 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), | 100 | Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), |
100 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), | 101 | Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), |
101 | 102 | ||
102 | Model_Yopy = ( 5 << 16 ), | 103 | Model_Yopy = ( 5 << 16 ), |
103 | 104 | ||
104 | Model_Yopy_All = ( Model_Yopy | 0xffff ), | 105 | Model_Yopy_All = ( Model_Yopy | 0xffff ), |
105 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), | 106 | Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), |
106 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), | 107 | Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), |
107 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), | 108 | Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), |
108 | 109 | ||
109 | Model_Beagle = ( 6 << 16 ), | 110 | Model_Beagle = ( 6 << 16 ), |
110 | 111 | ||
111 | Model_Beagle_All = ( Model_Beagle | 0xffff ), | 112 | Model_Beagle_All = ( Model_Beagle | 0xffff ), |
112 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), | 113 | Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), |
113 | 114 | ||
114 | Model_GenuineIntel = ( 7 << 16 ), | 115 | Model_GenuineIntel = ( 7 << 16 ), |
115 | 116 | ||
116 | Model_MyPal = ( 8 << 16 ), | 117 | Model_MyPal = ( 8 << 16 ), |
117 | 118 | ||
118 | Model_MyPal_All = ( Model_MyPal | 0xffff ), | 119 | Model_MyPal_All = ( Model_MyPal | 0xffff ), |
119 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), | 120 | Model_MyPal_620 = ( Model_MyPal | 0x0001 ), |
120 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), | 121 | Model_MyPal_716 = ( Model_MyPal | 0x0002 ), |
121 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ) | 122 | Model_MyPal_730 = ( Model_MyPal | 0x0003 ) |
122 | }; | 123 | }; |
123 | 124 | ||
124 | /** | 125 | /** |
125 | * The vendor of the device | 126 | * The vendor of the device |
126 | */ | 127 | */ |
127 | enum OVendor { | 128 | enum OVendor { |
128 | Vendor_Unknown, | 129 | Vendor_Unknown, |
129 | 130 | ||
130 | Vendor_HP, | 131 | Vendor_HP, |
131 | Vendor_Sharp, | 132 | Vendor_Sharp, |
132 | Vendor_SIEMENS, | 133 | Vendor_SIEMENS, |
133 | Vendor_MundN, | 134 | Vendor_MundN, |
134 | Vendor_GMate, | 135 | Vendor_GMate, |
135 | Vendor_MasterIA, | 136 | Vendor_MasterIA, |
136 | Vendor_GenuineIntel, | 137 | Vendor_GenuineIntel, |
137 | Vendor_Asus | 138 | Vendor_Asus |
138 | }; | 139 | }; |
139 | 140 | ||
140 | /** | 141 | /** |
141 | * The System used | 142 | * The System used |
142 | */ | 143 | */ |
143 | enum OSystem { | 144 | enum OSystem { |
144 | System_Unknown, | 145 | System_Unknown, |
145 | 146 | ||
146 | System_Familiar, | 147 | System_Familiar, |
147 | System_Zaurus, | 148 | System_Zaurus, |
148 | System_OpenZaurus, | 149 | System_OpenZaurus, |
149 | System_Linupy, | 150 | System_Linupy, |
150 | System_OpenEmbedded, | 151 | System_OpenEmbedded, |
151 | System_PC | 152 | System_PC |
152 | }; | 153 | }; |
153 | 154 | ||
154 | typedef struct { | 155 | typedef struct { |
155 | OSystem system; | 156 | OSystem system; |
156 | char* sysstr; | 157 | char* sysstr; |
157 | char* sysvfile; | 158 | char* sysvfile; |
158 | } ODistribution; | 159 | } ODistribution; |
159 | 160 | ||
160 | extern ODistribution distributions[]; | 161 | extern ODistribution distributions[]; |
161 | 162 | ||
162 | 163 | ||
163 | enum OLedState { | 164 | enum OLedState { |
164 | Led_Off, | 165 | Led_Off, |
165 | Led_On, | 166 | Led_On, |
166 | Led_BlinkSlow, | 167 | Led_BlinkSlow, |
167 | Led_BlinkFast | 168 | Led_BlinkFast |
168 | }; | 169 | }; |
169 | 170 | ||
170 | enum OLed { | 171 | enum OLed { |
171 | Led_Mail, | 172 | Led_Mail, |
172 | Led_Power, | 173 | Led_Power, |
173 | Led_BlueTooth | 174 | Led_BlueTooth |
174 | }; | 175 | }; |
175 | 176 | ||
176 | enum OHardKey { | 177 | enum OHardKey { |
177 | HardKey_Datebook = Qt::Key_F9, | 178 | HardKey_Datebook = Qt::Key_F9, |
178 | HardKey_Contacts = Qt::Key_F10, | 179 | HardKey_Contacts = Qt::Key_F10, |
179 | HardKey_Menu = Qt::Key_F11, | 180 | HardKey_Menu = Qt::Key_F11, |
180 | HardKey_Home = Qt::Key_F12, | 181 | HardKey_Home = Qt::Key_F12, |
181 | HardKey_Mail = Qt::Key_F13, | 182 | HardKey_Mail = Qt::Key_F13, |
182 | HardKey_Record = Qt::Key_F24, | 183 | HardKey_Record = Qt::Key_F24, |
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index b7f3104..4a80a7e 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -1,100 +1,100 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; version 2 of the License. | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
12 | ._= =} : | 12 | ._= =} : |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
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 | #include "odevice_zaurus.h" | 30 | #include "odevice_zaurus.h" |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
33 | #include <qapplication.h> | 33 | #include <qapplication.h> |
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
36 | #include <qwindowsystem_qws.h> | 36 | #include <qwindowsystem_qws.h> |
37 | 37 | ||
38 | /* OPIE */ | 38 | /* OPIE */ |
39 | #include <opie2/oinputsystem.h> | 39 | #include <opie2/oinputsystem.h> |
40 | #include <opie2/oresource.h> | 40 | #include <opie2/oresource.h> |
41 | 41 | ||
42 | #include <qpe/config.h> | 42 | #include <qpe/config.h> |
43 | #include <qpe/sound.h> | 43 | #include <qpe/sound.h> |
44 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
45 | 45 | ||
46 | /* STD */ | 46 | /* STD */ |
47 | #include <fcntl.h> | 47 | #include <fcntl.h> |
48 | #include <math.h> | 48 | #include <math.h> |
49 | #include <stdlib.h> | 49 | #include <stdlib.h> |
50 | #include <signal.h> | 50 | #include <signal.h> |
51 | #include <sys/ioctl.h> | 51 | #include <sys/ioctl.h> |
52 | #include <sys/time.h> | 52 | #include <sys/time.h> |
53 | #include <unistd.h> | 53 | #include <unistd.h> |
54 | #ifndef QT_NO_SOUND | 54 | #ifndef QT_NO_SOUND |
55 | #include <linux/soundcard.h> | 55 | #include <linux/soundcard.h> |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | using namespace Opie::Core; | 58 | using namespace Opie::Core; |
59 | using namespace Opie::Core::Internal; | 59 | using namespace Opie::Core::Internal; |
60 | 60 | ||
61 | struct z_button z_buttons [] = { | 61 | struct z_button z_buttons [] = { |
62 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 62 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
63 | "devicebuttons/z_calendar", | 63 | "devicebuttons/z_calendar", |
64 | "datebook", "nextView()", | 64 | "datebook", "nextView()", |
65 | "today", "raise()" }, | 65 | "today", "raise()" }, |
66 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 66 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
67 | "devicebuttons/z_contact", | 67 | "devicebuttons/z_contact", |
68 | "addressbook", "raise()", | 68 | "addressbook", "raise()", |
69 | "addressbook", "beamBusinessCard()" }, | 69 | "addressbook", "beamBusinessCard()" }, |
70 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 70 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
71 | "devicebuttons/z_home", | 71 | "devicebuttons/z_home", |
72 | "QPE/Launcher", "home()", | 72 | "QPE/Launcher", "home()", |
73 | "buttonsettings", "raise()" }, | 73 | "buttonsettings", "raise()" }, |
74 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 74 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
75 | "devicebuttons/z_menu", | 75 | "devicebuttons/z_menu", |
76 | "QPE/TaskBar", "toggleMenu()", | 76 | "QPE/TaskBar", "toggleMenu()", |
77 | "QPE/TaskBar", "toggleStartMenu()" }, | 77 | "QPE/TaskBar", "toggleStartMenu()" }, |
78 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 78 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
79 | "devicebuttons/z_mail", | 79 | "devicebuttons/z_mail", |
80 | "opiemail", "raise()", | 80 | "opiemail", "raise()", |
81 | "opiemail", "newMail()" }, | 81 | "opiemail", "newMail()" }, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct z_button z_buttons_c700 [] = { | 84 | struct z_button z_buttons_c700 [] = { |
85 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 85 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
86 | "devicebuttons/z_calendar", | 86 | "devicebuttons/z_calendar", |
87 | "datebook", "nextView()", | 87 | "datebook", "nextView()", |
88 | "today", "raise()" }, | 88 | "today", "raise()" }, |
89 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 89 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
90 | "devicebuttons/z_contact", | 90 | "devicebuttons/z_contact", |
91 | "addressbook", "raise()", | 91 | "addressbook", "raise()", |
92 | "addressbook", "beamBusinessCard()" }, | 92 | "addressbook", "beamBusinessCard()" }, |
93 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 93 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
94 | "devicebuttons/z_home", | 94 | "devicebuttons/z_home", |
95 | "QPE/Launcher", "home()", | 95 | "QPE/Launcher", "home()", |
96 | "buttonsettings", "raise()" }, | 96 | "buttonsettings", "raise()" }, |
97 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 97 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
98 | "devicebuttons/z_menu", | 98 | "devicebuttons/z_menu", |
99 | "QPE/TaskBar", "toggleMenu()", | 99 | "QPE/TaskBar", "toggleMenu()", |
100 | "QPE/TaskBar", "toggleStartMenu()" }, | 100 | "QPE/TaskBar", "toggleStartMenu()" }, |
@@ -131,264 +131,269 @@ struct z_button z_buttons_6000 [] = { | |||
131 | "devicebuttons/z_menu", | 131 | "devicebuttons/z_menu", |
132 | "QPE/TaskBar", "toggleMenu()", | 132 | "QPE/TaskBar", "toggleMenu()", |
133 | "QPE/TaskBar", "toggleStartMenu()" }, | 133 | "QPE/TaskBar", "toggleStartMenu()" }, |
134 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 134 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
135 | "devicebuttons/z_mail", | 135 | "devicebuttons/z_mail", |
136 | "opiemail", "raise()", | 136 | "opiemail", "raise()", |
137 | "opiemail", "newMail()" }, | 137 | "opiemail", "newMail()" }, |
138 | { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Rotate Button"), | 138 | { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Rotate Button"), |
139 | "devicebuttons/z_rotate", | 139 | "devicebuttons/z_rotate", |
140 | 0, | 140 | 0, |
141 | "QPE/Rotation", "rotateDefault()" }, | 141 | "QPE/Rotation", "rotateDefault()" }, |
142 | { Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | 142 | { Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
143 | "devicebuttons/z_hinge3", | 143 | "devicebuttons/z_hinge3", |
144 | "QPE/VMemo", "toggleRecord()", | 144 | "QPE/VMemo", "toggleRecord()", |
145 | "sound", "raise()" }, | 145 | "sound", "raise()" }, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | // FIXME This gets unnecessary complicated. We should think about splitting the Zaurus | 148 | // FIXME This gets unnecessary complicated. We should think about splitting the Zaurus |
149 | // class up into individual classes. We would need three classes | 149 | // class up into individual classes. We would need three classes |
150 | // | 150 | // |
151 | // Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000) | 151 | // Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000) |
152 | // Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600) | 152 | // Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600) |
153 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000, C1000, C3100) | 153 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000, C1000, C3100) |
154 | // Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000) | 154 | // Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000) |
155 | 155 | ||
156 | void Zaurus::init(const QString& cpu_info) | 156 | void Zaurus::init(const QString& cpu_info) |
157 | { | 157 | { |
158 | // Set the time to wait until the system is really suspended | 158 | // Set the time to wait until the system is really suspended |
159 | // the delta between apm --suspend and sleeping | 159 | // the delta between apm --suspend and sleeping |
160 | setAPMTimeOut( 15000 ); | 160 | setAPMTimeOut( 15000 ); |
161 | 161 | ||
162 | // generic distribution code already scanned /etc/issue at that point - | 162 | // generic distribution code already scanned /etc/issue at that point - |
163 | // embedix releases contain "Embedix <version> | Linux for Embedded Devices" | 163 | // embedix releases contain "Embedix <version> | Linux for Embedded Devices" |
164 | if ( d->m_sysverstr.contains( "embedix", false ) ) | 164 | if ( d->m_sysverstr.contains( "embedix", false ) ) |
165 | { | 165 | { |
166 | d->m_vendorstr = "Sharp"; | 166 | d->m_vendorstr = "Sharp"; |
167 | d->m_vendor = Vendor_Sharp; | 167 | d->m_vendor = Vendor_Sharp; |
168 | d->m_systemstr = "Zaurus"; | 168 | d->m_systemstr = "Zaurus"; |
169 | d->m_system = System_Zaurus; | 169 | d->m_system = System_Zaurus; |
170 | m_embedix = true; | 170 | m_embedix = true; |
171 | } | 171 | } |
172 | else | 172 | else |
173 | { | 173 | { |
174 | d->m_vendorstr = "OpenZaurus Team"; | 174 | d->m_vendorstr = "OpenZaurus Team"; |
175 | d->m_systemstr = "OpenZaurus"; | 175 | d->m_systemstr = "OpenZaurus"; |
176 | d->m_system = System_OpenZaurus; | 176 | d->m_system = System_OpenZaurus; |
177 | // sysver already gathered | 177 | // sysver already gathered |
178 | 178 | ||
179 | // OpenZaurus sometimes uses the 2.4 (embedix) kernel, check if this is one | 179 | // OpenZaurus sometimes uses the 2.4 (embedix) kernel, check if this is one |
180 | FILE *uname = popen("uname -r", "r"); | 180 | FILE *uname = popen("uname -r", "r"); |
181 | QFile f; | 181 | QFile f; |
182 | QString line; | 182 | QString line; |
183 | if ( f.open(IO_ReadOnly, uname) ) { | 183 | if ( f.open(IO_ReadOnly, uname) ) { |
184 | QTextStream ts ( &f ); | 184 | QTextStream ts ( &f ); |
185 | line = ts.readLine(); | 185 | line = ts.readLine(); |
186 | m_embedix = line.startsWith( "2.4." ); | 186 | m_embedix = line.startsWith( "2.4." ); |
187 | f.close(); | 187 | f.close(); |
188 | } | 188 | } |
189 | pclose(uname); | 189 | pclose(uname); |
190 | } | 190 | } |
191 | 191 | ||
192 | // check the Zaurus model | 192 | // check the Zaurus model |
193 | QString model; | 193 | QString model; |
194 | int loc = cpu_info.find( ":" ); | 194 | int loc = cpu_info.find( ":" ); |
195 | if ( loc != -1 ) | 195 | if ( loc != -1 ) |
196 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); | 196 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); |
197 | else | 197 | else |
198 | model = cpu_info; | 198 | model = cpu_info; |
199 | 199 | ||
200 | if ( model == "SHARP Corgi" ) { | 200 | if ( model == "SHARP Corgi" ) { |
201 | d->m_model = Model_Zaurus_SLC7x0; | 201 | d->m_model = Model_Zaurus_SLC7x0; |
202 | d->m_modelstr = "Zaurus SL-C700"; | 202 | d->m_modelstr = "Zaurus SL-C700"; |
203 | } else if ( model == "SHARP Shepherd" ) { | 203 | } else if ( model == "SHARP Shepherd" ) { |
204 | d->m_model = Model_Zaurus_SLC7x0; | 204 | d->m_model = Model_Zaurus_SLC7x0; |
205 | d->m_modelstr = "Zaurus SL-C750"; | 205 | d->m_modelstr = "Zaurus SL-C750"; |
206 | } else if ( model == "SHARP Husky" ) { | 206 | } else if ( model == "SHARP Husky" ) { |
207 | d->m_model = Model_Zaurus_SLC7x0; | 207 | d->m_model = Model_Zaurus_SLC7x0; |
208 | d->m_modelstr = "Zaurus SL-C760 or SL-C860"; | 208 | d->m_modelstr = "Zaurus SL-C760 or SL-C860"; |
209 | } else if ( model == "SHARP Boxer" ) { | 209 | } else if ( model == "SHARP Boxer" ) { |
210 | d->m_model = Model_Zaurus_SLC7x0; | 210 | d->m_model = Model_Zaurus_SLC7x0; |
211 | d->m_modelstr = "Zaurus SL-C760 or SL-C860"; | 211 | d->m_modelstr = "Zaurus SL-C760 or SL-C860"; |
212 | } else if ( model == "SHARP Poodle" ) { | 212 | } else if ( model == "SHARP Poodle" ) { |
213 | d->m_model = Model_Zaurus_SLB600; | 213 | d->m_model = Model_Zaurus_SLB600; |
214 | d->m_modelstr = "Zaurus SL-B500 or SL-5600"; | 214 | d->m_modelstr = "Zaurus SL-B500 or SL-5600"; |
215 | } else if ( model == "Sharp-Collie" || model == "Collie" ) { | 215 | } else if ( model == "Sharp-Collie" || model == "Collie" ) { |
216 | d->m_model = Model_Zaurus_SL5500; | 216 | d->m_model = Model_Zaurus_SL5500; |
217 | d->m_modelstr = "Zaurus SL-5500 or SL-5000d"; | 217 | d->m_modelstr = "Zaurus SL-5500 or SL-5000d"; |
218 | } else if ( model == "SHARP Tosa" ) { | 218 | } else if ( model == "SHARP Tosa" ) { |
219 | d->m_model = Model_Zaurus_SL6000; | 219 | d->m_model = Model_Zaurus_SL6000; |
220 | d->m_modelstr = "Zaurus SL-6000"; | 220 | d->m_modelstr = "Zaurus SL-6000"; |
221 | } else if ( model == "SHARP Spitz" ) { | 221 | } else if ( model == "SHARP Spitz" ) { |
222 | d->m_model = Model_Zaurus_SLC3000; | 222 | d->m_model = Model_Zaurus_SLC3000; |
223 | d->m_modelstr = "Zaurus SL-C3000"; | 223 | d->m_modelstr = "Zaurus SL-C3000"; |
224 | } else if ( model == "SHARP Akita" ) { | 224 | } else if ( model == "SHARP Akita" ) { |
225 | d->m_model = Model_Zaurus_SLC1000; | 225 | d->m_model = Model_Zaurus_SLC1000; |
226 | d->m_modelstr = "Zaurus SL-C1000"; | 226 | d->m_modelstr = "Zaurus SL-C1000"; |
227 | } else if ( model == "SHARP Borzoi" ) { | ||
228 | d->m_model = Model_Zaurus_SLC3100; | ||
229 | d->m_modelstr = "Zaurus SL-C3100"; | ||
227 | } else { | 230 | } else { |
228 | d->m_model = Model_Zaurus_SL5500; | 231 | d->m_model = Model_Zaurus_SL5500; |
229 | d->m_modelstr = "Unknown Zaurus"; | 232 | d->m_modelstr = "Unknown Zaurus"; |
230 | } | 233 | } |
231 | 234 | ||
232 | // set path to backlight device in kernel 2.6 | 235 | // set path to backlight device in kernel 2.6 |
233 | switch ( d->m_model ) | 236 | switch ( d->m_model ) |
234 | { | 237 | { |
235 | case Model_Zaurus_SLB600: // fallthrough | 238 | case Model_Zaurus_SLB600: // fallthrough |
236 | case Model_Zaurus_SL5500: | 239 | case Model_Zaurus_SL5500: |
237 | m_backlightdev = "/sys/class/backlight/locomo-backlight/"; | 240 | m_backlightdev = "/sys/class/backlight/locomo-backlight/"; |
238 | break; | 241 | break; |
239 | case Model_Zaurus_SL6000: | 242 | case Model_Zaurus_SL6000: |
240 | m_backlightdev = "/sys/class/backlight/tosa-bl/"; | 243 | m_backlightdev = "/sys/class/backlight/tosa-bl/"; |
241 | break; | 244 | break; |
242 | default: | 245 | default: |
243 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; | 246 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; |
244 | } | 247 | } |
245 | 248 | ||
246 | // set initial rotation | 249 | // set initial rotation |
247 | switch( d->m_model ) | 250 | switch( d->m_model ) |
248 | { | 251 | { |
249 | case Model_Zaurus_SL6000: // fallthrough | 252 | case Model_Zaurus_SL6000: // fallthrough |
250 | case Model_Zaurus_SLA300: | 253 | case Model_Zaurus_SLA300: |
251 | d->m_rotation = Rot0; | 254 | d->m_rotation = Rot0; |
252 | break; | 255 | break; |
256 | case Model_Zaurus_SLC3100: // fallthrough | ||
253 | case Model_Zaurus_SLC3000: // fallthrough | 257 | case Model_Zaurus_SLC3000: // fallthrough |
254 | case Model_Zaurus_SLC1000: // fallthrough | 258 | case Model_Zaurus_SLC1000: // fallthrough |
255 | case Model_Zaurus_SLC7x0: | 259 | case Model_Zaurus_SLC7x0: |
256 | d->m_rotation = rotation(); | 260 | d->m_rotation = rotation(); |
257 | d->m_direction = direction(); | 261 | d->m_direction = direction(); |
258 | break; | 262 | break; |
259 | case Model_Zaurus_SLB600: // fallthrough | 263 | case Model_Zaurus_SLB600: // fallthrough |
260 | case Model_Zaurus_SL5000: // fallthrough | 264 | case Model_Zaurus_SL5000: // fallthrough |
261 | case Model_Zaurus_SL5500: // fallthrough | 265 | case Model_Zaurus_SL5500: // fallthrough |
262 | default: | 266 | default: |
263 | d->m_rotation = Rot270; | 267 | d->m_rotation = Rot270; |
264 | } | 268 | } |
265 | 269 | ||
266 | // set default qte driver | 270 | // set default qte driver |
267 | switch( d->m_model ) | 271 | switch( d->m_model ) |
268 | { | 272 | { |
269 | case Model_Zaurus_SLC7x0: | 273 | case Model_Zaurus_SLC7x0: |
270 | d->m_qteDriver = "W100"; | 274 | d->m_qteDriver = "W100"; |
271 | break; | 275 | break; |
272 | default: | 276 | default: |
273 | d->m_qteDriver = "Transformed"; | 277 | d->m_qteDriver = "Transformed"; |
274 | } | 278 | } |
275 | 279 | ||
276 | m_leds[0] = Led_Off; | 280 | m_leds[0] = Led_Off; |
277 | 281 | ||
278 | if ( m_embedix ) | 282 | if ( m_embedix ) |
279 | qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr ); | 283 | qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr ); |
280 | else | 284 | else |
281 | qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); | 285 | qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); |
282 | } | 286 | } |
283 | 287 | ||
284 | void Zaurus::initButtons() | 288 | void Zaurus::initButtons() |
285 | { | 289 | { |
286 | if ( d->m_buttons ) | 290 | if ( d->m_buttons ) |
287 | return; | 291 | return; |
288 | 292 | ||
289 | d->m_buttons = new QValueList <ODeviceButton>; | 293 | d->m_buttons = new QValueList <ODeviceButton>; |
290 | 294 | ||
291 | struct z_button * pz_buttons; | 295 | struct z_button * pz_buttons; |
292 | int buttoncount; | 296 | int buttoncount; |
293 | switch ( d->m_model ) | 297 | switch ( d->m_model ) |
294 | { | 298 | { |
295 | case Model_Zaurus_SL6000: | 299 | case Model_Zaurus_SL6000: |
296 | pz_buttons = z_buttons_6000; | 300 | pz_buttons = z_buttons_6000; |
297 | buttoncount = ARRAY_SIZE(z_buttons_6000); | 301 | buttoncount = ARRAY_SIZE(z_buttons_6000); |
298 | break; | 302 | break; |
303 | case Model_Zaurus_SLC3100: // fallthrough | ||
299 | case Model_Zaurus_SLC3000: // fallthrough | 304 | case Model_Zaurus_SLC3000: // fallthrough |
300 | case Model_Zaurus_SLC1000: // fallthrough | 305 | case Model_Zaurus_SLC1000: // fallthrough |
301 | case Model_Zaurus_SLC7x0: | 306 | case Model_Zaurus_SLC7x0: |
302 | if ( isQWS( ) ) { | 307 | if ( isQWS( ) ) { |
303 | addPreHandler(this); // hinge-sensor-handler | 308 | addPreHandler(this); // hinge-sensor-handler |
304 | } | 309 | } |
305 | pz_buttons = z_buttons_c700; | 310 | pz_buttons = z_buttons_c700; |
306 | buttoncount = ARRAY_SIZE(z_buttons_c700); | 311 | buttoncount = ARRAY_SIZE(z_buttons_c700); |
307 | break; | 312 | break; |
308 | default: | 313 | default: |
309 | pz_buttons = z_buttons; | 314 | pz_buttons = z_buttons; |
310 | buttoncount = ARRAY_SIZE(z_buttons); | 315 | buttoncount = ARRAY_SIZE(z_buttons); |
311 | break; | 316 | break; |
312 | } | 317 | } |
313 | 318 | ||
314 | for ( int i = 0; i < buttoncount; i++ ) { | 319 | for ( int i = 0; i < buttoncount; i++ ) { |
315 | struct z_button *zb = pz_buttons + i; | 320 | struct z_button *zb = pz_buttons + i; |
316 | ODeviceButton b; | 321 | ODeviceButton b; |
317 | 322 | ||
318 | b.setKeycode( zb->code ); | 323 | b.setKeycode( zb->code ); |
319 | b.setUserText( QObject::tr( "Button", zb->utext )); | 324 | b.setUserText( QObject::tr( "Button", zb->utext )); |
320 | b.setPixmap( OResource::loadPixmap( zb->pix )); | 325 | b.setPixmap( OResource::loadPixmap( zb->pix )); |
321 | b.setFactoryPresetPressedAction( OQCopMessage( makeChannel ( zb->fpressedservice ), zb->fpressedaction )); | 326 | b.setFactoryPresetPressedAction( OQCopMessage( makeChannel ( zb->fpressedservice ), zb->fpressedaction )); |
322 | b.setFactoryPresetHeldAction( OQCopMessage( makeChannel ( zb->fheldservice ), zb->fheldaction )); | 327 | b.setFactoryPresetHeldAction( OQCopMessage( makeChannel ( zb->fheldservice ), zb->fheldaction )); |
323 | d->m_buttons->append( b ); | 328 | d->m_buttons->append( b ); |
324 | } | 329 | } |
325 | 330 | ||
326 | reloadButtonMapping(); | 331 | reloadButtonMapping(); |
327 | } | 332 | } |
328 | 333 | ||
329 | 334 | ||
330 | 335 | ||
331 | typedef struct sharp_led_status { | 336 | typedef struct sharp_led_status { |
332 | int which; /* select which LED status is wanted. */ | 337 | int which; /* select which LED status is wanted. */ |
333 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ | 338 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ |
334 | } sharp_led_status; | 339 | } sharp_led_status; |
335 | 340 | ||
336 | void Zaurus::buzzer( int sound ) | 341 | void Zaurus::buzzer( int sound ) |
337 | { | 342 | { |
338 | #ifndef QT_NO_SOUND | 343 | #ifndef QT_NO_SOUND |
339 | Sound *snd = 0; | 344 | Sound *snd = 0; |
340 | 345 | ||
341 | // All devices except SL5500 have a DSP device | 346 | // All devices except SL5500 have a DSP device |
342 | if ( d->m_model != Model_Zaurus_SL5000 | 347 | if ( d->m_model != Model_Zaurus_SL5000 |
343 | && d->m_model != Model_Zaurus_SL5500 ) { | 348 | && d->m_model != Model_Zaurus_SL5500 ) { |
344 | 349 | ||
345 | switch ( sound ){ | 350 | switch ( sound ){ |
346 | case SHARP_BUZ_TOUCHSOUND: { | 351 | case SHARP_BUZ_TOUCHSOUND: { |
347 | static Sound touch_sound("touchsound"); | 352 | static Sound touch_sound("touchsound"); |
348 | snd = &touch_sound; | 353 | snd = &touch_sound; |
349 | } | 354 | } |
350 | break; | 355 | break; |
351 | case SHARP_BUZ_KEYSOUND: { | 356 | case SHARP_BUZ_KEYSOUND: { |
352 | static Sound key_sound( "keysound" ); | 357 | static Sound key_sound( "keysound" ); |
353 | snd = &key_sound; | 358 | snd = &key_sound; |
354 | } | 359 | } |
355 | break; | 360 | break; |
356 | case SHARP_BUZ_SCHEDULE_ALARM: | 361 | case SHARP_BUZ_SCHEDULE_ALARM: |
357 | default: { | 362 | default: { |
358 | static Sound alarm_sound("alarm"); | 363 | static Sound alarm_sound("alarm"); |
359 | snd = &alarm_sound; | 364 | snd = &alarm_sound; |
360 | } | 365 | } |
361 | break; | 366 | break; |
362 | } | 367 | } |
363 | } | 368 | } |
364 | 369 | ||
365 | // If a soundname is defined, we expect that this device has | 370 | // If a soundname is defined, we expect that this device has |
366 | // sound capabilities.. Otherwise we expect to have the buzzer | 371 | // sound capabilities.. Otherwise we expect to have the buzzer |
367 | // device.. | 372 | // device.. |
368 | if ( snd && snd->isFinished() ){ | 373 | if ( snd && snd->isFinished() ){ |
369 | changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); | 374 | changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); |
370 | snd->play(); | 375 | snd->play(); |
371 | } else if( !snd ) { | 376 | } else if( !snd ) { |
372 | int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); | 377 | int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); |
373 | 378 | ||
374 | if ( fd >= 0 ) { | 379 | if ( fd >= 0 ) { |
375 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); | 380 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); |
376 | ::close ( fd ); | 381 | ::close ( fd ); |
377 | } | 382 | } |
378 | 383 | ||
379 | } | 384 | } |
380 | #endif | 385 | #endif |
381 | } | 386 | } |
382 | 387 | ||
383 | 388 | ||
384 | void Zaurus::playAlarmSound() | 389 | void Zaurus::playAlarmSound() |
385 | { | 390 | { |
386 | buzzer( SHARP_BUZ_SCHEDULE_ALARM ); | 391 | buzzer( SHARP_BUZ_SCHEDULE_ALARM ); |
387 | } | 392 | } |
388 | 393 | ||
389 | void Zaurus::playTouchSound() | 394 | void Zaurus::playTouchSound() |
390 | { | 395 | { |
391 | buzzer( SHARP_BUZ_TOUCHSOUND ); | 396 | buzzer( SHARP_BUZ_TOUCHSOUND ); |
392 | } | 397 | } |
393 | 398 | ||
394 | void Zaurus::playKeySound() | 399 | void Zaurus::playKeySound() |
@@ -456,273 +461,278 @@ bool Zaurus::setLedState( OLed which, OLedState st ) | |||
456 | } | 461 | } |
457 | 462 | ||
458 | int Zaurus::displayBrightnessResolution() const | 463 | int Zaurus::displayBrightnessResolution() const |
459 | { | 464 | { |
460 | int res = 1; | 465 | int res = 1; |
461 | if (m_embedix) | 466 | if (m_embedix) |
462 | { | 467 | { |
463 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_RDWR|O_NONBLOCK ); | 468 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_RDWR|O_NONBLOCK ); |
464 | if ( fd ) | 469 | if ( fd ) |
465 | { | 470 | { |
466 | int value = ::ioctl( fd, SHARP_FL_IOCTL_GET_STEP, 0 ); | 471 | int value = ::ioctl( fd, SHARP_FL_IOCTL_GET_STEP, 0 ); |
467 | ::close( fd ); | 472 | ::close( fd ); |
468 | return value ? value : res; | 473 | return value ? value : res; |
469 | } | 474 | } |
470 | } | 475 | } |
471 | else | 476 | else |
472 | { | 477 | { |
473 | int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK ); | 478 | int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK ); |
474 | if ( fd ) | 479 | if ( fd ) |
475 | { | 480 | { |
476 | char buf[100]; | 481 | char buf[100]; |
477 | if ( ::read( fd, &buf[0], sizeof buf ) ) ::sscanf( &buf[0], "%d", &res ); | 482 | if ( ::read( fd, &buf[0], sizeof buf ) ) ::sscanf( &buf[0], "%d", &res ); |
478 | ::close( fd ); | 483 | ::close( fd ); |
479 | } | 484 | } |
480 | } | 485 | } |
481 | return res; | 486 | return res; |
482 | } | 487 | } |
483 | 488 | ||
484 | bool Zaurus::setDisplayBrightness( int bright ) | 489 | bool Zaurus::setDisplayBrightness( int bright ) |
485 | { | 490 | { |
486 | //qDebug( "Zaurus::setDisplayBrightness( %d )", bright ); | 491 | //qDebug( "Zaurus::setDisplayBrightness( %d )", bright ); |
487 | bool res = false; | 492 | bool res = false; |
488 | 493 | ||
489 | if ( bright > 255 ) bright = 255; | 494 | if ( bright > 255 ) bright = 255; |
490 | if ( bright < 0 ) bright = 0; | 495 | if ( bright < 0 ) bright = 0; |
491 | 496 | ||
492 | int numberOfSteps = displayBrightnessResolution(); | 497 | int numberOfSteps = displayBrightnessResolution(); |
493 | int val = ( bright == 1 ) ? 1 : ( bright * numberOfSteps ) / 255; | 498 | int val = ( bright == 1 ) ? 1 : ( bright * numberOfSteps ) / 255; |
494 | 499 | ||
495 | if ( m_embedix ) | 500 | if ( m_embedix ) |
496 | { | 501 | { |
497 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); | 502 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); |
498 | if ( fd ) | 503 | if ( fd ) |
499 | { | 504 | { |
500 | res = ( ::ioctl( fd, SHARP_FL_IOCTL_STEP_CONTRAST, val ) == 0 ); | 505 | res = ( ::ioctl( fd, SHARP_FL_IOCTL_STEP_CONTRAST, val ) == 0 ); |
501 | ::close( fd ); | 506 | ::close( fd ); |
502 | } | 507 | } |
503 | } | 508 | } |
504 | else | 509 | else |
505 | { | 510 | { |
506 | int fd = ::open( m_backlightdev + "brightness", O_WRONLY|O_NONBLOCK ); | 511 | int fd = ::open( m_backlightdev + "brightness", O_WRONLY|O_NONBLOCK ); |
507 | if ( fd ) | 512 | if ( fd ) |
508 | { | 513 | { |
509 | char buf[100]; | 514 | char buf[100]; |
510 | int len = ::snprintf( &buf[0], sizeof buf, "%d", val ); | 515 | int len = ::snprintf( &buf[0], sizeof buf, "%d", val ); |
511 | res = ( ::write( fd, &buf[0], len ) == 0 ); | 516 | res = ( ::write( fd, &buf[0], len ) == 0 ); |
512 | ::close( fd ); | 517 | ::close( fd ); |
513 | } | 518 | } |
514 | } | 519 | } |
515 | return res; | 520 | return res; |
516 | } | 521 | } |
517 | 522 | ||
518 | bool Zaurus::setDisplayStatus( bool on ) | 523 | bool Zaurus::setDisplayStatus( bool on ) |
519 | { | 524 | { |
520 | bool res = false; | 525 | bool res = false; |
521 | if ( m_embedix ) | 526 | if ( m_embedix ) |
522 | { | 527 | { |
523 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); | 528 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); |
524 | if ( fd ) | 529 | if ( fd ) |
525 | { | 530 | { |
526 | int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF; | 531 | int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF; |
527 | res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 ); | 532 | res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 ); |
528 | ::close ( fd ); | 533 | ::close ( fd ); |
529 | } | 534 | } |
530 | } | 535 | } |
531 | else | 536 | else |
532 | { | 537 | { |
533 | int fd = ::open( m_backlightdev + "power", O_WRONLY|O_NONBLOCK ); | 538 | int fd = ::open( m_backlightdev + "power", O_WRONLY|O_NONBLOCK ); |
534 | if ( fd ) | 539 | if ( fd ) |
535 | { | 540 | { |
536 | char buf[10]; | 541 | char buf[10]; |
537 | buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; | 542 | buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; |
538 | buf[1] = '\0'; | 543 | buf[1] = '\0'; |
539 | res = ( ::write( fd, &buf[0], 2 ) == 0 ); | 544 | res = ( ::write( fd, &buf[0], 2 ) == 0 ); |
540 | ::close( fd ); | 545 | ::close( fd ); |
541 | } | 546 | } |
542 | } | 547 | } |
543 | return res; | 548 | return res; |
544 | } | 549 | } |
545 | 550 | ||
546 | Transformation Zaurus::rotation() const | 551 | Transformation Zaurus::rotation() const |
547 | { | 552 | { |
548 | qDebug( "Zaurus::rotation()" ); | 553 | qDebug( "Zaurus::rotation()" ); |
549 | Transformation rot; | 554 | Transformation rot; |
550 | 555 | ||
551 | switch ( d->m_model ) { | 556 | switch ( d->m_model ) { |
557 | case Model_Zaurus_SLC3100: // fallthrough | ||
552 | case Model_Zaurus_SLC3000: // fallthrough | 558 | case Model_Zaurus_SLC3000: // fallthrough |
553 | case Model_Zaurus_SLC1000: | 559 | case Model_Zaurus_SLC1000: |
554 | { | 560 | { |
555 | OHingeStatus hs = readHingeSensor(); | 561 | OHingeStatus hs = readHingeSensor(); |
556 | qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); | 562 | qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); |
557 | if ( hs == CASE_PORTRAIT ) rot = Rot0; | 563 | if ( hs == CASE_PORTRAIT ) rot = Rot0; |
558 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; | 564 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; |
559 | else rot = Rot270; | 565 | else rot = Rot270; |
560 | } | 566 | } |
561 | break; | 567 | break; |
562 | 568 | ||
563 | // SLC7x0 needs a special case here, because we were able to set the W100 | 569 | // SLC7x0 needs a special case here, because we were able to set the W100 |
564 | // hardware default rotation on kernel 2.6 to Rot0 | 570 | // hardware default rotation on kernel 2.6 to Rot0 |
565 | case Model_Zaurus_SLC7x0: | 571 | case Model_Zaurus_SLC7x0: |
566 | { | 572 | { |
567 | OHingeStatus hs = readHingeSensor(); | 573 | OHingeStatus hs = readHingeSensor(); |
568 | qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); | 574 | qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); |
569 | 575 | ||
570 | if ( m_embedix ) | 576 | if ( m_embedix ) |
571 | { | 577 | { |
572 | if ( hs == CASE_PORTRAIT ) rot = Rot0; | 578 | if ( hs == CASE_PORTRAIT ) rot = Rot0; |
573 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; | 579 | else if ( hs == CASE_UNKNOWN ) rot = Rot270; |
574 | else rot = Rot270; | 580 | else rot = Rot270; |
575 | } | 581 | } |
576 | else | 582 | else |
577 | { | 583 | { |
578 | if ( hs == CASE_PORTRAIT ) rot = Rot90; | 584 | if ( hs == CASE_PORTRAIT ) rot = Rot90; |
579 | else if ( hs == CASE_UNKNOWN ) rot = Rot0; | 585 | else if ( hs == CASE_UNKNOWN ) rot = Rot0; |
580 | else rot = Rot0; | 586 | else rot = Rot0; |
581 | } | 587 | } |
582 | } | 588 | } |
583 | break; | 589 | break; |
584 | case Model_Zaurus_SL6000: | 590 | case Model_Zaurus_SL6000: |
585 | case Model_Zaurus_SLB600: | 591 | case Model_Zaurus_SLB600: |
586 | case Model_Zaurus_SLA300: | 592 | case Model_Zaurus_SLA300: |
587 | case Model_Zaurus_SL5500: | 593 | case Model_Zaurus_SL5500: |
588 | case Model_Zaurus_SL5000: | 594 | case Model_Zaurus_SL5000: |
589 | default: | 595 | default: |
590 | rot = d->m_rotation; | 596 | rot = d->m_rotation; |
591 | break; | 597 | break; |
592 | } | 598 | } |
593 | 599 | ||
594 | return rot; | 600 | return rot; |
595 | } | 601 | } |
596 | ODirection Zaurus::direction() const | 602 | ODirection Zaurus::direction() const |
597 | { | 603 | { |
598 | ODirection dir; | 604 | ODirection dir; |
599 | 605 | ||
600 | switch ( d->m_model ) { | 606 | switch ( d->m_model ) { |
607 | case Model_Zaurus_SLC3100: // fallthrough | ||
601 | case Model_Zaurus_SLC3000: // fallthrough | 608 | case Model_Zaurus_SLC3000: // fallthrough |
602 | case Model_Zaurus_SLC1000: // fallthrough | 609 | case Model_Zaurus_SLC1000: // fallthrough |
603 | case Model_Zaurus_SLC7x0: { | 610 | case Model_Zaurus_SLC7x0: { |
604 | OHingeStatus hs = readHingeSensor(); | 611 | OHingeStatus hs = readHingeSensor(); |
605 | if ( hs == CASE_PORTRAIT ) dir = CCW; | 612 | if ( hs == CASE_PORTRAIT ) dir = CCW; |
606 | else if ( hs == CASE_UNKNOWN ) dir = CCW; | 613 | else if ( hs == CASE_UNKNOWN ) dir = CCW; |
607 | else dir = CW; | 614 | else dir = CW; |
608 | } | 615 | } |
609 | break; | 616 | break; |
610 | case Model_Zaurus_SL6000: | 617 | case Model_Zaurus_SL6000: |
611 | case Model_Zaurus_SLA300: | 618 | case Model_Zaurus_SLA300: |
612 | case Model_Zaurus_SLB600: | 619 | case Model_Zaurus_SLB600: |
613 | case Model_Zaurus_SL5500: | 620 | case Model_Zaurus_SL5500: |
614 | case Model_Zaurus_SL5000: | 621 | case Model_Zaurus_SL5000: |
615 | default: dir = d->m_direction; | 622 | default: dir = d->m_direction; |
616 | break; | 623 | break; |
617 | } | 624 | } |
618 | return dir; | 625 | return dir; |
619 | 626 | ||
620 | } | 627 | } |
621 | 628 | ||
622 | bool Zaurus::hasHingeSensor() const | 629 | bool Zaurus::hasHingeSensor() const |
623 | { | 630 | { |
624 | return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000 || d->m_model == Model_Zaurus_SLC1000; | 631 | return d->m_model == Model_Zaurus_SLC7x0 || |
632 | d->m_model == Model_Zaurus_SLC3100 || | ||
633 | d->m_model == Model_Zaurus_SLC3000 || | ||
634 | d->m_model == Model_Zaurus_SLC1000; | ||
625 | } | 635 | } |
626 | 636 | ||
627 | OHingeStatus Zaurus::readHingeSensor() const | 637 | OHingeStatus Zaurus::readHingeSensor() const |
628 | { | 638 | { |
629 | if (m_embedix) | 639 | if (m_embedix) |
630 | { | 640 | { |
631 | int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); | 641 | int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); |
632 | if (handle == -1) | 642 | if (handle == -1) |
633 | { | 643 | { |
634 | qWarning("Zaurus::readHingeSensor() - failed (%s)", "unknown reason" ); //FIXME: use strerror | 644 | qWarning("Zaurus::readHingeSensor() - failed (%s)", "unknown reason" ); //FIXME: use strerror |
635 | return CASE_UNKNOWN; | 645 | return CASE_UNKNOWN; |
636 | } | 646 | } |
637 | else | 647 | else |
638 | { | 648 | { |
639 | int retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); | 649 | int retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); |
640 | ::close (handle); | 650 | ::close (handle); |
641 | if ( retval == CASE_CLOSED || retval == CASE_PORTRAIT || retval == CASE_LANDSCAPE ) | 651 | if ( retval == CASE_CLOSED || retval == CASE_PORTRAIT || retval == CASE_LANDSCAPE ) |
642 | { | 652 | { |
643 | qDebug( "Zaurus::readHingeSensor() - result = %d", retval ); | 653 | qDebug( "Zaurus::readHingeSensor() - result = %d", retval ); |
644 | return static_cast<OHingeStatus>( retval ); | 654 | return static_cast<OHingeStatus>( retval ); |
645 | } | 655 | } |
646 | else | 656 | else |
647 | { | 657 | { |
648 | qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); | 658 | qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); |
649 | return CASE_UNKNOWN; | 659 | return CASE_UNKNOWN; |
650 | } | 660 | } |
651 | } | 661 | } |
652 | } | 662 | } |
653 | else | 663 | else |
654 | { | 664 | { |
655 | // corgi keyboard is event source 0 in OZ kernel 2.6 | 665 | // corgi keyboard is event source 0 in OZ kernel 2.6 |
656 | OInputDevice* keyboard = OInputSystem::instance()->device( "event0" ); | 666 | OInputDevice* keyboard = OInputSystem::instance()->device( "event0" ); |
657 | if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP0 ) ) return CASE_LANDSCAPE; | 667 | if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP0 ) ) return CASE_LANDSCAPE; |
658 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT; | 668 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT; |
659 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED; | 669 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED; |
660 | qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); | 670 | qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); |
661 | return CASE_UNKNOWN; | 671 | return CASE_UNKNOWN; |
662 | } | 672 | } |
663 | } | 673 | } |
664 | 674 | ||
665 | /* | 675 | /* |
666 | * Take code from iPAQ device. | 676 | * Take code from iPAQ device. |
667 | * That way we switch the cursor directions depending on status of hinge sensor, eg. hardware direction. | 677 | * That way we switch the cursor directions depending on status of hinge sensor, eg. hardware direction. |
668 | * I hope that is ok - Alwin | 678 | * I hope that is ok - Alwin |
669 | */ | 679 | */ |
670 | bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 680 | bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
671 | { | 681 | { |
672 | int newkeycode = keycode; | 682 | int newkeycode = keycode; |
673 | 683 | ||
674 | if (d->m_model != Model_Zaurus_SLC7x0 && d->m_model != Model_Zaurus_SLC3000 && d->m_model != Model_Zaurus_SLC1000) return false; | 684 | if ( !hasHingeSensor() ) return false; |
675 | 685 | ||
676 | /* map cursor keys depending on the hinge status */ | 686 | /* map cursor keys depending on the hinge status */ |
677 | switch ( keycode ) { | 687 | switch ( keycode ) { |
678 | // Rotate cursor keys | 688 | // Rotate cursor keys |
679 | case Key_Left : | 689 | case Key_Left : |
680 | case Key_Right: | 690 | case Key_Right: |
681 | case Key_Up : | 691 | case Key_Up : |
682 | case Key_Down : | 692 | case Key_Down : |
683 | { | 693 | { |
684 | if (rotation()==Rot90) { | 694 | if (rotation()==Rot90) { |
685 | newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; | 695 | newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; |
686 | } | 696 | } |
687 | } | 697 | } |
688 | break; | 698 | break; |
689 | 699 | ||
690 | } | 700 | } |
691 | if (newkeycode!=keycode) { | 701 | if (newkeycode!=keycode) { |
692 | if ( newkeycode != Key_unknown ) { | 702 | if ( newkeycode != Key_unknown ) { |
693 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); | 703 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); |
694 | } | 704 | } |
695 | return true; | 705 | return true; |
696 | } | 706 | } |
697 | return false; | 707 | return false; |
698 | } | 708 | } |
699 | 709 | ||
700 | bool Zaurus::suspend() { | 710 | bool Zaurus::suspend() { |
701 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 711 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
702 | return false; | 712 | return false; |
703 | 713 | ||
704 | bool res = false; | 714 | bool res = false; |
705 | QCopEnvelope( "QPE/System", "aboutToSuspend()" ); | 715 | QCopEnvelope( "QPE/System", "aboutToSuspend()" ); |
706 | 716 | ||
707 | struct timeval tvs, tvn; | 717 | struct timeval tvs, tvn; |
708 | ::gettimeofday ( &tvs, 0 ); | 718 | ::gettimeofday ( &tvs, 0 ); |
709 | 719 | ||
710 | ::sync(); // flush fs caches | 720 | ::sync(); // flush fs caches |
711 | res = ( ::system ( "apm --suspend" ) == 0 ); | 721 | res = ( ::system ( "apm --suspend" ) == 0 ); |
712 | 722 | ||
713 | // This is needed because some apm implementations are asynchronous and we | 723 | // This is needed because some apm implementations are asynchronous and we |
714 | // can not be sure when exactly the device is really suspended | 724 | // can not be sure when exactly the device is really suspended |
715 | // This can be deleted as soon as a stable familiar with a synchronous apm implementation exists. | 725 | // This can be deleted as soon as a stable familiar with a synchronous apm implementation exists. |
716 | // on non embedix eg. 2.6 kernel line apm is synchronous so we don't need it here. | 726 | // on non embedix eg. 2.6 kernel line apm is synchronous so we don't need it here. |
717 | 727 | ||
718 | if ( res && m_embedix) { | 728 | if ( res && m_embedix) { |
719 | do { // wait at most 1.5 sec: either suspend didn't work or the device resumed | 729 | do { // wait at most 1.5 sec: either suspend didn't work or the device resumed |
720 | ::usleep ( 200 * 1000 ); | 730 | ::usleep ( 200 * 1000 ); |
721 | ::gettimeofday ( &tvn, 0 ); | 731 | ::gettimeofday ( &tvn, 0 ); |
722 | } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); | 732 | } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); |
723 | } | 733 | } |
724 | 734 | ||
725 | QCopEnvelope( "QPE/System", "returnFromSuspend()" ); | 735 | QCopEnvelope( "QPE/System", "returnFromSuspend()" ); |
726 | 736 | ||
727 | return res; | 737 | return res; |
728 | } | 738 | } |
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 4314aff..677e29f 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -1,100 +1,100 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; version 2 of the License. | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
12 | ._= =} : | 12 | ._= =} : |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
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 <qwindowsystem_qws.h> | 36 | #include <qwindowsystem_qws.h> |
37 | 37 | ||
38 | #ifndef ARRAY_SIZE | 38 | #ifndef ARRAY_SIZE |
39 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 39 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | // _IO and friends are only defined in kernel headers ... | 42 | // _IO and friends are only defined in kernel headers ... |
43 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 43 | #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) | 44 | #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)) | 45 | #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)) | 46 | #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)) | 47 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
48 | 48 | ||
49 | // Audio | 49 | // Audio |
50 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | 50 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 |
51 | 51 | ||
52 | #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 52 | #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
53 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 53 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
54 | 54 | ||
55 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 55 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
56 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 56 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
57 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 57 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
58 | 58 | ||
59 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | 59 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) |
60 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | 60 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) |
61 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | 61 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) |
62 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | 62 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) |
63 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | 63 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) |
64 | 64 | ||
65 | // LED | 65 | // LED |
66 | #define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 66 | #define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
67 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) | 67 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) |
68 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ | 68 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ |
69 | 69 | ||
70 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ | 70 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ |
71 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ | 71 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ |
72 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ | 72 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ |
73 | 73 | ||
74 | // Rotation and Power Management | 74 | // Rotation and Power Management |
75 | #define SHARP_IOCTL_GET_ROTATION 0x413c | 75 | #define SHARP_IOCTL_GET_ROTATION 0x413c |
76 | 76 | ||
77 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | 77 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) |
78 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | 78 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) |
79 | #define APM_EVT_POWER_BUTTON (1 << 0) | 79 | #define APM_EVT_POWER_BUTTON (1 << 0) |
80 | 80 | ||
81 | // Brightness Embedix | 81 | // Brightness Embedix |
82 | #define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" | 82 | #define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" |
83 | #define SHARP_FL_IOCTL_ON 1 | 83 | #define SHARP_FL_IOCTL_ON 1 |
84 | #define SHARP_FL_IOCTL_OFF 2 | 84 | #define SHARP_FL_IOCTL_OFF 2 |
85 | #define SHARP_FL_IOCTL_STEP_CONTRAST 100 | 85 | #define SHARP_FL_IOCTL_STEP_CONTRAST 100 |
86 | #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 | 86 | #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 |
87 | #define SHARP_FL_IOCTL_GET_STEP 102 | 87 | #define SHARP_FL_IOCTL_GET_STEP 102 |
88 | 88 | ||
89 | // Vesa Standard | 89 | // Vesa Standard |
90 | #define FB_BLANK_UNBLANK 0 | 90 | #define FB_BLANK_UNBLANK 0 |
91 | #define FB_BLANK_POWERDOWN 4 | 91 | #define FB_BLANK_POWERDOWN 4 |
92 | 92 | ||
93 | namespace Opie { | 93 | namespace Opie { |
94 | namespace Core { | 94 | namespace Core { |
95 | namespace Internal { | 95 | namespace Internal { |
96 | 96 | ||
97 | class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter | 97 | class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter |
98 | { | 98 | { |
99 | protected: | 99 | protected: |
100 | virtual void init(const QString&); | 100 | virtual void init(const QString&); |