summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
diff options
context:
space:
mode:
authorJi-hoon Lee <dalton.lee@samsung.com>2017-08-01 14:47:25 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:40 +0900
commit1f48470ae96bf348b70abcbaacdd97f4307854f8 (patch)
tree59acc2882d7d4f9116a65c5ff4b14263610e0fb5 /Xamarin.Forms.Platform.Tizen/IMEApplication.cs
parent2f54796d9060c506af13eff6f052c514a2f491e1 (diff)
downloadxamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.tar.gz
xamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.tar.bz2
xamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.zip
Add IMEApplication class for supporting IME type applications
Change-Id: I359b5590d6f2046575013d9720990a2e54df37a2
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/IMEApplication.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/IMEApplication.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/IMEApplication.cs b/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
new file mode 100644
index 00000000..0718e9c3
--- /dev/null
+++ b/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
@@ -0,0 +1,38 @@
+using System;
+using ElmSharp;
+using Tizen.Uix.InputMethod;
+
+namespace Xamarin.Forms.Platform.Tizen
+{
+ public class IMEApplication : FormsApplication
+ {
+ public EditorWindow EditorWindow
+ {
+ get { return MainWindow as EditorWindow; }
+ }
+
+ protected IMEApplication()
+ {
+ }
+
+ protected override void OnPreCreate()
+ {
+ Application.ClearCurrent();
+
+ /*
+ * Since the IMEWindow class acquires window handle from InputMethod module and
+ * the handle is created internally when calling InputMethodEditor.Create() function,
+ * this needs to be called BEFORE creating new IMEWindow instance.
+ */
+ InputMethodEditor.Create();
+ MainWindow = InputMethodEditor.GetMainWindow();
+ MainWindow.IndicatorMode = IndicatorMode.Hide;
+ }
+
+ protected override void OnTerminate()
+ {
+ InputMethodEditor.Destroy();
+ base.OnTerminate();
+ }
+ }
+}