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