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