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