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 /// Retrieves a handle to the instance of the ImfManager.
696 /// <returns>A handle to the ImfManager.</returns>
697 /// <since_tizen> 3 </since_tizen>
698 public static ImfManager Get()
700 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
701 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
706 /// Activates the IMF.<br/>
707 /// It means that the text editing is started somewhere.<br/>
708 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
710 /// <since_tizen> 3 </since_tizen>
711 public void Activate()
713 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
714 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
718 /// Deactivates the IMF.<br/>
719 /// It means that the text editing is finished somewhere.
721 /// <since_tizen> 3 </since_tizen>
722 public void Deactivate()
724 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
725 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
729 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
730 /// If true, then the keyboard will be restored (activated) after focus is regained.
732 /// <returns>The restoration status.</returns>
733 /// <since_tizen> 3 </since_tizen>
734 public bool RestoreAfterFocusLost()
736 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
737 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
744 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
745 /// <since_tizen> 3 </since_tizen>
746 public void SetRestoreAfterFocusLost(bool toggle)
748 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
749 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
753 /// Sends a message reset to the preedit state or the IMF module.
755 /// <since_tizen> 3 </since_tizen>
756 public new void Reset()
758 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
759 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
763 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
765 /// <since_tizen> 3 </since_tizen>
766 public void NotifyCursorPosition()
768 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
769 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
775 /// <param name="cursorPosition">The position of the cursor.</param>
776 /// <since_tizen> 3 </since_tizen>
777 public void SetCursorPosition(uint cursorPosition)
779 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
780 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
786 /// <returns>The current position of the cursor.</returns>
787 /// <since_tizen> 3 </since_tizen>
788 public uint GetCursorPosition()
790 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
791 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
796 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
798 /// <param name="text">The text string surrounding the current cursor point.</param>
799 /// <since_tizen> 3 </since_tizen>
800 public void SetSurroundingText(string text)
802 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
803 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
807 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
809 /// <returns>The surrounding text.</returns>
810 /// <since_tizen> 3 </since_tizen>
811 public string GetSurroundingText()
813 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
814 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
819 /// Notifies the IMF context that text input is set to multiline or not.
821 /// <param name="multiLine">True if multiline text input is used.</param>
822 /// <since_tizen> 3 </since_tizen>
823 public void NotifyTextInputMultiLine(bool multiLine)
825 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
826 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
830 /// Returns the text direction of the keyboard's current input language.
832 /// <returns>The direction of the text.</returns>
833 /// <since_tizen> 3 </since_tizen>
834 public ImfManager.TextDirection GetTextDirection()
836 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
837 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
842 /// Provides the size and the position of the keyboard.<br/>
843 /// The position is relative to whether the keyboard is visible or not.<br/>
844 /// If the keyboard is not visible, then the position will be off the screen.<br/>
845 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
846 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
848 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
849 /// <since_tizen> 3 </since_tizen>
850 public Rectangle GetInputMethodArea()
852 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
853 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
857 internal void ApplyOptions(InputMethodOptions options)
859 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
860 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
864 /// Sets up the input-panel specific data.
866 /// <param name="text">The specific data to be set to the input panel.</param>
867 /// <since_tizen> 3 </since_tizen>
868 public void SetInputPanelUserData(string text)
870 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 /// Gets the specific data of the current active input panel.
877 /// <param name="text">The specific data to be received from the input panel.</param>
878 /// <since_tizen> 3 </since_tizen>
879 public void GetInputPanelUserData(out string text)
881 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
886 /// Gets the state of the current active input panel.
888 /// <returns>The state of the input panel.</returns>
889 /// <since_tizen> 3 </since_tizen>
890 public ImfManager.State GetInputPanelState()
892 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
893 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
898 /// Sets the return key on the input panel to be visible or invisible.<br/>
899 /// The default is true.
901 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
902 /// <since_tizen> 3 </since_tizen>
903 public void SetReturnKeyState(bool visible)
905 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 /// Enables to show the input panel automatically when focused.
912 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
913 /// <since_tizen> 3 </since_tizen>
914 public void AutoEnableInputPanel(bool enabled)
916 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
917 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
921 /// Shows the input panel.
923 /// <since_tizen> 3 </since_tizen>
924 public void ShowInputPanel()
926 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
927 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
931 /// Hides the input panel.
933 /// <since_tizen> 3 </since_tizen>
934 public void HideInputPanel()
936 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
937 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
941 /// Gets the keyboard type.<br/>
942 /// The default keyboard type is SoftwareKeyboard.
944 /// <returns>The keyboard type.</returns>
945 /// <since_tizen> 4 </since_tizen>
946 public ImfManager.KeyboardType GetKeyboardType()
948 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
954 /// Gets the current language locale of the input panel.<br/>
955 /// For example, en_US, en_GB, en_PH, fr_FR, ...
957 /// <returns>The current language locale of the input panel.</returns>
958 /// <since_tizen> 4 </since_tizen>
959 public string GetInputPanelLocale()
961 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
962 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 /// <since_tizen> 3 </since_tizen>
970 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
976 /// ImfManager activated event arguments.
978 //Please do not use! this will be deprecated
979 [EditorBrowsable(EditorBrowsableState.Never)]
980 public class ImfManagerActivatedEventArgs : EventArgs
985 /// <since_tizen> 3 </since_tizen>
986 public ImfManager ImfManager
993 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
994 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
995 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
996 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
999 /// ImfManager activated event.
1001 //Please do not use! this will be deprecated
1002 [EditorBrowsable(EditorBrowsableState.Never)]
1003 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1007 if (_imfManagerActivatedEventHandler == null)
1009 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1010 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1013 _imfManagerActivatedEventHandler += value;
1017 _imfManagerActivatedEventHandler -= value;
1019 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1021 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1026 private void OnImfManagerActivated(global::System.IntPtr data)
1028 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1032 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1035 if (_imfManagerActivatedEventHandler != null)
1037 _imfManagerActivatedEventHandler(this, e);
1042 /// ImfManager activated event arguments.
1044 public class ActivatedEventArgs : EventArgs
1049 /// <since_tizen> 3 </since_tizen>
1050 public ImfManager ImfManager
1057 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1058 private delegate void ActivatedEventCallbackType(IntPtr data);
1059 private ActivatedEventCallbackType _activatedEventCallback;
1060 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1063 /// ImfManager activated.
1065 /// <since_tizen> 4 </since_tizen>
1066 public event EventHandler<ActivatedEventArgs> Activated
1070 if (_activatedEventHandler == null)
1072 _activatedEventCallback = OnActivated;
1073 ActivatedSignal().Connect(_activatedEventCallback);
1076 _activatedEventHandler += value;
1080 _activatedEventHandler -= value;
1082 if (_activatedEventHandler == null && _activatedEventCallback != null)
1084 ActivatedSignal().Disconnect(_activatedEventCallback);
1089 private void OnActivated(IntPtr data)
1091 ActivatedEventArgs e = new ActivatedEventArgs();
1095 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1098 if (_activatedEventHandler != null)
1100 _activatedEventHandler(this, e);
1105 /// ImfManager activated signal.
1107 //Please do not use! this will be internal
1108 [EditorBrowsable(EditorBrowsableState.Never)]
1109 public ActivatedSignalType ActivatedSignal()
1111 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1117 /// ImfManager event received event arguments.
1119 //Please do not use! this will be deprecated
1120 [EditorBrowsable(EditorBrowsableState.Never)]
1121 public class ImfManagerEventReceivedEventArgs : EventArgs
1126 /// <since_tizen> 3 </since_tizen>
1127 public ImfManager ImfManager
1134 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1135 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1136 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1139 /// ImfManager event received.
1141 //Please do not use! this will be deprecated
1142 [EditorBrowsable(EditorBrowsableState.Never)]
1143 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1147 if (_imfManagerEventReceivedEventHandler == null)
1149 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1150 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1153 _imfManagerEventReceivedEventHandler += value;
1157 _imfManagerEventReceivedEventHandler -= value;
1159 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1161 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1166 private void OnImfManagerEventReceived(global::System.IntPtr data)
1168 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1172 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1175 if (_imfManagerEventReceivedEventHandler != null)
1177 _imfManagerEventReceivedEventHandler(this, e);
1182 /// ImfManager event received event arguments.
1184 public class EventReceivedEventArgs : EventArgs
1189 /// <since_tizen> 3 </since_tizen>
1190 public ImfManager ImfManager
1199 /// <since_tizen> 3 </since_tizen>
1200 public ImfEventData ImfEventData
1207 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1208 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1209 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1212 /// ImfManager event received.
1214 /// <since_tizen> 4 </since_tizen>
1215 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1219 if (_eventReceivedEventHandler == null)
1221 _eventReceivedEventCallback = OnEventReceived;
1222 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1225 _eventReceivedEventHandler += value;
1229 _eventReceivedEventHandler -= value;
1231 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1233 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1238 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1240 ImfCallbackData imfCallbackData = null;
1242 EventReceivedEventArgs e = new EventReceivedEventArgs();
1244 if (imfManager != null)
1246 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1248 if (imfEventData != null)
1250 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1253 if (_eventReceivedEventHandler != null)
1255 imfCallbackData = _eventReceivedEventHandler(this, e);
1257 if (imfCallbackData != null)
1259 return imfCallbackData.GetImfCallbackDataPtr();
1263 return new ImfCallbackData().GetImfCallbackDataPtr();
1268 /// ImfManager event received signal.
1270 //Please do not use! this will be internal
1271 [EditorBrowsable(EditorBrowsableState.Never)]
1272 public ImfEventSignalType EventReceivedSignal()
1274 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1280 /// ImfManager status changed event arguments.
1282 //Please do not use! this will be deprecated
1283 [EditorBrowsable(EditorBrowsableState.Never)]
1284 public class ImfManagerStatusChangedEventArgs : EventArgs
1289 /// <since_tizen> 3 </since_tizen>
1290 public ImfManager ImfManager
1297 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1298 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1299 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1302 /// ImfManager status changed.
1304 //Please do not use! this will be deprecated
1305 [EditorBrowsable(EditorBrowsableState.Never)]
1306 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1310 if (_imfManagerStatusChangedEventHandler == null)
1312 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1313 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1316 _imfManagerStatusChangedEventHandler += value;
1320 _imfManagerStatusChangedEventHandler -= value;
1322 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1324 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1329 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1331 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1335 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1338 if (_imfManagerStatusChangedEventHandler != null)
1340 _imfManagerStatusChangedEventHandler(this, e);
1345 /// ImfManager status changed event arguments.
1347 public class StatusChangedEventArgs : EventArgs
1350 /// ImfManager status
1352 /// <since_tizen> 3 </since_tizen>
1353 public bool StatusChanged
1360 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1361 private StatusChangedEventCallbackType _statusChangedEventCallback;
1362 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1365 /// ImfManager status changed.
1367 /// <since_tizen> 4 </since_tizen>
1368 public event EventHandler<StatusChangedEventArgs> StatusChanged
1372 if (_statusChangedEventHandler == null)
1374 _statusChangedEventCallback = OnStatusChanged;
1375 StatusChangedSignal().Connect(_statusChangedEventCallback);
1378 _statusChangedEventHandler += value;
1382 _statusChangedEventHandler -= value;
1384 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1386 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1391 private void OnStatusChanged(bool statusChanged)
1393 StatusChangedEventArgs e = new StatusChangedEventArgs();
1395 e.StatusChanged = statusChanged;
1397 if (_statusChangedEventHandler != null)
1399 _statusChangedEventHandler(this, e);
1404 /// ImfManager status changed signal.
1406 //Please do not use! this will be internal
1407 [EditorBrowsable(EditorBrowsableState.Never)]
1408 public StatusSignalType StatusChangedSignal()
1410 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1411 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1416 /// ImfManager resized event arguments.
1418 //Please do not use! this will be deprecated
1419 [EditorBrowsable(EditorBrowsableState.Never)]
1420 public class ImfManagerResizedEventArgs : EventArgs
1425 /// <since_tizen> 3 </since_tizen>
1426 public ImfManager ImfManager
1433 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1434 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1435 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1438 /// ImfManager resized event.
1440 //Please do not use! this will be deprecated
1441 [EditorBrowsable(EditorBrowsableState.Never)]
1442 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1446 if (_imfManagerResizedEventHandler == null)
1448 _imfManagerResizedEventCallback = OnImfManagerResized;
1449 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1452 _imfManagerResizedEventHandler += value;
1456 _imfManagerResizedEventHandler -= value;
1458 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1460 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1465 private void OnImfManagerResized(IntPtr data)
1467 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1471 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1474 if (_imfManagerResizedEventHandler != null)
1476 _imfManagerResizedEventHandler(this, e);
1480 private delegate void ResizedEventCallbackType();
1481 private ResizedEventCallbackType _resizedEventCallback;
1482 private event EventHandler _resizedEventHandler;
1485 /// ImfManager resized.
1487 /// <since_tizen> 4 </since_tizen>
1488 public event EventHandler Resized
1492 if (_resizedEventHandler == null)
1494 _resizedEventCallback = OnResized;
1495 ResizedSignal().Connect(_resizedEventCallback);
1498 _resizedEventHandler += value;
1502 _resizedEventHandler -= value;
1504 if (_resizedEventHandler == null && _resizedEventCallback != null)
1506 ResizedSignal().Disconnect(_resizedEventCallback);
1511 private void OnResized()
1513 if (_resizedEventHandler != null)
1515 _resizedEventHandler(this, null);
1520 /// ImfManager resized signal.
1522 //Please do not use! this will be internal
1523 [EditorBrowsable(EditorBrowsableState.Never)]
1524 public ImfVoidSignalType ResizedSignal()
1526 ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1532 /// ImfManager language changed event arguments.
1534 //Please do not use! this will be deprecated
1535 [EditorBrowsable(EditorBrowsableState.Never)]
1536 public class ImfManagerLanguageChangedEventArgs : EventArgs
1541 /// <since_tizen> 3 </since_tizen>
1542 public ImfManager ImfManager
1549 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1550 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1551 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1554 /// ImfManager language changed event.
1556 //Please do not use! this will be deprecated
1557 [EditorBrowsable(EditorBrowsableState.Never)]
1558 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1562 if (_imfManagerLanguageChangedEventHandler == null)
1564 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1565 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1568 _imfManagerLanguageChangedEventHandler += value;
1572 _imfManagerLanguageChangedEventHandler -= value;
1574 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1576 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1581 private void OnImfManagerLanguageChanged(IntPtr data)
1583 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1587 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1590 if (_imfManagerLanguageChangedEventHandler != null)
1592 _imfManagerLanguageChangedEventHandler(this, e);
1596 private delegate void LanguageChangedEventCallbackType();
1597 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1598 private event EventHandler _languageChangedEventHandler;
1601 /// ImfManager language changed.
1603 /// <since_tizen> 4 </since_tizen>
1604 public event EventHandler LanguageChanged
1608 if (_languageChangedEventHandler == null)
1610 _languageChangedEventCallback = OnLanguageChanged;
1611 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1614 _languageChangedEventHandler += value;
1618 _languageChangedEventHandler -= value;
1620 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1622 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1627 private void OnLanguageChanged()
1629 if (_languageChangedEventHandler != null)
1631 _languageChangedEventHandler(this, null);
1636 /// ImfManager language changed signal.
1638 //Please do not use! this will be internal
1639 [EditorBrowsable(EditorBrowsableState.Never)]
1640 public ImfVoidSignalType LanguageChangedSignal()
1642 ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1643 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1648 /// ImfManager keyboard type changed event arguments.
1650 public class KeyboardTypeChangedEventArgs : EventArgs
1653 /// ImfManager keyboard type
1655 /// <since_tizen> 3 </since_tizen>
1656 public KeyboardType KeyboardType
1663 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1664 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1665 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1668 /// ImfManager keyboard type changed.
1670 /// <since_tizen> 4 </since_tizen>
1671 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1675 if (_keyboardTypeChangedEventHandler == null)
1677 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1678 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1681 _keyboardTypeChangedEventHandler += value;
1685 _keyboardTypeChangedEventHandler -= value;
1687 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1689 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1694 private void OnKeyboardTypeChanged(KeyboardType type)
1696 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1698 e.KeyboardType = type;
1700 if (_keyboardTypeChangedEventHandler != null)
1702 _keyboardTypeChangedEventHandler(this, e);
1706 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1708 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1709 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1714 /// The direction of the text.
1716 /// <since_tizen> 3 </since_tizen>
1717 public enum TextDirection
1730 /// Events that are generated by the IMF.
1732 /// <since_tizen> 4 </since_tizen>
1733 public enum ImfEvent
1740 /// Pre-Edit changed.
1744 /// Commit received.
1748 /// An event to delete a range of characters from the string.
1752 /// An event to query string and the cursor position.
1756 /// Private command sent from the input panel.
1762 /// Enumeration for the state of the input panel.
1764 /// <since_tizen> 4 </since_tizen>
1772 /// Input panel is shown.
1776 /// Input panel is hidden.
1780 /// Input panel in process of being shown.
1786 /// Enumeration for the types of keyboard.
1788 /// <since_tizen> 4 </since_tizen>
1789 public enum KeyboardType
1792 /// Software keyboard (virtual keyboard) is default.
1796 /// Hardware keyboard.