summaryrefslogtreecommitdiffstats
path: root/src/PYEngine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/PYEngine.cc')
-rw-r--r--src/PYEngine.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/PYEngine.cc b/src/PYEngine.cc
index 68260dd..fb32a0e 100644
--- a/src/PYEngine.cc
+++ b/src/PYEngine.cc
@@ -246,6 +246,39 @@ FUNCTION(cursor_up, cursorUp)
FUNCTION(cursor_down, cursorDown)
#undef FUNCTION
+Engine::Engine (IBusEngine *engine) : m_engine (engine)
+{
+#if IBUS_CHECK_VERSION (1, 5, 4)
+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM;
+#endif
+}
+
+gboolean
+Engine::contentIsPassword()
+{
+#if IBUS_CHECK_VERSION (1, 5, 4)
+ return IBUS_INPUT_PURPOSE_PASSWORD == m_input_purpose;
+#else
+ return FALSE;
+#endif
+}
+
+void
+Engine::focusOut (void)
+{
+#if IBUS_CHECK_VERSION (1, 5, 4)
+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM;
+#endif
+}
+
+#if IBUS_CHECK_VERSION(1, 5, 4)
+void
+Engine::setContentType (guint purpose, guint hints)
+{
+ m_input_purpose = (IBusInputPurpose) purpose;
+}
+#endif
+
Engine::~Engine (void)
{
}