2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 using System.Runtime.InteropServices;
20 using System.ComponentModel;
25 /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
27 /// <since_tizen> 3 </since_tizen>
28 public class ImfManager : BaseHandle
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
42 private static readonly ImfManager instance = ImfManager.Get();
45 /// Gets the singleton of the ImfManager object.
47 /// <since_tizen> 5 </since_tizen>
48 public static ImfManager Instance
59 /// <param name="type">Dispose Type</param>
60 /// <since_tizen> 3 </since_tizen>
61 /// Please DO NOT use! This will be deprecated!
62 /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
63 /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
64 [Obsolete("Please do not use! This will be deprecated!")]
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 protected override void Dispose(DisposeTypes type)
73 if (type == DisposeTypes.Explicit)
76 //Release your own managed resources here.
77 //You should release all of your own disposable objects here.
81 //Release your own unmanaged resources here.
82 //You should not access any managed member here except static instance.
83 //because the execution order of Finalizes is non-deterministic.
85 if (_keyboardTypeChangedEventCallback != null)
87 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
90 if (_imfManagerLanguageChangedEventCallback != null)
92 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
95 if (_imfManagerResizedEventCallback != null)
97 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
100 if (_imfManagerStatusChangedEventCallback != null)
102 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
105 if (_imfManagerEventReceivedEventCallback != null)
107 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
110 if (_imfManagerActivatedEventCallback != null)
112 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
115 if (swigCPtr.Handle != global::System.IntPtr.Zero)
120 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
122 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
129 /// This structure is used to pass on data from the IMF regarding predictive text.
131 /// <since_tizen> 3 </since_tizen>
132 public class ImfEventData : global::System.IDisposable
134 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
138 /// <since_tizen> 3 </since_tizen>
139 protected bool swigCMemOwn;
141 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
143 swigCMemOwn = cMemoryOwn;
144 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
147 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
149 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
152 //A Flag to check who called Dispose(). (By User or DisposeQueue)
153 private bool isDisposeQueued = false;
155 /// A Flat to check if it is already disposed.
157 /// <since_tizen> 3 </since_tizen>
158 protected bool disposed = false;
163 /// <since_tizen> 3 </since_tizen>
166 if (!isDisposeQueued)
168 isDisposeQueued = true;
169 DisposeQueue.Instance.Add(this);
174 /// The dispose pattern.
176 /// <since_tizen> 3 </since_tizen>
177 public void Dispose()
179 //Throw excpetion if Dispose() is called in separate thread.
180 if (!Window.IsInstalled())
182 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
187 Dispose(DisposeTypes.Implicit);
191 Dispose(DisposeTypes.Explicit);
192 System.GC.SuppressFinalize(this);
199 /// <since_tizen> 3 </since_tizen>
200 protected virtual void Dispose(DisposeTypes type)
207 if (type == DisposeTypes.Explicit)
210 //Release your own managed resources here.
211 //You should release all of your own disposable objects here.
215 //Release your own unmanaged resources here.
216 //You should not access any managed member here except static instance.
217 //because the execution order of Finalizes is non-deterministic.
219 if (swigCPtr.Handle != IntPtr.Zero)
224 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
226 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
232 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
234 ImfEventData ret = new ImfEventData(cPtr, false);
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 /// The default constructor.
242 /// <since_tizen> 3 </since_tizen>
243 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 /// <param name="aEventName">The name of the event from the IMF.</param>
252 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
253 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
254 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
255 /// <since_tizen> 3 </since_tizen>
256 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 /// The pre-edit or the commit string.
264 /// /// <since_tizen> 3 </since_tizen>
265 [Obsolete("Please do not use! This will be deprecated! Please use PredictiveString instead!")]
266 [EditorBrowsable(EditorBrowsableState.Never)]
267 public string predictiveString
271 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283 /// The pre-edit or the commit string.
285 /// <since_tizen> 4 </since_tizen>
286 public string PredictiveString
290 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 /// The name of the event from the IMF.
304 /// Please do not use! this will be deprecated
305 /// <since_tizen> 3 </since_tizen>
306 [Obsolete("Please do not use! This will be deprecated! Please use EventName instead!")]
307 [EditorBrowsable(EditorBrowsableState.Never)]
308 public ImfManager.ImfEvent eventName
312 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 /// The name of the event from the IMF.
326 /// <since_tizen> 4 </since_tizen>
327 public ImfManager.ImfEvent EventName
331 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 /// The start position from the current cursor position to start deleting characters.
345 /// Please do not use! this will be deprecated
346 /// <since_tizen> 3 </since_tizen>
347 [Obsolete("Please do not use! This will be deprecated! Please use CursorOffset instead!")]
348 [EditorBrowsable(EditorBrowsableState.Never)]
349 public int cursorOffset
353 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
354 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
358 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365 /// The start position from the current cursor position to start deleting characters.
367 /// <since_tizen> 4 </since_tizen>
368 public int CursorOffset
372 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
373 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
378 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
384 /// The number of characters to delete from the cursorOffset.
386 /// Please do not use! this will be deprecated
387 /// <since_tizen> 3 </since_tizen>
388 [Obsolete("Please do not use! This will be deprecated! Please use NumberOfChars instead!")]
389 [EditorBrowsable(EditorBrowsableState.Never)]
390 public int numberOfChars
394 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
395 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
400 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406 /// The number of characters to delete from the cursorOffset.
408 /// <since_tizen> 4 </since_tizen>
409 public int NumberOfChars
413 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
414 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
418 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
419 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
427 /// Data required by the IMF from the callback.
429 /// <since_tizen> 3 </since_tizen>
430 public class ImfCallbackData : global::System.IDisposable
432 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
436 /// <since_tizen> 3 </since_tizen>
437 protected bool swigCMemOwn;
439 internal IntPtr GetImfCallbackDataPtr()
441 return (IntPtr)swigCPtr;
444 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
446 swigCMemOwn = cMemoryOwn;
447 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
450 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
452 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
455 //A Flag to check who called Dispose(). (By User or DisposeQueue)
456 private bool isDisposeQueued = false;
458 /// A Flat to check if it is already disposed.
460 /// <since_tizen> 3 </since_tizen>
461 protected bool disposed = false;
467 /// <since_tizen> 3 </since_tizen>
470 if (!isDisposeQueued)
472 isDisposeQueued = true;
473 DisposeQueue.Instance.Add(this);
478 /// The dispose pattern.
480 /// <since_tizen> 3 </since_tizen>
481 public void Dispose()
483 //Throw excpetion if Dispose() is called in separate thread.
484 if (!Window.IsInstalled())
486 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
491 Dispose(DisposeTypes.Implicit);
495 Dispose(DisposeTypes.Explicit);
496 System.GC.SuppressFinalize(this);
503 /// <since_tizen> 3 </since_tizen>
504 protected virtual void Dispose(DisposeTypes type)
511 if (type == DisposeTypes.Explicit)
514 //Release your own managed resources here.
515 //You should release all of your own disposable objects here.
519 //Release your own unmanaged resources here.
520 //You should not access any managed member here except static instance.
521 //because the execution order of Finalizes is non-deterministic.
523 if (swigCPtr.Handle != IntPtr.Zero)
528 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
530 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
536 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
538 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
539 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544 /// The default constructor.
546 /// <since_tizen> 3 </since_tizen>
547 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
549 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
556 /// <param name="aCursorPosition">The new position of the cursor.</param>
557 /// <param name="aCurrentText">The current text string.</param>
558 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
559 /// <since_tizen> 3 </since_tizen>
560 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
562 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
566 /// The current text string.
568 /// Please do not use! this will be deprecated
569 /// <since_tizen> 3 </since_tizen>
570 [Obsolete("Please do not use! This will be deprecated! Please use CurrentText instead!")]
571 [EditorBrowsable(EditorBrowsableState.Never)]
572 public string currentText
576 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
577 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
582 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
588 /// The current text string.
590 /// <since_tizen> 4 </since_tizen>
591 public string CurrentText
595 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
596 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
600 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
601 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607 /// The current text string.
609 /// Please do not use! this will be deprecated
610 /// <since_tizen> 3 </since_tizen>
611 [Obsolete("Please do not use! This will be deprecated! Please use CursorPosition instead!")]
612 [EditorBrowsable(EditorBrowsableState.Never)]
613 public int cursorPosition
617 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
618 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
623 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
629 /// The current text string.
631 /// <since_tizen> 4 </since_tizen>
632 public int CursorPosition
636 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
637 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
642 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648 /// If the cursor position needs to be updated.
650 /// Please do not use! this will be deprecated
651 /// <since_tizen> 3 </since_tizen>
652 [Obsolete("Please do not use! This will be deprecated! Please use Update instead!")]
653 [EditorBrowsable(EditorBrowsableState.Never)]
658 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
659 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
664 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
670 /// If the cursor position needs to be updated.
672 /// <since_tizen> 4 </since_tizen>
677 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
678 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
682 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
683 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
689 /// Flags if preedit reset is required.
691 /// Please do not use! this will be deprecated
692 /// <since_tizen> 3 </since_tizen>
693 [Obsolete("Please do not use! This will be deprecated! Please use PreeditResetRequired instead!")]
694 [EditorBrowsable(EditorBrowsableState.Never)]
695 public bool preeditResetRequired
699 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
700 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
705 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
711 /// Flags if preedit reset is required.
713 /// <since_tizen> 4 </since_tizen>
714 public bool PreeditResetRequired
718 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
719 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
724 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732 /// Destroy the context of the IMF.<br/>
734 /// <since_tizen> 5 </since_tizen>
735 public void DestroyContext()
737 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
738 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742 /// Destroy the context of the IMF.<br/>
744 /// <since_tizen> 4 </since_tizen>
745 /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
746 [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")]
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public void Finalize()
754 /// Retrieves a handle to the instance of the ImfManager.
756 /// <returns>A handle to the ImfManager.</returns>
757 /// <since_tizen> 3 </since_tizen>
758 public static ImfManager Get()
760 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
761 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766 /// Activates the IMF.<br/>
767 /// It means that the text editing is started somewhere.<br/>
768 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
770 /// <since_tizen> 3 </since_tizen>
771 public void Activate()
773 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
774 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
778 /// Deactivates the IMF.<br/>
779 /// It means that the text editing is finished somewhere.
781 /// <since_tizen> 3 </since_tizen>
782 public void Deactivate()
784 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
785 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
789 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
790 /// If true, then the keyboard will be restored (activated) after focus is regained.
792 /// <returns>The restoration status.</returns>
793 /// <since_tizen> 3 </since_tizen>
794 public bool RestoreAfterFocusLost()
796 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
797 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
802 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
804 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
805 /// <since_tizen> 3 </since_tizen>
806 public void SetRestoreAfterFocusLost(bool toggle)
808 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
809 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
813 /// Sends a message reset to the preedit state or the IMF module.
815 /// <since_tizen> 3 </since_tizen>
816 public new void Reset()
818 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
819 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
823 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
825 /// <since_tizen> 3 </since_tizen>
826 public void NotifyCursorPosition()
828 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
835 /// <param name="cursorPosition">The position of the cursor.</param>
836 /// <since_tizen> 3 </since_tizen>
837 public void SetCursorPosition(uint cursorPosition)
839 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
840 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
844 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
846 /// <returns>The current position of the cursor.</returns>
847 /// <since_tizen> 3 </since_tizen>
848 public uint GetCursorPosition()
850 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
851 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
856 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
858 /// <param name="text">The text string surrounding the current cursor point.</param>
859 /// <since_tizen> 3 </since_tizen>
860 public void SetSurroundingText(string text)
862 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
863 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
867 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
869 /// <returns>The surrounding text.</returns>
870 /// <since_tizen> 3 </since_tizen>
871 public string GetSurroundingText()
873 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
874 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879 /// Notifies the IMF context that text input is set to multiline or not.
881 /// <param name="multiLine">True if multiline text input is used.</param>
882 /// <since_tizen> 3 </since_tizen>
883 public void NotifyTextInputMultiLine(bool multiLine)
885 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
886 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
890 /// Returns the text direction of the keyboard's current input language.
892 /// <returns>The direction of the text.</returns>
893 /// <since_tizen> 3 </since_tizen>
894 public ImfManager.TextDirection GetTextDirection()
896 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
897 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
902 /// Provides the size and the position of the keyboard.<br/>
903 /// The position is relative to whether the keyboard is visible or not.<br/>
904 /// If the keyboard is not visible, then the position will be off the screen.<br/>
905 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
906 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
908 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
909 /// <since_tizen> 3 </since_tizen>
910 public Rectangle GetInputMethodArea()
912 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
913 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
917 internal void ApplyOptions(InputMethodOptions options)
919 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
920 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
924 /// Sets up the input-panel specific data.
926 /// <param name="text">The specific data to be set to the input panel.</param>
927 /// <since_tizen> 3 </since_tizen>
928 public void SetInputPanelUserData(string text)
930 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
931 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935 /// Gets the specific data of the current active input panel.
937 /// <param name="text">The specific data to be received from the input panel.</param>
938 /// <since_tizen> 4 </since_tizen>
939 public void GetInputPanelUserData(out string text)
941 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 /// Gets the state of the current active input panel.
948 /// <returns>The state of the input panel.</returns>
949 /// <since_tizen> 3 </since_tizen>
950 public ImfManager.State GetInputPanelState()
952 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
953 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 /// Sets the return key on the input panel to be visible or invisible.<br/>
959 /// The default is true.
961 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
962 /// <since_tizen> 3 </since_tizen>
963 public void SetReturnKeyState(bool visible)
965 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
966 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
970 /// Enables to show the input panel automatically when focused.
972 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
973 /// <since_tizen> 3 </since_tizen>
974 public void AutoEnableInputPanel(bool enabled)
976 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981 /// Shows the input panel.
983 /// <since_tizen> 3 </since_tizen>
984 public void ShowInputPanel()
986 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 /// Hides the input panel.
993 /// <since_tizen> 3 </since_tizen>
994 public void HideInputPanel()
996 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 /// Gets the keyboard type.<br/>
1002 /// The default keyboard type is SoftwareKeyboard.
1004 /// <returns>The keyboard type.</returns>
1005 /// <since_tizen> 4 </since_tizen>
1006 public ImfManager.KeyboardType GetKeyboardType()
1008 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
1009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1014 /// Gets the current language locale of the input panel.<br/>
1015 /// For example, en_US, en_GB, en_PH, fr_FR, ...
1017 /// <returns>The current language locale of the input panel.</returns>
1018 /// <since_tizen> 4 </since_tizen>
1019 public string GetInputPanelLocale()
1021 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
1022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027 /// The constructor.
1029 /// <since_tizen> 3 </since_tizen>
1030 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
1032 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1036 /// ImfManager activated event arguments.
1038 /// Please do not use! this will be deprecated
1039 /// <since_tizen> 3 </since_tizen>
1040 [Obsolete("Please do not use! This will be deprecated! Please use ActivatedEventArgs instead!")]
1041 [EditorBrowsable(EditorBrowsableState.Never)]
1042 public class ImfManagerActivatedEventArgs : EventArgs
1047 /// <since_tizen> 3 </since_tizen>
1048 public ImfManager ImfManager
1055 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1056 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1057 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1058 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1061 /// ImfManager activated event.
1063 ///Please do not use! this will be deprecated
1064 /// <since_tizen> 3 </since_tizen>
1065 [Obsolete("Please do not use! This will be deprecated! Please use Activated instead!")]
1066 [EditorBrowsable(EditorBrowsableState.Never)]
1067 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1071 if (_imfManagerActivatedEventHandler == null)
1073 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1074 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1077 _imfManagerActivatedEventHandler += value;
1081 _imfManagerActivatedEventHandler -= value;
1083 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1085 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1090 private void OnImfManagerActivated(global::System.IntPtr data)
1092 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1096 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1099 if (_imfManagerActivatedEventHandler != null)
1101 _imfManagerActivatedEventHandler(this, e);
1106 /// ImfManager activated event arguments.
1108 /// <since_tizen> 4 </since_tizen>
1109 public class ActivatedEventArgs : EventArgs
1114 /// <since_tizen> 4 </since_tizen>
1115 public ImfManager ImfManager
1122 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1123 private delegate void ActivatedEventCallbackType(IntPtr data);
1124 private ActivatedEventCallbackType _activatedEventCallback;
1125 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1128 /// ImfManager activated.
1130 /// <since_tizen> 4 </since_tizen>
1131 public event EventHandler<ActivatedEventArgs> Activated
1135 if (_activatedEventHandler == null)
1137 _activatedEventCallback = OnActivated;
1138 ActivatedSignal().Connect(_activatedEventCallback);
1141 _activatedEventHandler += value;
1145 _activatedEventHandler -= value;
1147 if (_activatedEventHandler == null && _activatedEventCallback != null)
1149 ActivatedSignal().Disconnect(_activatedEventCallback);
1154 private void OnActivated(IntPtr data)
1156 ActivatedEventArgs e = new ActivatedEventArgs();
1160 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1163 if (_activatedEventHandler != null)
1165 _activatedEventHandler(this, e);
1170 /// ImfManager activated signal.
1172 /// Please do not use! this will be internal
1173 /// <since_tizen> 3 </since_tizen>
1174 [Obsolete("Please do not use! This will be deprecated!")]
1175 [EditorBrowsable(EditorBrowsableState.Never)]
1176 public ActivatedSignalType ActivatedSignal()
1178 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1184 /// ImfManager event received event arguments.
1186 /// Please do not use! this will be deprecated
1187 /// <since_tizen> 3 </since_tizen>
1188 [Obsolete("Please do not use! This will be deprecated! Please use EventReceivedEventArgs instead!")]
1189 [EditorBrowsable(EditorBrowsableState.Never)]
1190 public class ImfManagerEventReceivedEventArgs : EventArgs
1195 /// <since_tizen> 3 </since_tizen>
1196 public ImfManager ImfManager
1203 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1204 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1205 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1208 /// ImfManager event received.
1210 ///Please do not use! this will be deprecated
1211 /// <since_tizen> 3 </since_tizen>
1212 [Obsolete("Please do not use! This will be deprecated! Please use EventReceived instead!")]
1213 [EditorBrowsable(EditorBrowsableState.Never)]
1214 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1218 if (_imfManagerEventReceivedEventHandler == null)
1220 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1221 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1224 _imfManagerEventReceivedEventHandler += value;
1228 _imfManagerEventReceivedEventHandler -= value;
1230 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1232 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1237 private void OnImfManagerEventReceived(global::System.IntPtr data)
1239 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1243 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1246 if (_imfManagerEventReceivedEventHandler != null)
1248 _imfManagerEventReceivedEventHandler(this, e);
1253 /// ImfManager event received event arguments.
1255 /// <since_tizen> 4 </since_tizen>
1256 public class EventReceivedEventArgs : EventArgs
1261 /// <since_tizen> 4 </since_tizen>
1262 public ImfManager ImfManager
1271 /// <since_tizen> 4 </since_tizen>
1272 public ImfEventData ImfEventData
1279 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1280 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1281 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1284 /// ImfManager event received.
1286 /// <since_tizen> 4 </since_tizen>
1287 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1291 if (_eventReceivedEventHandler == null)
1293 _eventReceivedEventCallback = OnEventReceived;
1294 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1297 _eventReceivedEventHandler += value;
1301 _eventReceivedEventHandler -= value;
1303 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1305 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1310 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1312 ImfCallbackData imfCallbackData = null;
1314 EventReceivedEventArgs e = new EventReceivedEventArgs();
1316 if (imfManager != null)
1318 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1320 if (imfEventData != null)
1322 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1325 if (_eventReceivedEventHandler != null)
1327 imfCallbackData = _eventReceivedEventHandler(this, e);
1329 if (imfCallbackData != null)
1331 return imfCallbackData.GetImfCallbackDataPtr();
1335 return new ImfCallbackData().GetImfCallbackDataPtr();
1340 /// ImfManager event received signal.
1342 /// Please do not use! this will be internal
1343 /// <since_tizen> 3 </since_tizen>
1344 [Obsolete("Please do not use! This will be deprecated!")]
1345 [EditorBrowsable(EditorBrowsableState.Never)]
1346 public ImfEventSignalType EventReceivedSignal()
1348 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1349 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1354 /// ImfManager status changed event arguments.
1356 ///Please do not use! this will be deprecated
1357 /// <since_tizen> 3 </since_tizen>
1358 [Obsolete("Please do not use! This will be deprecated! Please use StatusChangedEventArgs instead!")]
1359 [EditorBrowsable(EditorBrowsableState.Never)]
1360 public class ImfManagerStatusChangedEventArgs : EventArgs
1365 /// <since_tizen> 3 </since_tizen>
1366 public ImfManager ImfManager
1373 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1374 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1375 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1378 /// ImfManager status changed.
1380 /// Please do not use! this will be deprecated
1381 /// <since_tizen> 3 </since_tizen>
1382 [Obsolete("Please do not use! This will be deprecated! Please use StatusChanged instead!")]
1383 [EditorBrowsable(EditorBrowsableState.Never)]
1384 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1388 if (_imfManagerStatusChangedEventHandler == null)
1390 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1391 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1394 _imfManagerStatusChangedEventHandler += value;
1398 _imfManagerStatusChangedEventHandler -= value;
1400 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1402 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1407 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1409 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1413 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1416 if (_imfManagerStatusChangedEventHandler != null)
1418 _imfManagerStatusChangedEventHandler(this, e);
1423 /// ImfManager status changed event arguments.
1425 /// <since_tizen> 4 </since_tizen>
1426 public class StatusChangedEventArgs : EventArgs
1429 /// ImfManager status
1431 /// <since_tizen> 4 </since_tizen>
1432 public bool StatusChanged
1439 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1440 private StatusChangedEventCallbackType _statusChangedEventCallback;
1441 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1444 /// ImfManager status changed.
1446 /// <since_tizen> 4 </since_tizen>
1447 public event EventHandler<StatusChangedEventArgs> StatusChanged
1451 if (_statusChangedEventHandler == null)
1453 _statusChangedEventCallback = OnStatusChanged;
1454 StatusChangedSignal().Connect(_statusChangedEventCallback);
1457 _statusChangedEventHandler += value;
1461 _statusChangedEventHandler -= value;
1463 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1465 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1470 private void OnStatusChanged(bool statusChanged)
1472 StatusChangedEventArgs e = new StatusChangedEventArgs();
1474 e.StatusChanged = statusChanged;
1476 if (_statusChangedEventHandler != null)
1478 _statusChangedEventHandler(this, e);
1483 /// ImfManager status changed signal.
1485 ///Please do not use! this will be internal
1486 /// <since_tizen> 3 </since_tizen>
1487 [Obsolete("Please do not use! This will be deprecated!")]
1488 [EditorBrowsable(EditorBrowsableState.Never)]
1489 public StatusSignalType StatusChangedSignal()
1491 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1492 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1497 /// ImfManager resized event arguments.
1499 ///Please do not use! this will be deprecated
1500 /// <since_tizen> 3 </since_tizen>
1501 [Obsolete("Please do not use! This will be deprecated! Please use ResizedEventArgs instead!")]
1502 [EditorBrowsable(EditorBrowsableState.Never)]
1503 public class ImfManagerResizedEventArgs : EventArgs
1508 /// <since_tizen> 3 </since_tizen>
1509 public ImfManager ImfManager
1516 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1517 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1518 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1521 /// ImfManager resized event.
1523 ///Please do not use! this will be deprecated
1524 /// <since_tizen> 3 </since_tizen>
1525 [Obsolete("Please do not use! This will be deprecated! Please use Resized instead!")]
1526 [EditorBrowsable(EditorBrowsableState.Never)]
1527 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1531 if (_imfManagerResizedEventHandler == null)
1533 _imfManagerResizedEventCallback = OnImfManagerResized;
1534 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1537 _imfManagerResizedEventHandler += value;
1541 _imfManagerResizedEventHandler -= value;
1543 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1545 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1550 private void OnImfManagerResized(IntPtr data)
1552 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1556 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1559 if (_imfManagerResizedEventHandler != null)
1561 _imfManagerResizedEventHandler(this, e);
1566 /// ImfManager resized event.
1568 /// <since_tizen> 4 </since_tizen>
1569 public class ResizedEventArgs : EventArgs
1574 /// <since_tizen> 4 </since_tizen>
1582 private delegate void ResizedEventCallbackType(int resized);
1583 private ResizedEventCallbackType _resizedEventCallback;
1584 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1587 /// ImfManager resized.
1589 /// <since_tizen> 4 </since_tizen>
1590 public event EventHandler<ResizedEventArgs> Resized
1594 if (_resizedEventHandler == null)
1596 _resizedEventCallback = OnResized;
1597 ResizedSignal().Connect(_resizedEventCallback);
1600 _resizedEventHandler += value;
1604 _resizedEventHandler -= value;
1606 if (_resizedEventHandler == null && _resizedEventCallback != null)
1608 ResizedSignal().Disconnect(_resizedEventCallback);
1613 private void OnResized(int resized)
1615 ResizedEventArgs e = new ResizedEventArgs();
1616 e.Resized = resized;
1618 if (_resizedEventHandler != null)
1620 _resizedEventHandler(this, e);
1625 /// ImfManager resized signal.
1627 ///Please do not use! this will be internal
1628 /// <since_tizen> 3 </since_tizen>
1629 [Obsolete("Please do not use! This will be deprecated!")]
1630 [EditorBrowsable(EditorBrowsableState.Never)]
1631 public KeyboardResizedSignalType ResizedSignal()
1633 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1634 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1639 /// ImfManager language changed event arguments.
1641 ///Please do not use! this will be deprecated
1642 /// <since_tizen> 3 </since_tizen>
1643 [Obsolete("Please do not use! This will be deprecated! Please use LanguageChangedEventArgs instead!")]
1644 [EditorBrowsable(EditorBrowsableState.Never)]
1645 public class ImfManagerLanguageChangedEventArgs : EventArgs
1650 /// <since_tizen> 3 </since_tizen>
1651 public ImfManager ImfManager
1658 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1659 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1660 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1663 /// ImfManager language changed event.
1665 ///Please do not use! this will be deprecated
1666 /// <since_tizen> 3 </since_tizen>
1667 [Obsolete("Please do not use! This will be deprecated! Please use LanguageChanged instead!")]
1668 [EditorBrowsable(EditorBrowsableState.Never)]
1669 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1673 if (_imfManagerLanguageChangedEventHandler == null)
1675 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1676 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1679 _imfManagerLanguageChangedEventHandler += value;
1683 _imfManagerLanguageChangedEventHandler -= value;
1685 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1687 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1692 private void OnImfManagerLanguageChanged(IntPtr data)
1694 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1698 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1701 if (_imfManagerLanguageChangedEventHandler != null)
1703 _imfManagerLanguageChangedEventHandler(this, e);
1708 /// ImfManager language changed event args.
1710 /// <since_tizen> 4 </since_tizen>
1711 public class LanguageChangedEventArgs : EventArgs
1714 /// language changed.
1716 /// <since_tizen> 4 </since_tizen>
1717 public int LanguageChanged
1724 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1725 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1726 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1729 /// ImfManager language changed.
1731 /// <since_tizen> 4 </since_tizen>
1732 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1736 if (_languageChangedEventHandler == null)
1738 _languageChangedEventCallback = OnLanguageChanged;
1739 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1742 _languageChangedEventHandler += value;
1746 _languageChangedEventHandler -= value;
1748 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1750 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1755 private void OnLanguageChanged(int languageChanged)
1757 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1758 e.LanguageChanged = languageChanged;
1760 if (_languageChangedEventHandler != null)
1762 _languageChangedEventHandler(this, e);
1767 /// ImfManager language changed signal.
1769 ///Please do not use! this will be internal
1770 /// <since_tizen> 3 </since_tizen>
1771 [Obsolete("Please do not use! This will be deprecated!")]
1772 [EditorBrowsable(EditorBrowsableState.Never)]
1773 public LanguageChangedSignalType LanguageChangedSignal()
1775 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1776 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1781 /// ImfManager keyboard type changed event arguments.
1783 /// <since_tizen> 4 </since_tizen>
1784 public class KeyboardTypeChangedEventArgs : EventArgs
1787 /// ImfManager keyboard type
1789 /// <since_tizen> 4 </since_tizen>
1790 public KeyboardType KeyboardType
1797 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1798 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1799 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1802 /// ImfManager keyboard type changed.
1804 /// <since_tizen> 4 </since_tizen>
1805 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1809 if (_keyboardTypeChangedEventHandler == null)
1811 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1812 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1815 _keyboardTypeChangedEventHandler += value;
1819 _keyboardTypeChangedEventHandler -= value;
1821 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1823 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1828 private void OnKeyboardTypeChanged(KeyboardType type)
1830 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1832 e.KeyboardType = type;
1834 if (_keyboardTypeChangedEventHandler != null)
1836 _keyboardTypeChangedEventHandler(this, e);
1840 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1842 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1843 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1848 /// The direction of the text.
1850 /// <since_tizen> 3 </since_tizen>
1851 public enum TextDirection
1864 /// Events that are generated by the IMF.
1866 /// <since_tizen> 3 </since_tizen>
1867 public enum ImfEvent
1872 /// <since_tizen> 4 </since_tizen>
1875 /// Pre-Edit changed.
1877 /// <since_tizen> 4 </since_tizen>
1880 /// Commit received.
1882 /// <since_tizen> 4 </since_tizen>
1885 /// An event to delete a range of characters from the string.
1887 /// <since_tizen> 4 </since_tizen>
1890 /// An event to query string and the cursor position.
1892 /// <since_tizen> 4 </since_tizen>
1895 /// Private command sent from the input panel.
1897 /// <since_tizen> 4 </since_tizen>
1902 /// Enumeration for the state of the input panel.
1904 /// <since_tizen> 3 </since_tizen>
1910 /// <since_tizen> 4 </since_tizen>
1913 /// Input panel is shown.
1915 /// <since_tizen> 4 </since_tizen>
1918 /// Input panel is hidden.
1920 /// <since_tizen> 4 </since_tizen>
1923 /// Input panel in process of being shown.
1925 /// <since_tizen> 4 </since_tizen>
1930 /// Enumeration for the types of keyboard.
1932 /// <since_tizen> 4 </since_tizen>
1933 public enum KeyboardType
1936 /// Software keyboard (virtual keyboard) is default.
1938 /// <since_tizen> 4 </since_tizen>
1941 /// Hardware keyboard.
1943 /// <since_tizen> 4 </since_tizen>