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.
18 using System.Runtime.InteropServices;
19 using System.ComponentModel;
24 /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
26 public class ImfManager : BaseHandle
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
43 /// <param name="type">Dispose Type</param>
44 /// <since_tizen> 3 </since_tizen>
45 protected override void Dispose(DisposeTypes type)
52 if (type == DisposeTypes.Explicit)
55 //Release your own managed resources here.
56 //You should release all of your own disposable objects here.
60 //Release your own unmanaged resources here.
61 //You should not access any managed member here except static instance.
62 //because the execution order of Finalizes is non-deterministic.
64 if (_keyboardTypeChangedEventCallback != null)
66 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
69 if (_imfManagerLanguageChangedEventCallback != null)
71 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
74 if (_imfManagerResizedEventCallback != null)
76 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
79 if (_imfManagerStatusChangedEventCallback != null)
81 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
84 if (_imfManagerEventReceivedEventCallback != null)
86 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
89 if (_imfManagerActivatedEventCallback != null)
91 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
94 if (swigCPtr.Handle != global::System.IntPtr.Zero)
99 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
101 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
108 /// This structure is used to pass on data from the IMF regarding predictive text.
110 public class ImfEventData : global::System.IDisposable
112 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
116 /// <since_tizen> 3 </since_tizen>
117 protected bool swigCMemOwn;
119 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
121 swigCMemOwn = cMemoryOwn;
122 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
125 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
127 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
130 //A Flag to check who called Dispose(). (By User or DisposeQueue)
131 private bool isDisposeQueued = false;
133 /// A Flat to check if it is already disposed.
135 /// <since_tizen> 3 </since_tizen>
136 protected bool disposed = false;
141 /// <since_tizen> 3 </since_tizen>
144 if (!isDisposeQueued)
146 isDisposeQueued = true;
147 DisposeQueue.Instance.Add(this);
152 /// The dispose pattern.
154 /// <since_tizen> 3 </since_tizen>
155 public void Dispose()
157 //Throw excpetion if Dispose() is called in separate thread.
158 if (!Window.IsInstalled())
160 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
165 Dispose(DisposeTypes.Implicit);
169 Dispose(DisposeTypes.Explicit);
170 System.GC.SuppressFinalize(this);
177 /// <since_tizen> 3 </since_tizen>
178 protected virtual void Dispose(DisposeTypes type)
185 if (type == DisposeTypes.Explicit)
188 //Release your own managed resources here.
189 //You should release all of your own disposable objects here.
193 //Release your own unmanaged resources here.
194 //You should not access any managed member here except static instance.
195 //because the execution order of Finalizes is non-deterministic.
197 if (swigCPtr.Handle != IntPtr.Zero)
202 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
204 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
210 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
212 ImfEventData ret = new ImfEventData(cPtr, false);
213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 /// The default constructor.
220 /// <since_tizen> 3 </since_tizen>
221 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 /// <param name="aEventName">The name of the event from the IMF.</param>
230 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
231 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
232 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
233 /// <since_tizen> 3 </since_tizen>
234 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 /// The pre-edit or the commit string.
242 /// /// <since_tizen> 3 </since_tizen>
243 [EditorBrowsable(EditorBrowsableState.Never)]
244 public string predictiveString
248 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
254 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 /// The pre-edit or the commit string.
262 /// <since_tizen> 4 </since_tizen>
263 public string PredictiveString
267 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 /// The name of the event from the IMF.
281 //Please do not use! this will be deprecated
282 [EditorBrowsable(EditorBrowsableState.Never)]
283 public ImfManager.ImfEvent eventName
287 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299 /// The name of the event from the IMF.
301 /// <since_tizen> 4 </since_tizen>
302 public ImfManager.ImfEvent EventName
306 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 /// The start position from the current cursor position to start deleting characters.
320 //Please do not use! this will be deprecated
321 [EditorBrowsable(EditorBrowsableState.Never)]
322 public int cursorOffset
326 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
331 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338 /// The start position from the current cursor position to start deleting characters.
340 /// <since_tizen> 4 </since_tizen>
341 public int CursorOffset
345 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
351 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 /// The number of characters to delete from the cursorOffset.
359 //Please do not use! this will be deprecated
360 [EditorBrowsable(EditorBrowsableState.Never)]
361 public int numberOfChars
365 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
366 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377 /// The number of characters to delete from the cursorOffset.
379 /// <since_tizen> 4 </since_tizen>
380 public int NumberOfChars
384 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398 /// Data required by the IMF from the callback.
400 public class ImfCallbackData : global::System.IDisposable
402 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
406 /// <since_tizen> 3 </since_tizen>
407 protected bool swigCMemOwn;
409 internal IntPtr GetImfCallbackDataPtr()
411 return (IntPtr)swigCPtr;
414 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
416 swigCMemOwn = cMemoryOwn;
417 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
420 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
422 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
425 //A Flag to check who called Dispose(). (By User or DisposeQueue)
426 private bool isDisposeQueued = false;
428 /// A Flat to check if it is already disposed.
430 /// <since_tizen> 3 </since_tizen>
431 protected bool disposed = false;
437 /// <since_tizen> 3 </since_tizen>
440 if (!isDisposeQueued)
442 isDisposeQueued = true;
443 DisposeQueue.Instance.Add(this);
448 /// The dispose pattern.
450 /// <since_tizen> 3 </since_tizen>
451 public void Dispose()
453 //Throw excpetion if Dispose() is called in separate thread.
454 if (!Window.IsInstalled())
456 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
461 Dispose(DisposeTypes.Implicit);
465 Dispose(DisposeTypes.Explicit);
466 System.GC.SuppressFinalize(this);
473 /// <since_tizen> 3 </since_tizen>
474 protected virtual void Dispose(DisposeTypes type)
481 if (type == DisposeTypes.Explicit)
484 //Release your own managed resources here.
485 //You should release all of your own disposable objects here.
489 //Release your own unmanaged resources here.
490 //You should not access any managed member here except static instance.
491 //because the execution order of Finalizes is non-deterministic.
493 if (swigCPtr.Handle != IntPtr.Zero)
498 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
500 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
506 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
508 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
509 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
514 /// The default constructor.
516 /// <since_tizen> 3 </since_tizen>
517 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
519 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
526 /// <param name="aCursorPosition">The new position of the cursor.</param>
527 /// <param name="aCurrentText">The current text string.</param>
528 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
529 /// <since_tizen> 3 </since_tizen>
530 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
532 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
536 /// The current text string.
538 //Please do not use! this will be deprecated
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public string currentText
544 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
545 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556 /// The current text string.
558 /// <since_tizen> 4 </since_tizen>
559 public string CurrentText
563 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
575 /// The current text string.
577 //Please do not use! this will be deprecated
578 [EditorBrowsable(EditorBrowsableState.Never)]
579 public int cursorPosition
583 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
584 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
588 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
589 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595 /// The current text string.
597 /// <since_tizen> 4 </since_tizen>
598 public int CursorPosition
602 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614 /// If the cursor position needs to be updated.
616 //Please do not use! this will be deprecated
617 [EditorBrowsable(EditorBrowsableState.Never)]
622 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
623 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
627 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
628 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634 /// If the cursor position needs to be updated.
636 /// <since_tizen> 4 </since_tizen>
641 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
642 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
646 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
647 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
653 /// Flags if preedit reset is required.
655 //Please do not use! this will be deprecated
656 [EditorBrowsable(EditorBrowsableState.Never)]
657 public bool preeditResetRequired
661 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
662 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
666 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
667 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
673 /// Flags if preedit reset is required.
675 /// <since_tizen> 4 </since_tizen>
676 public bool PreeditResetRequired
680 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
681 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
685 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
686 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
694 /// Finalize the IMF.<br/>
696 public void Finalize()
698 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
699 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
703 /// Retrieves a handle to the instance of the ImfManager.
705 /// <returns>A handle to the ImfManager.</returns>
706 /// <since_tizen> 3 </since_tizen>
707 public static ImfManager Get()
709 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
710 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
715 /// Activates the IMF.<br/>
716 /// It means that the text editing is started somewhere.<br/>
717 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
719 /// <since_tizen> 3 </since_tizen>
720 public void Activate()
722 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
723 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
727 /// Deactivates the IMF.<br/>
728 /// It means that the text editing is finished somewhere.
730 /// <since_tizen> 3 </since_tizen>
731 public void Deactivate()
733 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
734 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
738 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
739 /// If true, then the keyboard will be restored (activated) after focus is regained.
741 /// <returns>The restoration status.</returns>
742 /// <since_tizen> 3 </since_tizen>
743 public bool RestoreAfterFocusLost()
745 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
746 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
751 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
753 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
754 /// <since_tizen> 3 </since_tizen>
755 public void SetRestoreAfterFocusLost(bool toggle)
757 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
758 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
762 /// Sends a message reset to the preedit state or the IMF module.
764 /// <since_tizen> 3 </since_tizen>
765 public new void Reset()
767 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
768 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
774 /// <since_tizen> 3 </since_tizen>
775 public void NotifyCursorPosition()
777 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
778 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
782 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
784 /// <param name="cursorPosition">The position of the cursor.</param>
785 /// <since_tizen> 3 </since_tizen>
786 public void SetCursorPosition(uint cursorPosition)
788 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
789 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
795 /// <returns>The current position of the cursor.</returns>
796 /// <since_tizen> 3 </since_tizen>
797 public uint GetCursorPosition()
799 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
800 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
805 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
807 /// <param name="text">The text string surrounding the current cursor point.</param>
808 /// <since_tizen> 3 </since_tizen>
809 public void SetSurroundingText(string text)
811 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
812 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
818 /// <returns>The surrounding text.</returns>
819 /// <since_tizen> 3 </since_tizen>
820 public string GetSurroundingText()
822 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
823 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
828 /// Notifies the IMF context that text input is set to multiline or not.
830 /// <param name="multiLine">True if multiline text input is used.</param>
831 /// <since_tizen> 3 </since_tizen>
832 public void NotifyTextInputMultiLine(bool multiLine)
834 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
835 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
839 /// Returns the text direction of the keyboard's current input language.
841 /// <returns>The direction of the text.</returns>
842 /// <since_tizen> 3 </since_tizen>
843 public ImfManager.TextDirection GetTextDirection()
845 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
846 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
851 /// Provides the size and the position of the keyboard.<br/>
852 /// The position is relative to whether the keyboard is visible or not.<br/>
853 /// If the keyboard is not visible, then the position will be off the screen.<br/>
854 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
855 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
857 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
858 /// <since_tizen> 3 </since_tizen>
859 public Rectangle GetInputMethodArea()
861 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
862 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866 internal void ApplyOptions(InputMethodOptions options)
868 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
869 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
873 /// Sets up the input-panel specific data.
875 /// <param name="text">The specific data to be set to the input panel.</param>
876 /// <since_tizen> 3 </since_tizen>
877 public void SetInputPanelUserData(string text)
879 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
880 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
884 /// Gets the specific data of the current active input panel.
886 /// <param name="text">The specific data to be received from the input panel.</param>
887 /// <since_tizen> 3 </since_tizen>
888 public void GetInputPanelUserData(out string text)
890 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
891 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
895 /// Gets the state of the current active input panel.
897 /// <returns>The state of the input panel.</returns>
898 /// <since_tizen> 3 </since_tizen>
899 public ImfManager.State GetInputPanelState()
901 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
902 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
907 /// Sets the return key on the input panel to be visible or invisible.<br/>
908 /// The default is true.
910 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
911 /// <since_tizen> 3 </since_tizen>
912 public void SetReturnKeyState(bool visible)
914 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
919 /// Enables to show the input panel automatically when focused.
921 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
922 /// <since_tizen> 3 </since_tizen>
923 public void AutoEnableInputPanel(bool enabled)
925 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
926 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
930 /// Shows the input panel.
932 /// <since_tizen> 3 </since_tizen>
933 public void ShowInputPanel()
935 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
940 /// Hides the input panel.
942 /// <since_tizen> 3 </since_tizen>
943 public void HideInputPanel()
945 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
946 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
950 /// Gets the keyboard type.<br/>
951 /// The default keyboard type is SoftwareKeyboard.
953 /// <returns>The keyboard type.</returns>
954 /// <since_tizen> 4 </since_tizen>
955 public ImfManager.KeyboardType GetKeyboardType()
957 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
958 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
963 /// Gets the current language locale of the input panel.<br/>
964 /// For example, en_US, en_GB, en_PH, fr_FR, ...
966 /// <returns>The current language locale of the input panel.</returns>
967 /// <since_tizen> 4 </since_tizen>
968 public string GetInputPanelLocale()
970 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 /// <since_tizen> 3 </since_tizen>
979 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 /// ImfManager activated event arguments.
987 //Please do not use! this will be deprecated
988 [EditorBrowsable(EditorBrowsableState.Never)]
989 public class ImfManagerActivatedEventArgs : EventArgs
994 /// <since_tizen> 3 </since_tizen>
995 public ImfManager ImfManager
1002 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1003 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1004 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1005 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1008 /// ImfManager activated event.
1010 //Please do not use! this will be deprecated
1011 [EditorBrowsable(EditorBrowsableState.Never)]
1012 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1016 if (_imfManagerActivatedEventHandler == null)
1018 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1019 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1022 _imfManagerActivatedEventHandler += value;
1026 _imfManagerActivatedEventHandler -= value;
1028 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1030 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1035 private void OnImfManagerActivated(global::System.IntPtr data)
1037 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1041 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1044 if (_imfManagerActivatedEventHandler != null)
1046 _imfManagerActivatedEventHandler(this, e);
1051 /// ImfManager activated event arguments.
1053 public class ActivatedEventArgs : EventArgs
1058 /// <since_tizen> 3 </since_tizen>
1059 public ImfManager ImfManager
1066 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1067 private delegate void ActivatedEventCallbackType(IntPtr data);
1068 private ActivatedEventCallbackType _activatedEventCallback;
1069 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1072 /// ImfManager activated.
1074 /// <since_tizen> 4 </since_tizen>
1075 public event EventHandler<ActivatedEventArgs> Activated
1079 if (_activatedEventHandler == null)
1081 _activatedEventCallback = OnActivated;
1082 ActivatedSignal().Connect(_activatedEventCallback);
1085 _activatedEventHandler += value;
1089 _activatedEventHandler -= value;
1091 if (_activatedEventHandler == null && _activatedEventCallback != null)
1093 ActivatedSignal().Disconnect(_activatedEventCallback);
1098 private void OnActivated(IntPtr data)
1100 ActivatedEventArgs e = new ActivatedEventArgs();
1104 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1107 if (_activatedEventHandler != null)
1109 _activatedEventHandler(this, e);
1114 /// ImfManager activated signal.
1116 //Please do not use! this will be internal
1117 [EditorBrowsable(EditorBrowsableState.Never)]
1118 public ActivatedSignalType ActivatedSignal()
1120 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1126 /// ImfManager event received event arguments.
1128 //Please do not use! this will be deprecated
1129 [EditorBrowsable(EditorBrowsableState.Never)]
1130 public class ImfManagerEventReceivedEventArgs : EventArgs
1135 /// <since_tizen> 3 </since_tizen>
1136 public ImfManager ImfManager
1143 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1144 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1145 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1148 /// ImfManager event received.
1150 //Please do not use! this will be deprecated
1151 [EditorBrowsable(EditorBrowsableState.Never)]
1152 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1156 if (_imfManagerEventReceivedEventHandler == null)
1158 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1159 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1162 _imfManagerEventReceivedEventHandler += value;
1166 _imfManagerEventReceivedEventHandler -= value;
1168 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1170 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1175 private void OnImfManagerEventReceived(global::System.IntPtr data)
1177 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1181 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1184 if (_imfManagerEventReceivedEventHandler != null)
1186 _imfManagerEventReceivedEventHandler(this, e);
1191 /// ImfManager event received event arguments.
1193 public class EventReceivedEventArgs : EventArgs
1198 /// <since_tizen> 3 </since_tizen>
1199 public ImfManager ImfManager
1208 /// <since_tizen> 3 </since_tizen>
1209 public ImfEventData ImfEventData
1216 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1217 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1218 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1221 /// ImfManager event received.
1223 /// <since_tizen> 4 </since_tizen>
1224 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1228 if (_eventReceivedEventHandler == null)
1230 _eventReceivedEventCallback = OnEventReceived;
1231 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1234 _eventReceivedEventHandler += value;
1238 _eventReceivedEventHandler -= value;
1240 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1242 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1247 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1249 ImfCallbackData imfCallbackData = null;
1251 EventReceivedEventArgs e = new EventReceivedEventArgs();
1253 if (imfManager != null)
1255 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1257 if (imfEventData != null)
1259 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1262 if (_eventReceivedEventHandler != null)
1264 imfCallbackData = _eventReceivedEventHandler(this, e);
1266 if (imfCallbackData != null)
1268 return imfCallbackData.GetImfCallbackDataPtr();
1272 return new ImfCallbackData().GetImfCallbackDataPtr();
1277 /// ImfManager event received signal.
1279 //Please do not use! this will be internal
1280 [EditorBrowsable(EditorBrowsableState.Never)]
1281 public ImfEventSignalType EventReceivedSignal()
1283 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1284 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1289 /// ImfManager status changed event arguments.
1291 //Please do not use! this will be deprecated
1292 [EditorBrowsable(EditorBrowsableState.Never)]
1293 public class ImfManagerStatusChangedEventArgs : EventArgs
1298 /// <since_tizen> 3 </since_tizen>
1299 public ImfManager ImfManager
1306 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1307 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1308 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1311 /// ImfManager status changed.
1313 //Please do not use! this will be deprecated
1314 [EditorBrowsable(EditorBrowsableState.Never)]
1315 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1319 if (_imfManagerStatusChangedEventHandler == null)
1321 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1322 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1325 _imfManagerStatusChangedEventHandler += value;
1329 _imfManagerStatusChangedEventHandler -= value;
1331 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1333 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1338 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1340 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1344 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1347 if (_imfManagerStatusChangedEventHandler != null)
1349 _imfManagerStatusChangedEventHandler(this, e);
1354 /// ImfManager status changed event arguments.
1356 public class StatusChangedEventArgs : EventArgs
1359 /// ImfManager status
1361 /// <since_tizen> 3 </since_tizen>
1362 public bool StatusChanged
1369 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1370 private StatusChangedEventCallbackType _statusChangedEventCallback;
1371 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1374 /// ImfManager status changed.
1376 /// <since_tizen> 4 </since_tizen>
1377 public event EventHandler<StatusChangedEventArgs> StatusChanged
1381 if (_statusChangedEventHandler == null)
1383 _statusChangedEventCallback = OnStatusChanged;
1384 StatusChangedSignal().Connect(_statusChangedEventCallback);
1387 _statusChangedEventHandler += value;
1391 _statusChangedEventHandler -= value;
1393 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1395 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1400 private void OnStatusChanged(bool statusChanged)
1402 StatusChangedEventArgs e = new StatusChangedEventArgs();
1404 e.StatusChanged = statusChanged;
1406 if (_statusChangedEventHandler != null)
1408 _statusChangedEventHandler(this, e);
1413 /// ImfManager status changed signal.
1415 //Please do not use! this will be internal
1416 [EditorBrowsable(EditorBrowsableState.Never)]
1417 public StatusSignalType StatusChangedSignal()
1419 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1420 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1425 /// ImfManager resized event arguments.
1427 //Please do not use! this will be deprecated
1428 [EditorBrowsable(EditorBrowsableState.Never)]
1429 public class ImfManagerResizedEventArgs : EventArgs
1434 /// <since_tizen> 3 </since_tizen>
1435 public ImfManager ImfManager
1442 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1443 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1444 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1447 /// ImfManager resized event.
1449 //Please do not use! this will be deprecated
1450 [EditorBrowsable(EditorBrowsableState.Never)]
1451 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1455 if (_imfManagerResizedEventHandler == null)
1457 _imfManagerResizedEventCallback = OnImfManagerResized;
1458 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1461 _imfManagerResizedEventHandler += value;
1465 _imfManagerResizedEventHandler -= value;
1467 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1469 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1474 private void OnImfManagerResized(IntPtr data)
1476 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1480 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1483 if (_imfManagerResizedEventHandler != null)
1485 _imfManagerResizedEventHandler(this, e);
1490 /// ImfManager resized event.
1492 public class ResizedEventArgs : EventArgs
1504 private delegate void ResizedEventCallbackType(int resized);
1505 private ResizedEventCallbackType _resizedEventCallback;
1506 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1509 /// ImfManager resized.
1511 /// <since_tizen> 4 </since_tizen>
1512 public event EventHandler<ResizedEventArgs> Resized
1516 if (_resizedEventHandler == null)
1518 _resizedEventCallback = OnResized;
1519 ResizedSignal().Connect(_resizedEventCallback);
1522 _resizedEventHandler += value;
1526 _resizedEventHandler -= value;
1528 if (_resizedEventHandler == null && _resizedEventCallback != null)
1530 ResizedSignal().Disconnect(_resizedEventCallback);
1535 private void OnResized(int resized)
1537 ResizedEventArgs e = new ResizedEventArgs();
1538 e.Resized = resized;
1540 if (_resizedEventHandler != null)
1542 _resizedEventHandler(this, e);
1547 /// ImfManager resized signal.
1549 //Please do not use! this will be internal
1550 [EditorBrowsable(EditorBrowsableState.Never)]
1551 public KeyboardResizedSignalType ResizedSignal()
1553 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1554 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1559 /// ImfManager language changed event arguments.
1561 //Please do not use! this will be deprecated
1562 [EditorBrowsable(EditorBrowsableState.Never)]
1563 public class ImfManagerLanguageChangedEventArgs : EventArgs
1568 /// <since_tizen> 3 </since_tizen>
1569 public ImfManager ImfManager
1576 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1577 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1578 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1581 /// ImfManager language changed event.
1583 //Please do not use! this will be deprecated
1584 [EditorBrowsable(EditorBrowsableState.Never)]
1585 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1589 if (_imfManagerLanguageChangedEventHandler == null)
1591 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1592 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1595 _imfManagerLanguageChangedEventHandler += value;
1599 _imfManagerLanguageChangedEventHandler -= value;
1601 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1603 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1608 private void OnImfManagerLanguageChanged(IntPtr data)
1610 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1614 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1617 if (_imfManagerLanguageChangedEventHandler != null)
1619 _imfManagerLanguageChangedEventHandler(this, e);
1624 /// ImfManager language changed event args.
1626 public class LanguageChangedEventArgs : EventArgs
1629 /// language changed.
1631 public int LanguageChanged
1638 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1639 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1640 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1643 /// ImfManager language changed.
1645 /// <since_tizen> 4 </since_tizen>
1646 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1650 if (_languageChangedEventHandler == null)
1652 _languageChangedEventCallback = OnLanguageChanged;
1653 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1656 _languageChangedEventHandler += value;
1660 _languageChangedEventHandler -= value;
1662 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1664 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1669 private void OnLanguageChanged(int languageChanged)
1671 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1672 e.LanguageChanged = languageChanged;
1674 if (_languageChangedEventHandler != null)
1676 _languageChangedEventHandler(this, e);
1681 /// ImfManager language changed signal.
1683 //Please do not use! this will be internal
1684 [EditorBrowsable(EditorBrowsableState.Never)]
1685 public LanguageChangedSignalType LanguageChangedSignal()
1687 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1688 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1693 /// ImfManager keyboard type changed event arguments.
1695 public class KeyboardTypeChangedEventArgs : EventArgs
1698 /// ImfManager keyboard type
1700 /// <since_tizen> 3 </since_tizen>
1701 public KeyboardType KeyboardType
1708 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1709 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1710 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1713 /// ImfManager keyboard type changed.
1715 /// <since_tizen> 4 </since_tizen>
1716 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1720 if (_keyboardTypeChangedEventHandler == null)
1722 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1723 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1726 _keyboardTypeChangedEventHandler += value;
1730 _keyboardTypeChangedEventHandler -= value;
1732 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1734 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1739 private void OnKeyboardTypeChanged(KeyboardType type)
1741 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1743 e.KeyboardType = type;
1745 if (_keyboardTypeChangedEventHandler != null)
1747 _keyboardTypeChangedEventHandler(this, e);
1751 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1753 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1754 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1759 /// The direction of the text.
1761 /// <since_tizen> 3 </since_tizen>
1762 public enum TextDirection
1775 /// Events that are generated by the IMF.
1777 /// <since_tizen> 4 </since_tizen>
1778 public enum ImfEvent
1785 /// Pre-Edit changed.
1789 /// Commit received.
1793 /// An event to delete a range of characters from the string.
1797 /// An event to query string and the cursor position.
1801 /// Private command sent from the input panel.
1807 /// Enumeration for the state of the input panel.
1809 /// <since_tizen> 4 </since_tizen>
1817 /// Input panel is shown.
1821 /// Input panel is hidden.
1825 /// Input panel in process of being shown.
1831 /// Enumeration for the types of keyboard.
1833 /// <since_tizen> 4 </since_tizen>
1834 public enum KeyboardType
1837 /// Software keyboard (virtual keyboard) is default.
1841 /// Hardware keyboard.