summaryrefslogtreecommitdiff
path: root/inputmethods/kjumpx
Unidiff
Diffstat (limited to 'inputmethods/kjumpx') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/kjumpx/config.in2
-rw-r--r--inputmethods/kjumpx/keyboard.cpp60
-rw-r--r--inputmethods/kjumpx/kjumpx.pro2
-rw-r--r--inputmethods/kjumpx/opie-kjumpx.control2
4 files changed, 33 insertions, 33 deletions
diff --git a/inputmethods/kjumpx/config.in b/inputmethods/kjumpx/config.in
index 8ccef5b..0c4e9d4 100644
--- a/inputmethods/kjumpx/config.in
+++ b/inputmethods/kjumpx/config.in
@@ -1,4 +1,4 @@
1 config KJUMPX 1 config KJUMPX
2 boolean "opie-kjumpx (korean keyboard optimized for single finger/stylus input)" 2 boolean "opie-kjumpx (korean keyboard optimized for single finger/stylus input)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/inputmethods/kjumpx/keyboard.cpp b/inputmethods/kjumpx/keyboard.cpp
index dc44805..4e99f40 100644
--- a/inputmethods/kjumpx/keyboard.cpp
+++ b/inputmethods/kjumpx/keyboard.cpp
@@ -2,25 +2,25 @@
2** 2**
3** This file may be distributed and/or modified under the terms of the 3** This file may be distributed and/or modified under the terms of the
4** GNU General Public License version 2 as published by the Free Software 4** GNU General Public License version 2 as published by the Free Software
5** Foundation and appearing in the file LICENSE.GPL included in the 5** Foundation and appearing in the file LICENSE.GPL included in the
6** packaging of this file. 6** packaging of this file.
7** 7**
8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10** 10**
11*********************************************************************************************/ 11*********************************************************************************************/
12#include "keyboard.h" 12#include "keyboard.h"
13 13
14#include <qpe/resource.h> 14#include <opie2/oresource.h>
15 15
16//#include <iostream.h> 16//#include <iostream.h>
17 17
18 18
19static const int autorepeatDelaytime = 500; // ms 19static const int autorepeatDelaytime = 500; // ms
20static const int autorepeatRate = 20; // chars per second 20static const int autorepeatRate = 20; // chars per second
21 21
22static const int mod1x1 = 0; 22static const int mod1x1 = 0;
23static const int mod1x2 = 23; 23static const int mod1x2 = 23;
24static const int mod1w = mod1x2 - mod1x1; 24static const int mod1w = mod1x2 - mod1x1;
25 25
26static const int letterx1 = 27; 26static const int letterx1 = 27;
@@ -144,43 +144,43 @@ using namespace KJumpX;
144 144
145Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : 145Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) :
146 QFrame(parent, name, f), 146 QFrame(parent, name, f),
147 shift(0), paren(0), ctrl(0), alt(0), lang(1), lastKey(0), 147 shift(0), paren(0), ctrl(0), alt(0), lang(1), lastKey(0),
148 pressedKeyUnicode(0), pressedKeyQcode(0), pressedMod(0), 148 pressedKeyUnicode(0), pressedKeyQcode(0), pressedMod(0),
149 isnoncont(false), 149 isnoncont(false),
150 slideKeyUnicodeH(0), slideKeyQcodeH(0), slideKeyUnicodeV(0), slideKeyQcodeV(0), 150 slideKeyUnicodeH(0), slideKeyQcodeH(0), slideKeyUnicodeV(0), slideKeyQcodeV(0),
151 enableMouseTracking(false), slidePix(NULL), slidePixH(NULL), slidePixV(NULL), 151 enableMouseTracking(false), slidePix(NULL), slidePixH(NULL), slidePixV(NULL),
152 releasedPix(NULL), pressedPix(NULL) 152 releasedPix(NULL), pressedPix(NULL)
153{ 153{
154 //setPalette(QPalette(QColor(240,240,230))); // Beige! 154 //setPalette(QPalette(QColor(240,240,230))); // Beige!
155 155
156 releasedPlain = releasedShift = releasedParen = Resource::loadPixmap("kjumpx/released"); 156 releasedPlain = releasedShift = releasedParen = Opie::Core::OResource::loadPixmap("kjumpx/released");
157 pressedPlain = pressedShift = pressedParen = Resource::loadPixmap("kjumpx/pressed"); 157 pressedPlain = pressedShift = pressedParen = Opie::Core::OResource::loadPixmap("kjumpx/pressed");
158 pressedDigit = Resource::loadPixmap("kjumpx/pressed"); 158 pressedDigit = Opie::Core::OResource::loadPixmap("kjumpx/pressed");
159 159
160 QPixmap tmp; 160 QPixmap tmp;
161 161
162 tmp = Resource::loadPixmap("kjumpx/releasedShift"); 162 tmp = Opie::Core::OResource::loadPixmap("kjumpx/releasedShift");
163 bitBlt(&releasedShift, letterx1, 0, &tmp); 163 bitBlt(&releasedShift, letterx1, 0, &tmp);
164 164
165 tmp = Resource::loadPixmap("kjumpx/releasedParen"); 165 tmp = Opie::Core::OResource::loadPixmap("kjumpx/releasedParen");
166 bitBlt(&releasedParen, specialx1, 0, &tmp); 166 bitBlt(&releasedParen, specialx1, 0, &tmp);
167 167
168 tmp = Resource::loadPixmap("kjumpx/pressedShift"); 168 tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedShift");
169 bitBlt(&pressedShift, letterx1, 0, &tmp); 169 bitBlt(&pressedShift, letterx1, 0, &tmp);
170 170
171 tmp = Resource::loadPixmap("kjumpx/pressedParen"); 171 tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedParen");
172 bitBlt(&pressedParen, specialx1, 0, &tmp); 172 bitBlt(&pressedParen, specialx1, 0, &tmp);
173 173
174 tmp = Resource::loadPixmap("kjumpx/pressedDigit"); 174 tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedDigit");
175 bitBlt(&pressedDigit, specialx1, 0, &tmp); 175 bitBlt(&pressedDigit, specialx1, 0, &tmp);
176 176
177 offscreen = QPixmap( releasedPlain ); 177 offscreen = QPixmap( releasedPlain );
178 178
179 releasedPix = &releasedPlain; 179 releasedPix = &releasedPlain;
180 pressedPix = &pressedPlain; 180 pressedPix = &pressedPlain;
181 slidePix = &pressedPlain; 181 slidePix = &pressedPlain;
182 182
183 delayTimer = new QTimer(this); 183 delayTimer = new QTimer(this);
184 rateTimer = new QTimer(this); 184 rateTimer = new QTimer(this);
185 connect( delayTimer, SIGNAL( timeout() ), this, SLOT( delayTimerDone() ) ); 185 connect( delayTimer, SIGNAL( timeout() ), this, SLOT( delayTimerDone() ) );
186 connect( rateTimer, SIGNAL( timeout() ), this, SLOT( rateTimerDone() ) ); 186 connect( rateTimer, SIGNAL( timeout() ), this, SLOT( rateTimerDone() ) );
@@ -555,27 +555,27 @@ void Keyboard::resetState()
555 * one major problem with this implementation is that you can't move the 555 * one major problem with this implementation is that you can't move the
556 * cursor after inputing korean chars, otherwise it will eat up and replace 556 * cursor after inputing korean chars, otherwise it will eat up and replace
557 * the char before the cursor you move to. fix that 557 * the char before the cursor you move to. fix that
558 * 558 *
559 * make a kor/eng swaping key 559 * make a kor/eng swaping key
560 * 560 *
561 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 561 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
562 * 562 *
563 * how korean input works 563 * how korean input works
564 * 564 *
565 * all following chars means unicode char value and are in hex 565 * all following chars means unicode char value and are in hex
566 * 566 *
567 * ÃÊÀ½ = schar (start char) 567 * �= = schar (start char)
568 * ÁßÀ½ = mchar (middle char) 568 * �= = mchar (middle char)
569 * ³¡À½ = echar (end char) 569 * = = echar (end char)
570 * 570 *
571 * there are 19 schars. unicode position is at 1100 - 1112 571 * there are 19 schars. unicode position is at 1100 - 1112
572 * there are 21 mchars. unicode position is at 1161 - 1175 572 * there are 21 mchars. unicode position is at 1161 - 1175
573 * there are 27 echars. unicode position is at 11a8 - 11c2 573 * there are 27 echars. unicode position is at 11a8 - 11c2
574 * 574 *
575 * the map with everything combined is at ac00 - d7a3 575 * the map with everything combined is at ac00 - d7a3
576 * 576 *
577 * to find a combination of schar + mchar in the map, lookup 577 * to find a combination of schar + mchar in the map, lookup
578 * ((schar - 0x1100) * 587) + ((mchar - 0x1161) * 27) + (echar - 0x11a8) + 0xac00) 578 * ((schar - 0x1100) * 587) + ((mchar - 0x1161) * 27) + (echar - 0x11a8) + 0xac00)
579 * 579 *
580 */ 580 */
581 581
@@ -601,67 +601,67 @@ QChar Keyboard::parseKoreanInput (ushort c) {
601 601
602 if (echar == 0) { 602 if (echar == 0) {
603 603
604 if (!(echar = constoe(c))) { 604 if (!(echar = constoe(c))) {
605 605
606 schar = c; mchar = 0; echar = 0; 606 schar = c; mchar = 0; echar = 0;
607 return QChar(c); 607 return QChar(c);
608 } 608 }
609 609
610 } 610 }
611 else { // must figure out what the echar is 611 else { // must figure out what the echar is
612 612
613 if (echar == 0x11a8) { // ¤¡ 613 if (echar == 0x11a8) { //
614 614
615 if (c == 0x1100) echar = 0x11a9; // ¤¡ + ¤¡ 615 if (c == 0x1100) echar = 0x11a9; // +
616 else if (c == 0x1109) echar = 0x11aa; // ¤¡ + ¤µ 616 else if (c == 0x1109) echar = 0x11aa; // +
617 else { 617 else {
618 schar = c; mchar = 0; echar = 0; 618 schar = c; mchar = 0; echar = 0;
619 return QChar(c); 619 return QChar(c);
620 } 620 }
621 621
622 } else if (echar == 0x11ab) { // ¤¤ 622 } else if (echar == 0x11ab) { //
623 623
624 if (c == 0x110c) echar = 0x11ac; // ¤¤ + ¤¸ 624 if (c == 0x110c) echar = 0x11ac; // +
625 else if (c == 0x1112) echar = 0x11ad; // ¤¤ + ¤¾ 625 else if (c == 0x1112) echar = 0x11ad; // +
626 else { 626 else {
627 schar = c; mchar = 0; echar = 0; 627 schar = c; mchar = 0; echar = 0;
628 return QChar(c); 628 return QChar(c);
629 } 629 }
630 630
631 } else if (echar == 0x11af) { // ¤© 631 } else if (echar == 0x11af) { //
632 632
633 if (c == 0x1100) echar = 0x11b0; // ¤© + ¤¡ 633 if (c == 0x1100) echar = 0x11b0; // +
634 else if (c == 0x1106) echar = 0x11b1; // ¤© + ¤± 634 else if (c == 0x1106) echar = 0x11b1; // +
635 else if (c == 0x1107) echar = 0x11b2; // ¤© + ¤² 635 else if (c == 0x1107) echar = 0x11b2; // +
636 else if (c == 0x1109) echar = 0x11b3; // ¤© + ¤µ 636 else if (c == 0x1109) echar = 0x11b3; // +
637 else if (c == 0x1110) echar = 0x11b4; // ¤© + ¤¼ 637 else if (c == 0x1110) echar = 0x11b4; // +
638 else if (c == 0x1111) echar = 0x11b5; // ¤© + ¤½ 638 else if (c == 0x1111) echar = 0x11b5; // +
639 else if (c == 0x1112) echar = 0x11b6; // ¤© + ¤¾ 639 else if (c == 0x1112) echar = 0x11b6; // +
640 else { 640 else {
641 schar = c; mchar = 0; echar = 0; 641 schar = c; mchar = 0; echar = 0;
642 return QChar(c); 642 return QChar(c);
643 } 643 }
644 644
645 } else if (echar == 0x11b8) { // ¤² 645 } else if (echar == 0x11b8) { //
646 646
647 if (c == 0x1109) echar = 0x11b9; // ¤² + ¤µ 647 if (c == 0x1109) echar = 0x11b9; // +
648 else { 648 else {
649 schar = c; mchar = 0; echar = 0; 649 schar = c; mchar = 0; echar = 0;
650 return QChar(c); 650 return QChar(c);
651 } 651 }
652 652
653 } else if (echar == 0x11ba) { // ¤µ 653 } else if (echar == 0x11ba) { //
654 654
655 if (c == 0x1109) echar = 0x11bb; // ¤µ + ¤µ 655 if (c == 0x1109) echar = 0x11bb; // +
656 else { 656 else {
657 schar = c; mchar = 0; echar = 0; 657 schar = c; mchar = 0; echar = 0;
658 return QChar(c); 658 return QChar(c);
659 } 659 }
660 660
661 } else { // if any other char, cannot combine chars 661 } else { // if any other char, cannot combine chars
662 662
663 schar = c; mchar = 0; echar = 0; 663 schar = c; mchar = 0; echar = 0;
664 return QChar(c); 664 return QChar(c);
665 } 665 }
666 666
667 lastKey = echar; 667 lastKey = echar;
diff --git a/inputmethods/kjumpx/kjumpx.pro b/inputmethods/kjumpx/kjumpx.pro
index 09e9bf1..0f708fd 100644
--- a/inputmethods/kjumpx/kjumpx.pro
+++ b/inputmethods/kjumpx/kjumpx.pro
@@ -1,15 +1,15 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt plugin warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = keyboard.h \ 3HEADERS = keyboard.h \
4 keyboardimpl.h 4 keyboardimpl.h
5SOURCES = keyboard.cpp \ 5SOURCES = keyboard.cpp \
6 keyboardimpl.cpp 6 keyboardimpl.cpp
7TARGET = qkjumpx 7TARGET = qkjumpx
8DESTDIR = ../../plugins/inputmethods 8DESTDIR = ../../plugins/inputmethods
9INCLUDEPATH += $(OPIEDIR)/include 9INCLUDEPATH += $(OPIEDIR)/include
10DEPENDPATH += $(OPIEDIR)/include 10DEPENDPATH += $(OPIEDIR)/include
11LIBS += -lqpe 11LIBS += -lqpe -lopiecore2
12VERSION = 1.0.0 12VERSION = 1.0.0
13 13
14include( $(OPIEDIR)/include.pro ) 14include( $(OPIEDIR)/include.pro )
15target.path = $$prefix/plugins/inputmethods 15target.path = $$prefix/plugins/inputmethods
diff --git a/inputmethods/kjumpx/opie-kjumpx.control b/inputmethods/kjumpx/opie-kjumpx.control
index 3650812..a9d004e 100644
--- a/inputmethods/kjumpx/opie-kjumpx.control
+++ b/inputmethods/kjumpx/opie-kjumpx.control
@@ -1,11 +1,11 @@
1Package: opie-kjumpx 1Package: opie-kjumpx
2Files: plugins/inputmethods/libqkjumpx.so* pics/kjumpx/* 2Files: plugins/inputmethods/libqkjumpx.so* pics/kjumpx/*
3Priority: optional 3Priority: optional
4Section: opie/inputmethods 4Section: opie/inputmethods
5Maintainer: Jake Richardson <jake@asdfnews.org> 5Maintainer: Jake Richardson <jake@asdfnews.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal 7Depends: task-opie-minimal, libopiecore2
8License: GPL 8License: GPL
9Description: Koreanized JumpX input method 9Description: Koreanized JumpX input method
10 Keyboard-like input method for the Opie environment. 10 Keyboard-like input method for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION 11Version: $QPE_VERSION$EXTRAVERSION