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 [EditorBrowsable(EditorBrowsableState.Never)]
65 protected override void Dispose(DisposeTypes type)
72 if (type == DisposeTypes.Explicit)
75 //Release your own managed resources here.
76 //You should release all of your own disposable objects here.
80 //Release your own unmanaged resources here.
81 //You should not access any managed member here except static instance.
82 //because the execution order of Finalizes is non-deterministic.
84 if (_keyboardTypeChangedEventCallback != null)
86 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
89 if (_imfManagerLanguageChangedEventCallback != null)
91 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
94 if (_imfManagerResizedEventCallback != null)
96 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
99 if (_imfManagerStatusChangedEventCallback != null)
101 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
104 if (_imfManagerEventReceivedEventCallback != null)
106 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
109 if (_imfManagerActivatedEventCallback != null)
111 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
114 if (swigCPtr.Handle != global::System.IntPtr.Zero)
119 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
121 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
128 /// This structure is used to pass on data from the IMF regarding predictive text.
130 /// <since_tizen> 3 </since_tizen>
131 public class ImfEventData : global::System.IDisposable
133 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
137 /// <since_tizen> 3 </since_tizen>
138 protected bool swigCMemOwn;
140 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
142 swigCMemOwn = cMemoryOwn;
143 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
146 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
148 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
151 //A Flag to check who called Dispose(). (By User or DisposeQueue)
152 private bool isDisposeQueued = false;
154 /// A Flat to check if it is already disposed.
156 /// <since_tizen> 3 </since_tizen>
157 protected bool disposed = false;
162 /// <since_tizen> 3 </since_tizen>
165 if (!isDisposeQueued)
167 isDisposeQueued = true;
168 DisposeQueue.Instance.Add(this);
173 /// The dispose pattern.
175 /// <since_tizen> 3 </since_tizen>
176 public void Dispose()
178 //Throw excpetion if Dispose() is called in separate thread.
179 if (!Window.IsInstalled())
181 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
186 Dispose(DisposeTypes.Implicit);
190 Dispose(DisposeTypes.Explicit);
191 System.GC.SuppressFinalize(this);
198 /// <since_tizen> 3 </since_tizen>
199 protected virtual void Dispose(DisposeTypes type)
206 if (type == DisposeTypes.Explicit)
209 //Release your own managed resources here.
210 //You should release all of your own disposable objects here.
214 //Release your own unmanaged resources here.
215 //You should not access any managed member here except static instance.
216 //because the execution order of Finalizes is non-deterministic.
218 if (swigCPtr.Handle != IntPtr.Zero)
223 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
225 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
231 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
233 ImfEventData ret = new ImfEventData(cPtr, false);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239 /// The default constructor.
241 /// <since_tizen> 3 </since_tizen>
242 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250 /// <param name="aEventName">The name of the event from the IMF.</param>
251 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
252 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
253 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
254 /// <since_tizen> 3 </since_tizen>
255 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 /// The pre-edit or the commit string.
263 /// /// <since_tizen> 3 </since_tizen>
264 [EditorBrowsable(EditorBrowsableState.Never)]
265 public string predictiveString
269 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 /// The pre-edit or the commit string.
283 /// <since_tizen> 4 </since_tizen>
284 public string PredictiveString
288 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
289 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
300 /// The name of the event from the IMF.
302 /// Please do not use! this will be deprecated
303 /// <since_tizen> 3 </since_tizen>
304 [EditorBrowsable(EditorBrowsableState.Never)]
305 public ImfManager.ImfEvent eventName
309 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
314 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321 /// The name of the event from the IMF.
323 /// <since_tizen> 4 </since_tizen>
324 public ImfManager.ImfEvent EventName
328 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340 /// The start position from the current cursor position to start deleting characters.
342 /// Please do not use! this will be deprecated
343 /// <since_tizen> 3 </since_tizen>
344 [EditorBrowsable(EditorBrowsableState.Never)]
345 public int cursorOffset
349 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
355 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
361 /// The start position from the current cursor position to start deleting characters.
363 /// <since_tizen> 4 </since_tizen>
364 public int CursorOffset
368 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
369 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
374 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
380 /// The number of characters to delete from the cursorOffset.
382 /// Please do not use! this will be deprecated
383 /// <since_tizen> 3 </since_tizen>
384 [EditorBrowsable(EditorBrowsableState.Never)]
385 public int numberOfChars
389 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
394 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
395 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401 /// The number of characters to delete from the cursorOffset.
403 /// <since_tizen> 4 </since_tizen>
404 public int NumberOfChars
408 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
414 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422 /// Data required by the IMF from the callback.
424 /// <since_tizen> 3 </since_tizen>
425 public class ImfCallbackData : global::System.IDisposable
427 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
431 /// <since_tizen> 3 </since_tizen>
432 protected bool swigCMemOwn;
434 internal IntPtr GetImfCallbackDataPtr()
436 return (IntPtr)swigCPtr;
439 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
441 swigCMemOwn = cMemoryOwn;
442 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
445 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
447 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
450 //A Flag to check who called Dispose(). (By User or DisposeQueue)
451 private bool isDisposeQueued = false;
453 /// A Flat to check if it is already disposed.
455 /// <since_tizen> 3 </since_tizen>
456 protected bool disposed = false;
462 /// <since_tizen> 3 </since_tizen>
465 if (!isDisposeQueued)
467 isDisposeQueued = true;
468 DisposeQueue.Instance.Add(this);
473 /// The dispose pattern.
475 /// <since_tizen> 3 </since_tizen>
476 public void Dispose()
478 //Throw excpetion if Dispose() is called in separate thread.
479 if (!Window.IsInstalled())
481 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
486 Dispose(DisposeTypes.Implicit);
490 Dispose(DisposeTypes.Explicit);
491 System.GC.SuppressFinalize(this);
498 /// <since_tizen> 3 </since_tizen>
499 protected virtual void Dispose(DisposeTypes type)
506 if (type == DisposeTypes.Explicit)
509 //Release your own managed resources here.
510 //You should release all of your own disposable objects here.
514 //Release your own unmanaged resources here.
515 //You should not access any managed member here except static instance.
516 //because the execution order of Finalizes is non-deterministic.
518 if (swigCPtr.Handle != IntPtr.Zero)
523 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
525 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
531 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
533 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
534 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 /// The default constructor.
541 /// <since_tizen> 3 </since_tizen>
542 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
544 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
550 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
551 /// <param name="aCursorPosition">The new position of the cursor.</param>
552 /// <param name="aCurrentText">The current text string.</param>
553 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
554 /// <since_tizen> 3 </since_tizen>
555 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
557 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
561 /// The current text string.
563 /// Please do not use! this will be deprecated
564 /// <since_tizen> 3 </since_tizen>
565 [EditorBrowsable(EditorBrowsableState.Never)]
566 public string currentText
570 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
571 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
575 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
576 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
582 /// The current text string.
584 /// <since_tizen> 4 </since_tizen>
585 public string CurrentText
589 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
595 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
601 /// The current text string.
603 /// Please do not use! this will be deprecated
604 /// <since_tizen> 3 </since_tizen>
605 [EditorBrowsable(EditorBrowsableState.Never)]
606 public int cursorPosition
610 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
611 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
616 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622 /// The current text string.
624 /// <since_tizen> 4 </since_tizen>
625 public int CursorPosition
629 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
630 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
635 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641 /// If the cursor position needs to be updated.
643 /// Please do not use! this will be deprecated
644 /// <since_tizen> 3 </since_tizen>
645 [EditorBrowsable(EditorBrowsableState.Never)]
650 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
651 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
656 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
662 /// If the cursor position needs to be updated.
664 /// <since_tizen> 4 </since_tizen>
669 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
670 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
675 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
681 /// Flags if preedit reset is required.
683 /// Please do not use! this will be deprecated
684 /// <since_tizen> 3 </since_tizen>
685 [EditorBrowsable(EditorBrowsableState.Never)]
686 public bool preeditResetRequired
690 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
696 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702 /// Flags if preedit reset is required.
704 /// <since_tizen> 4 </since_tizen>
705 public bool PreeditResetRequired
709 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
710 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
715 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723 /// Destroy the context of the IMF.<br/>
725 /// <since_tizen> 5 </since_tizen>
726 public void DestroyContext()
728 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
729 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732 /// Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
733 [Obsolete("Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!")]
734 [EditorBrowsable(EditorBrowsableState.Never)]
735 public void Finalize()
741 /// Retrieves a handle to the instance of the ImfManager.
743 /// <returns>A handle to the ImfManager.</returns>
744 /// <since_tizen> 3 </since_tizen>
745 public static ImfManager Get()
747 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
748 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
753 /// Activates the IMF.<br/>
754 /// It means that the text editing is started somewhere.<br/>
755 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
757 /// <since_tizen> 3 </since_tizen>
758 public void Activate()
760 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
761 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765 /// Deactivates the IMF.<br/>
766 /// It means that the text editing is finished somewhere.
768 /// <since_tizen> 3 </since_tizen>
769 public void Deactivate()
771 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
772 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
776 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
777 /// If true, then the keyboard will be restored (activated) after focus is regained.
779 /// <returns>The restoration status.</returns>
780 /// <since_tizen> 3 </since_tizen>
781 public bool RestoreAfterFocusLost()
783 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
784 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
789 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
791 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
792 /// <since_tizen> 3 </since_tizen>
793 public void SetRestoreAfterFocusLost(bool toggle)
795 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
796 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
800 /// Sends a message reset to the preedit state or the IMF module.
802 /// <since_tizen> 3 </since_tizen>
803 public new void Reset()
805 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
806 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
812 /// <since_tizen> 3 </since_tizen>
813 public void NotifyCursorPosition()
815 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
816 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
820 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
822 /// <param name="cursorPosition">The position of the cursor.</param>
823 /// <since_tizen> 3 </since_tizen>
824 public void SetCursorPosition(uint cursorPosition)
826 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
827 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
831 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
833 /// <returns>The current position of the cursor.</returns>
834 /// <since_tizen> 3 </since_tizen>
835 public uint GetCursorPosition()
837 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
838 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
845 /// <param name="text">The text string surrounding the current cursor point.</param>
846 /// <since_tizen> 3 </since_tizen>
847 public void SetSurroundingText(string text)
849 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
850 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
854 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
856 /// <returns>The surrounding text.</returns>
857 /// <since_tizen> 3 </since_tizen>
858 public string GetSurroundingText()
860 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
861 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866 /// Notifies the IMF context that text input is set to multiline or not.
868 /// <param name="multiLine">True if multiline text input is used.</param>
869 /// <since_tizen> 3 </since_tizen>
870 public void NotifyTextInputMultiLine(bool multiLine)
872 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
873 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
877 /// Returns the text direction of the keyboard's current input language.
879 /// <returns>The direction of the text.</returns>
880 /// <since_tizen> 3 </since_tizen>
881 public ImfManager.TextDirection GetTextDirection()
883 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
884 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 /// Provides the size and the position of the keyboard.<br/>
890 /// The position is relative to whether the keyboard is visible or not.<br/>
891 /// If the keyboard is not visible, then the position will be off the screen.<br/>
892 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
893 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
895 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
896 /// <since_tizen> 3 </since_tizen>
897 public Rectangle GetInputMethodArea()
899 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
900 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
904 internal void ApplyOptions(InputMethodOptions options)
906 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
907 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911 /// Sets up the input-panel specific data.
913 /// <param name="text">The specific data to be set to the input panel.</param>
914 /// <since_tizen> 3 </since_tizen>
915 public void SetInputPanelUserData(string text)
917 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
918 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922 /// Gets the specific data of the current active input panel.
924 /// <param name="text">The specific data to be received from the input panel.</param>
925 /// <since_tizen> 4 </since_tizen>
926 public void GetInputPanelUserData(out string text)
928 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 /// Gets the state of the current active input panel.
935 /// <returns>The state of the input panel.</returns>
936 /// <since_tizen> 3 </since_tizen>
937 public ImfManager.State GetInputPanelState()
939 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
940 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945 /// Sets the return key on the input panel to be visible or invisible.<br/>
946 /// The default is true.
948 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
949 /// <since_tizen> 3 </since_tizen>
950 public void SetReturnKeyState(bool visible)
952 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
953 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
957 /// Enables to show the input panel automatically when focused.
959 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
960 /// <since_tizen> 3 </since_tizen>
961 public void AutoEnableInputPanel(bool enabled)
963 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 /// Shows the input panel.
970 /// <since_tizen> 3 </since_tizen>
971 public void ShowInputPanel()
973 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
974 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 /// Hides the input panel.
980 /// <since_tizen> 3 </since_tizen>
981 public void HideInputPanel()
983 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
984 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988 /// Gets the keyboard type.<br/>
989 /// The default keyboard type is SoftwareKeyboard.
991 /// <returns>The keyboard type.</returns>
992 /// <since_tizen> 4 </since_tizen>
993 public ImfManager.KeyboardType GetKeyboardType()
995 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 /// Gets the current language locale of the input panel.<br/>
1002 /// For example, en_US, en_GB, en_PH, fr_FR, ...
1004 /// <returns>The current language locale of the input panel.</returns>
1005 /// <since_tizen> 4 </since_tizen>
1006 public string GetInputPanelLocale()
1008 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
1009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1014 /// The constructor.
1016 /// <since_tizen> 3 </since_tizen>
1017 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1023 /// ImfManager activated event arguments.
1025 /// Please do not use! this will be deprecated
1026 /// <since_tizen> 3 </since_tizen>
1027 [EditorBrowsable(EditorBrowsableState.Never)]
1028 public class ImfManagerActivatedEventArgs : EventArgs
1033 /// <since_tizen> 3 </since_tizen>
1034 public ImfManager ImfManager
1041 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1042 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1043 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1044 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1047 /// ImfManager activated event.
1049 ///Please do not use! this will be deprecated
1050 /// <since_tizen> 3 </since_tizen>
1051 [EditorBrowsable(EditorBrowsableState.Never)]
1052 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1056 if (_imfManagerActivatedEventHandler == null)
1058 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1059 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1062 _imfManagerActivatedEventHandler += value;
1066 _imfManagerActivatedEventHandler -= value;
1068 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1070 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1075 private void OnImfManagerActivated(global::System.IntPtr data)
1077 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1081 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1084 if (_imfManagerActivatedEventHandler != null)
1086 _imfManagerActivatedEventHandler(this, e);
1091 /// ImfManager activated event arguments.
1093 /// <since_tizen> 4 </since_tizen>
1094 public class ActivatedEventArgs : EventArgs
1099 /// <since_tizen> 4 </since_tizen>
1100 public ImfManager ImfManager
1107 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1108 private delegate void ActivatedEventCallbackType(IntPtr data);
1109 private ActivatedEventCallbackType _activatedEventCallback;
1110 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1113 /// ImfManager activated.
1115 /// <since_tizen> 4 </since_tizen>
1116 public event EventHandler<ActivatedEventArgs> Activated
1120 if (_activatedEventHandler == null)
1122 _activatedEventCallback = OnActivated;
1123 ActivatedSignal().Connect(_activatedEventCallback);
1126 _activatedEventHandler += value;
1130 _activatedEventHandler -= value;
1132 if (_activatedEventHandler == null && _activatedEventCallback != null)
1134 ActivatedSignal().Disconnect(_activatedEventCallback);
1139 private void OnActivated(IntPtr data)
1141 ActivatedEventArgs e = new ActivatedEventArgs();
1145 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1148 if (_activatedEventHandler != null)
1150 _activatedEventHandler(this, e);
1155 /// ImfManager activated signal.
1157 /// Please do not use! this will be internal
1158 /// <since_tizen> 3 </since_tizen>
1159 [EditorBrowsable(EditorBrowsableState.Never)]
1160 public ActivatedSignalType ActivatedSignal()
1162 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1168 /// ImfManager event received event arguments.
1170 /// Please do not use! this will be deprecated
1171 /// <since_tizen> 3 </since_tizen>
1172 [EditorBrowsable(EditorBrowsableState.Never)]
1173 public class ImfManagerEventReceivedEventArgs : EventArgs
1178 /// <since_tizen> 3 </since_tizen>
1179 public ImfManager ImfManager
1186 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1187 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1188 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1191 /// ImfManager event received.
1193 ///Please do not use! this will be deprecated
1194 /// <since_tizen> 3 </since_tizen>
1195 [EditorBrowsable(EditorBrowsableState.Never)]
1196 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1200 if (_imfManagerEventReceivedEventHandler == null)
1202 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1203 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1206 _imfManagerEventReceivedEventHandler += value;
1210 _imfManagerEventReceivedEventHandler -= value;
1212 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1214 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1219 private void OnImfManagerEventReceived(global::System.IntPtr data)
1221 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1225 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1228 if (_imfManagerEventReceivedEventHandler != null)
1230 _imfManagerEventReceivedEventHandler(this, e);
1235 /// ImfManager event received event arguments.
1237 /// <since_tizen> 4 </since_tizen>
1238 public class EventReceivedEventArgs : EventArgs
1243 /// <since_tizen> 4 </since_tizen>
1244 public ImfManager ImfManager
1253 /// <since_tizen> 4 </since_tizen>
1254 public ImfEventData ImfEventData
1261 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1262 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1263 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1266 /// ImfManager event received.
1268 /// <since_tizen> 4 </since_tizen>
1269 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1273 if (_eventReceivedEventHandler == null)
1275 _eventReceivedEventCallback = OnEventReceived;
1276 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1279 _eventReceivedEventHandler += value;
1283 _eventReceivedEventHandler -= value;
1285 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1287 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1292 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1294 ImfCallbackData imfCallbackData = null;
1296 EventReceivedEventArgs e = new EventReceivedEventArgs();
1298 if (imfManager != null)
1300 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1302 if (imfEventData != null)
1304 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1307 if (_eventReceivedEventHandler != null)
1309 imfCallbackData = _eventReceivedEventHandler(this, e);
1311 if (imfCallbackData != null)
1313 return imfCallbackData.GetImfCallbackDataPtr();
1317 return new ImfCallbackData().GetImfCallbackDataPtr();
1322 /// ImfManager event received signal.
1324 /// Please do not use! this will be internal
1325 /// <since_tizen> 3 </since_tizen>
1326 [EditorBrowsable(EditorBrowsableState.Never)]
1327 public ImfEventSignalType EventReceivedSignal()
1329 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1335 /// ImfManager status changed event arguments.
1337 ///Please do not use! this will be deprecated
1338 /// <since_tizen> 3 </since_tizen>
1339 [EditorBrowsable(EditorBrowsableState.Never)]
1340 public class ImfManagerStatusChangedEventArgs : EventArgs
1345 /// <since_tizen> 3 </since_tizen>
1346 public ImfManager ImfManager
1353 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1354 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1355 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1358 /// ImfManager status changed.
1360 /// Please do not use! this will be deprecated
1361 /// <since_tizen> 3 </since_tizen>
1362 [EditorBrowsable(EditorBrowsableState.Never)]
1363 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1367 if (_imfManagerStatusChangedEventHandler == null)
1369 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1370 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1373 _imfManagerStatusChangedEventHandler += value;
1377 _imfManagerStatusChangedEventHandler -= value;
1379 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1381 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1386 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1388 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1392 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1395 if (_imfManagerStatusChangedEventHandler != null)
1397 _imfManagerStatusChangedEventHandler(this, e);
1402 /// ImfManager status changed event arguments.
1404 /// <since_tizen> 4 </since_tizen>
1405 public class StatusChangedEventArgs : EventArgs
1408 /// ImfManager status
1410 /// <since_tizen> 4 </since_tizen>
1411 public bool StatusChanged
1418 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1419 private StatusChangedEventCallbackType _statusChangedEventCallback;
1420 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1423 /// ImfManager status changed.
1425 /// <since_tizen> 4 </since_tizen>
1426 public event EventHandler<StatusChangedEventArgs> StatusChanged
1430 if (_statusChangedEventHandler == null)
1432 _statusChangedEventCallback = OnStatusChanged;
1433 StatusChangedSignal().Connect(_statusChangedEventCallback);
1436 _statusChangedEventHandler += value;
1440 _statusChangedEventHandler -= value;
1442 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1444 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1449 private void OnStatusChanged(bool statusChanged)
1451 StatusChangedEventArgs e = new StatusChangedEventArgs();
1453 e.StatusChanged = statusChanged;
1455 if (_statusChangedEventHandler != null)
1457 _statusChangedEventHandler(this, e);
1462 /// ImfManager status changed signal.
1464 ///Please do not use! this will be internal
1465 /// <since_tizen> 3 </since_tizen>
1466 [EditorBrowsable(EditorBrowsableState.Never)]
1467 public StatusSignalType StatusChangedSignal()
1469 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1470 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1475 /// ImfManager resized event arguments.
1477 ///Please do not use! this will be deprecated
1478 /// <since_tizen> 3 </since_tizen>
1479 [EditorBrowsable(EditorBrowsableState.Never)]
1480 public class ImfManagerResizedEventArgs : EventArgs
1485 /// <since_tizen> 3 </since_tizen>
1486 public ImfManager ImfManager
1493 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1494 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1495 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1498 /// ImfManager resized event.
1500 ///Please do not use! this will be deprecated
1501 /// <since_tizen> 3 </since_tizen>
1502 [EditorBrowsable(EditorBrowsableState.Never)]
1503 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1507 if (_imfManagerResizedEventHandler == null)
1509 _imfManagerResizedEventCallback = OnImfManagerResized;
1510 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1513 _imfManagerResizedEventHandler += value;
1517 _imfManagerResizedEventHandler -= value;
1519 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1521 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1526 private void OnImfManagerResized(IntPtr data)
1528 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1532 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1535 if (_imfManagerResizedEventHandler != null)
1537 _imfManagerResizedEventHandler(this, e);
1542 /// ImfManager resized event.
1544 /// <since_tizen> 4 </since_tizen>
1545 public class ResizedEventArgs : EventArgs
1550 /// <since_tizen> 4 </since_tizen>
1558 private delegate void ResizedEventCallbackType(int resized);
1559 private ResizedEventCallbackType _resizedEventCallback;
1560 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1563 /// ImfManager resized.
1565 /// <since_tizen> 4 </since_tizen>
1566 public event EventHandler<ResizedEventArgs> Resized
1570 if (_resizedEventHandler == null)
1572 _resizedEventCallback = OnResized;
1573 ResizedSignal().Connect(_resizedEventCallback);
1576 _resizedEventHandler += value;
1580 _resizedEventHandler -= value;
1582 if (_resizedEventHandler == null && _resizedEventCallback != null)
1584 ResizedSignal().Disconnect(_resizedEventCallback);
1589 private void OnResized(int resized)
1591 ResizedEventArgs e = new ResizedEventArgs();
1592 e.Resized = resized;
1594 if (_resizedEventHandler != null)
1596 _resizedEventHandler(this, e);
1601 /// ImfManager resized signal.
1603 ///Please do not use! this will be internal
1604 /// <since_tizen> 3 </since_tizen>
1605 [EditorBrowsable(EditorBrowsableState.Never)]
1606 public KeyboardResizedSignalType ResizedSignal()
1608 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1609 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1614 /// ImfManager language changed event arguments.
1616 ///Please do not use! this will be deprecated
1617 /// <since_tizen> 3 </since_tizen>
1618 [EditorBrowsable(EditorBrowsableState.Never)]
1619 public class ImfManagerLanguageChangedEventArgs : EventArgs
1624 /// <since_tizen> 3 </since_tizen>
1625 public ImfManager ImfManager
1632 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1633 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1634 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1637 /// ImfManager language changed event.
1639 ///Please do not use! this will be deprecated
1640 /// <since_tizen> 3 </since_tizen>
1641 [EditorBrowsable(EditorBrowsableState.Never)]
1642 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1646 if (_imfManagerLanguageChangedEventHandler == null)
1648 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1649 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1652 _imfManagerLanguageChangedEventHandler += value;
1656 _imfManagerLanguageChangedEventHandler -= value;
1658 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1660 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1665 private void OnImfManagerLanguageChanged(IntPtr data)
1667 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1671 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1674 if (_imfManagerLanguageChangedEventHandler != null)
1676 _imfManagerLanguageChangedEventHandler(this, e);
1681 /// ImfManager language changed event args.
1683 /// <since_tizen> 4 </since_tizen>
1684 public class LanguageChangedEventArgs : EventArgs
1687 /// language changed.
1689 /// <since_tizen> 4 </since_tizen>
1690 public int LanguageChanged
1697 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1698 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1699 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1702 /// ImfManager language changed.
1704 /// <since_tizen> 4 </since_tizen>
1705 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1709 if (_languageChangedEventHandler == null)
1711 _languageChangedEventCallback = OnLanguageChanged;
1712 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1715 _languageChangedEventHandler += value;
1719 _languageChangedEventHandler -= value;
1721 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1723 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1728 private void OnLanguageChanged(int languageChanged)
1730 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1731 e.LanguageChanged = languageChanged;
1733 if (_languageChangedEventHandler != null)
1735 _languageChangedEventHandler(this, e);
1740 /// ImfManager language changed signal.
1742 ///Please do not use! this will be internal
1743 /// <since_tizen> 3 </since_tizen>
1744 [EditorBrowsable(EditorBrowsableState.Never)]
1745 public LanguageChangedSignalType LanguageChangedSignal()
1747 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1748 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1753 /// ImfManager keyboard type changed event arguments.
1755 /// <since_tizen> 4 </since_tizen>
1756 public class KeyboardTypeChangedEventArgs : EventArgs
1759 /// ImfManager keyboard type
1761 /// <since_tizen> 4 </since_tizen>
1762 public KeyboardType KeyboardType
1769 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1770 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1771 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1774 /// ImfManager keyboard type changed.
1776 /// <since_tizen> 4 </since_tizen>
1777 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1781 if (_keyboardTypeChangedEventHandler == null)
1783 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1784 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1787 _keyboardTypeChangedEventHandler += value;
1791 _keyboardTypeChangedEventHandler -= value;
1793 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1795 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1800 private void OnKeyboardTypeChanged(KeyboardType type)
1802 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1804 e.KeyboardType = type;
1806 if (_keyboardTypeChangedEventHandler != null)
1808 _keyboardTypeChangedEventHandler(this, e);
1812 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1814 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1815 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1820 /// The direction of the text.
1822 /// <since_tizen> 3 </since_tizen>
1823 public enum TextDirection
1836 /// Events that are generated by the IMF.
1838 /// <since_tizen> 3 </since_tizen>
1839 public enum ImfEvent
1844 /// <since_tizen> 4 </since_tizen>
1847 /// Pre-Edit changed.
1849 /// <since_tizen> 4 </since_tizen>
1852 /// Commit received.
1854 /// <since_tizen> 4 </since_tizen>
1857 /// An event to delete a range of characters from the string.
1859 /// <since_tizen> 4 </since_tizen>
1862 /// An event to query string and the cursor position.
1864 /// <since_tizen> 4 </since_tizen>
1867 /// Private command sent from the input panel.
1869 /// <since_tizen> 4 </since_tizen>
1874 /// Enumeration for the state of the input panel.
1876 /// <since_tizen> 3 </since_tizen>
1882 /// <since_tizen> 4 </since_tizen>
1885 /// Input panel is shown.
1887 /// <since_tizen> 4 </since_tizen>
1890 /// Input panel is hidden.
1892 /// <since_tizen> 4 </since_tizen>
1895 /// Input panel in process of being shown.
1897 /// <since_tizen> 4 </since_tizen>
1902 /// Enumeration for the types of keyboard.
1904 /// <since_tizen> 4 </since_tizen>
1905 public enum KeyboardType
1908 /// Software keyboard (virtual keyboard) is default.
1910 /// <since_tizen> 4 </since_tizen>
1913 /// Hardware keyboard.
1915 /// <since_tizen> 4 </since_tizen>