2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Runtime.InteropServices;
20 using System.ComponentModel;
25 /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
27 public class ImfManager : BaseHandle
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31 internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
44 /// <param name="type">Dispose Type</param>
45 /// <since_tizen> 3 </since_tizen>
46 /// Please DO NOT use! This will be deprecated!
47 /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
48 /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
49 [Obsolete("Please DO NOT use! This will be Deprecated!")]
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 protected override void Dispose(DisposeTypes type)
58 if (type == DisposeTypes.Explicit)
61 //Release your own managed resources here.
62 //You should release all of your own disposable objects here.
66 //Release your own unmanaged resources here.
67 //You should not access any managed member here except static instance.
68 //because the execution order of Finalizes is non-deterministic.
70 if (_keyboardTypeChangedEventCallback != null)
72 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
75 if (_imfManagerLanguageChangedEventCallback != null)
77 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
80 if (_imfManagerResizedEventCallback != null)
82 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
85 if (_imfManagerStatusChangedEventCallback != null)
87 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
90 if (_imfManagerEventReceivedEventCallback != null)
92 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
95 if (_imfManagerActivatedEventCallback != null)
97 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
100 if (swigCPtr.Handle != global::System.IntPtr.Zero)
105 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
107 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
114 /// This structure is used to pass on data from the IMF regarding predictive text.
116 public class ImfEventData : global::System.IDisposable
118 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
122 /// <since_tizen> 3 </since_tizen>
123 protected bool swigCMemOwn;
125 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
127 swigCMemOwn = cMemoryOwn;
128 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
131 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
133 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
136 //A Flag to check who called Dispose(). (By User or DisposeQueue)
137 private bool isDisposeQueued = false;
139 /// A Flat to check if it is already disposed.
141 /// <since_tizen> 3 </since_tizen>
142 protected bool disposed = false;
147 /// <since_tizen> 3 </since_tizen>
150 if (!isDisposeQueued)
152 isDisposeQueued = true;
153 DisposeQueue.Instance.Add(this);
158 /// The dispose pattern.
160 /// <since_tizen> 3 </since_tizen>
161 public void Dispose()
163 //Throw excpetion if Dispose() is called in separate thread.
164 if (!Window.IsInstalled())
166 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
171 Dispose(DisposeTypes.Implicit);
175 Dispose(DisposeTypes.Explicit);
176 System.GC.SuppressFinalize(this);
183 /// <since_tizen> 3 </since_tizen>
184 protected virtual void Dispose(DisposeTypes type)
191 if (type == DisposeTypes.Explicit)
194 //Release your own managed resources here.
195 //You should release all of your own disposable objects here.
199 //Release your own unmanaged resources here.
200 //You should not access any managed member here except static instance.
201 //because the execution order of Finalizes is non-deterministic.
203 if (swigCPtr.Handle != IntPtr.Zero)
208 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
210 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
216 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
218 ImfEventData ret = new ImfEventData(cPtr, false);
219 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 /// The default constructor.
226 /// <since_tizen> 3 </since_tizen>
227 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 /// <param name="aEventName">The name of the event from the IMF.</param>
236 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
237 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
238 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
239 /// <since_tizen> 3 </since_tizen>
240 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 /// The pre-edit or the commit string.
248 /// /// <since_tizen> 3 </since_tizen>
249 [EditorBrowsable(EditorBrowsableState.Never)]
250 public string predictiveString
254 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
260 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 /// The pre-edit or the commit string.
268 /// <since_tizen> 4 </since_tizen>
269 public string PredictiveString
273 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
279 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 /// The name of the event from the IMF.
287 //Please do not use! this will be deprecated
288 [EditorBrowsable(EditorBrowsableState.Never)]
289 public ImfManager.ImfEvent eventName
293 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
299 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 /// The name of the event from the IMF.
307 /// <since_tizen> 4 </since_tizen>
308 public ImfManager.ImfEvent EventName
312 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 /// The start position from the current cursor position to start deleting characters.
326 //Please do not use! this will be deprecated
327 [EditorBrowsable(EditorBrowsableState.Never)]
328 public int cursorOffset
332 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344 /// The start position from the current cursor position to start deleting characters.
346 /// <since_tizen> 4 </since_tizen>
347 public int CursorOffset
351 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
357 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363 /// The number of characters to delete from the cursorOffset.
365 //Please do not use! this will be deprecated
366 [EditorBrowsable(EditorBrowsableState.Never)]
367 public int numberOfChars
371 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
372 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
377 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
383 /// The number of characters to delete from the cursorOffset.
385 /// <since_tizen> 4 </since_tizen>
386 public int NumberOfChars
390 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
391 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
396 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
404 /// Data required by the IMF from the callback.
406 public class ImfCallbackData : global::System.IDisposable
408 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
412 /// <since_tizen> 3 </since_tizen>
413 protected bool swigCMemOwn;
415 internal IntPtr GetImfCallbackDataPtr()
417 return (IntPtr)swigCPtr;
420 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
422 swigCMemOwn = cMemoryOwn;
423 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
426 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
428 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
431 //A Flag to check who called Dispose(). (By User or DisposeQueue)
432 private bool isDisposeQueued = false;
434 /// A Flat to check if it is already disposed.
436 /// <since_tizen> 3 </since_tizen>
437 protected bool disposed = false;
443 /// <since_tizen> 3 </since_tizen>
446 if (!isDisposeQueued)
448 isDisposeQueued = true;
449 DisposeQueue.Instance.Add(this);
454 /// The dispose pattern.
456 /// <since_tizen> 3 </since_tizen>
457 public void Dispose()
459 //Throw excpetion if Dispose() is called in separate thread.
460 if (!Window.IsInstalled())
462 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
467 Dispose(DisposeTypes.Implicit);
471 Dispose(DisposeTypes.Explicit);
472 System.GC.SuppressFinalize(this);
479 /// <since_tizen> 3 </since_tizen>
480 protected virtual void Dispose(DisposeTypes type)
487 if (type == DisposeTypes.Explicit)
490 //Release your own managed resources here.
491 //You should release all of your own disposable objects here.
495 //Release your own unmanaged resources here.
496 //You should not access any managed member here except static instance.
497 //because the execution order of Finalizes is non-deterministic.
499 if (swigCPtr.Handle != IntPtr.Zero)
504 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
506 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
512 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
514 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520 /// The default constructor.
522 /// <since_tizen> 3 </since_tizen>
523 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
525 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
532 /// <param name="aCursorPosition">The new position of the cursor.</param>
533 /// <param name="aCurrentText">The current text string.</param>
534 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
535 /// <since_tizen> 3 </since_tizen>
536 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
538 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542 /// The current text string.
544 //Please do not use! this will be deprecated
545 [EditorBrowsable(EditorBrowsableState.Never)]
546 public string currentText
550 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
551 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
556 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
562 /// The current text string.
564 /// <since_tizen> 4 </since_tizen>
565 public string CurrentText
569 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
574 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
575 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581 /// The current text string.
583 //Please do not use! this will be deprecated
584 [EditorBrowsable(EditorBrowsableState.Never)]
585 public int cursorPosition
589 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
595 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
601 /// The current text string.
603 /// <since_tizen> 4 </since_tizen>
604 public int CursorPosition
608 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
609 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
613 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
614 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
620 /// If the cursor position needs to be updated.
622 //Please do not use! this will be deprecated
623 [EditorBrowsable(EditorBrowsableState.Never)]
628 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
629 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
634 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
640 /// If the cursor position needs to be updated.
642 /// <since_tizen> 4 </since_tizen>
647 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
648 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
653 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
659 /// Flags if preedit reset is required.
661 //Please do not use! this will be deprecated
662 [EditorBrowsable(EditorBrowsableState.Never)]
663 public bool preeditResetRequired
667 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
668 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
672 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
673 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679 /// Flags if preedit reset is required.
681 /// <since_tizen> 4 </since_tizen>
682 public bool PreeditResetRequired
686 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
687 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
692 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
700 /// Finalize the IMF.<br/>
702 public void Finalize()
704 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
705 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
709 /// Retrieves a handle to the instance of the ImfManager.
711 /// <returns>A handle to the ImfManager.</returns>
712 /// <since_tizen> 3 </since_tizen>
713 public static ImfManager Get()
715 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
716 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
721 /// Activates the IMF.<br/>
722 /// It means that the text editing is started somewhere.<br/>
723 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
725 /// <since_tizen> 3 </since_tizen>
726 public void Activate()
728 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
729 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
733 /// Deactivates the IMF.<br/>
734 /// It means that the text editing is finished somewhere.
736 /// <since_tizen> 3 </since_tizen>
737 public void Deactivate()
739 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
740 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
745 /// If true, then the keyboard will be restored (activated) after focus is regained.
747 /// <returns>The restoration status.</returns>
748 /// <since_tizen> 3 </since_tizen>
749 public bool RestoreAfterFocusLost()
751 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
752 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
757 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
759 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
760 /// <since_tizen> 3 </since_tizen>
761 public void SetRestoreAfterFocusLost(bool toggle)
763 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
764 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
768 /// Sends a message reset to the preedit state or the IMF module.
770 /// <since_tizen> 3 </since_tizen>
771 public new void Reset()
773 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
774 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
778 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
780 /// <since_tizen> 3 </since_tizen>
781 public void NotifyCursorPosition()
783 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
784 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
790 /// <param name="cursorPosition">The position of the cursor.</param>
791 /// <since_tizen> 3 </since_tizen>
792 public void SetCursorPosition(uint cursorPosition)
794 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
795 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
799 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
801 /// <returns>The current position of the cursor.</returns>
802 /// <since_tizen> 3 </since_tizen>
803 public uint GetCursorPosition()
805 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
806 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
811 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
813 /// <param name="text">The text string surrounding the current cursor point.</param>
814 /// <since_tizen> 3 </since_tizen>
815 public void SetSurroundingText(string text)
817 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
818 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
824 /// <returns>The surrounding text.</returns>
825 /// <since_tizen> 3 </since_tizen>
826 public string GetSurroundingText()
828 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
834 /// Notifies the IMF context that text input is set to multiline or not.
836 /// <param name="multiLine">True if multiline text input is used.</param>
837 /// <since_tizen> 3 </since_tizen>
838 public void NotifyTextInputMultiLine(bool multiLine)
840 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
841 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
845 /// Returns the text direction of the keyboard's current input language.
847 /// <returns>The direction of the text.</returns>
848 /// <since_tizen> 3 </since_tizen>
849 public ImfManager.TextDirection GetTextDirection()
851 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
852 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
857 /// Provides the size and the position of the keyboard.<br/>
858 /// The position is relative to whether the keyboard is visible or not.<br/>
859 /// If the keyboard is not visible, then the position will be off the screen.<br/>
860 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
861 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
863 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
864 /// <since_tizen> 3 </since_tizen>
865 public Rectangle GetInputMethodArea()
867 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
868 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
872 internal void ApplyOptions(InputMethodOptions options)
874 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
875 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879 /// Sets up the input-panel specific data.
881 /// <param name="text">The specific data to be set to the input panel.</param>
882 /// <since_tizen> 3 </since_tizen>
883 public void SetInputPanelUserData(string text)
885 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
886 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
890 /// Gets the specific data of the current active input panel.
892 /// <param name="text">The specific data to be received from the input panel.</param>
893 /// <since_tizen> 3 </since_tizen>
894 public void GetInputPanelUserData(out string text)
896 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
897 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
901 /// Gets the state of the current active input panel.
903 /// <returns>The state of the input panel.</returns>
904 /// <since_tizen> 3 </since_tizen>
905 public ImfManager.State GetInputPanelState()
907 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
908 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
913 /// Sets the return key on the input panel to be visible or invisible.<br/>
914 /// The default is true.
916 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
917 /// <since_tizen> 3 </since_tizen>
918 public void SetReturnKeyState(bool visible)
920 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
925 /// Enables to show the input panel automatically when focused.
927 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
928 /// <since_tizen> 3 </since_tizen>
929 public void AutoEnableInputPanel(bool enabled)
931 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
936 /// Shows the input panel.
938 /// <since_tizen> 3 </since_tizen>
939 public void ShowInputPanel()
941 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 /// Hides the input panel.
948 /// <since_tizen> 3 </since_tizen>
949 public void HideInputPanel()
951 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
952 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
956 /// Gets the keyboard type.<br/>
957 /// The default keyboard type is SoftwareKeyboard.
959 /// <returns>The keyboard type.</returns>
960 /// <since_tizen> 4 </since_tizen>
961 public ImfManager.KeyboardType GetKeyboardType()
963 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 /// Gets the current language locale of the input panel.<br/>
970 /// For example, en_US, en_GB, en_PH, fr_FR, ...
972 /// <returns>The current language locale of the input panel.</returns>
973 /// <since_tizen> 4 </since_tizen>
974 public string GetInputPanelLocale()
976 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
984 /// <since_tizen> 3 </since_tizen>
985 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 /// ImfManager activated event arguments.
993 //Please do not use! this will be deprecated
994 [EditorBrowsable(EditorBrowsableState.Never)]
995 public class ImfManagerActivatedEventArgs : EventArgs
1000 /// <since_tizen> 3 </since_tizen>
1001 public ImfManager ImfManager
1008 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1009 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1010 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1011 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1014 /// ImfManager activated event.
1016 //Please do not use! this will be deprecated
1017 [EditorBrowsable(EditorBrowsableState.Never)]
1018 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1022 if (_imfManagerActivatedEventHandler == null)
1024 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1025 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1028 _imfManagerActivatedEventHandler += value;
1032 _imfManagerActivatedEventHandler -= value;
1034 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1036 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1041 private void OnImfManagerActivated(global::System.IntPtr data)
1043 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1047 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1050 if (_imfManagerActivatedEventHandler != null)
1052 _imfManagerActivatedEventHandler(this, e);
1057 /// ImfManager activated event arguments.
1059 public class ActivatedEventArgs : EventArgs
1064 /// <since_tizen> 3 </since_tizen>
1065 public ImfManager ImfManager
1072 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1073 private delegate void ActivatedEventCallbackType(IntPtr data);
1074 private ActivatedEventCallbackType _activatedEventCallback;
1075 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1078 /// ImfManager activated.
1080 /// <since_tizen> 4 </since_tizen>
1081 public event EventHandler<ActivatedEventArgs> Activated
1085 if (_activatedEventHandler == null)
1087 _activatedEventCallback = OnActivated;
1088 ActivatedSignal().Connect(_activatedEventCallback);
1091 _activatedEventHandler += value;
1095 _activatedEventHandler -= value;
1097 if (_activatedEventHandler == null && _activatedEventCallback != null)
1099 ActivatedSignal().Disconnect(_activatedEventCallback);
1104 private void OnActivated(IntPtr data)
1106 ActivatedEventArgs e = new ActivatedEventArgs();
1110 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1113 if (_activatedEventHandler != null)
1115 _activatedEventHandler(this, e);
1120 /// ImfManager activated signal.
1122 //Please do not use! this will be internal
1123 [EditorBrowsable(EditorBrowsableState.Never)]
1124 public ActivatedSignalType ActivatedSignal()
1126 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1132 /// ImfManager event received event arguments.
1134 //Please do not use! this will be deprecated
1135 [EditorBrowsable(EditorBrowsableState.Never)]
1136 public class ImfManagerEventReceivedEventArgs : EventArgs
1141 /// <since_tizen> 3 </since_tizen>
1142 public ImfManager ImfManager
1149 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1150 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1151 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1154 /// ImfManager event received.
1156 //Please do not use! this will be deprecated
1157 [EditorBrowsable(EditorBrowsableState.Never)]
1158 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1162 if (_imfManagerEventReceivedEventHandler == null)
1164 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1165 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1168 _imfManagerEventReceivedEventHandler += value;
1172 _imfManagerEventReceivedEventHandler -= value;
1174 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1176 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1181 private void OnImfManagerEventReceived(global::System.IntPtr data)
1183 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1187 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1190 if (_imfManagerEventReceivedEventHandler != null)
1192 _imfManagerEventReceivedEventHandler(this, e);
1197 /// ImfManager event received event arguments.
1199 public class EventReceivedEventArgs : EventArgs
1204 /// <since_tizen> 3 </since_tizen>
1205 public ImfManager ImfManager
1214 /// <since_tizen> 3 </since_tizen>
1215 public ImfEventData ImfEventData
1222 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1223 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1224 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1227 /// ImfManager event received.
1229 /// <since_tizen> 4 </since_tizen>
1230 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1234 if (_eventReceivedEventHandler == null)
1236 _eventReceivedEventCallback = OnEventReceived;
1237 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1240 _eventReceivedEventHandler += value;
1244 _eventReceivedEventHandler -= value;
1246 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1248 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1253 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1255 ImfCallbackData imfCallbackData = null;
1257 EventReceivedEventArgs e = new EventReceivedEventArgs();
1259 if (imfManager != null)
1261 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1263 if (imfEventData != null)
1265 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1268 if (_eventReceivedEventHandler != null)
1270 imfCallbackData = _eventReceivedEventHandler(this, e);
1272 if (imfCallbackData != null)
1274 return imfCallbackData.GetImfCallbackDataPtr();
1278 return new ImfCallbackData().GetImfCallbackDataPtr();
1283 /// ImfManager event received signal.
1285 //Please do not use! this will be internal
1286 [Obsolete("Please DO NOT use! This will be internal method!")]
1287 [EditorBrowsable(EditorBrowsableState.Never)]
1288 public ImfEventSignalType EventReceivedSignal()
1290 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296 /// ImfManager status changed event arguments.
1298 //Please do not use! this will be deprecated
1299 [EditorBrowsable(EditorBrowsableState.Never)]
1300 public class ImfManagerStatusChangedEventArgs : EventArgs
1305 /// <since_tizen> 3 </since_tizen>
1306 public ImfManager ImfManager
1313 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1314 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1315 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1318 /// ImfManager status changed.
1320 //Please do not use! this will be deprecated
1321 [EditorBrowsable(EditorBrowsableState.Never)]
1322 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1326 if (_imfManagerStatusChangedEventHandler == null)
1328 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1329 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1332 _imfManagerStatusChangedEventHandler += value;
1336 _imfManagerStatusChangedEventHandler -= value;
1338 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1340 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1345 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1347 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1351 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1354 if (_imfManagerStatusChangedEventHandler != null)
1356 _imfManagerStatusChangedEventHandler(this, e);
1361 /// ImfManager status changed event arguments.
1363 public class StatusChangedEventArgs : EventArgs
1366 /// ImfManager status
1368 /// <since_tizen> 3 </since_tizen>
1369 public bool StatusChanged
1376 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1377 private StatusChangedEventCallbackType _statusChangedEventCallback;
1378 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1381 /// ImfManager status changed.
1383 /// <since_tizen> 4 </since_tizen>
1384 public event EventHandler<StatusChangedEventArgs> StatusChanged
1388 if (_statusChangedEventHandler == null)
1390 _statusChangedEventCallback = OnStatusChanged;
1391 StatusChangedSignal().Connect(_statusChangedEventCallback);
1394 _statusChangedEventHandler += value;
1398 _statusChangedEventHandler -= value;
1400 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1402 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1407 private void OnStatusChanged(bool statusChanged)
1409 StatusChangedEventArgs e = new StatusChangedEventArgs();
1411 e.StatusChanged = statusChanged;
1413 if (_statusChangedEventHandler != null)
1415 _statusChangedEventHandler(this, e);
1420 /// ImfManager status changed signal.
1422 //Please do not use! this will be internal
1423 [EditorBrowsable(EditorBrowsableState.Never)]
1424 public StatusSignalType StatusChangedSignal()
1426 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1427 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1432 /// ImfManager resized event arguments.
1434 //Please do not use! this will be deprecated
1435 [EditorBrowsable(EditorBrowsableState.Never)]
1436 public class ImfManagerResizedEventArgs : EventArgs
1441 /// <since_tizen> 3 </since_tizen>
1442 public ImfManager ImfManager
1449 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1450 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1451 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1454 /// ImfManager resized event.
1456 //Please do not use! this will be deprecated
1457 [EditorBrowsable(EditorBrowsableState.Never)]
1458 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1462 if (_imfManagerResizedEventHandler == null)
1464 _imfManagerResizedEventCallback = OnImfManagerResized;
1465 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1468 _imfManagerResizedEventHandler += value;
1472 _imfManagerResizedEventHandler -= value;
1474 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1476 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1481 private void OnImfManagerResized(IntPtr data)
1483 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1487 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1490 if (_imfManagerResizedEventHandler != null)
1492 _imfManagerResizedEventHandler(this, e);
1497 /// ImfManager resized event.
1499 public class ResizedEventArgs : EventArgs
1511 private delegate void ResizedEventCallbackType(int resized);
1512 private ResizedEventCallbackType _resizedEventCallback;
1513 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1516 /// ImfManager resized.
1518 /// <since_tizen> 4 </since_tizen>
1519 public event EventHandler<ResizedEventArgs> Resized
1523 if (_resizedEventHandler == null)
1525 _resizedEventCallback = OnResized;
1526 ResizedSignal().Connect(_resizedEventCallback);
1529 _resizedEventHandler += value;
1533 _resizedEventHandler -= value;
1535 if (_resizedEventHandler == null && _resizedEventCallback != null)
1537 ResizedSignal().Disconnect(_resizedEventCallback);
1542 private void OnResized(int resized)
1544 ResizedEventArgs e = new ResizedEventArgs();
1545 e.Resized = resized;
1547 if (_resizedEventHandler != null)
1549 _resizedEventHandler(this, e);
1554 /// ImfManager resized signal.
1556 //Please do not use! this will be internal
1557 [EditorBrowsable(EditorBrowsableState.Never)]
1558 public KeyboardResizedSignalType ResizedSignal()
1560 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1561 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1566 /// ImfManager language changed event arguments.
1568 //Please do not use! this will be deprecated
1569 [EditorBrowsable(EditorBrowsableState.Never)]
1570 public class ImfManagerLanguageChangedEventArgs : EventArgs
1575 /// <since_tizen> 3 </since_tizen>
1576 public ImfManager ImfManager
1583 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1584 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1585 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1588 /// ImfManager language changed event.
1590 //Please do not use! this will be deprecated
1591 [EditorBrowsable(EditorBrowsableState.Never)]
1592 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1596 if (_imfManagerLanguageChangedEventHandler == null)
1598 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1599 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1602 _imfManagerLanguageChangedEventHandler += value;
1606 _imfManagerLanguageChangedEventHandler -= value;
1608 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1610 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1615 private void OnImfManagerLanguageChanged(IntPtr data)
1617 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1621 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1624 if (_imfManagerLanguageChangedEventHandler != null)
1626 _imfManagerLanguageChangedEventHandler(this, e);
1631 /// ImfManager language changed event args.
1633 public class LanguageChangedEventArgs : EventArgs
1636 /// language changed.
1638 public int LanguageChanged
1645 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1646 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1647 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1650 /// ImfManager language changed.
1652 /// <since_tizen> 4 </since_tizen>
1653 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1657 if (_languageChangedEventHandler == null)
1659 _languageChangedEventCallback = OnLanguageChanged;
1660 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1663 _languageChangedEventHandler += value;
1667 _languageChangedEventHandler -= value;
1669 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1671 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1676 private void OnLanguageChanged(int languageChanged)
1678 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1679 e.LanguageChanged = languageChanged;
1681 if (_languageChangedEventHandler != null)
1683 _languageChangedEventHandler(this, e);
1688 /// ImfManager language changed signal.
1690 //Please do not use! this will be internal
1691 [EditorBrowsable(EditorBrowsableState.Never)]
1692 public LanguageChangedSignalType LanguageChangedSignal()
1694 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1695 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1700 /// ImfManager keyboard type changed event arguments.
1702 public class KeyboardTypeChangedEventArgs : EventArgs
1705 /// ImfManager keyboard type
1707 /// <since_tizen> 3 </since_tizen>
1708 public KeyboardType KeyboardType
1715 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1716 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1717 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1720 /// ImfManager keyboard type changed.
1722 /// <since_tizen> 4 </since_tizen>
1723 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1727 if (_keyboardTypeChangedEventHandler == null)
1729 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1730 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1733 _keyboardTypeChangedEventHandler += value;
1737 _keyboardTypeChangedEventHandler -= value;
1739 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1741 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1746 private void OnKeyboardTypeChanged(KeyboardType type)
1748 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1750 e.KeyboardType = type;
1752 if (_keyboardTypeChangedEventHandler != null)
1754 _keyboardTypeChangedEventHandler(this, e);
1758 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1760 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1761 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1766 /// The direction of the text.
1768 /// <since_tizen> 3 </since_tizen>
1769 public enum TextDirection
1782 /// Events that are generated by the IMF.
1784 /// <since_tizen> 4 </since_tizen>
1785 public enum ImfEvent
1792 /// Pre-Edit changed.
1796 /// Commit received.
1800 /// An event to delete a range of characters from the string.
1804 /// An event to query string and the cursor position.
1808 /// Private command sent from the input panel.
1814 /// Enumeration for the state of the input panel.
1816 /// <since_tizen> 4 </since_tizen>
1824 /// Input panel is shown.
1828 /// Input panel is hidden.
1832 /// Input panel in process of being shown.
1838 /// Enumeration for the types of keyboard.
1840 /// <since_tizen> 4 </since_tizen>
1841 public enum KeyboardType
1844 /// Software keyboard (virtual keyboard) is default.
1848 /// Hardware keyboard.