summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device
authoralwin <alwin>2004-08-01 10:32:56 (UTC)
committer alwin <alwin>2004-08-01 10:32:56 (UTC)
commit142d432ef9f8215636a81c358c828d4b6986a6ad (patch) (unidiff)
treefaf33f40f3e19fdd0362256c61e6774ea949f70c /libopie2/opiecore/device
parent24c8aff75cbb41ccb2acf3de79675c2f4fd7ecc9 (diff)
downloadopie-142d432ef9f8215636a81c358c828d4b6986a6ad.zip
opie-142d432ef9f8215636a81c358c828d4b6986a6ad.tar.gz
opie-142d432ef9f8215636a81c358c828d4b6986a6ad.tar.bz2
added a keyfilter singleton. All OPIE apps should use that instead of
the base from qte 'cause there are some stupids in handling pointers. key handlers from odevice-classes will handled at top of all others iPAQ and SIMPad are switched to that filter queue.
Diffstat (limited to 'libopie2/opiecore/device') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp53
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp50
2 files changed, 55 insertions, 48 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 16c0538..791e409 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -1,25 +1,25 @@
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,
@@ -42,2 +42,3 @@
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43#include <opie2/okeyfilter.h>
43 44
@@ -169,4 +170,6 @@ void iPAQ::initButtons()
169 170
170 if ( isQWS( ) ) 171 if ( isQWS( ) ) {
171 QWSServer::setKeyboardFilter ( this ); 172 Opie::Core::OKeyFilter::inst()->addPreHandler(this);
173 //QWSServer::setKeyboardFilter ( this );
174 }
172 175
@@ -273,3 +276,3 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b
273 276
274 // Rotate cursor keys 180° or 270° 277 // Rotate cursor keys 180 or 270
275 case Key_Left : 278 case Key_Left :
@@ -282,3 +285,3 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b
282 } 285 }
283 // Rotate the cursor keys by 270° 286 // Rotate the cursor keys by 270
284 // keycode - Key_Left = position of the button starting from left clockwise 287 // keycode - Key_Left = position of the button starting from left clockwise
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index e62ea18..6c3253c 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -1,25 +1,25 @@
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,
@@ -42,2 +42,3 @@
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43#include <opie2/okeyfilter.h>
43 44
@@ -147,4 +148,7 @@ void SIMpad::initButtons()
147 148
148 if ( isQWS( ) ) 149 if ( isQWS( ) ) {
149 QWSServer::setKeyboardFilter ( this ); 150 Opie::Core::OKeyFilter::inst()->addPreHandler(this);
151// QWSServer::setKeyboardFilter ( this );
152 }
153
150 154