Merge "[ElmSharp] Fixed the crash issue of Calendar"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / ImfManager.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using System.Runtime.InteropServices;
20 using System.ComponentModel;
21
22 namespace Tizen.NUI
23 {
24     /// <summary>
25     /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
26     /// </summary>
27     /// <since_tizen> 3 </since_tizen>
28     public class ImfManager : BaseHandle
29     {
30         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32         internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
33         {
34             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35         }
36
37         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
38         {
39             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
40         }
41
42         private static readonly ImfManager instance = ImfManager.Get();
43
44         /// <summary>
45         /// Gets the singleton of the ImfManager object.
46         /// </summary>
47         /// <since_tizen> 5 </since_tizen>
48         public static ImfManager Instance
49         {
50             get
51             {
52                 return instance;
53             }
54         }
55
56         /// <summary>
57         /// Dispose
58         /// </summary>
59         /// <param name="type">Dispose Type</param>
60         /// <since_tizen> 3 </since_tizen>
61         /// Please DO NOT use! This will be deprecated!
62         /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
63         /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
64         [Obsolete("Please do not use! This will be deprecated!")]
65         [EditorBrowsable(EditorBrowsableState.Never)]
66         protected override void Dispose(DisposeTypes type)
67         {
68             if (disposed)
69             {
70                 return;
71             }
72
73             if (type == DisposeTypes.Explicit)
74             {
75                 //Called by User
76                 //Release your own managed resources here.
77                 //You should release all of your own disposable objects here.
78
79             }
80
81             //Release your own unmanaged resources here.
82             //You should not access any managed member here except static instance.
83             //because the execution order of Finalizes is non-deterministic.
84
85             if (_keyboardTypeChangedEventCallback != null)
86             {
87                 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
88             }
89
90             if (swigCPtr.Handle != global::System.IntPtr.Zero)
91             {
92                 if (swigCMemOwn)
93                 {
94                     swigCMemOwn = false;
95                     NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
96                 }
97                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
98             }
99
100             base.Dispose(type);
101         }
102
103         /// <summary>
104         /// This structure is used to pass on data from the IMF regarding predictive text.
105         /// </summary>
106         /// <since_tizen> 3 </since_tizen>
107         public class ImfEventData : global::System.IDisposable
108         {
109             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
110             /// <summary>
111             /// swigCMemOwn
112             /// </summary>
113             /// <since_tizen> 3 </since_tizen>
114             protected bool swigCMemOwn;
115
116             internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
117             {
118                 swigCMemOwn = cMemoryOwn;
119                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
120             }
121
122             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
123             {
124                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
125             }
126
127             //A Flag to check who called Dispose(). (By User or DisposeQueue)
128             private bool isDisposeQueued = false;
129             /// <summary>
130             /// A Flat to check if it is already disposed.
131             /// </summary>
132             /// <since_tizen> 3 </since_tizen>
133             protected bool disposed = false;
134
135             /// <summary>
136             /// Dispose.
137             /// </summary>
138             /// <since_tizen> 3 </since_tizen>
139             ~ImfEventData()
140             {
141                 if (!isDisposeQueued)
142                 {
143                     isDisposeQueued = true;
144                     DisposeQueue.Instance.Add(this);
145                 }
146             }
147
148             /// <summary>
149             /// The dispose pattern.
150             /// </summary>
151             /// <since_tizen> 3 </since_tizen>
152             public void Dispose()
153             {
154                 //Throw excpetion if Dispose() is called in separate thread.
155                 if (!Window.IsInstalled())
156                 {
157                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
158                 }
159
160                 if (isDisposeQueued)
161                 {
162                     Dispose(DisposeTypes.Implicit);
163                 }
164                 else
165                 {
166                     Dispose(DisposeTypes.Explicit);
167                     System.GC.SuppressFinalize(this);
168                 }
169             }
170
171             /// <summary>
172             /// Dispose.
173             /// </summary>
174             /// <since_tizen> 3 </since_tizen>
175             protected virtual void Dispose(DisposeTypes type)
176             {
177                 if (disposed)
178                 {
179                     return;
180                 }
181
182                 if (type == DisposeTypes.Explicit)
183                 {
184                     //Called by User
185                     //Release your own managed resources here.
186                     //You should release all of your own disposable objects here.
187
188                 }
189
190                 //Release your own unmanaged resources here.
191                 //You should not access any managed member here except static instance.
192                 //because the execution order of Finalizes is non-deterministic.
193
194                 if (swigCPtr.Handle != IntPtr.Zero)
195                 {
196                     if (swigCMemOwn)
197                     {
198                         swigCMemOwn = false;
199                         NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
200                     }
201                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
202                 }
203
204                 disposed = true;
205             }
206
207             internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
208             {
209                 ImfEventData ret = new ImfEventData(cPtr, false);
210                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211                 return ret;
212             }
213
214             /// <summary>
215             /// The default constructor.
216             /// </summary>
217             /// <since_tizen> 3 </since_tizen>
218             public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
219             {
220                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221             }
222
223             /// <summary>
224             /// The constructor.
225             /// </summary>
226             /// <param name="aEventName">The name of the event from the IMF.</param>
227             /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
228             /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
229             /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
230             /// <since_tizen> 3 </since_tizen>
231             public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
232             {
233                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234             }
235
236             /// <summary>
237             /// The pre-edit or the commit string.
238             /// </summary>
239             /// <since_tizen> 4 </since_tizen>
240             public string PredictiveString
241             {
242                 set
243                 {
244                     NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
245                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246                 }
247                 get
248                 {
249                     string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
250                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251                     return ret;
252                 }
253             }
254
255             /// <summary>
256             /// The name of the event from the IMF.
257             /// </summary>
258             /// <since_tizen> 4 </since_tizen>
259             public ImfManager.ImfEvent EventName
260             {
261                 set
262                 {
263                     NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
264                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265                 }
266                 get
267                 {
268                     ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
269                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
270                     return ret;
271                 }
272             }
273
274             /// <summary>
275             /// The start position from the current cursor position to start deleting characters.
276             /// </summary>
277             /// <since_tizen> 4 </since_tizen>
278             public int CursorOffset
279             {
280                 set
281                 {
282                     NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
283                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284                 }
285                 get
286                 {
287                     int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
288                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289                     return ret;
290                 }
291             }
292
293             /// <summary>
294             /// The number of characters to delete from the cursorOffset.
295             /// </summary>
296             /// <since_tizen> 4 </since_tizen>
297             public int NumberOfChars
298             {
299                 set
300                 {
301                     NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
302                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
303                 }
304                 get
305                 {
306                     int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
307                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308                     return ret;
309                 }
310             }
311
312         }
313
314         /// <summary>
315         /// Data required by the IMF from the callback.
316         /// </summary>
317         /// <since_tizen> 3 </since_tizen>
318         public class ImfCallbackData : global::System.IDisposable
319         {
320             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
321             /// <summary>
322             /// swigCMemOwn
323             /// </summary>
324             /// <since_tizen> 3 </since_tizen>
325             protected bool swigCMemOwn;
326
327             internal IntPtr GetImfCallbackDataPtr()
328             {
329                 return (IntPtr)swigCPtr;
330             }
331
332             internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
333             {
334                 swigCMemOwn = cMemoryOwn;
335                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
336             }
337
338             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
339             {
340                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
341             }
342
343             //A Flag to check who called Dispose(). (By User or DisposeQueue)
344             private bool isDisposeQueued = false;
345             /// <summary>
346             /// A Flat to check if it is already disposed.
347             /// </summary>
348             /// <since_tizen> 3 </since_tizen>
349             protected bool disposed = false;
350
351
352             /// <summary>
353             /// Dispose.
354             /// </summary>
355             /// <since_tizen> 3 </since_tizen>
356             ~ImfCallbackData()
357             {
358                 if (!isDisposeQueued)
359                 {
360                     isDisposeQueued = true;
361                     DisposeQueue.Instance.Add(this);
362                 }
363             }
364
365             /// <summary>
366             /// The dispose pattern.
367             /// </summary>
368             /// <since_tizen> 3 </since_tizen>
369             public void Dispose()
370             {
371                 //Throw excpetion if Dispose() is called in separate thread.
372                 if (!Window.IsInstalled())
373                 {
374                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
375                 }
376
377                 if (isDisposeQueued)
378                 {
379                     Dispose(DisposeTypes.Implicit);
380                 }
381                 else
382                 {
383                     Dispose(DisposeTypes.Explicit);
384                     System.GC.SuppressFinalize(this);
385                 }
386             }
387
388             /// <summary>
389             /// Dispose.
390             /// </summary>
391             /// <since_tizen> 3 </since_tizen>
392             protected virtual void Dispose(DisposeTypes type)
393             {
394                 if (disposed)
395                 {
396                     return;
397                 }
398
399                 if (type == DisposeTypes.Explicit)
400                 {
401                     //Called by User
402                     //Release your own managed resources here.
403                     //You should release all of your own disposable objects here.
404
405                 }
406
407                 //Release your own unmanaged resources here.
408                 //You should not access any managed member here except static instance.
409                 //because the execution order of Finalizes is non-deterministic.
410
411                 if (swigCPtr.Handle != IntPtr.Zero)
412                 {
413                     if (swigCMemOwn)
414                     {
415                         swigCMemOwn = false;
416                         NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
417                     }
418                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
419                 }
420
421                 disposed = true;
422             }
423
424             internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
425             {
426                 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
427                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428                 return ret;
429             }
430
431             /// <summary>
432             /// The default constructor.
433             /// </summary>
434             /// <since_tizen> 3 </since_tizen>
435             public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
436             {
437                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438             }
439
440             /// <summary>
441             /// The constructor.
442             /// </summary>
443             /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
444             /// <param name="aCursorPosition">The new position of the cursor.</param>
445             /// <param name="aCurrentText">The current text string.</param>
446             /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
447             /// <since_tizen> 3 </since_tizen>
448             public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
449             {
450                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
451             }
452
453             /// <summary>
454             /// The current text string.
455             /// </summary>
456             /// <since_tizen> 4 </since_tizen>
457             public string CurrentText
458             {
459                 set
460                 {
461                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
462                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
463                 }
464                 get
465                 {
466                     string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
467                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468                     return ret;
469                 }
470             }
471
472             /// <summary>
473             /// The current text string.
474             /// </summary>
475             /// <since_tizen> 4 </since_tizen>
476             public int CursorPosition
477             {
478                 set
479                 {
480                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
481                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482                 }
483                 get
484                 {
485                     int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
486                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
487                     return ret;
488                 }
489             }
490
491             /// <summary>
492             /// If the cursor position needs to be updated.
493             /// </summary>
494             /// <since_tizen> 4 </since_tizen>
495             public bool Update
496             {
497                 set
498                 {
499                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
500                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501                 }
502                 get
503                 {
504                     bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
505                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
506                     return ret;
507                 }
508             }
509
510             /// <summary>
511             /// Flags if preedit reset is required.
512             /// </summary>
513             /// <since_tizen> 4 </since_tizen>
514             public bool PreeditResetRequired
515             {
516                 set
517                 {
518                     NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
519                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520                 }
521                 get
522                 {
523                     bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
524                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525                     return ret;
526                 }
527             }
528
529         }
530
531         /// <summary>
532         /// Destroy the context of the IMF.<br/>
533         /// </summary>
534         /// <since_tizen> 5 </since_tizen>
535         public void DestroyContext()
536         {
537             NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
538             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539         }
540
541         /// <summary>
542         /// Destroy the context of the IMF.<br/>
543         /// </summary>
544         /// <since_tizen> 4 </since_tizen>
545         /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
546         [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")]
547         [EditorBrowsable(EditorBrowsableState.Never)]
548         public void Finalize()
549         {
550             DestroyContext();
551         }
552
553         /// <summary>
554         /// Retrieves a handle to the instance of the ImfManager.
555         /// </summary>
556         /// <returns>A handle to the ImfManager.</returns>
557         /// <since_tizen> 3 </since_tizen>
558         public static ImfManager Get()
559         {
560             ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
561             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
562             return ret;
563         }
564
565         /// <summary>
566         /// Activates the IMF.<br/>
567         /// It means that the text editing is started somewhere.<br/>
568         /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
569         /// </summary>
570         /// <since_tizen> 3 </since_tizen>
571         public void Activate()
572         {
573             NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
574             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
575         }
576
577         /// <summary>
578         /// Deactivates the IMF.<br/>
579         /// It means that the text editing is finished somewhere.
580         /// </summary>
581         /// <since_tizen> 3 </since_tizen>
582         public void Deactivate()
583         {
584             NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
585             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
586         }
587
588         /// <summary>
589         /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
590         /// If true, then the keyboard will be restored (activated) after focus is regained.
591         /// </summary>
592         /// <returns>The restoration status.</returns>
593         /// <since_tizen> 3 </since_tizen>
594         public bool RestoreAfterFocusLost()
595         {
596             bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
597             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
598             return ret;
599         }
600
601         /// <summary>
602         /// Sets the status whether the IMF has to restore the keyboard after losing focus.
603         /// </summary>
604         /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
605         /// <since_tizen> 3 </since_tizen>
606         public void SetRestoreAfterFocusLost(bool toggle)
607         {
608             NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
609             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
610         }
611
612         /// <summary>
613         /// Sends a message reset to the preedit state or the IMF module.
614         /// </summary>
615         /// <since_tizen> 3 </since_tizen>
616         public new void Reset()
617         {
618             NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
619             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
620         }
621
622         /// <summary>
623         /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
624         /// </summary>
625         /// <since_tizen> 3 </since_tizen>
626         public void NotifyCursorPosition()
627         {
628             NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
629             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
630         }
631
632         /// <summary>
633         /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
634         /// </summary>
635         /// <param name="cursorPosition">The position of the cursor.</param>
636         /// <since_tizen> 3 </since_tizen>
637         public void SetCursorPosition(uint cursorPosition)
638         {
639             NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
640             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641         }
642
643         /// <summary>
644         /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
645         /// </summary>
646         /// <returns>The current position of the cursor.</returns>
647         /// <since_tizen> 3 </since_tizen>
648         public uint GetCursorPosition()
649         {
650             uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
651             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652             return ret;
653         }
654
655         /// <summary>
656         /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
657         /// </summary>
658         /// <param name="text">The text string surrounding the current cursor point.</param>
659         /// <since_tizen> 3 </since_tizen>
660         public void SetSurroundingText(string text)
661         {
662             NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
663             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
664         }
665
666         /// <summary>
667         /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
668         /// </summary>
669         /// <returns>The surrounding text.</returns>
670         /// <since_tizen> 3 </since_tizen>
671         public string GetSurroundingText()
672         {
673             string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
674             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
675             return ret;
676         }
677
678         /// <summary>
679         /// Notifies the IMF context that text input is set to multiline or not.
680         /// </summary>
681         /// <param name="multiLine">True if multiline text input is used.</param>
682         /// <since_tizen> 3 </since_tizen>
683         public void NotifyTextInputMultiLine(bool multiLine)
684         {
685             NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
686             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
687         }
688
689         /// <summary>
690         /// Returns the text direction of the keyboard's current input language.
691         /// </summary>
692         /// <returns>The direction of the text.</returns>
693         /// <since_tizen> 3 </since_tizen>
694         public ImfManager.TextDirection GetTextDirection()
695         {
696             ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
697             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
698             return ret;
699         }
700
701         /// <summary>
702         /// Provides the size and the position of the keyboard.<br/>
703         /// The position is relative to whether the keyboard is visible or not.<br/>
704         /// If the keyboard is not visible, then the position will be off the screen.<br/>
705         /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
706         /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
707         /// </summary>
708         /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
709         /// <since_tizen> 3 </since_tizen>
710         public Rectangle GetInputMethodArea()
711         {
712             Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
713             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714             return ret;
715         }
716
717         internal void ApplyOptions(InputMethodOptions options)
718         {
719             NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
720             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
721         }
722
723         /// <summary>
724         /// Sets up the input-panel specific data.
725         /// </summary>
726         /// <param name="text">The specific data to be set to the input panel.</param>
727         /// <since_tizen> 3 </since_tizen>
728         public void SetInputPanelUserData(string text)
729         {
730             NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
731             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732         }
733
734         /// <summary>
735         /// Gets the specific data of the current active input panel.
736         /// </summary>
737         /// <param name="text">The specific data to be received from the input panel.</param>
738         /// <since_tizen> 4 </since_tizen>
739         public void GetInputPanelUserData(out string text)
740         {
741             NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
742             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
743         }
744
745         /// <summary>
746         /// Gets the state of the current active input panel.
747         /// </summary>
748         /// <returns>The state of the input panel.</returns>
749         /// <since_tizen> 3 </since_tizen>
750         public ImfManager.State GetInputPanelState()
751         {
752             ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
753             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
754             return ret;
755         }
756
757         /// <summary>
758         /// Sets the return key on the input panel to be visible or invisible.<br/>
759         /// The default is true.
760         /// </summary>
761         /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
762         /// <since_tizen> 3 </since_tizen>
763         public void SetReturnKeyState(bool visible)
764         {
765             NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
766             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
767         }
768
769         /// <summary>
770         /// Enables to show the input panel automatically when focused.
771         /// </summary>
772         /// <param name="enabled">If true, the input panel will be shown when focused.</param>
773         /// <since_tizen> 3 </since_tizen>
774         public void AutoEnableInputPanel(bool enabled)
775         {
776             NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
777             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
778         }
779
780         /// <summary>
781         /// Shows the input panel.
782         /// </summary>
783         /// <since_tizen> 3 </since_tizen>
784         public void ShowInputPanel()
785         {
786             NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
787             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788         }
789
790         /// <summary>
791         /// Hides the input panel.
792         /// </summary>
793         /// <since_tizen> 3 </since_tizen>
794         public void HideInputPanel()
795         {
796             NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
797             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
798         }
799
800         /// <summary>
801         /// Gets the keyboard type.<br/>
802         /// The default keyboard type is SoftwareKeyboard.
803         /// </summary>
804         /// <returns>The keyboard type.</returns>
805         /// <since_tizen> 4 </since_tizen>
806         public ImfManager.KeyboardType GetKeyboardType()
807         {
808             ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
809             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810             return ret;
811         }
812
813         /// <summary>
814         /// Gets the current language locale of the input panel.<br/>
815         /// For example, en_US, en_GB, en_PH, fr_FR, ...
816         /// </summary>
817         /// <returns>The current language locale of the input panel.</returns>
818         /// <since_tizen> 4 </since_tizen>
819         public string GetInputPanelLocale()
820         {
821             string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
822             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
823             return ret;
824         }
825
826         /// <summary>
827         /// The constructor.
828         /// </summary>
829         /// <since_tizen> 3 </since_tizen>
830         public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
831         {
832             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833         }
834
835         /// <summary>
836         /// ImfManager activated event arguments.
837         /// </summary>
838         /// <since_tizen> 4 </since_tizen>
839         public class ActivatedEventArgs : EventArgs
840         {
841             /// <summary>
842             /// ImfManager
843             /// </summary>
844             /// <since_tizen> 4 </since_tizen>
845             public ImfManager ImfManager
846             {
847                 get;
848                 set;
849             }
850         }
851
852         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
853         private delegate void ActivatedEventCallbackType(IntPtr data);
854         private ActivatedEventCallbackType _activatedEventCallback;
855         private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
856
857         /// <summary>
858         /// ImfManager activated.
859         /// </summary>
860         /// <since_tizen> 4 </since_tizen>
861         public event EventHandler<ActivatedEventArgs> Activated
862         {
863             add
864             {
865                 if (_activatedEventHandler == null)
866                 {
867                     _activatedEventCallback = OnActivated;
868                     ActivatedSignal().Connect(_activatedEventCallback);
869                 }
870
871                 _activatedEventHandler += value;
872             }
873             remove
874             {
875                 _activatedEventHandler -= value;
876
877                 if (_activatedEventHandler == null && _activatedEventCallback != null)
878                 {
879                     ActivatedSignal().Disconnect(_activatedEventCallback);
880                 }
881             }
882         }
883
884         private void OnActivated(IntPtr data)
885         {
886             ActivatedEventArgs e = new ActivatedEventArgs();
887
888             if (data != null)
889             {
890                 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
891             }
892
893             if (_activatedEventHandler != null)
894             {
895                 _activatedEventHandler(this, e);
896             }
897         }
898
899         internal ActivatedSignalType ActivatedSignal()
900         {
901             ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
902             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903             return ret;
904         }
905
906         /// <summary>
907         /// ImfManager event received event arguments.
908         /// </summary>
909         /// <since_tizen> 4 </since_tizen>
910         public class EventReceivedEventArgs : EventArgs
911         {
912             /// <summary>
913             /// ImfManager
914             /// </summary>
915             /// <since_tizen> 4 </since_tizen>
916             public ImfManager ImfManager
917             {
918                 get;
919                 set;
920             }
921
922             /// <summary>
923             /// ImfEventData
924             /// </summary>
925             /// <since_tizen> 4 </since_tizen>
926             public ImfEventData ImfEventData
927             {
928                 get;
929                 set;
930             }
931         }
932
933         private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
934         private EventReceivedEventCallbackType _eventReceivedEventCallback;
935         private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
936
937         /// <summary>
938         /// ImfManager event received.
939         /// </summary>
940         /// <since_tizen> 4 </since_tizen>
941         public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
942         {
943             add
944             {
945                 if (_eventReceivedEventHandler == null)
946                 {
947                     _eventReceivedEventCallback = OnEventReceived;
948                     EventReceivedSignal().Connect(_eventReceivedEventCallback);
949                 }
950
951                 _eventReceivedEventHandler += value;
952             }
953             remove
954             {
955                 _eventReceivedEventHandler -= value;
956
957                 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
958                 {
959                     EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
960                 }
961             }
962         }
963
964         private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
965         {
966             ImfCallbackData imfCallbackData = null;
967
968             EventReceivedEventArgs e = new EventReceivedEventArgs();
969
970             if (imfManager != null)
971             {
972                 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
973             }
974             if (imfEventData != null)
975             {
976                 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
977             }
978
979             if (_eventReceivedEventHandler != null)
980             {
981                 imfCallbackData = _eventReceivedEventHandler(this, e);
982             }
983             if (imfCallbackData != null)
984             {
985                 return imfCallbackData.GetImfCallbackDataPtr();
986             }
987             else
988             {
989                 return new ImfCallbackData().GetImfCallbackDataPtr();
990             }
991         }
992
993         internal ImfEventSignalType EventReceivedSignal()
994         {
995             ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
996             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
997             return ret;
998         }
999
1000         /// <summary>
1001         /// ImfManager status changed event arguments.
1002         /// </summary>
1003         /// <since_tizen> 4 </since_tizen>
1004         public class StatusChangedEventArgs : EventArgs
1005         {
1006             /// <summary>
1007             /// ImfManager status
1008             /// </summary>
1009             /// <since_tizen> 4 </since_tizen>
1010             public bool StatusChanged
1011             {
1012                 get;
1013                 set;
1014             }
1015         }
1016
1017         private delegate void StatusChangedEventCallbackType(bool statusChanged);
1018         private StatusChangedEventCallbackType _statusChangedEventCallback;
1019         private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1020
1021         /// <summary>
1022         /// ImfManager status changed.
1023         /// </summary>
1024         /// <since_tizen> 4 </since_tizen>
1025         public event EventHandler<StatusChangedEventArgs> StatusChanged
1026         {
1027             add
1028             {
1029                 if (_statusChangedEventHandler == null)
1030                 {
1031                     _statusChangedEventCallback = OnStatusChanged;
1032                     StatusChangedSignal().Connect(_statusChangedEventCallback);
1033                 }
1034
1035                 _statusChangedEventHandler += value;
1036             }
1037             remove
1038             {
1039                 _statusChangedEventHandler -= value;
1040
1041                 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1042                 {
1043                     StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1044                 }
1045             }
1046         }
1047
1048         private void OnStatusChanged(bool statusChanged)
1049         {
1050             StatusChangedEventArgs e = new StatusChangedEventArgs();
1051
1052             e.StatusChanged = statusChanged;
1053
1054             if (_statusChangedEventHandler != null)
1055             {
1056                 _statusChangedEventHandler(this, e);
1057             }
1058         }
1059
1060         internal StatusSignalType StatusChangedSignal()
1061         {
1062             StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1063             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1064             return ret;
1065         }
1066
1067         /// <summary>
1068         /// ImfManager resized event.
1069         /// </summary>
1070         /// <since_tizen> 4 </since_tizen>
1071         public class ResizedEventArgs : EventArgs
1072         {
1073             /// <summary>
1074             /// resized.
1075             /// </summary>
1076             /// <since_tizen> 4 </since_tizen>
1077             public int Resized
1078             {
1079                 get;
1080                 set;
1081             }
1082         }
1083
1084         private delegate void ResizedEventCallbackType(int resized);
1085         private ResizedEventCallbackType _resizedEventCallback;
1086         private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1087
1088         /// <summary>
1089         /// ImfManager resized.
1090         /// </summary>
1091         /// <since_tizen> 4 </since_tizen>
1092         public event EventHandler<ResizedEventArgs> Resized
1093         {
1094             add
1095             {
1096                 if (_resizedEventHandler == null)
1097                 {
1098                     _resizedEventCallback = OnResized;
1099                     ResizedSignal().Connect(_resizedEventCallback);
1100                 }
1101
1102                 _resizedEventHandler += value;
1103             }
1104             remove
1105             {
1106                 _resizedEventHandler -= value;
1107
1108                 if (_resizedEventHandler == null && _resizedEventCallback != null)
1109                 {
1110                     ResizedSignal().Disconnect(_resizedEventCallback);
1111                 }
1112             }
1113         }
1114
1115         private void OnResized(int resized)
1116         {
1117             ResizedEventArgs e = new ResizedEventArgs();
1118             e.Resized = resized;
1119
1120             if (_resizedEventHandler != null)
1121             {
1122                 _resizedEventHandler(this, e);
1123             }
1124         }
1125
1126         internal KeyboardResizedSignalType ResizedSignal()
1127         {
1128             KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1129             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1130             return ret;
1131         }
1132
1133         /// <summary>
1134         /// ImfManager language changed event args.
1135         /// </summary>
1136         /// <since_tizen> 4 </since_tizen>
1137         public class LanguageChangedEventArgs : EventArgs
1138         {
1139             /// <summary>
1140             /// language changed.
1141             /// </summary>
1142             /// <since_tizen> 4 </since_tizen>
1143             public int LanguageChanged
1144             {
1145                 get;
1146                 set;
1147             }
1148         }
1149
1150         private delegate void LanguageChangedEventCallbackType(int languageChanged);
1151         private LanguageChangedEventCallbackType _languageChangedEventCallback;
1152         private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1153
1154         /// <summary>
1155         /// ImfManager language changed.
1156         /// </summary>
1157         /// <since_tizen> 4 </since_tizen>
1158         public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1159         {
1160             add
1161             {
1162                 if (_languageChangedEventHandler == null)
1163                 {
1164                     _languageChangedEventCallback = OnLanguageChanged;
1165                     LanguageChangedSignal().Connect(_languageChangedEventCallback);
1166                 }
1167
1168                 _languageChangedEventHandler += value;
1169             }
1170             remove
1171             {
1172                 _languageChangedEventHandler -= value;
1173
1174                 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1175                 {
1176                     LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1177                 }
1178             }
1179         }
1180
1181         private void OnLanguageChanged(int languageChanged)
1182         {
1183             LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1184             e.LanguageChanged = languageChanged;
1185
1186             if (_languageChangedEventHandler != null)
1187             {
1188                 _languageChangedEventHandler(this, e);
1189             }
1190         }
1191
1192         internal LanguageChangedSignalType LanguageChangedSignal()
1193         {
1194             LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1195             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1196             return ret;
1197         }
1198
1199         /// <summary>
1200         /// ImfManager keyboard type changed event arguments.
1201         /// </summary>
1202         /// <since_tizen> 4 </since_tizen>
1203         public class KeyboardTypeChangedEventArgs : EventArgs
1204         {
1205             /// <summary>
1206             /// ImfManager keyboard type
1207             /// </summary>
1208             /// <since_tizen> 4 </since_tizen>
1209             public KeyboardType KeyboardType
1210             {
1211                 get;
1212                 set;
1213             }
1214         }
1215
1216         private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1217         private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1218         private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1219
1220         /// <summary>
1221         /// ImfManager keyboard type changed.
1222         /// </summary>
1223         /// <since_tizen> 4 </since_tizen>
1224         public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1225         {
1226             add
1227             {
1228                 if (_keyboardTypeChangedEventHandler == null)
1229                 {
1230                     _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1231                     KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1232                 }
1233
1234                 _keyboardTypeChangedEventHandler += value;
1235             }
1236             remove
1237             {
1238                 _keyboardTypeChangedEventHandler -= value;
1239
1240                 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1241                 {
1242                     KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1243                 }
1244             }
1245         }
1246
1247         private void OnKeyboardTypeChanged(KeyboardType type)
1248         {
1249             KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1250
1251             e.KeyboardType = type;
1252
1253             if (_keyboardTypeChangedEventHandler != null)
1254             {
1255                 _keyboardTypeChangedEventHandler(this, e);
1256             }
1257         }
1258
1259         internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1260         {
1261             KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1262             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1263             return ret;
1264         }
1265
1266         /// <summary>
1267         /// The direction of the text.
1268         /// </summary>
1269         /// <since_tizen> 3 </since_tizen>
1270         public enum TextDirection
1271         {
1272             /// <summary>
1273             /// Left to right.
1274             /// </summary>
1275             LeftToRight,
1276             /// <summary>
1277             /// Right to left.
1278             /// </summary>
1279             RightToLeft
1280         }
1281
1282         /// <summary>
1283         /// Events that are generated by the IMF.
1284         /// </summary>
1285         /// <since_tizen> 3 </since_tizen>
1286         public enum ImfEvent
1287         {
1288             /// <summary>
1289             /// No event.
1290             /// </summary>
1291             /// <since_tizen> 4 </since_tizen>
1292             Void,
1293             /// <summary>
1294             /// Pre-Edit changed.
1295             /// </summary>
1296             /// <since_tizen> 4 </since_tizen>
1297             Preedit,
1298             /// <summary>
1299             /// Commit received.
1300             /// </summary>
1301             /// <since_tizen> 4 </since_tizen>
1302             Commit,
1303             /// <summary>
1304             /// An event to delete a range of characters from the string.
1305             /// </summary>
1306             /// <since_tizen> 4 </since_tizen>
1307             DeleteSurrounding,
1308             /// <summary>
1309             /// An event to query string and the cursor position.
1310             /// </summary>
1311             /// <since_tizen> 4 </since_tizen>
1312             GetSurrounding,
1313             /// <summary>
1314             /// Private command sent from the input panel.
1315             /// </summary>
1316             /// <since_tizen> 4 </since_tizen>
1317             PrivateCommand
1318         }
1319
1320         /// <summary>
1321         /// Enumeration for the state of the input panel.
1322         /// </summary>
1323         /// <since_tizen> 3 </since_tizen>
1324         public enum State
1325         {
1326             /// <summary>
1327             /// Unknown state.
1328             /// </summary>
1329             /// <since_tizen> 4 </since_tizen>
1330             Default = 0,
1331             /// <summary>
1332             /// Input panel is shown.
1333             /// </summary>
1334             /// <since_tizen> 4 </since_tizen>
1335             Show,
1336             /// <summary>
1337             /// Input panel is hidden.
1338             /// </summary>
1339             /// <since_tizen> 4 </since_tizen>
1340             Hide,
1341             /// <summary>
1342             /// Input panel in process of being shown.
1343             /// </summary>
1344             /// <since_tizen> 4 </since_tizen>
1345             WillShow
1346         }
1347
1348         /// <summary>
1349         /// Enumeration for the types of keyboard.
1350         /// </summary>
1351         /// <since_tizen> 4 </since_tizen>
1352         public enum KeyboardType
1353         {
1354             /// <summary>
1355             /// Software keyboard (virtual keyboard) is default.
1356             /// </summary>
1357             /// <since_tizen> 4 </since_tizen>
1358             SoftwareKeyboard,
1359             /// <summary>
1360             /// Hardware keyboard.
1361             /// </summary>
1362             /// <since_tizen> 4 </since_tizen>
1363             HardwareKeyboard
1364         }
1365     }
1366 }