summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.h1
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp53
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h42
3 files changed, 52 insertions, 44 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index e7cd82a..5db43ff 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -81,8 +81,9 @@ enum OModel {
81 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), 81 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
82 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x000005 ), 82 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x000005 ),
83 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x000006 ), 83 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x000006 ),
84 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x000007 ), 84 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x000007 ),
85 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x000008 ),
85 86
86 Model_SIMpad = ( 3 << 24 ), 87 Model_SIMpad = ( 3 << 24 ),
87 88
88 Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), 89 Model_SIMpad_All = ( Model_SIMpad | 0xffffff ),
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 8aefc13..3bd7f6e 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -1,28 +1,28 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002,2003,2004 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 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*/
@@ -198,8 +198,11 @@ void Zaurus::init(const QString& cpu_info)
198 d->m_modelstr = "Zaurus SL-6000"; 198 d->m_modelstr = "Zaurus SL-6000";
199 } else if ( model == "SHARP Spitz" ) { 199 } else if ( model == "SHARP Spitz" ) {
200 d->m_model = Model_Zaurus_SLC3000; 200 d->m_model = Model_Zaurus_SLC3000;
201 d->m_modelstr = "Zaurus SL-C3000"; 201 d->m_modelstr = "Zaurus SL-C3000";
202 } else if ( model == "SHARP Akita" ) {
203 d->m_model = Model_Zaurus_SLC1000;
204 d->m_modelstr = "Zaurus SL-C1000";
202 } else { 205 } else {
203 d->m_model = Model_Zaurus_SL5500; 206 d->m_model = Model_Zaurus_SL5500;
204 d->m_modelstr = "Unknown Zaurus"; 207 d->m_modelstr = "Unknown Zaurus";
205 } 208 }
@@ -210,8 +213,9 @@ void Zaurus::init(const QString& cpu_info)
210 case Model_Zaurus_SLA300: 213 case Model_Zaurus_SLA300:
211 d->m_rotation = Rot0; 214 d->m_rotation = Rot0;
212 break; 215 break;
213 case Model_Zaurus_SLC3000: // fallthrough 216 case Model_Zaurus_SLC3000: // fallthrough
217 case Model_Zaurus_SLC1000: // fallthrough
214 case Model_Zaurus_SLC7x0: 218 case Model_Zaurus_SLC7x0:
215 d->m_rotation = rotation(); 219 d->m_rotation = rotation();
216 d->m_direction = direction(); 220 d->m_direction = direction();
217 break; 221 break;
@@ -241,8 +245,9 @@ void Zaurus::initButtons()
241 struct z_button * pz_buttons; 245 struct z_button * pz_buttons;
242 int buttoncount; 246 int buttoncount;
243 switch ( d->m_model ) { 247 switch ( d->m_model ) {
244 case Model_Zaurus_SLC3000: // fallthrough 248 case Model_Zaurus_SLC3000: // fallthrough
249 case Model_Zaurus_SLC1000: // fallthrough
245 case Model_Zaurus_SLC7x0: 250 case Model_Zaurus_SLC7x0:
246 if ( isQWS( ) ) { 251 if ( isQWS( ) ) {
247 addPreHandler(this); // hinge-sensor-handler 252 addPreHandler(this); // hinge-sensor-handler
248 } 253 }
@@ -493,8 +498,9 @@ Transformation Zaurus::rotation() const
493 Transformation rot; 498 Transformation rot;
494 499
495 switch ( d->m_model ) { 500 switch ( d->m_model ) {
496 case Model_Zaurus_SLC3000: // fallthrough 501 case Model_Zaurus_SLC3000: // fallthrough
502 case Model_Zaurus_SLC1000: // fallthrough
497 case Model_Zaurus_SLC7x0: 503 case Model_Zaurus_SLC7x0:
498 { 504 {
499 OHingeStatus hs = readHingeSensor(); 505 OHingeStatus hs = readHingeSensor();
500 qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); 506 qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs );
@@ -530,8 +536,9 @@ ODirection Zaurus::direction() const
530 ODirection dir; 536 ODirection dir;
531 537
532 switch ( d->m_model ) { 538 switch ( d->m_model ) {
533 case Model_Zaurus_SLC3000: // fallthrough 539 case Model_Zaurus_SLC3000: // fallthrough
540 case Model_Zaurus_SLC1000: // fallthrough
534 case Model_Zaurus_SLC7x0: { 541 case Model_Zaurus_SLC7x0: {
535 OHingeStatus hs = readHingeSensor(); 542 OHingeStatus hs = readHingeSensor();
536 if ( hs == CASE_PORTRAIT ) dir = CCW; 543 if ( hs == CASE_PORTRAIT ) dir = CCW;
537 else if ( hs == CASE_UNKNOWN ) dir = CCW; 544 else if ( hs == CASE_UNKNOWN ) dir = CCW;
@@ -551,9 +558,9 @@ ODirection Zaurus::direction() const
551} 558}
552 559
553bool Zaurus::hasHingeSensor() const 560bool Zaurus::hasHingeSensor() const
554{ 561{
555 return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000; 562 return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000 || d->m_model == Model_Zaurus_SLC1000;
556} 563}
557 564
558OHingeStatus Zaurus::readHingeSensor() const 565OHingeStatus Zaurus::readHingeSensor() const
559{ 566{
@@ -601,9 +608,9 @@ OHingeStatus Zaurus::readHingeSensor() const
601bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 608bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
602{ 609{
603 int newkeycode = keycode; 610 int newkeycode = keycode;
604 611
605 if (d->m_model!=Model_Zaurus_SLC3000 && d->m_model!=Model_Zaurus_SLC7x0) return false; 612 if (d->m_model != Model_Zaurus_SLC7x0 && d->m_model != Model_Zaurus_SLC3000 && d->m_model != Model_Zaurus_SLC1000) return false;
606 613
607 /* map cursor keys depending on the hinge status */ 614 /* map cursor keys depending on the hinge status */
608 switch ( keycode ) { 615 switch ( keycode ) {
609 // Rotate cursor keys 616 // Rotate cursor keys
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index 4548e35..4250356 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -1,28 +1,28 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002,2003,2004 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 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*/