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