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