summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
blob: 0718e9c3e35e6b1231effc16649e8e73d1d48eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();
		}
	}
}