Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create QUimPlatformInputContext for Qt5.

* configure.ac
  - Change file name from quiminputcontextplugin.pro
    to quimplatforminputcontextplugin.pro
* qt4/immodule/candidatewindowproxy.cpp
* qt4/immodule/candidatewindowproxy.h
* qt4/immodule/plugin.cpp
* qt4/immodule/qhelpermanager.cpp
* qt4/immodule/qtextutil.cpp
* qt4/immodule/qtextutil.h
* qt4/immodule/quiminputcontext_compose.cpp
* qt4/immodule/quiminputcontext_compose.h
* qt4/immodule/quiminputcontext_with_slave.h
  - Use QUimPlatformInputContext for Qt5.
* qt4/immodule/quiminputcontext.cpp
* qt4/immodule/quiminputcontext.h
  - Remove lines for Qt5.
* qt5/immodule/quimplatforminputcontext.cpp
* qt5/immodule/quimplatforminputcontext.h
  - New files.
* qt5/immodule/quiminputcontextplugin.pro.in
  - (HEADERS)
    * Add quimplatforminputcontext.h.
    * Remove quiminputcontext.h.
  - (SOURCES)
    * Add quimplatforminputcontext.cpp.
    * Remove quiminputcontext.cpp.
  - (TARGET): Rename to uimplatforminputcontextplugin.
  • Loading branch information...
