summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatforminputcontext_qpa_p.h
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-02-23 15:57:14 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-01 20:13:51 +0200
commit6a4bf73c07b034a0f9d07cb617d23e92ca778dd1 (patch)
tree818497855c1ad073919c214fa52ba3fd5b50d7d7 /src/gui/kernel/qplatforminputcontext_qpa_p.h
parent1f5e058f79f95e869d8de300596137463492056c (diff)
Added some convenience API for platform input contexts
QPlatformInputContext now gets notified on changed focus and has inputMethodAccepted() telling whether current focus object accepts input method events. Also adapted IBus plugin to use this. Key event filtering for focused objects without input method support got fixed by the change. Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatforminputcontext_qpa_p.h')
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa_p.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatforminputcontext_qpa_p.h b/src/gui/kernel/qplatforminputcontext_qpa_p.h
new file mode 100644
index 0000000000..dc12d26ffc
--- /dev/null
+++ b/src/gui/kernel/qplatforminputcontext_qpa_p.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINPUTCONTEXT_P_H
+#define QPLATFORMINPUTCONTEXT_P_H
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QPlatformInputContextPrivate: public QObjectPrivate
+{
+public:
+ QPlatformInputContextPrivate() {}
+ ~QPlatformInputContextPrivate() {}
+
+ static void setInputMethodAccepted(bool accepted);
+ static bool inputMethodAccepted();
+
+ static bool s_inputMethodAccepted;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif