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;
44 /// <param name="type">Dispose Type</param>
45 /// <since_tizen> 3 </since_tizen>
46 /// Please DO NOT use! This will be deprecated!
47 /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
48 /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 protected override void Dispose(DisposeTypes type)
57 if (type == DisposeTypes.Explicit)
60 //Release your own managed resources here.
61 //You should release all of your own disposable objects here.
65 //Release your own unmanaged resources here.
66 //You should not access any managed member here except static instance.
67 //because the execution order of Finalizes is non-deterministic.
69 if (_keyboardTypeChangedEventCallback != null)
71 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
74 if (_imfManagerLanguageChangedEventCallback != null)
76 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
79 if (_imfManagerResizedEventCallback != null)
81 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
84 if (_imfManagerStatusChangedEventCallback != null)
86 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
89 if (_imfManagerEventReceivedEventCallback != null)
91 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
94 if (_imfManagerActivatedEventCallback != null)
96 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
99 if (swigCPtr.Handle != global::System.IntPtr.Zero)
104 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
106 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
113 /// This structure is used to pass on data from the IMF regarding predictive text.
115 public class ImfEventData : global::System.IDisposable
117 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
121 /// <since_tizen> 3 </since_tizen>
122 protected bool swigCMemOwn;
124 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
126 swigCMemOwn = cMemoryOwn;
127 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
130 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
132 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
135 //A Flag to check who called Dispose(). (By User or DisposeQueue)
136 private bool isDisposeQueued = false;
138 /// A Flat to check if it is already disposed.
140 /// <since_tizen> 3 </since_tizen>
141 protected bool disposed = false;
146 /// <since_tizen> 3 </since_tizen>
149 if (!isDisposeQueued)
151 isDisposeQueued = true;
152 DisposeQueue.Instance.Add(this);
157 /// The dispose pattern.
159 /// <since_tizen> 3 </since_tizen>
160 public void Dispose()
162 //Throw excpetion if Dispose() is called in separate thread.
163 if (!Window.IsInstalled())
165 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
170 Dispose(DisposeTypes.Implicit);
174 Dispose(DisposeTypes.Explicit);
175 System.GC.SuppressFinalize(this);
182 /// <since_tizen> 3 </since_tizen>
183 protected virtual void Dispose(DisposeTypes type)
190 if (type == DisposeTypes.Explicit)
193 //Release your own managed resources here.
194 //You should release all of your own disposable objects here.
198 //Release your own unmanaged resources here.
199 //You should not access any managed member here except static instance.
200 //because the execution order of Finalizes is non-deterministic.
202 if (swigCPtr.Handle != IntPtr.Zero)
207 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
209 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
215 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
217 ImfEventData ret = new ImfEventData(cPtr, false);
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223 /// The default constructor.
225 /// <since_tizen> 3 </since_tizen>
226 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 /// <param name="aEventName">The name of the event from the IMF.</param>
235 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
236 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
237 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
238 /// <since_tizen> 3 </since_tizen>
239 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 /// The pre-edit or the commit string.
247 /// /// <since_tizen> 3 </since_tizen>
248 [EditorBrowsable(EditorBrowsableState.Never)]
249 public string predictiveString
253 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
254 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
258 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
259 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265 /// The pre-edit or the commit string.
267 /// <since_tizen> 4 </since_tizen>
268 public string PredictiveString
272 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284 /// The name of the event from the IMF.
286 //Please do not use! this will be deprecated
287 [EditorBrowsable(EditorBrowsableState.Never)]
288 public ImfManager.ImfEvent eventName
292 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304 /// The name of the event from the IMF.
306 /// <since_tizen> 4 </since_tizen>
307 public ImfManager.ImfEvent EventName
311 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
317 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 /// The start position from the current cursor position to start deleting characters.
325 //Please do not use! this will be deprecated
326 [EditorBrowsable(EditorBrowsableState.Never)]
327 public int cursorOffset
331 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 /// The start position from the current cursor position to start deleting characters.
345 /// <since_tizen> 4 </since_tizen>
346 public int CursorOffset
350 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
351 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
355 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362 /// The number of characters to delete from the cursorOffset.
364 //Please do not use! this will be deprecated
365 [EditorBrowsable(EditorBrowsableState.Never)]
366 public int numberOfChars
370 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
376 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 /// The number of characters to delete from the cursorOffset.
384 /// <since_tizen> 4 </since_tizen>
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();
403 /// Data required by the IMF from the callback.
405 public class ImfCallbackData : global::System.IDisposable
407 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
411 /// <since_tizen> 3 </since_tizen>
412 protected bool swigCMemOwn;
414 internal IntPtr GetImfCallbackDataPtr()
416 return (IntPtr)swigCPtr;
419 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
421 swigCMemOwn = cMemoryOwn;
422 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
425 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
427 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
430 //A Flag to check who called Dispose(). (By User or DisposeQueue)
431 private bool isDisposeQueued = false;
433 /// A Flat to check if it is already disposed.
435 /// <since_tizen> 3 </since_tizen>
436 protected bool disposed = false;
442 /// <since_tizen> 3 </since_tizen>
445 if (!isDisposeQueued)
447 isDisposeQueued = true;
448 DisposeQueue.Instance.Add(this);
453 /// The dispose pattern.
455 /// <since_tizen> 3 </since_tizen>
456 public void Dispose()
458 //Throw excpetion if Dispose() is called in separate thread.
459 if (!Window.IsInstalled())
461 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
466 Dispose(DisposeTypes.Implicit);
470 Dispose(DisposeTypes.Explicit);
471 System.GC.SuppressFinalize(this);
478 /// <since_tizen> 3 </since_tizen>
479 protected virtual void Dispose(DisposeTypes type)
486 if (type == DisposeTypes.Explicit)
489 //Release your own managed resources here.
490 //You should release all of your own disposable objects here.
494 //Release your own unmanaged resources here.
495 //You should not access any managed member here except static instance.
496 //because the execution order of Finalizes is non-deterministic.
498 if (swigCPtr.Handle != IntPtr.Zero)
503 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
505 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
511 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
513 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
514 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
519 /// The default constructor.
521 /// <since_tizen> 3 </since_tizen>
522 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
524 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
530 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
531 /// <param name="aCursorPosition">The new position of the cursor.</param>
532 /// <param name="aCurrentText">The current text string.</param>
533 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
534 /// <since_tizen> 3 </since_tizen>
535 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
537 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
541 /// The current text string.
543 //Please do not use! this will be deprecated
544 [EditorBrowsable(EditorBrowsableState.Never)]
545 public string currentText
549 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
554 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
555 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
561 /// The current text string.
563 /// <since_tizen> 4 </since_tizen>
564 public string CurrentText
568 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
573 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
574 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
580 /// The current text string.
582 //Please do not use! this will be deprecated
583 [EditorBrowsable(EditorBrowsableState.Never)]
584 public int cursorPosition
588 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
589 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
593 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
594 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
600 /// The current text string.
602 /// <since_tizen> 4 </since_tizen>
603 public int CursorPosition
607 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
612 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
619 /// If the cursor position needs to be updated.
621 //Please do not use! this will be deprecated
622 [EditorBrowsable(EditorBrowsableState.Never)]
627 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
628 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
639 /// If the cursor position needs to be updated.
641 /// <since_tizen> 4 </since_tizen>
646 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
647 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
651 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
652 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
658 /// Flags if preedit reset is required.
660 //Please do not use! this will be deprecated
661 [EditorBrowsable(EditorBrowsableState.Never)]
662 public bool preeditResetRequired
666 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
667 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
671 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
672 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
678 /// Flags if preedit reset is required.
680 /// <since_tizen> 4 </since_tizen>
681 public bool PreeditResetRequired
685 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
686 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
690 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
699 /// Finalize the IMF.<br/>
701 public void Finalize()
703 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
704 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
708 /// Retrieves a handle to the instance of the ImfManager.
710 /// <returns>A handle to the ImfManager.</returns>
711 /// <since_tizen> 3 </since_tizen>
712 public static ImfManager Get()
714 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
715 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720 /// Activates the IMF.<br/>
721 /// It means that the text editing is started somewhere.<br/>
722 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
724 /// <since_tizen> 3 </since_tizen>
725 public void Activate()
727 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
728 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732 /// Deactivates the IMF.<br/>
733 /// It means that the text editing is finished somewhere.
735 /// <since_tizen> 3 </since_tizen>
736 public void Deactivate()
738 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
739 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
743 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
744 /// If true, then the keyboard will be restored (activated) after focus is regained.
746 /// <returns>The restoration status.</returns>
747 /// <since_tizen> 3 </since_tizen>
748 public bool RestoreAfterFocusLost()
750 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
751 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
756 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
758 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
759 /// <since_tizen> 3 </since_tizen>
760 public void SetRestoreAfterFocusLost(bool toggle)
762 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
763 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
767 /// Sends a message reset to the preedit state or the IMF module.
769 /// <since_tizen> 3 </since_tizen>
770 public new void Reset()
772 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
773 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
777 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
779 /// <since_tizen> 3 </since_tizen>
780 public void NotifyCursorPosition()
782 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
783 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
787 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
789 /// <param name="cursorPosition">The position of the cursor.</param>
790 /// <since_tizen> 3 </since_tizen>
791 public void SetCursorPosition(uint cursorPosition)
793 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
794 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
798 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
800 /// <returns>The current position of the cursor.</returns>
801 /// <since_tizen> 3 </since_tizen>
802 public uint GetCursorPosition()
804 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
805 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
812 /// <param name="text">The text string surrounding the current cursor point.</param>
813 /// <since_tizen> 3 </since_tizen>
814 public void SetSurroundingText(string text)
816 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
817 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
821 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
823 /// <returns>The surrounding text.</returns>
824 /// <since_tizen> 3 </since_tizen>
825 public string GetSurroundingText()
827 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
828 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 /// Notifies the IMF context that text input is set to multiline or not.
835 /// <param name="multiLine">True if multiline text input is used.</param>
836 /// <since_tizen> 3 </since_tizen>
837 public void NotifyTextInputMultiLine(bool multiLine)
839 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
840 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
844 /// Returns the text direction of the keyboard's current input language.
846 /// <returns>The direction of the text.</returns>
847 /// <since_tizen> 3 </since_tizen>
848 public ImfManager.TextDirection GetTextDirection()
850 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
851 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
856 /// Provides the size and the position of the keyboard.<br/>
857 /// The position is relative to whether the keyboard is visible or not.<br/>
858 /// If the keyboard is not visible, then the position will be off the screen.<br/>
859 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
860 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
862 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
863 /// <since_tizen> 3 </since_tizen>
864 public Rectangle GetInputMethodArea()
866 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
867 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871 internal void ApplyOptions(InputMethodOptions options)
873 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
874 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878 /// Sets up the input-panel specific data.
880 /// <param name="text">The specific data to be set to the input panel.</param>
881 /// <since_tizen> 3 </since_tizen>
882 public void SetInputPanelUserData(string text)
884 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
885 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 /// Gets the specific data of the current active input panel.
891 /// <param name="text">The specific data to be received from the input panel.</param>
892 /// <since_tizen> 3 </since_tizen>
893 public void GetInputPanelUserData(out string text)
895 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
896 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
900 /// Gets the state of the current active input panel.
902 /// <returns>The state of the input panel.</returns>
903 /// <since_tizen> 3 </since_tizen>
904 public ImfManager.State GetInputPanelState()
906 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
907 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
912 /// Sets the return key on the input panel to be visible or invisible.<br/>
913 /// The default is true.
915 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
916 /// <since_tizen> 3 </since_tizen>
917 public void SetReturnKeyState(bool visible)
919 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
920 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
924 /// Enables to show the input panel automatically when focused.
926 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
927 /// <since_tizen> 3 </since_tizen>
928 public void AutoEnableInputPanel(bool enabled)
930 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
931 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935 /// Shows the input panel.
937 /// <since_tizen> 3 </since_tizen>
938 public void ShowInputPanel()
940 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945 /// Hides the input panel.
947 /// <since_tizen> 3 </since_tizen>
948 public void HideInputPanel()
950 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
951 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955 /// Gets the keyboard type.<br/>
956 /// The default keyboard type is SoftwareKeyboard.
958 /// <returns>The keyboard type.</returns>
959 /// <since_tizen> 4 </since_tizen>
960 public ImfManager.KeyboardType GetKeyboardType()
962 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 /// Gets the current language locale of the input panel.<br/>
969 /// For example, en_US, en_GB, en_PH, fr_FR, ...
971 /// <returns>The current language locale of the input panel.</returns>
972 /// <since_tizen> 4 </since_tizen>
973 public string GetInputPanelLocale()
975 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
976 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 /// <since_tizen> 3 </since_tizen>
984 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 /// ImfManager activated event arguments.
992 //Please do not use! this will be deprecated
993 [EditorBrowsable(EditorBrowsableState.Never)]
994 public class ImfManagerActivatedEventArgs : EventArgs
999 /// <since_tizen> 3 </since_tizen>
1000 public ImfManager ImfManager
1007 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1008 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1009 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1010 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1013 /// ImfManager activated event.
1015 //Please do not use! this will be deprecated
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1021 if (_imfManagerActivatedEventHandler == null)
1023 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1024 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1027 _imfManagerActivatedEventHandler += value;
1031 _imfManagerActivatedEventHandler -= value;
1033 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1035 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1040 private void OnImfManagerActivated(global::System.IntPtr data)
1042 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1046 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1049 if (_imfManagerActivatedEventHandler != null)
1051 _imfManagerActivatedEventHandler(this, e);
1056 /// ImfManager activated event arguments.
1058 public class ActivatedEventArgs : EventArgs
1063 /// <since_tizen> 3 </since_tizen>
1064 public ImfManager ImfManager
1071 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1072 private delegate void ActivatedEventCallbackType(IntPtr data);
1073 private ActivatedEventCallbackType _activatedEventCallback;
1074 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1077 /// ImfManager activated.
1079 /// <since_tizen> 4 </since_tizen>
1080 public event EventHandler<ActivatedEventArgs> Activated
1084 if (_activatedEventHandler == null)
1086 _activatedEventCallback = OnActivated;
1087 ActivatedSignal().Connect(_activatedEventCallback);
1090 _activatedEventHandler += value;
1094 _activatedEventHandler -= value;
1096 if (_activatedEventHandler == null && _activatedEventCallback != null)
1098 ActivatedSignal().Disconnect(_activatedEventCallback);
1103 private void OnActivated(IntPtr data)
1105 ActivatedEventArgs e = new ActivatedEventArgs();
1109 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1112 if (_activatedEventHandler != null)
1114 _activatedEventHandler(this, e);
1119 /// ImfManager activated signal.
1121 //Please do not use! this will be internal
1122 [EditorBrowsable(EditorBrowsableState.Never)]
1123 public ActivatedSignalType ActivatedSignal()
1125 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1131 /// ImfManager event received event arguments.
1133 //Please do not use! this will be deprecated
1134 [EditorBrowsable(EditorBrowsableState.Never)]
1135 public class ImfManagerEventReceivedEventArgs : EventArgs
1140 /// <since_tizen> 3 </since_tizen>
1141 public ImfManager ImfManager
1148 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1149 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1150 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1153 /// ImfManager event received.
1155 //Please do not use! this will be deprecated
1156 [EditorBrowsable(EditorBrowsableState.Never)]
1157 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1161 if (_imfManagerEventReceivedEventHandler == null)
1163 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1164 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1167 _imfManagerEventReceivedEventHandler += value;
1171 _imfManagerEventReceivedEventHandler -= value;
1173 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1175 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1180 private void OnImfManagerEventReceived(global::System.IntPtr data)
1182 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1186 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1189 if (_imfManagerEventReceivedEventHandler != null)
1191 _imfManagerEventReceivedEventHandler(this, e);
1196 /// ImfManager event received event arguments.
1198 public class EventReceivedEventArgs : EventArgs
1203 /// <since_tizen> 3 </since_tizen>
1204 public ImfManager ImfManager
1213 /// <since_tizen> 3 </since_tizen>
1214 public ImfEventData ImfEventData
1221 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1222 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1223 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1226 /// ImfManager event received.
1228 /// <since_tizen> 4 </since_tizen>
1229 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1233 if (_eventReceivedEventHandler == null)
1235 _eventReceivedEventCallback = OnEventReceived;
1236 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1239 _eventReceivedEventHandler += value;
1243 _eventReceivedEventHandler -= value;
1245 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1247 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1252 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1254 ImfCallbackData imfCallbackData = null;
1256 EventReceivedEventArgs e = new EventReceivedEventArgs();
1258 if (imfManager != null)
1260 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1262 if (imfEventData != null)
1264 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1267 if (_eventReceivedEventHandler != null)
1269 imfCallbackData = _eventReceivedEventHandler(this, e);
1271 if (imfCallbackData != null)
1273 return imfCallbackData.GetImfCallbackDataPtr();
1277 return new ImfCallbackData().GetImfCallbackDataPtr();
1282 /// ImfManager event received signal.
1284 //Please do not use! this will be internal
1285 [EditorBrowsable(EditorBrowsableState.Never)]
1286 public ImfEventSignalType EventReceivedSignal()
1288 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1289 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1294 /// ImfManager status changed event arguments.
1296 //Please do not use! this will be deprecated
1297 [EditorBrowsable(EditorBrowsableState.Never)]
1298 public class ImfManagerStatusChangedEventArgs : EventArgs
1303 /// <since_tizen> 3 </since_tizen>
1304 public ImfManager ImfManager
1311 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1312 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1313 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1316 /// ImfManager status changed.
1318 //Please do not use! this will be deprecated
1319 [EditorBrowsable(EditorBrowsableState.Never)]
1320 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1324 if (_imfManagerStatusChangedEventHandler == null)
1326 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1327 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1330 _imfManagerStatusChangedEventHandler += value;
1334 _imfManagerStatusChangedEventHandler -= value;
1336 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1338 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1343 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1345 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1349 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1352 if (_imfManagerStatusChangedEventHandler != null)
1354 _imfManagerStatusChangedEventHandler(this, e);
1359 /// ImfManager status changed event arguments.
1361 public class StatusChangedEventArgs : EventArgs
1364 /// ImfManager status
1366 /// <since_tizen> 3 </since_tizen>
1367 public bool StatusChanged
1374 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1375 private StatusChangedEventCallbackType _statusChangedEventCallback;
1376 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1379 /// ImfManager status changed.
1381 /// <since_tizen> 4 </since_tizen>
1382 public event EventHandler<StatusChangedEventArgs> StatusChanged
1386 if (_statusChangedEventHandler == null)
1388 _statusChangedEventCallback = OnStatusChanged;
1389 StatusChangedSignal().Connect(_statusChangedEventCallback);
1392 _statusChangedEventHandler += value;
1396 _statusChangedEventHandler -= value;
1398 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1400 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1405 private void OnStatusChanged(bool statusChanged)
1407 StatusChangedEventArgs e = new StatusChangedEventArgs();
1409 e.StatusChanged = statusChanged;
1411 if (_statusChangedEventHandler != null)
1413 _statusChangedEventHandler(this, e);
1418 /// ImfManager status changed signal.
1420 //Please do not use! this will be internal
1421 [EditorBrowsable(EditorBrowsableState.Never)]
1422 public StatusSignalType StatusChangedSignal()
1424 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1425 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1430 /// ImfManager resized event arguments.
1432 //Please do not use! this will be deprecated
1433 [EditorBrowsable(EditorBrowsableState.Never)]
1434 public class ImfManagerResizedEventArgs : EventArgs
1439 /// <since_tizen> 3 </since_tizen>
1440 public ImfManager ImfManager
1447 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1448 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1449 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1452 /// ImfManager resized event.
1454 //Please do not use! this will be deprecated
1455 [EditorBrowsable(EditorBrowsableState.Never)]
1456 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1460 if (_imfManagerResizedEventHandler == null)
1462 _imfManagerResizedEventCallback = OnImfManagerResized;
1463 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1466 _imfManagerResizedEventHandler += value;
1470 _imfManagerResizedEventHandler -= value;
1472 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1474 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1479 private void OnImfManagerResized(IntPtr data)
1481 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1485 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1488 if (_imfManagerResizedEventHandler != null)
1490 _imfManagerResizedEventHandler(this, e);
1495 /// ImfManager resized event.
1497 public class ResizedEventArgs : EventArgs
1509 private delegate void ResizedEventCallbackType(int resized);
1510 private ResizedEventCallbackType _resizedEventCallback;
1511 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1514 /// ImfManager resized.
1516 /// <since_tizen> 4 </since_tizen>
1517 public event EventHandler<ResizedEventArgs> Resized
1521 if (_resizedEventHandler == null)
1523 _resizedEventCallback = OnResized;
1524 ResizedSignal().Connect(_resizedEventCallback);
1527 _resizedEventHandler += value;
1531 _resizedEventHandler -= value;
1533 if (_resizedEventHandler == null && _resizedEventCallback != null)
1535 ResizedSignal().Disconnect(_resizedEventCallback);
1540 private void OnResized(int resized)
1542 ResizedEventArgs e = new ResizedEventArgs();
1543 e.Resized = resized;
1545 if (_resizedEventHandler != null)
1547 _resizedEventHandler(this, e);
1552 /// ImfManager resized signal.
1554 //Please do not use! this will be internal
1555 [EditorBrowsable(EditorBrowsableState.Never)]
1556 public KeyboardResizedSignalType ResizedSignal()
1558 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1564 /// ImfManager language changed event arguments.
1566 //Please do not use! this will be deprecated
1567 [EditorBrowsable(EditorBrowsableState.Never)]
1568 public class ImfManagerLanguageChangedEventArgs : EventArgs
1573 /// <since_tizen> 3 </since_tizen>
1574 public ImfManager ImfManager
1581 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1582 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1583 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1586 /// ImfManager language changed event.
1588 //Please do not use! this will be deprecated
1589 [EditorBrowsable(EditorBrowsableState.Never)]
1590 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1594 if (_imfManagerLanguageChangedEventHandler == null)
1596 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1597 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1600 _imfManagerLanguageChangedEventHandler += value;
1604 _imfManagerLanguageChangedEventHandler -= value;
1606 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1608 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1613 private void OnImfManagerLanguageChanged(IntPtr data)
1615 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1619 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1622 if (_imfManagerLanguageChangedEventHandler != null)
1624 _imfManagerLanguageChangedEventHandler(this, e);
1629 /// ImfManager language changed event args.
1631 public class LanguageChangedEventArgs : EventArgs
1634 /// language changed.
1636 public int LanguageChanged
1643 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1644 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1645 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1648 /// ImfManager language changed.
1650 /// <since_tizen> 4 </since_tizen>
1651 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1655 if (_languageChangedEventHandler == null)
1657 _languageChangedEventCallback = OnLanguageChanged;
1658 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1661 _languageChangedEventHandler += value;
1665 _languageChangedEventHandler -= value;
1667 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1669 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1674 private void OnLanguageChanged(int languageChanged)
1676 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1677 e.LanguageChanged = languageChanged;
1679 if (_languageChangedEventHandler != null)
1681 _languageChangedEventHandler(this, e);
1686 /// ImfManager language changed signal.
1688 //Please do not use! this will be internal
1689 [EditorBrowsable(EditorBrowsableState.Never)]
1690 public LanguageChangedSignalType LanguageChangedSignal()
1692 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1693 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1698 /// ImfManager keyboard type changed event arguments.
1700 public class KeyboardTypeChangedEventArgs : EventArgs
1703 /// ImfManager keyboard type
1705 /// <since_tizen> 3 </since_tizen>
1706 public KeyboardType KeyboardType
1713 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1714 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1715 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1718 /// ImfManager keyboard type changed.
1720 /// <since_tizen> 4 </since_tizen>
1721 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1725 if (_keyboardTypeChangedEventHandler == null)
1727 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1728 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1731 _keyboardTypeChangedEventHandler += value;
1735 _keyboardTypeChangedEventHandler -= value;
1737 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1739 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1744 private void OnKeyboardTypeChanged(KeyboardType type)
1746 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1748 e.KeyboardType = type;
1750 if (_keyboardTypeChangedEventHandler != null)
1752 _keyboardTypeChangedEventHandler(this, e);
1756 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1758 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1759 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1764 /// The direction of the text.
1766 /// <since_tizen> 3 </since_tizen>
1767 public enum TextDirection
1780 /// Events that are generated by the IMF.
1782 /// <since_tizen> 4 </since_tizen>
1783 public enum ImfEvent
1790 /// Pre-Edit changed.
1794 /// Commit received.
1798 /// An event to delete a range of characters from the string.
1802 /// An event to query string and the cursor position.
1806 /// Private command sent from the input panel.
1812 /// Enumeration for the state of the input panel.
1814 /// <since_tizen> 4 </since_tizen>
1822 /// Input panel is shown.
1826 /// Input panel is hidden.
1830 /// Input panel in process of being shown.
1836 /// Enumeration for the types of keyboard.
1838 /// <since_tizen> 4 </since_tizen>
1839 public enum KeyboardType
1842 /// Software keyboard (virtual keyboard) is default.
1846 /// Hardware keyboard.