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 public class ImfManager : BaseHandle
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31 internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
41 private static readonly ImfManager instance = ImfManager.Get();
44 /// Gets the singleton of the ImfManager object.
46 /// <since_tizen> 5 </since_tizen>
47 public static ImfManager Instance
58 /// <param name="type">Dispose Type</param>
59 /// <since_tizen> 3 </since_tizen>
60 /// Please DO NOT use! This will be deprecated!
61 /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
62 /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
63 [EditorBrowsable(EditorBrowsableState.Never)]
64 protected override void Dispose(DisposeTypes type)
71 if (type == DisposeTypes.Explicit)
74 //Release your own managed resources here.
75 //You should release all of your own disposable objects here.
79 //Release your own unmanaged resources here.
80 //You should not access any managed member here except static instance.
81 //because the execution order of Finalizes is non-deterministic.
83 if (_keyboardTypeChangedEventCallback != null)
85 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
88 if (_imfManagerLanguageChangedEventCallback != null)
90 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
93 if (_imfManagerResizedEventCallback != null)
95 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
98 if (_imfManagerStatusChangedEventCallback != null)
100 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
103 if (_imfManagerEventReceivedEventCallback != null)
105 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
108 if (_imfManagerActivatedEventCallback != null)
110 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
113 if (swigCPtr.Handle != global::System.IntPtr.Zero)
118 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
120 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
127 /// This structure is used to pass on data from the IMF regarding predictive text.
129 public class ImfEventData : global::System.IDisposable
131 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
135 /// <since_tizen> 3 </since_tizen>
136 protected bool swigCMemOwn;
138 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
140 swigCMemOwn = cMemoryOwn;
141 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
144 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
146 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
149 //A Flag to check who called Dispose(). (By User or DisposeQueue)
150 private bool isDisposeQueued = false;
152 /// A Flat to check if it is already disposed.
154 /// <since_tizen> 3 </since_tizen>
155 protected bool disposed = false;
160 /// <since_tizen> 3 </since_tizen>
163 if (!isDisposeQueued)
165 isDisposeQueued = true;
166 DisposeQueue.Instance.Add(this);
171 /// The dispose pattern.
173 /// <since_tizen> 3 </since_tizen>
174 public void Dispose()
176 //Throw excpetion if Dispose() is called in separate thread.
177 if (!Window.IsInstalled())
179 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
184 Dispose(DisposeTypes.Implicit);
188 Dispose(DisposeTypes.Explicit);
189 System.GC.SuppressFinalize(this);
196 /// <since_tizen> 3 </since_tizen>
197 protected virtual void Dispose(DisposeTypes type)
204 if (type == DisposeTypes.Explicit)
207 //Release your own managed resources here.
208 //You should release all of your own disposable objects here.
212 //Release your own unmanaged resources here.
213 //You should not access any managed member here except static instance.
214 //because the execution order of Finalizes is non-deterministic.
216 if (swigCPtr.Handle != IntPtr.Zero)
221 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
223 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
229 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
231 ImfEventData ret = new ImfEventData(cPtr, false);
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 /// The default constructor.
239 /// <since_tizen> 3 </since_tizen>
240 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 /// <param name="aEventName">The name of the event from the IMF.</param>
249 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
250 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
251 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
252 /// <since_tizen> 3 </since_tizen>
253 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 /// The pre-edit or the commit string.
261 /// /// <since_tizen> 3 </since_tizen>
262 [EditorBrowsable(EditorBrowsableState.Never)]
263 public string predictiveString
267 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 /// The pre-edit or the commit string.
281 /// <since_tizen> 4 </since_tizen>
282 public string PredictiveString
286 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
287 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 /// The name of the event from the IMF.
300 //Please do not use! this will be deprecated
301 [EditorBrowsable(EditorBrowsableState.Never)]
302 public ImfManager.ImfEvent eventName
306 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 /// The name of the event from the IMF.
320 /// <since_tizen> 4 </since_tizen>
321 public ImfManager.ImfEvent EventName
325 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 /// The start position from the current cursor position to start deleting characters.
339 //Please do not use! this will be deprecated
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public int cursorOffset
345 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
351 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 /// The start position from the current cursor position to start deleting characters.
359 /// <since_tizen> 4 </since_tizen>
360 public int CursorOffset
364 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 /// The number of characters to delete from the cursorOffset.
378 //Please do not use! this will be deprecated
379 [EditorBrowsable(EditorBrowsableState.Never)]
380 public int numberOfChars
384 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 /// The number of characters to delete from the cursorOffset.
398 /// <since_tizen> 4 </since_tizen>
399 public int NumberOfChars
403 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
404 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417 /// Data required by the IMF from the callback.
419 public class ImfCallbackData : global::System.IDisposable
421 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
425 /// <since_tizen> 3 </since_tizen>
426 protected bool swigCMemOwn;
428 internal IntPtr GetImfCallbackDataPtr()
430 return (IntPtr)swigCPtr;
433 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
435 swigCMemOwn = cMemoryOwn;
436 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
439 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
441 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
444 //A Flag to check who called Dispose(). (By User or DisposeQueue)
445 private bool isDisposeQueued = false;
447 /// A Flat to check if it is already disposed.
449 /// <since_tizen> 3 </since_tizen>
450 protected bool disposed = false;
456 /// <since_tizen> 3 </since_tizen>
459 if (!isDisposeQueued)
461 isDisposeQueued = true;
462 DisposeQueue.Instance.Add(this);
467 /// The dispose pattern.
469 /// <since_tizen> 3 </since_tizen>
470 public void Dispose()
472 //Throw excpetion if Dispose() is called in separate thread.
473 if (!Window.IsInstalled())
475 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
480 Dispose(DisposeTypes.Implicit);
484 Dispose(DisposeTypes.Explicit);
485 System.GC.SuppressFinalize(this);
492 /// <since_tizen> 3 </since_tizen>
493 protected virtual void Dispose(DisposeTypes type)
500 if (type == DisposeTypes.Explicit)
503 //Release your own managed resources here.
504 //You should release all of your own disposable objects here.
508 //Release your own unmanaged resources here.
509 //You should not access any managed member here except static instance.
510 //because the execution order of Finalizes is non-deterministic.
512 if (swigCPtr.Handle != IntPtr.Zero)
517 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
519 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
525 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
527 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533 /// The default constructor.
535 /// <since_tizen> 3 </since_tizen>
536 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
538 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
545 /// <param name="aCursorPosition">The new position of the cursor.</param>
546 /// <param name="aCurrentText">The current text string.</param>
547 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
548 /// <since_tizen> 3 </since_tizen>
549 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
551 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555 /// The current text string.
557 //Please do not use! this will be deprecated
558 [EditorBrowsable(EditorBrowsableState.Never)]
559 public string currentText
563 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
575 /// The current text string.
577 /// <since_tizen> 4 </since_tizen>
578 public string CurrentText
582 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
583 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
588 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594 /// The current text string.
596 //Please do not use! this will be deprecated
597 [EditorBrowsable(EditorBrowsableState.Never)]
598 public int cursorPosition
602 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614 /// The current text string.
616 /// <since_tizen> 4 </since_tizen>
617 public int CursorPosition
621 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
622 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
627 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633 /// If the cursor position needs to be updated.
635 //Please do not use! this will be deprecated
636 [EditorBrowsable(EditorBrowsableState.Never)]
641 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
642 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
646 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
647 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
653 /// If the cursor position needs to be updated.
655 /// <since_tizen> 4 </since_tizen>
660 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
661 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
665 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
666 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
672 /// Flags if preedit reset is required.
674 //Please do not use! this will be deprecated
675 [EditorBrowsable(EditorBrowsableState.Never)]
676 public bool preeditResetRequired
680 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
681 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
685 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
686 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 /// Flags if preedit reset is required.
694 /// <since_tizen> 4 </since_tizen>
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();
713 /// Destroy the context of the IMF.<br/>
715 /// <since_tizen> 5 </since_tizen>
716 public void DestroyContext()
718 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
719 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
722 /// Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
723 [Obsolete("Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!")]
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public void Finalize()
731 /// Retrieves a handle to the instance of the ImfManager.
733 /// <returns>A handle to the ImfManager.</returns>
734 /// <since_tizen> 3 </since_tizen>
735 public static ImfManager Get()
737 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
738 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
743 /// Activates the IMF.<br/>
744 /// It means that the text editing is started somewhere.<br/>
745 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
747 /// <since_tizen> 3 </since_tizen>
748 public void Activate()
750 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
751 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
755 /// Deactivates the IMF.<br/>
756 /// It means that the text editing is finished somewhere.
758 /// <since_tizen> 3 </since_tizen>
759 public void Deactivate()
761 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
762 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
767 /// If true, then the keyboard will be restored (activated) after focus is regained.
769 /// <returns>The restoration status.</returns>
770 /// <since_tizen> 3 </since_tizen>
771 public bool RestoreAfterFocusLost()
773 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
774 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
779 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
781 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
782 /// <since_tizen> 3 </since_tizen>
783 public void SetRestoreAfterFocusLost(bool toggle)
785 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
786 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
790 /// Sends a message reset to the preedit state or the IMF module.
792 /// <since_tizen> 3 </since_tizen>
793 public new void Reset()
795 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
796 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
800 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
802 /// <since_tizen> 3 </since_tizen>
803 public void NotifyCursorPosition()
805 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
806 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
812 /// <param name="cursorPosition">The position of the cursor.</param>
813 /// <since_tizen> 3 </since_tizen>
814 public void SetCursorPosition(uint cursorPosition)
816 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
817 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
821 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
823 /// <returns>The current position of the cursor.</returns>
824 /// <since_tizen> 3 </since_tizen>
825 public uint GetCursorPosition()
827 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
828 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
835 /// <param name="text">The text string surrounding the current cursor point.</param>
836 /// <since_tizen> 3 </since_tizen>
837 public void SetSurroundingText(string text)
839 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
840 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
844 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
846 /// <returns>The surrounding text.</returns>
847 /// <since_tizen> 3 </since_tizen>
848 public string GetSurroundingText()
850 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
851 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
856 /// Notifies the IMF context that text input is set to multiline or not.
858 /// <param name="multiLine">True if multiline text input is used.</param>
859 /// <since_tizen> 3 </since_tizen>
860 public void NotifyTextInputMultiLine(bool multiLine)
862 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
863 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
867 /// Returns the text direction of the keyboard's current input language.
869 /// <returns>The direction of the text.</returns>
870 /// <since_tizen> 3 </since_tizen>
871 public ImfManager.TextDirection GetTextDirection()
873 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
874 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879 /// Provides the size and the position of the keyboard.<br/>
880 /// The position is relative to whether the keyboard is visible or not.<br/>
881 /// If the keyboard is not visible, then the position will be off the screen.<br/>
882 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
883 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
885 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
886 /// <since_tizen> 3 </since_tizen>
887 public Rectangle GetInputMethodArea()
889 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
890 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
894 internal void ApplyOptions(InputMethodOptions options)
896 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
897 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
901 /// Sets up the input-panel specific data.
903 /// <param name="text">The specific data to be set to the input panel.</param>
904 /// <since_tizen> 3 </since_tizen>
905 public void SetInputPanelUserData(string text)
907 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
908 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
912 /// Gets the specific data of the current active input panel.
914 /// <param name="text">The specific data to be received from the input panel.</param>
915 /// <since_tizen> 3 </since_tizen>
916 public void GetInputPanelUserData(out string text)
918 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
919 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
923 /// Gets the state of the current active input panel.
925 /// <returns>The state of the input panel.</returns>
926 /// <since_tizen> 3 </since_tizen>
927 public ImfManager.State GetInputPanelState()
929 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
930 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935 /// Sets the return key on the input panel to be visible or invisible.<br/>
936 /// The default is true.
938 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
939 /// <since_tizen> 3 </since_tizen>
940 public void SetReturnKeyState(bool visible)
942 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
947 /// Enables to show the input panel automatically when focused.
949 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
950 /// <since_tizen> 3 </since_tizen>
951 public void AutoEnableInputPanel(bool enabled)
953 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 /// Shows the input panel.
960 /// <since_tizen> 3 </since_tizen>
961 public void ShowInputPanel()
963 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 /// Hides the input panel.
970 /// <since_tizen> 3 </since_tizen>
971 public void HideInputPanel()
973 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
974 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 /// Gets the keyboard type.<br/>
979 /// The default keyboard type is SoftwareKeyboard.
981 /// <returns>The keyboard type.</returns>
982 /// <since_tizen> 4 </since_tizen>
983 public ImfManager.KeyboardType GetKeyboardType()
985 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 /// Gets the current language locale of the input panel.<br/>
992 /// For example, en_US, en_GB, en_PH, fr_FR, ...
994 /// <returns>The current language locale of the input panel.</returns>
995 /// <since_tizen> 4 </since_tizen>
996 public string GetInputPanelLocale()
998 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1004 /// The constructor.
1006 /// <since_tizen> 3 </since_tizen>
1007 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
1009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1013 /// ImfManager activated event arguments.
1015 //Please do not use! this will be deprecated
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public class ImfManagerActivatedEventArgs : EventArgs
1022 /// <since_tizen> 3 </since_tizen>
1023 public ImfManager ImfManager
1030 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1031 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1032 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1033 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1036 /// ImfManager activated event.
1038 //Please do not use! this will be deprecated
1039 [EditorBrowsable(EditorBrowsableState.Never)]
1040 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1044 if (_imfManagerActivatedEventHandler == null)
1046 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1047 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1050 _imfManagerActivatedEventHandler += value;
1054 _imfManagerActivatedEventHandler -= value;
1056 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1058 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1063 private void OnImfManagerActivated(global::System.IntPtr data)
1065 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1069 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1072 if (_imfManagerActivatedEventHandler != null)
1074 _imfManagerActivatedEventHandler(this, e);
1079 /// ImfManager activated event arguments.
1081 public class ActivatedEventArgs : EventArgs
1086 /// <since_tizen> 3 </since_tizen>
1087 public ImfManager ImfManager
1094 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1095 private delegate void ActivatedEventCallbackType(IntPtr data);
1096 private ActivatedEventCallbackType _activatedEventCallback;
1097 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1100 /// ImfManager activated.
1102 /// <since_tizen> 4 </since_tizen>
1103 public event EventHandler<ActivatedEventArgs> Activated
1107 if (_activatedEventHandler == null)
1109 _activatedEventCallback = OnActivated;
1110 ActivatedSignal().Connect(_activatedEventCallback);
1113 _activatedEventHandler += value;
1117 _activatedEventHandler -= value;
1119 if (_activatedEventHandler == null && _activatedEventCallback != null)
1121 ActivatedSignal().Disconnect(_activatedEventCallback);
1126 private void OnActivated(IntPtr data)
1128 ActivatedEventArgs e = new ActivatedEventArgs();
1132 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1135 if (_activatedEventHandler != null)
1137 _activatedEventHandler(this, e);
1142 /// ImfManager activated signal.
1144 //Please do not use! this will be internal
1145 [EditorBrowsable(EditorBrowsableState.Never)]
1146 public ActivatedSignalType ActivatedSignal()
1148 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1154 /// ImfManager event received event arguments.
1156 //Please do not use! this will be deprecated
1157 [EditorBrowsable(EditorBrowsableState.Never)]
1158 public class ImfManagerEventReceivedEventArgs : EventArgs
1163 /// <since_tizen> 3 </since_tizen>
1164 public ImfManager ImfManager
1171 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1172 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1173 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1176 /// ImfManager event received.
1178 //Please do not use! this will be deprecated
1179 [EditorBrowsable(EditorBrowsableState.Never)]
1180 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1184 if (_imfManagerEventReceivedEventHandler == null)
1186 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1187 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1190 _imfManagerEventReceivedEventHandler += value;
1194 _imfManagerEventReceivedEventHandler -= value;
1196 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1198 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1203 private void OnImfManagerEventReceived(global::System.IntPtr data)
1205 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1209 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1212 if (_imfManagerEventReceivedEventHandler != null)
1214 _imfManagerEventReceivedEventHandler(this, e);
1219 /// ImfManager event received event arguments.
1221 public class EventReceivedEventArgs : EventArgs
1226 /// <since_tizen> 3 </since_tizen>
1227 public ImfManager ImfManager
1236 /// <since_tizen> 3 </since_tizen>
1237 public ImfEventData ImfEventData
1244 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1245 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1246 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1249 /// ImfManager event received.
1251 /// <since_tizen> 4 </since_tizen>
1252 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1256 if (_eventReceivedEventHandler == null)
1258 _eventReceivedEventCallback = OnEventReceived;
1259 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1262 _eventReceivedEventHandler += value;
1266 _eventReceivedEventHandler -= value;
1268 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1270 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1275 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1277 ImfCallbackData imfCallbackData = null;
1279 EventReceivedEventArgs e = new EventReceivedEventArgs();
1281 if (imfManager != null)
1283 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1285 if (imfEventData != null)
1287 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1290 if (_eventReceivedEventHandler != null)
1292 imfCallbackData = _eventReceivedEventHandler(this, e);
1294 if (imfCallbackData != null)
1296 return imfCallbackData.GetImfCallbackDataPtr();
1300 return new ImfCallbackData().GetImfCallbackDataPtr();
1305 /// ImfManager event received signal.
1307 //Please do not use! this will be internal
1308 [EditorBrowsable(EditorBrowsableState.Never)]
1309 public ImfEventSignalType EventReceivedSignal()
1311 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1317 /// ImfManager status changed event arguments.
1319 //Please do not use! this will be deprecated
1320 [EditorBrowsable(EditorBrowsableState.Never)]
1321 public class ImfManagerStatusChangedEventArgs : EventArgs
1326 /// <since_tizen> 3 </since_tizen>
1327 public ImfManager ImfManager
1334 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1335 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1336 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1339 /// ImfManager status changed.
1341 //Please do not use! this will be deprecated
1342 [EditorBrowsable(EditorBrowsableState.Never)]
1343 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1347 if (_imfManagerStatusChangedEventHandler == null)
1349 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1350 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1353 _imfManagerStatusChangedEventHandler += value;
1357 _imfManagerStatusChangedEventHandler -= value;
1359 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1361 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1366 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1368 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1372 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1375 if (_imfManagerStatusChangedEventHandler != null)
1377 _imfManagerStatusChangedEventHandler(this, e);
1382 /// ImfManager status changed event arguments.
1384 public class StatusChangedEventArgs : EventArgs
1387 /// ImfManager status
1389 /// <since_tizen> 3 </since_tizen>
1390 public bool StatusChanged
1397 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1398 private StatusChangedEventCallbackType _statusChangedEventCallback;
1399 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1402 /// ImfManager status changed.
1404 /// <since_tizen> 4 </since_tizen>
1405 public event EventHandler<StatusChangedEventArgs> StatusChanged
1409 if (_statusChangedEventHandler == null)
1411 _statusChangedEventCallback = OnStatusChanged;
1412 StatusChangedSignal().Connect(_statusChangedEventCallback);
1415 _statusChangedEventHandler += value;
1419 _statusChangedEventHandler -= value;
1421 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1423 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1428 private void OnStatusChanged(bool statusChanged)
1430 StatusChangedEventArgs e = new StatusChangedEventArgs();
1432 e.StatusChanged = statusChanged;
1434 if (_statusChangedEventHandler != null)
1436 _statusChangedEventHandler(this, e);
1441 /// ImfManager status changed signal.
1443 //Please do not use! this will be internal
1444 [EditorBrowsable(EditorBrowsableState.Never)]
1445 public StatusSignalType StatusChangedSignal()
1447 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1448 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1453 /// ImfManager resized event arguments.
1455 //Please do not use! this will be deprecated
1456 [EditorBrowsable(EditorBrowsableState.Never)]
1457 public class ImfManagerResizedEventArgs : EventArgs
1462 /// <since_tizen> 3 </since_tizen>
1463 public ImfManager ImfManager
1470 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1471 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1472 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1475 /// ImfManager resized event.
1477 //Please do not use! this will be deprecated
1478 [EditorBrowsable(EditorBrowsableState.Never)]
1479 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1483 if (_imfManagerResizedEventHandler == null)
1485 _imfManagerResizedEventCallback = OnImfManagerResized;
1486 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1489 _imfManagerResizedEventHandler += value;
1493 _imfManagerResizedEventHandler -= value;
1495 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1497 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1502 private void OnImfManagerResized(IntPtr data)
1504 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1508 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1511 if (_imfManagerResizedEventHandler != null)
1513 _imfManagerResizedEventHandler(this, e);
1518 /// ImfManager resized event.
1520 public class ResizedEventArgs : EventArgs
1532 private delegate void ResizedEventCallbackType(int resized);
1533 private ResizedEventCallbackType _resizedEventCallback;
1534 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1537 /// ImfManager resized.
1539 /// <since_tizen> 4 </since_tizen>
1540 public event EventHandler<ResizedEventArgs> Resized
1544 if (_resizedEventHandler == null)
1546 _resizedEventCallback = OnResized;
1547 ResizedSignal().Connect(_resizedEventCallback);
1550 _resizedEventHandler += value;
1554 _resizedEventHandler -= value;
1556 if (_resizedEventHandler == null && _resizedEventCallback != null)
1558 ResizedSignal().Disconnect(_resizedEventCallback);
1563 private void OnResized(int resized)
1565 ResizedEventArgs e = new ResizedEventArgs();
1566 e.Resized = resized;
1568 if (_resizedEventHandler != null)
1570 _resizedEventHandler(this, e);
1575 /// ImfManager resized signal.
1577 //Please do not use! this will be internal
1578 [EditorBrowsable(EditorBrowsableState.Never)]
1579 public KeyboardResizedSignalType ResizedSignal()
1581 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1582 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1587 /// ImfManager language changed event arguments.
1589 //Please do not use! this will be deprecated
1590 [EditorBrowsable(EditorBrowsableState.Never)]
1591 public class ImfManagerLanguageChangedEventArgs : EventArgs
1596 /// <since_tizen> 3 </since_tizen>
1597 public ImfManager ImfManager
1604 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1605 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1606 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1609 /// ImfManager language changed event.
1611 //Please do not use! this will be deprecated
1612 [EditorBrowsable(EditorBrowsableState.Never)]
1613 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1617 if (_imfManagerLanguageChangedEventHandler == null)
1619 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1620 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1623 _imfManagerLanguageChangedEventHandler += value;
1627 _imfManagerLanguageChangedEventHandler -= value;
1629 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1631 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1636 private void OnImfManagerLanguageChanged(IntPtr data)
1638 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1642 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1645 if (_imfManagerLanguageChangedEventHandler != null)
1647 _imfManagerLanguageChangedEventHandler(this, e);
1652 /// ImfManager language changed event args.
1654 public class LanguageChangedEventArgs : EventArgs
1657 /// language changed.
1659 public int LanguageChanged
1666 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1667 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1668 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1671 /// ImfManager language changed.
1673 /// <since_tizen> 4 </since_tizen>
1674 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1678 if (_languageChangedEventHandler == null)
1680 _languageChangedEventCallback = OnLanguageChanged;
1681 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1684 _languageChangedEventHandler += value;
1688 _languageChangedEventHandler -= value;
1690 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1692 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1697 private void OnLanguageChanged(int languageChanged)
1699 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1700 e.LanguageChanged = languageChanged;
1702 if (_languageChangedEventHandler != null)
1704 _languageChangedEventHandler(this, e);
1709 /// ImfManager language changed signal.
1711 //Please do not use! this will be internal
1712 [EditorBrowsable(EditorBrowsableState.Never)]
1713 public LanguageChangedSignalType LanguageChangedSignal()
1715 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1716 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1721 /// ImfManager keyboard type changed event arguments.
1723 public class KeyboardTypeChangedEventArgs : EventArgs
1726 /// ImfManager keyboard type
1728 /// <since_tizen> 3 </since_tizen>
1729 public KeyboardType KeyboardType
1736 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1737 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1738 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1741 /// ImfManager keyboard type changed.
1743 /// <since_tizen> 4 </since_tizen>
1744 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1748 if (_keyboardTypeChangedEventHandler == null)
1750 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1751 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1754 _keyboardTypeChangedEventHandler += value;
1758 _keyboardTypeChangedEventHandler -= value;
1760 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1762 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1767 private void OnKeyboardTypeChanged(KeyboardType type)
1769 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1771 e.KeyboardType = type;
1773 if (_keyboardTypeChangedEventHandler != null)
1775 _keyboardTypeChangedEventHandler(this, e);
1779 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1781 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1782 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1787 /// The direction of the text.
1789 /// <since_tizen> 3 </since_tizen>
1790 public enum TextDirection
1803 /// Events that are generated by the IMF.
1805 /// <since_tizen> 4 </since_tizen>
1806 public enum ImfEvent
1813 /// Pre-Edit changed.
1817 /// Commit received.
1821 /// An event to delete a range of characters from the string.
1825 /// An event to query string and the cursor position.
1829 /// Private command sent from the input panel.
1835 /// Enumeration for the state of the input panel.
1837 /// <since_tizen> 4 </since_tizen>
1845 /// Input panel is shown.
1849 /// Input panel is hidden.
1853 /// Input panel in process of being shown.
1859 /// Enumeration for the types of keyboard.
1861 /// <since_tizen> 4 </since_tizen>
1862 public enum KeyboardType
1865 /// Software keyboard (virtual keyboard) is default.
1869 /// Hardware keyboard.