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