commit 98827163d9f37e9a861368835f8532000842b1b5 1 parent 1051e07
@mnogu authored
View
4 configure.ac
@@ -2036,7 +2036,7 @@ AC_CONFIG_FILES([Makefile
qt5/chardict/Makefile
qt5/chardict/uim-chardict-qt5.pro
qt5/edittest/Makefile
- qt5/immodule/quiminputcontextplugin.pro
+ qt5/immodule/quimplatforminputcontextplugin.pro
qt5/immodule/Makefile
qt5/pref/uim-pref-qt5.pro
qt5/pref/Makefile
@@ -2144,7 +2144,7 @@ if test x$use_qt5 = xyes; then
fi
if test x$use_qt5_immodule = xyes; then
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/immodule/Makefile.qmake \
- ${ac_abs_top_builddir}/qt5/immodule/quiminputcontextplugin.pro
+ ${ac_abs_top_builddir}/qt5/immodule/quimplatforminputcontextplugin.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/edittest/Makefile.qmake \
${ac_abs_top_srcdir}/qt4/edittest/edittest.pro
fi
View
6 qt4/immodule/candidatewindowproxy.cpp
@@ -50,7 +50,11 @@
#include <uim-scm.h>
-#include "quiminputcontext.h"
+#if QT_VERSION < 0x050000
+# include "quiminputcontext.h"
+#else
+# include "quimplatforminputcontext.h"
+#endif
CandidateWindowProxy::CandidateWindowProxy()
: ic(0), nrCandidates(0), displayLimit(0), candidateIndex(-1), pageIndex(-1),
View
13 qt4/immodule/candidatewindowproxy.h
@@ -44,7 +44,11 @@ class QProcess;
class QRect;
class QTimer;
+#if QT_VERSION < 0x050000
class QUimInputContext;
+#else
+class QUimPlatformInputContext;
+#endif
class CandidateWindowProxy : public QObject
{
@@ -68,7 +72,12 @@ class CandidateWindowProxy : public QObject
void layoutWindow(int x, int y, int height);
+#if QT_VERSION < 0x050000
void setQUimInputContext(QUimInputContext *m_ic) { ic = m_ic; }
+#else
+ void setQUimPlatformInputContext(QUimPlatformInputContext *m_ic)
+ { ic = m_ic; }
+#endif
void candidateActivate(int nr, int displayLimit);
#ifdef UIM_QT_USE_DELAY
@@ -110,7 +119,11 @@ class CandidateWindowProxy : public QObject
bool eventFilter(QObject *obj, QEvent *event);
QProcess *process;
+#if QT_VERSION < 0x050000
QUimInputContext *ic;
+#else
+ QUimPlatformInputContext *ic;
+#endif
// candidate data
QList<uim_candidate> stores;
View
5 qt4/immodule/plugin.cpp
@@ -101,7 +101,12 @@ QPlatformInputContext *UimInputContextPlugin::create( const QString & key, const
if ( key == "uim" )
imname = uim_get_default_im_name( setlocale( LC_CTYPE, 0 ) );
+#if QT_VERSION < 0x050000
QUimInputContext *uic = new QUimInputContext( imname.toUtf8().data() );
+#else
+ QUimPlatformInputContext *uic
+ = new QUimPlatformInputContext( imname.toUtf8().data() );
+#endif
return uic;
}
View
38 qt4/immodule/qhelpermanager.cpp
@@ -43,15 +43,27 @@ SUCH DAMAGE.
#include "plugin.h"
#include "quiminfomanager.h"
-#include "quiminputcontext.h"
+#if QT_VERSION < 0x050000
+# include "quiminputcontext.h"
+#else
+# include "quimplatforminputcontext.h"
+#endif
static int im_uim_fd = 0;
static QSocketNotifier *notifier = 0;
+#if QT_VERSION < 0x050000
extern QUimInputContext *focusedInputContext;
+#else
+extern QUimPlatformInputContext *focusedInputContext;
+#endif
extern bool disableFocusedContext;
+#if QT_VERSION < 0x050000
extern QList<QUimInputContext *> contextList;
+#else
+extern QList<QUimPlatformInputContext *> contextList;
+#endif
QUimHelperManager::QUimHelperManager( QObject *parent )
: QObject( parent )
@@ -153,7 +165,11 @@ void QUimHelperManager::parseHelperStr( const QString &str )
if ( !list.isEmpty() && !list[ 0 ].isEmpty() &&
!list[ 1 ].isEmpty() && !list[ 2 ].isEmpty() )
{
+#if QT_VERSION < 0x050000
QList<QUimInputContext *>::iterator it;
+#else
+ QList<QUimPlatformInputContext *>::iterator it;
+#endif
for ( it = contextList.begin(); it != contextList.end(); ++it )
{
uim_prop_update_custom( ( *it )->uimContext(),
@@ -177,7 +193,11 @@ void QUimHelperManager::parseHelperStr( const QString &str )
UimInputContextPlugin::getQUimInfoManager();
infoManager->initUimInfo();
+#if QT_VERSION < 0x050000
QList<QUimInputContext *>::iterator it;
+#else
+ QList<QUimPlatformInputContext *>::iterator it;
+#endif
for ( it = contextList.begin(); it != contextList.end(); ++it ) {
( *it )->updatePosition();
( *it )->updateStyle();
@@ -203,7 +223,11 @@ void QUimHelperManager::parseHelperStrImChange( const QString &str )
}
else if ( str.startsWith( QLatin1String( "im_change_whole_desktop" ) ) )
{
+#if QT_VERSION < 0x050000
QList<QUimInputContext *>::iterator it;
+#else
+ QList<QUimPlatformInputContext *>::iterator it;
+#endif
for ( it = contextList.begin(); it != contextList.end(); ++it )
{
uim_switch_im( ( *it )->uimContext(), im_name.toUtf8().data() );
@@ -218,7 +242,11 @@ void QUimHelperManager::parseHelperStrImChange( const QString &str )
{
if ( focusedInputContext )
{
+#if QT_VERSION < 0x050000
QList<QUimInputContext *>::iterator it;
+#else
+ QList<QUimPlatformInputContext *>::iterator it;
+#endif
for ( it = contextList.begin(); it != contextList.end(); ++it )
{
uim_switch_im( ( *it )->uimContext(), im_name.toUtf8().data() );
@@ -283,7 +311,11 @@ void QUimHelperManager::helper_disconnect_cb()
void QUimHelperManager::update_prop_list_cb( void *ptr, const char *str )
{
+#if QT_VERSION < 0x050000
QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
+#else
+ QUimPlatformInputContext *ic = static_cast<QUimPlatformInputContext*>( ptr );
+#endif
if ( ic != focusedInputContext || disableFocusedContext )
return;
@@ -298,7 +330,11 @@ void QUimHelperManager::update_prop_list_cb( void *ptr, const char *str )
void QUimHelperManager::update_prop_label_cb( void *ptr, const char *str )
{
+#if QT_VERSION < 0x050000
QUimInputContext *ic = static_cast<QUimInputContext*>( ptr );
+#else
+ QUimPlatformInputContext *ic = static_cast<QUimPlatformInputContext*>( ptr );
+#endif
if ( ic != focusedInputContext || disableFocusedContext )
return;
View
18 qt4/immodule/qtextutil.cpp
@@ -49,12 +49,20 @@ SUCH DAMAGE.
# include <QtWidgets/QTextEdit>
#endif
+#if QT_VERSION < 0x050000
#include "quiminputcontext.h"
+#else
+#include "quimplatforminputcontext.h"
+#endif
QUimTextUtil::QUimTextUtil( QObject *parent )
: QObject( parent )
{
+#if QT_VERSION < 0x050000
mIc = static_cast<QUimInputContext *>( parent );
+#else
+ mIc = static_cast<QUimPlatformInputContext *>( parent );
+#endif
mPreeditSaved = false;
}
@@ -69,7 +77,12 @@ QUimTextUtil::acquire_text_cb( void *ptr, enum UTextArea text_id,
char **former, char **latter )
{
int err;
+#if QT_VERSION < 0x050000
QUimInputContext *ic = static_cast<QUimInputContext *>( ptr );
+#else
+ QUimPlatformInputContext *ic
+ = static_cast<QUimPlatformInputContext *>( ptr );
+#endif
QUimTextUtil *tu = ic->textUtil();
switch ( text_id ) {
@@ -99,7 +112,12 @@ QUimTextUtil::delete_text_cb( void *ptr, enum UTextArea text_id,
int former_req_len, int latter_req_len )
{
int err;
+#if QT_VERSION < 0x050000
QUimInputContext *ic = static_cast<QUimInputContext *>( ptr );
+#else
+ QUimPlatformInputContext *ic
+ = static_cast<QUimPlatformInputContext *>( ptr );
+#endif
QUimTextUtil *tu = ic->textUtil();
switch ( text_id ) {
View
8 qt4/immodule/qtextutil.h
@@ -37,7 +37,11 @@ SUCH DAMAGE.
#include "uim/uim.h"
+#if QT_VERSION < 0x050000
class QUimInputContext;
+#else
+class QUimPlatformInputContext;
+#endif
class QUimTextUtil : QObject
{
@@ -118,7 +122,11 @@ class QUimTextUtil : QObject
void restorePreedit();
QWidget *mWidget;
+#if QT_VERSION < 0x050000
QUimInputContext *mIc;
+#else
+ QUimPlatformInputContext *mIc;
+#endif
bool mPreeditSaved;
};
View
15 qt4/immodule/quiminputcontext.cpp
@@ -37,15 +37,10 @@
#include <cstring>
#include <QtCore/QPoint>
+#include <QtGui/QApplication>
#include <QtGui/QInputMethodEvent>
+#include <QtGui/QLabel>
#include <QtGui/QTextCharFormat>
-#if QT_VERSION < 0x050000
-# include <QtGui/QApplication>
-# include <QtGui/QLabel>
-#else
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QLabel>
-#endif
#include <uim/uim-helper.h>
#include <uim/uim-im-switcher.h>
@@ -374,9 +369,7 @@ void QUimInputContext::setFocusWidget( QWidget *w )
qDebug( "QUimInputContext::setFocusWidget() w = %p", w );
#endif
-#if QT_VERSION < 0x050000
QInputContext::setFocusWidget( w );
-#endif
if ( w )
setFocus();
@@ -630,9 +623,7 @@ void QUimInputContext::commitString( const QString& str )
{
QInputMethodEvent e;
e.setCommitString( str );
-#if QT_VERSION < 0x050000
sendEvent( e );
-#endif
m_isComposing = false;
}
@@ -662,9 +653,7 @@ void QUimInputContext::updatePreedit()
if ( !newString.isEmpty() ) {
QInputMethodEvent e( newString, getPreeditAttrs() );
-#if QT_VERSION < 0x050000
sendEvent( e );
-#endif
// Qt4.3.1 does not call back update() here
update();
} else {
View
11 qt4/immodule/quiminputcontext.h
@@ -36,12 +36,7 @@
#define UIM_QT4_IMMODULE_QUIMINPUTCONTEXT_H
#include <QtCore/QtGlobal>
-#if QT_VERSION < 0x050000
-# include <QtGui/QInputContext>
-#else
-# include <QtGui/QInputMethodEvent>
-# include <QtGui/QPlatformInputContext>
-#endif
+#include <QtGui/QInputContext>
#ifdef Q_WS_X11
#define UIM_QT_USE_JAPANESE_KANA_KEYBOARD_HACK 1
@@ -75,11 +70,7 @@ struct PreeditSegment
QString str;
};
-#if QT_VERSION < 0x050000
class QUimInputContext : public QInputContext
-#else
-class QUimInputContext : public QPlatformInputContext
-#endif
{
Q_OBJECT
public:
View
8 qt4/immodule/quiminputcontext_compose.cpp
@@ -57,7 +57,11 @@
#include "uim/uim.h"
+#if QT_VERSION < 0x050000
#include "quiminputcontext.h"
+#else
+#include "quimplatforminputcontext.h"
+#endif
static const char COMPOSE_FILE[] = "Compose";
static const char COMPOSE_DIR_FILE[] = "X11/locale/compose.dir";
@@ -73,7 +77,11 @@ static inline bool iscomment(char ch)
static int parse_line(char *line, char **argv, int argsize);
static unsigned int KeySymToUcs4(KeySym keysym);
+#if QT_VERSION < 0x050000
Compose::Compose(DefTree *top, QUimInputContext *ic)
+#else
+Compose::Compose(DefTree *top, QUimPlatformInputContext *ic)
+#endif
{
m_ic = ic;
m_composed = 0;
View
14 qt4/immodule/quiminputcontext_compose.h
@@ -59,16 +59,30 @@ typedef struct _DefTree {
KeySym ks;
} DefTree;
+#include <QtCore/QtGlobal>
+
+#if QT_VERSION < 0x050000
class QUimInputContext;
+#else
+class QUimPlatformInputContext;
+#endif
class Compose {
public:
+#if QT_VERSION < 0x050000
Compose(DefTree *, QUimInputContext *);
+#else
+ Compose(DefTree *, QUimPlatformInputContext *);
+#endif
~Compose();
bool handle_qkey(const QKeyEvent *event);
void reset();
private:
bool handleKey(KeySym xkeysym, int xstate, bool is_push);
+#if QT_VERSION < 0x050000
QUimInputContext *m_ic;
+#else
+ QUimPlatformInputContext *m_ic;
+#endif
DefTree *m_top;
DefTree *m_context;
DefTree *m_composed;
View
10 qt4/immodule/quiminputcontext_with_slave.h
@@ -35,13 +35,21 @@
#ifndef UIM_QT4_IMMODULE_QUIMINPUTCONTEXT_WITH_SLAVE_H
#define UIM_QT4_IMMODULE_QUIMINPUTCONTEXT_WITH_SLAVE_H
-#include "quiminputcontext.h"
+#if QT_VERSION < 0x050000
+# include "quiminputcontext.h"
+#else
+# include "quimplatforminputcontext.h"
+#endif
// This class is for dealing with Dead/Multi key composing.
// Have QSimpleInputContext as slave and forward event to the
// slave when isComposing==false.
+#if QT_VERSION < 0x050000
class QUimInputContextWithSlave : public QUimInputContext
+#else
+class QUimInputContextWithSlave : public QUimPlatformInputContext
+#endif
{
Q_OBJECT
public:
View
160 qt5/immodule/quimplatforminputcontext.cpp
@@ -0,0 +1,160 @@
+/*
+
+ Copyright (c) 2012 uim Project http://code.google.com/p/uim/
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of authors nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+*/
+#include "quimplatforminputcontext.h"
+
+QUimPlatformInputContext *focusedInputContext = 0;
+bool disableFocusedContext = false;
+
+QList<QUimPlatformInputContext*> contextList;
+
+#include <QtCore/QRectF>
+#include <QtCore/QLocale>
+
+#define ENABLE_DEBUG
+
+QUimPlatformInputContext::QUimPlatformInputContext( const char *imname )
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "QUimPlatformInputContext()" );
+#endif
+ Q_UNUSED(imname)
+}
+
+QUimPlatformInputContext::~QUimPlatformInputContext()
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "~QUimPlatformInputContext()" );
+#endif
+}
+
+void QUimPlatformInputContext::commit()
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "commit()" );
+#endif
+}
+
+bool QUimPlatformInputContext::filterEvent(const QEvent *event)
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "filterEvent()" );
+#endif
+ Q_UNUSED(event)
+ return false;
+}
+
+void QUimPlatformInputContext::hideInputPanel()
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "hideInputPanel()" );
+#endif
+}
+
+Qt::LayoutDirection QUimPlatformInputContext::inputDirection() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "inputDirection()" );
+#endif
+ return Qt::LayoutDirectionAuto;
+}
+
+void QUimPlatformInputContext::invokeAction(QInputMethod::Action action,
+ int cursorPosition)
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "invokeAction()" );
+#endif
+ Q_UNUSED(action)
+ Q_UNUSED(cursorPosition)
+}
+
+bool QUimPlatformInputContext::isAnimating() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "isAnimating()" );
+#endif
+ return false;
+}
+
+bool QUimPlatformInputContext::isInputPanelVisible() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "isInputPanelVisible()" );
+#endif
+ return false;
+}
+
+bool QUimPlatformInputContext::isValid() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "isValid()" );
+#endif
+ return true;
+}
+
+QRectF QUimPlatformInputContext::keyboardRect() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "keyboardRect()" );
+#endif
+ return QRectF();
+}
+
+QLocale QUimPlatformInputContext::locale() const
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "locale()" );
+#endif
+ return QLocale();
+}
+
+void QUimPlatformInputContext::reset()
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "reset()" );
+#endif
+}
+
+void QUimPlatformInputContext::showInputPanel()
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "showInputPanel()" );
+#endif
+}
+
+void QUimPlatformInputContext::update(Qt::InputMethodQueries)
+{
+#ifdef ENABLE_DEBUG
+ qDebug( "update()" );
+#endif
+}
View
91 qt5/immodule/quimplatforminputcontext.h
@@ -0,0 +1,91 @@
+/*
+
+ Copyright (c) 2012 uim Project http://code.google.com/p/uim/
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of authors nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+*/
+
+#ifndef UIM_QT5_IMMODULE_QUIMPLATFORMINPUTCONTEXT_H
+#define UIM_QT5_IMMODULE_QUIMPLATFORMINPUTCONTEXT_H
+
+#include <QtGui/QPlatformInputContext>
+
+#include <uim.h>
+
+class QUimTextUtil;
+
+class QUimPlatformInputContext : public QPlatformInputContext
+{
+ Q_OBJECT
+
+public:
+ explicit QUimPlatformInputContext( const char *imname = 0 );
+ ~QUimPlatformInputContext();
+
+
+ virtual void commit();
+ virtual bool filterEvent(const QEvent *event);
+ virtual void hideInputPanel();
+ virtual Qt::LayoutDirection inputDirection() const;
+ virtual void invokeAction(QInputMethod::Action action, int cursorPosition);
+ virtual bool isAnimating() const;
+ virtual bool isInputPanelVisible() const;
+ virtual bool isValid() const;
+ virtual QRectF keyboardRect() const;
+ virtual QLocale locale() const;
+ virtual void reset();
+ virtual void showInputPanel();
+ virtual void update(Qt::InputMethodQueries);
+
+ uim_context uimContext() { return m_uc; }
+
+ void commitString(const QString& str);
+
+ void updatePosition();
+ void updateStyle();
+
+ QUimTextUtil *textUtil() { return mTextUtil; }
+
+ QString getPreeditString();
+ int getPreeditCursorPosition();
+
+ void saveContext();
+ void restoreContext();
+
+ void updateIndicator(const QString &str);
+
+ void setCandwinActive() { candwinIsActive = true; }
+
+private:
+ QUimTextUtil *mTextUtil;
+ bool candwinIsActive;
+ uim_context m_uc;
+};
+
+#endif /* Not def: UIM_QT5_IMMODULE_QUIMPLATFORMINPUTCONTEXT_H */
View
10 qt5/immodule/quiminputcontextplugin.pro.in → qt5/immodule/quimplatforminputcontextplugin.pro.in
@@ -9,22 +9,22 @@ LIBS += @X11_LIBS@ -luim-counted-init
QT += platformsupport-private
# Input
-HEADERS += @srcdir@/../../qt4/immodule/candidatewindowproxy.h \
+HEADERS += @srcdir@/quimplatforminputcontext.h \
+ @srcdir@/../../qt4/immodule/candidatewindowproxy.h \
@srcdir@/../../qt4/immodule/caretstateindicator.h \
@srcdir@/../../qt4/immodule/plugin.h \
@srcdir@/../../qt4/immodule/qhelpermanager.h \
@srcdir@/../../qt4/immodule/qtextutil.h \
@srcdir@/../../qt4/immodule/quiminfomanager.h \
- @srcdir@/../../qt4/immodule/quiminputcontext.h \
@srcdir@/../../qt4/candwin/util.h
-SOURCES += @srcdir@/../../qt4/immodule/candidatewindowproxy.cpp \
+SOURCES += @srcdir@/quimplatforminputcontext.cpp \
+ @srcdir@/../../qt4/immodule/candidatewindowproxy.cpp \
@srcdir@/../../qt4/immodule/caretstateindicator.cpp \
@srcdir@/../../qt4/immodule/plugin.cpp \
@srcdir@/../../qt4/immodule/qhelpermanager.cpp \
@srcdir@/../../qt4/immodule/qtextutil.cpp \
@srcdir@/../../qt4/immodule/quiminfomanager.cpp \
- @srcdir@/../../qt4/immodule/quiminputcontext.cpp \
@srcdir@/../../qt4/candwin/util.cpp
!win32:!embedded:!mac {
@@ -34,6 +34,6 @@ SOURCES += @srcdir@/../../qt4/immodule/candidatewindowproxy.cpp \
OTHER_FILES += uim.json
-TARGET = uiminputcontextplugin
+TARGET = uimplatforminputcontextplugin
target.path += @DESTDIR@$$[QT_INSTALL_PLUGINS]/platforminputcontexts
Please sign in to comment.
Something went wrong with that request. Please try again.