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