summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.h
Unidiff
Diffstat (limited to 'core/launcher/inputmethods.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.h50
1 files changed, 42 insertions, 8 deletions
diff --git a/core/launcher/inputmethods.h b/core/launcher/inputmethods.h
index 286a818..93b69de 100644
--- a/core/launcher/inputmethods.h
+++ b/core/launcher/inputmethods.h
@@ -1,5 +1,5 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
@@ -23,4 +23,4 @@
23 23
24 24#include <qtopia/qlibrary.h>
25#include <qpe/inputmethodinterface.h> 25#include <qtopia/inputmethodinterface.h>
26 26
@@ -30,3 +30,3 @@
30class QToolButton; 30class QToolButton;
31class QLibrary; 31class QWidgetStack;
32 32
@@ -38,3 +38,22 @@ struct InputMethod
38 QWidget *widget; 38 QWidget *widget;
39 InputMethodInterface *interface; 39 QString libName;
40 bool newIM;
41 union {
42 InputMethodInterface *interface;
43 ExtInputMethodInterface *extInterface;
44 };
45
46 inline void releaseInterface() {
47 newIM ? (void)extInterface->release() : (void)interface->release();
48 library->unload();
49 delete library; library = 0l;
50 }
51 inline QString name() const { return newIM ? extInterface->name() : interface->name(); }
52 inline QPixmap *icon() const { return newIM ? extInterface->icon() : interface->icon(); }
53 inline QUnknownInterface *iface() { return newIM ? (QUnknownInterface *)extInterface : (QUnknownInterface *)interface; }
54 inline void resetState() { if ( !newIM ) interface->resetState(); }
55
56 int operator <(const InputMethod& o) const;
57 int operator >(const InputMethod& o) const;
58 int operator <=(const InputMethod& o) const;
40}; 59};
@@ -47,3 +66,3 @@ public:
47 ~InputMethods(); 66 ~InputMethods();
48 67
49 QRect inputRect() const; 68 QRect inputRect() const;
@@ -54,2 +73,3 @@ public:
54 void hideInputMethod(); 73 void hideInputMethod();
74 void unloadInputMethods();
55 void loadInputMethods(); 75 void loadInputMethods();
@@ -61,2 +81,3 @@ private slots:
61 void chooseKbd(); 81 void chooseKbd();
82 void chooseIm();
62 void showKbd( bool ); 83 void showKbd( bool );
@@ -64,9 +85,22 @@ private slots:
64 void sendKey( ushort unicode, ushort scancode, ushort modifiers, bool, bool ); 85 void sendKey( ushort unicode, ushort scancode, ushort modifiers, bool, bool );
86 void qcopReceive( const QCString &msg, const QByteArray &data );
65 87
66private: 88private:
89 void setPreferedHandlers();
90 /*static */QStringList plugins()const;
91 /*static */void installTranslator( const QString& );
92 void unloadMethod( QValueList<InputMethod>& );
67 void chooseMethod(InputMethod* im); 93 void chooseMethod(InputMethod* im);
94 void chooseKeyboard(InputMethod* im);
95 void updateKeyboards(InputMethod *im);
96
97private:
68 QToolButton *kbdButton; 98 QToolButton *kbdButton;
69 QToolButton *kbdChoice; 99 QToolButton *kbdChoice;
70 InputMethod *method; 100 QWidgetStack *imButton; // later will be widget stack
101 QToolButton *imChoice;
102 InputMethod *mkeyboard;
103 InputMethod *imethod;
71 QValueList<InputMethod> inputMethodList; 104 QValueList<InputMethod> inputMethodList;
105 QValueList<InputMethod> inputModifierList;
72}; 106};