2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Runtime.InteropServices;
20 using System.ComponentModel;
25 /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
27 /// <since_tizen> 3 </since_tizen>
28 public class ImfManager : BaseHandle
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
42 private static readonly ImfManager instance = ImfManager.Get();
45 /// Gets the singleton of the ImfManager object.
47 /// <since_tizen> 5 </since_tizen>
48 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public static ImfManager Instance
61 /// <param name="type">Dispose Type</param>
62 /// <since_tizen> 3 </since_tizen>
63 /// Please DO NOT use! This will be deprecated!
64 /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
65 /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 protected override void Dispose(DisposeTypes type)
74 if (type == DisposeTypes.Explicit)
77 //Release your own managed resources here.
78 //You should release all of your own disposable objects here.
82 //Release your own unmanaged resources here.
83 //You should not access any managed member here except static instance.
84 //because the execution order of Finalizes is non-deterministic.
86 if (_keyboardTypeChangedEventCallback != null)
88 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
91 if (_imfManagerLanguageChangedEventCallback != null)
93 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
96 if (_imfManagerResizedEventCallback != null)
98 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
101 if (_imfManagerStatusChangedEventCallback != null)
103 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
106 if (_imfManagerEventReceivedEventCallback != null)
108 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
111 if (_imfManagerActivatedEventCallback != null)
113 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
116 if (swigCPtr.Handle != global::System.IntPtr.Zero)
121 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
123 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
130 /// This structure is used to pass on data from the IMF regarding predictive text.
132 /// <since_tizen> 3 </since_tizen>
133 public class ImfEventData : global::System.IDisposable
135 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
139 /// <since_tizen> 3 </since_tizen>
140 protected bool swigCMemOwn;
142 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
144 swigCMemOwn = cMemoryOwn;
145 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
148 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
150 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
153 //A Flag to check who called Dispose(). (By User or DisposeQueue)
154 private bool isDisposeQueued = false;
156 /// A Flat to check if it is already disposed.
158 /// <since_tizen> 3 </since_tizen>
159 protected bool disposed = false;
164 /// <since_tizen> 3 </since_tizen>
167 if (!isDisposeQueued)
169 isDisposeQueued = true;
170 DisposeQueue.Instance.Add(this);
175 /// The dispose pattern.
177 /// <since_tizen> 3 </since_tizen>
178 public void Dispose()
180 //Throw excpetion if Dispose() is called in separate thread.
181 if (!Window.IsInstalled())
183 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
188 Dispose(DisposeTypes.Implicit);
192 Dispose(DisposeTypes.Explicit);
193 System.GC.SuppressFinalize(this);
200 /// <since_tizen> 3 </since_tizen>
201 protected virtual void Dispose(DisposeTypes type)
208 if (type == DisposeTypes.Explicit)
211 //Release your own managed resources here.
212 //You should release all of your own disposable objects here.
216 //Release your own unmanaged resources here.
217 //You should not access any managed member here except static instance.
218 //because the execution order of Finalizes is non-deterministic.
220 if (swigCPtr.Handle != IntPtr.Zero)
225 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
227 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
233 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
235 ImfEventData ret = new ImfEventData(cPtr, false);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241 /// The default constructor.
243 /// <since_tizen> 3 </since_tizen>
244 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
246 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 /// <param name="aEventName">The name of the event from the IMF.</param>
253 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
254 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
255 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
256 /// <since_tizen> 3 </since_tizen>
257 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
259 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263 /// The pre-edit or the commit string.
265 /// /// <since_tizen> 3 </since_tizen>
266 [EditorBrowsable(EditorBrowsableState.Never)]
267 public string predictiveString
271 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283 /// The pre-edit or the commit string.
285 /// <since_tizen> 4 </since_tizen>
286 public string PredictiveString
290 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 /// The name of the event from the IMF.
304 //Please do not use! this will be deprecated
305 /// <since_tizen> 3 </since_tizen>
306 [EditorBrowsable(EditorBrowsableState.Never)]
307 public ImfManager.ImfEvent eventName
311 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
317 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 /// The name of the event from the IMF.
325 /// <since_tizen> 4 </since_tizen>
326 public ImfManager.ImfEvent EventName
330 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342 /// The start position from the current cursor position to start deleting characters.
344 //Please do not use! this will be deprecated
345 /// <since_tizen> 3 </since_tizen>
346 [EditorBrowsable(EditorBrowsableState.Never)]
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 start position from the current cursor position to start deleting characters.
365 /// <since_tizen> 4 </since_tizen>
366 public int CursorOffset
370 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
376 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 /// The number of characters to delete from the cursorOffset.
384 //Please do not use! this will be deprecated
385 /// <since_tizen> 3 </since_tizen>
386 [EditorBrowsable(EditorBrowsableState.Never)]
387 public int numberOfChars
391 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
392 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
397 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
403 /// The number of characters to delete from the cursorOffset.
405 /// <since_tizen> 4 </since_tizen>
406 public int NumberOfChars
410 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
411 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
416 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
424 /// Data required by the IMF from the callback.
426 /// <since_tizen> 3 </since_tizen>
427 public class ImfCallbackData : global::System.IDisposable
429 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
433 /// <since_tizen> 3 </since_tizen>
434 protected bool swigCMemOwn;
436 internal IntPtr GetImfCallbackDataPtr()
438 return (IntPtr)swigCPtr;
441 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
443 swigCMemOwn = cMemoryOwn;
444 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
447 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
449 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
452 //A Flag to check who called Dispose(). (By User or DisposeQueue)
453 private bool isDisposeQueued = false;
455 /// A Flat to check if it is already disposed.
457 /// <since_tizen> 3 </since_tizen>
458 protected bool disposed = false;
464 /// <since_tizen> 3 </since_tizen>
467 if (!isDisposeQueued)
469 isDisposeQueued = true;
470 DisposeQueue.Instance.Add(this);
475 /// The dispose pattern.
477 /// <since_tizen> 3 </since_tizen>
478 public void Dispose()
480 //Throw excpetion if Dispose() is called in separate thread.
481 if (!Window.IsInstalled())
483 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
488 Dispose(DisposeTypes.Implicit);
492 Dispose(DisposeTypes.Explicit);
493 System.GC.SuppressFinalize(this);
500 /// <since_tizen> 3 </since_tizen>
501 protected virtual void Dispose(DisposeTypes type)
508 if (type == DisposeTypes.Explicit)
511 //Release your own managed resources here.
512 //You should release all of your own disposable objects here.
516 //Release your own unmanaged resources here.
517 //You should not access any managed member here except static instance.
518 //because the execution order of Finalizes is non-deterministic.
520 if (swigCPtr.Handle != IntPtr.Zero)
525 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
527 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
533 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
535 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
536 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
541 /// The default constructor.
543 /// <since_tizen> 3 </since_tizen>
544 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
546 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
552 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
553 /// <param name="aCursorPosition">The new position of the cursor.</param>
554 /// <param name="aCurrentText">The current text string.</param>
555 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
556 /// <since_tizen> 3 </since_tizen>
557 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
563 /// The current text string.
565 //Please do not use! this will be deprecated
566 /// <since_tizen> 3 </since_tizen>
567 [EditorBrowsable(EditorBrowsableState.Never)]
568 public string currentText
572 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
573 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
577 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
578 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584 /// The current text string.
586 /// <since_tizen> 4 </since_tizen>
587 public string CurrentText
591 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
592 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
597 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
603 /// The current text string.
605 //Please do not use! this will be deprecated
606 /// <since_tizen> 3 </since_tizen>
607 [EditorBrowsable(EditorBrowsableState.Never)]
608 public int cursorPosition
612 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
617 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
618 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
624 /// The current text string.
626 /// <since_tizen> 4 </since_tizen>
627 public int CursorPosition
631 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
636 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
637 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643 /// If the cursor position needs to be updated.
645 //Please do not use! this will be deprecated
646 /// <since_tizen> 3 </since_tizen>
647 [EditorBrowsable(EditorBrowsableState.Never)]
652 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
653 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
657 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
658 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
664 /// If the cursor position needs to be updated.
666 /// <since_tizen> 4 </since_tizen>
671 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
672 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
676 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
677 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683 /// Flags if preedit reset is required.
685 //Please do not use! this will be deprecated
686 /// <since_tizen> 3 </since_tizen>
687 [EditorBrowsable(EditorBrowsableState.Never)]
688 public bool preeditResetRequired
692 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
693 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
697 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
698 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 /// Flags if preedit reset is required.
706 /// <since_tizen> 4 </since_tizen>
707 public bool PreeditResetRequired
711 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
712 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
717 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
725 /// Destroy the context of the IMF.<br/>
727 /// <since_tizen> 5 </since_tizen>
728 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
729 [EditorBrowsable(EditorBrowsableState.Never)]
730 public void DestroyContext()
732 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
733 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
736 /// Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
737 [Obsolete("Please DO NOT use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!")]
738 [EditorBrowsable(EditorBrowsableState.Never)]
739 public void Finalize()
745 /// Retrieves a handle to the instance of the ImfManager.
747 /// <returns>A handle to the ImfManager.</returns>
748 /// <since_tizen> 3 </since_tizen>
749 public static ImfManager Get()
751 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
752 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
757 /// Activates the IMF.<br/>
758 /// It means that the text editing is started somewhere.<br/>
759 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
761 /// <since_tizen> 3 </since_tizen>
762 public void Activate()
764 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
765 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
769 /// Deactivates the IMF.<br/>
770 /// It means that the text editing is finished somewhere.
772 /// <since_tizen> 3 </since_tizen>
773 public void Deactivate()
775 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
776 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
781 /// If true, then the keyboard will be restored (activated) after focus is regained.
783 /// <returns>The restoration status.</returns>
784 /// <since_tizen> 3 </since_tizen>
785 public bool RestoreAfterFocusLost()
787 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
788 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
795 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
796 /// <since_tizen> 3 </since_tizen>
797 public void SetRestoreAfterFocusLost(bool toggle)
799 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
800 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
804 /// Sends a message reset to the preedit state or the IMF module.
806 /// <since_tizen> 3 </since_tizen>
807 public new void Reset()
809 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
810 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
814 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
816 /// <since_tizen> 3 </since_tizen>
817 public void NotifyCursorPosition()
819 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
820 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
824 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
826 /// <param name="cursorPosition">The position of the cursor.</param>
827 /// <since_tizen> 3 </since_tizen>
828 public void SetCursorPosition(uint cursorPosition)
830 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
831 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
835 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
837 /// <returns>The current position of the cursor.</returns>
838 /// <since_tizen> 3 </since_tizen>
839 public uint GetCursorPosition()
841 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
842 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
847 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
849 /// <param name="text">The text string surrounding the current cursor point.</param>
850 /// <since_tizen> 3 </since_tizen>
851 public void SetSurroundingText(string text)
853 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
854 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
858 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
860 /// <returns>The surrounding text.</returns>
861 /// <since_tizen> 3 </since_tizen>
862 public string GetSurroundingText()
864 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
865 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
870 /// Notifies the IMF context that text input is set to multiline or not.
872 /// <param name="multiLine">True if multiline text input is used.</param>
873 /// <since_tizen> 3 </since_tizen>
874 public void NotifyTextInputMultiLine(bool multiLine)
876 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
877 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
881 /// Returns the text direction of the keyboard's current input language.
883 /// <returns>The direction of the text.</returns>
884 /// <since_tizen> 3 </since_tizen>
885 public ImfManager.TextDirection GetTextDirection()
887 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
888 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
893 /// Provides the size and the position of the keyboard.<br/>
894 /// The position is relative to whether the keyboard is visible or not.<br/>
895 /// If the keyboard is not visible, then the position will be off the screen.<br/>
896 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
897 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
899 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
900 /// <since_tizen> 3 </since_tizen>
901 public Rectangle GetInputMethodArea()
903 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
904 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
908 internal void ApplyOptions(InputMethodOptions options)
910 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
911 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915 /// Sets up the input-panel specific data.
917 /// <param name="text">The specific data to be set to the input panel.</param>
918 /// <since_tizen> 3 </since_tizen>
919 public void SetInputPanelUserData(string text)
921 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
926 /// Gets the specific data of the current active input panel.
928 /// <param name="text">The specific data to be received from the input panel.</param>
929 /// <since_tizen> 4 </since_tizen>
930 public void GetInputPanelUserData(out string text)
932 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
937 /// Gets the state of the current active input panel.
939 /// <returns>The state of the input panel.</returns>
940 /// <since_tizen> 3 </since_tizen>
941 public ImfManager.State GetInputPanelState()
943 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
949 /// Sets the return key on the input panel to be visible or invisible.<br/>
950 /// The default is true.
952 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
953 /// <since_tizen> 3 </since_tizen>
954 public void SetReturnKeyState(bool visible)
956 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
961 /// Enables to show the input panel automatically when focused.
963 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
964 /// <since_tizen> 3 </since_tizen>
965 public void AutoEnableInputPanel(bool enabled)
967 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
968 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
972 /// Shows the input panel.
974 /// <since_tizen> 3 </since_tizen>
975 public void ShowInputPanel()
977 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
978 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
982 /// Hides the input panel.
984 /// <since_tizen> 3 </since_tizen>
985 public void HideInputPanel()
987 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
988 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
992 /// Gets the keyboard type.<br/>
993 /// The default keyboard type is SoftwareKeyboard.
995 /// <returns>The keyboard type.</returns>
996 /// <since_tizen> 4 </since_tizen>
997 public ImfManager.KeyboardType GetKeyboardType()
999 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
1000 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 /// Gets the current language locale of the input panel.<br/>
1006 /// For example, en_US, en_GB, en_PH, fr_FR, ...
1008 /// <returns>The current language locale of the input panel.</returns>
1009 /// <since_tizen> 4 </since_tizen>
1010 public string GetInputPanelLocale()
1012 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1018 /// The constructor.
1020 /// <since_tizen> 3 </since_tizen>
1021 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
1023 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027 /// ImfManager activated event arguments.
1029 //Please do not use! this will be deprecated
1030 /// <since_tizen> 3 </since_tizen>
1031 [EditorBrowsable(EditorBrowsableState.Never)]
1032 public class ImfManagerActivatedEventArgs : EventArgs
1037 /// <since_tizen> 3 </since_tizen>
1038 public ImfManager ImfManager
1045 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1046 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1047 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1048 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1051 /// ImfManager activated event.
1053 //Please do not use! this will be deprecated
1054 /// <since_tizen> 3 </since_tizen>
1055 [EditorBrowsable(EditorBrowsableState.Never)]
1056 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1060 if (_imfManagerActivatedEventHandler == null)
1062 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1063 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1066 _imfManagerActivatedEventHandler += value;
1070 _imfManagerActivatedEventHandler -= value;
1072 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1074 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1079 private void OnImfManagerActivated(global::System.IntPtr data)
1081 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1085 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1088 if (_imfManagerActivatedEventHandler != null)
1090 _imfManagerActivatedEventHandler(this, e);
1095 /// ImfManager activated event arguments.
1097 /// <since_tizen> 4 </since_tizen>
1098 public class ActivatedEventArgs : EventArgs
1103 /// <since_tizen> 4 </since_tizen>
1104 public ImfManager ImfManager
1111 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1112 private delegate void ActivatedEventCallbackType(IntPtr data);
1113 private ActivatedEventCallbackType _activatedEventCallback;
1114 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1117 /// ImfManager activated.
1119 /// <since_tizen> 4 </since_tizen>
1120 public event EventHandler<ActivatedEventArgs> Activated
1124 if (_activatedEventHandler == null)
1126 _activatedEventCallback = OnActivated;
1127 ActivatedSignal().Connect(_activatedEventCallback);
1130 _activatedEventHandler += value;
1134 _activatedEventHandler -= value;
1136 if (_activatedEventHandler == null && _activatedEventCallback != null)
1138 ActivatedSignal().Disconnect(_activatedEventCallback);
1143 private void OnActivated(IntPtr data)
1145 ActivatedEventArgs e = new ActivatedEventArgs();
1149 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1152 if (_activatedEventHandler != null)
1154 _activatedEventHandler(this, e);
1159 /// ImfManager activated signal.
1161 //Please do not use! this will be internal
1162 /// <since_tizen> 3 </since_tizen>
1163 [EditorBrowsable(EditorBrowsableState.Never)]
1164 public ActivatedSignalType ActivatedSignal()
1166 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1172 /// ImfManager event received event arguments.
1174 //Please do not use! this will be deprecated
1175 /// <since_tizen> 3 </since_tizen>
1176 [EditorBrowsable(EditorBrowsableState.Never)]
1177 public class ImfManagerEventReceivedEventArgs : EventArgs
1182 /// <since_tizen> 3 </since_tizen>
1183 public ImfManager ImfManager
1190 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1191 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1192 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1195 /// ImfManager event received.
1197 //Please do not use! this will be deprecated
1198 /// <since_tizen> 3 </since_tizen>
1199 [EditorBrowsable(EditorBrowsableState.Never)]
1200 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1204 if (_imfManagerEventReceivedEventHandler == null)
1206 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1207 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1210 _imfManagerEventReceivedEventHandler += value;
1214 _imfManagerEventReceivedEventHandler -= value;
1216 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1218 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1223 private void OnImfManagerEventReceived(global::System.IntPtr data)
1225 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1229 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1232 if (_imfManagerEventReceivedEventHandler != null)
1234 _imfManagerEventReceivedEventHandler(this, e);
1239 /// ImfManager event received event arguments.
1241 /// <since_tizen> 4 </since_tizen>
1242 public class EventReceivedEventArgs : EventArgs
1247 /// <since_tizen> 4 </since_tizen>
1248 public ImfManager ImfManager
1257 /// <since_tizen> 4 </since_tizen>
1258 public ImfEventData ImfEventData
1265 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1266 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1267 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1270 /// ImfManager event received.
1272 /// <since_tizen> 4 </since_tizen>
1273 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1277 if (_eventReceivedEventHandler == null)
1279 _eventReceivedEventCallback = OnEventReceived;
1280 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1283 _eventReceivedEventHandler += value;
1287 _eventReceivedEventHandler -= value;
1289 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1291 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1296 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1298 ImfCallbackData imfCallbackData = null;
1300 EventReceivedEventArgs e = new EventReceivedEventArgs();
1302 if (imfManager != null)
1304 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1306 if (imfEventData != null)
1308 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1311 if (_eventReceivedEventHandler != null)
1313 imfCallbackData = _eventReceivedEventHandler(this, e);
1315 if (imfCallbackData != null)
1317 return imfCallbackData.GetImfCallbackDataPtr();
1321 return new ImfCallbackData().GetImfCallbackDataPtr();
1326 /// ImfManager event received signal.
1328 //Please do not use! this will be internal
1329 /// <since_tizen> 3 </since_tizen>
1330 [EditorBrowsable(EditorBrowsableState.Never)]
1331 public ImfEventSignalType EventReceivedSignal()
1333 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1339 /// ImfManager status changed event arguments.
1341 //Please do not use! this will be deprecated
1342 /// <since_tizen> 3 </since_tizen>
1343 [EditorBrowsable(EditorBrowsableState.Never)]
1344 public class ImfManagerStatusChangedEventArgs : EventArgs
1349 /// <since_tizen> 3 </since_tizen>
1350 public ImfManager ImfManager
1357 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1358 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1359 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1362 /// ImfManager status changed.
1364 //Please do not use! this will be deprecated
1365 /// <since_tizen> 3 </since_tizen>
1366 [EditorBrowsable(EditorBrowsableState.Never)]
1367 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1371 if (_imfManagerStatusChangedEventHandler == null)
1373 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1374 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1377 _imfManagerStatusChangedEventHandler += value;
1381 _imfManagerStatusChangedEventHandler -= value;
1383 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1385 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1390 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1392 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1396 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1399 if (_imfManagerStatusChangedEventHandler != null)
1401 _imfManagerStatusChangedEventHandler(this, e);
1406 /// ImfManager status changed event arguments.
1408 /// <since_tizen> 4 </since_tizen>
1409 public class StatusChangedEventArgs : EventArgs
1412 /// ImfManager status
1414 /// <since_tizen> 4 </since_tizen>
1415 public bool StatusChanged
1422 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1423 private StatusChangedEventCallbackType _statusChangedEventCallback;
1424 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1427 /// ImfManager status changed.
1429 /// <since_tizen> 4 </since_tizen>
1430 public event EventHandler<StatusChangedEventArgs> StatusChanged
1434 if (_statusChangedEventHandler == null)
1436 _statusChangedEventCallback = OnStatusChanged;
1437 StatusChangedSignal().Connect(_statusChangedEventCallback);
1440 _statusChangedEventHandler += value;
1444 _statusChangedEventHandler -= value;
1446 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1448 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1453 private void OnStatusChanged(bool statusChanged)
1455 StatusChangedEventArgs e = new StatusChangedEventArgs();
1457 e.StatusChanged = statusChanged;
1459 if (_statusChangedEventHandler != null)
1461 _statusChangedEventHandler(this, e);
1466 /// ImfManager status changed signal.
1468 //Please do not use! this will be internal
1469 /// <since_tizen> 3 </since_tizen>
1470 [EditorBrowsable(EditorBrowsableState.Never)]
1471 public StatusSignalType StatusChangedSignal()
1473 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1474 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1479 /// ImfManager resized event arguments.
1481 //Please do not use! this will be deprecated
1482 /// <since_tizen> 3 </since_tizen>
1483 [EditorBrowsable(EditorBrowsableState.Never)]
1484 public class ImfManagerResizedEventArgs : EventArgs
1489 /// <since_tizen> 3 </since_tizen>
1490 public ImfManager ImfManager
1497 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1498 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1499 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1502 /// ImfManager resized event.
1504 //Please do not use! this will be deprecated
1505 /// <since_tizen> 3 </since_tizen>
1506 [EditorBrowsable(EditorBrowsableState.Never)]
1507 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1511 if (_imfManagerResizedEventHandler == null)
1513 _imfManagerResizedEventCallback = OnImfManagerResized;
1514 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1517 _imfManagerResizedEventHandler += value;
1521 _imfManagerResizedEventHandler -= value;
1523 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1525 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1530 private void OnImfManagerResized(IntPtr data)
1532 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1536 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1539 if (_imfManagerResizedEventHandler != null)
1541 _imfManagerResizedEventHandler(this, e);
1546 /// ImfManager resized event.
1548 /// <since_tizen> 4 </since_tizen>
1549 public class ResizedEventArgs : EventArgs
1554 /// <since_tizen> 4 </since_tizen>
1562 private delegate void ResizedEventCallbackType(int resized);
1563 private ResizedEventCallbackType _resizedEventCallback;
1564 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1567 /// ImfManager resized.
1569 /// <since_tizen> 4 </since_tizen>
1570 public event EventHandler<ResizedEventArgs> Resized
1574 if (_resizedEventHandler == null)
1576 _resizedEventCallback = OnResized;
1577 ResizedSignal().Connect(_resizedEventCallback);
1580 _resizedEventHandler += value;
1584 _resizedEventHandler -= value;
1586 if (_resizedEventHandler == null && _resizedEventCallback != null)
1588 ResizedSignal().Disconnect(_resizedEventCallback);
1593 private void OnResized(int resized)
1595 ResizedEventArgs e = new ResizedEventArgs();
1596 e.Resized = resized;
1598 if (_resizedEventHandler != null)
1600 _resizedEventHandler(this, e);
1605 /// ImfManager resized signal.
1607 //Please do not use! this will be internal
1608 /// <since_tizen> 3 </since_tizen>
1609 [EditorBrowsable(EditorBrowsableState.Never)]
1610 public KeyboardResizedSignalType ResizedSignal()
1612 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1618 /// ImfManager language changed event arguments.
1620 //Please do not use! this will be deprecated
1621 /// <since_tizen> 3 </since_tizen>
1622 [EditorBrowsable(EditorBrowsableState.Never)]
1623 public class ImfManagerLanguageChangedEventArgs : EventArgs
1628 /// <since_tizen> 3 </since_tizen>
1629 public ImfManager ImfManager
1636 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1637 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1638 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1641 /// ImfManager language changed event.
1643 //Please do not use! this will be deprecated
1644 /// <since_tizen> 3 </since_tizen>
1645 [EditorBrowsable(EditorBrowsableState.Never)]
1646 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1650 if (_imfManagerLanguageChangedEventHandler == null)
1652 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1653 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1656 _imfManagerLanguageChangedEventHandler += value;
1660 _imfManagerLanguageChangedEventHandler -= value;
1662 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1664 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1669 private void OnImfManagerLanguageChanged(IntPtr data)
1671 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1675 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1678 if (_imfManagerLanguageChangedEventHandler != null)
1680 _imfManagerLanguageChangedEventHandler(this, e);
1685 /// ImfManager language changed event args.
1687 /// <since_tizen> 4 </since_tizen>
1688 public class LanguageChangedEventArgs : EventArgs
1691 /// language changed.
1693 /// <since_tizen> 4 </since_tizen>
1694 public int LanguageChanged
1701 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1702 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1703 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1706 /// ImfManager language changed.
1708 /// <since_tizen> 4 </since_tizen>
1709 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1713 if (_languageChangedEventHandler == null)
1715 _languageChangedEventCallback = OnLanguageChanged;
1716 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1719 _languageChangedEventHandler += value;
1723 _languageChangedEventHandler -= value;
1725 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1727 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1732 private void OnLanguageChanged(int languageChanged)
1734 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1735 e.LanguageChanged = languageChanged;
1737 if (_languageChangedEventHandler != null)
1739 _languageChangedEventHandler(this, e);
1744 /// ImfManager language changed signal.
1746 //Please do not use! this will be internal
1747 /// <since_tizen> 3 </since_tizen>
1748 [EditorBrowsable(EditorBrowsableState.Never)]
1749 public LanguageChangedSignalType LanguageChangedSignal()
1751 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1752 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1757 /// ImfManager keyboard type changed event arguments.
1759 /// <since_tizen> 4 </since_tizen>
1760 public class KeyboardTypeChangedEventArgs : EventArgs
1763 /// ImfManager keyboard type
1765 /// <since_tizen> 4 </since_tizen>
1766 public KeyboardType KeyboardType
1773 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1774 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1775 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1778 /// ImfManager keyboard type changed.
1780 /// <since_tizen> 4 </since_tizen>
1781 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1785 if (_keyboardTypeChangedEventHandler == null)
1787 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1788 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1791 _keyboardTypeChangedEventHandler += value;
1795 _keyboardTypeChangedEventHandler -= value;
1797 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1799 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1804 private void OnKeyboardTypeChanged(KeyboardType type)
1806 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1808 e.KeyboardType = type;
1810 if (_keyboardTypeChangedEventHandler != null)
1812 _keyboardTypeChangedEventHandler(this, e);
1816 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1818 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1819 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1824 /// The direction of the text.
1826 /// <since_tizen> 3 </since_tizen>
1827 public enum TextDirection
1840 /// Events that are generated by the IMF.
1842 /// <since_tizen> 3 </since_tizen>
1843 public enum ImfEvent
1848 /// <since_tizen> 4 </since_tizen>
1851 /// Pre-Edit changed.
1853 /// <since_tizen> 4 </since_tizen>
1856 /// Commit received.
1858 /// <since_tizen> 4 </since_tizen>
1861 /// An event to delete a range of characters from the string.
1863 /// <since_tizen> 4 </since_tizen>
1866 /// An event to query string and the cursor position.
1868 /// <since_tizen> 4 </since_tizen>
1871 /// Private command sent from the input panel.
1873 /// <since_tizen> 4 </since_tizen>
1878 /// Enumeration for the state of the input panel.
1880 /// <since_tizen> 3 </since_tizen>
1886 /// <since_tizen> 4 </since_tizen>
1889 /// Input panel is shown.
1891 /// <since_tizen> 4 </since_tizen>
1894 /// Input panel is hidden.
1896 /// <since_tizen> 4 </since_tizen>
1899 /// Input panel in process of being shown.
1901 /// <since_tizen> 4 </since_tizen>
1906 /// Enumeration for the types of keyboard.
1908 /// <since_tizen> 4 </since_tizen>
1909 public enum KeyboardType
1912 /// Software keyboard (virtual keyboard) is default.
1914 /// <since_tizen> 4 </since_tizen>
1917 /// Hardware keyboard.
1919 /// <since_tizen> 4 </since_tizen>