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 [Obsolete("Please do not use! This will be deprecated!")]
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 protected override void Dispose(DisposeTypes type)
75 if (type == DisposeTypes.Explicit)
78 //Release your own managed resources here.
79 //You should release all of your own disposable objects here.
83 //Release your own unmanaged resources here.
84 //You should not access any managed member here except static instance.
85 //because the execution order of Finalizes is non-deterministic.
87 if (_keyboardTypeChangedEventCallback != null)
89 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
92 if (_imfManagerLanguageChangedEventCallback != null)
94 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
97 if (_imfManagerResizedEventCallback != null)
99 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
102 if (_imfManagerStatusChangedEventCallback != null)
104 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
107 if (_imfManagerEventReceivedEventCallback != null)
109 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
112 if (_imfManagerActivatedEventCallback != null)
114 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
117 if (swigCPtr.Handle != global::System.IntPtr.Zero)
122 NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
124 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
131 /// This structure is used to pass on data from the IMF regarding predictive text.
133 /// <since_tizen> 3 </since_tizen>
134 public class ImfEventData : global::System.IDisposable
136 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
140 /// <since_tizen> 3 </since_tizen>
141 protected bool swigCMemOwn;
143 internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
145 swigCMemOwn = cMemoryOwn;
146 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
149 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
151 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
154 //A Flag to check who called Dispose(). (By User or DisposeQueue)
155 private bool isDisposeQueued = false;
157 /// A Flat to check if it is already disposed.
159 /// <since_tizen> 3 </since_tizen>
160 protected bool disposed = false;
165 /// <since_tizen> 3 </since_tizen>
168 if (!isDisposeQueued)
170 isDisposeQueued = true;
171 DisposeQueue.Instance.Add(this);
176 /// The dispose pattern.
178 /// <since_tizen> 3 </since_tizen>
179 public void Dispose()
181 //Throw excpetion if Dispose() is called in separate thread.
182 if (!Window.IsInstalled())
184 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
189 Dispose(DisposeTypes.Implicit);
193 Dispose(DisposeTypes.Explicit);
194 System.GC.SuppressFinalize(this);
201 /// <since_tizen> 3 </since_tizen>
202 protected virtual void Dispose(DisposeTypes type)
209 if (type == DisposeTypes.Explicit)
212 //Release your own managed resources here.
213 //You should release all of your own disposable objects here.
217 //Release your own unmanaged resources here.
218 //You should not access any managed member here except static instance.
219 //because the execution order of Finalizes is non-deterministic.
221 if (swigCPtr.Handle != IntPtr.Zero)
226 NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
228 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
234 internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
236 ImfEventData ret = new ImfEventData(cPtr, false);
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 /// The default constructor.
244 /// <since_tizen> 3 </since_tizen>
245 public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 /// <param name="aEventName">The name of the event from the IMF.</param>
254 /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
255 /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
256 /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
257 /// <since_tizen> 3 </since_tizen>
258 public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
260 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264 /// The pre-edit or the commit string.
266 /// /// <since_tizen> 3 </since_tizen>
267 [Obsolete("Please do not use! This will be deprecated! Please use PredictiveString instead!")]
268 [EditorBrowsable(EditorBrowsableState.Never)]
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 pre-edit or the commit string.
287 /// <since_tizen> 4 </since_tizen>
288 public string PredictiveString
292 NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304 /// The name of the event from the IMF.
306 /// Please do not use! this will be deprecated
307 /// <since_tizen> 3 </since_tizen>
308 [Obsolete("Please do not use! This will be deprecated! Please use EventName instead!")]
309 [EditorBrowsable(EditorBrowsableState.Never)]
310 public ImfManager.ImfEvent eventName
314 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326 /// The name of the event from the IMF.
328 /// <since_tizen> 4 </since_tizen>
329 public ImfManager.ImfEvent EventName
333 NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338 ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 /// The start position from the current cursor position to start deleting characters.
347 /// Please do not use! this will be deprecated
348 /// <since_tizen> 3 </since_tizen>
349 [Obsolete("Please do not use! This will be deprecated! Please use CursorOffset instead!")]
350 [EditorBrowsable(EditorBrowsableState.Never)]
351 public int cursorOffset
355 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
361 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367 /// The start position from the current cursor position to start deleting characters.
369 /// <since_tizen> 4 </since_tizen>
370 public int CursorOffset
374 NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
375 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
379 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
380 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
386 /// The number of characters to delete from the cursorOffset.
388 /// Please do not use! this will be deprecated
389 /// <since_tizen> 3 </since_tizen>
390 [Obsolete("Please do not use! This will be deprecated! Please use NumberOfChars instead!")]
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public int numberOfChars
396 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
397 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
402 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408 /// The number of characters to delete from the cursorOffset.
410 /// <since_tizen> 4 </since_tizen>
411 public int NumberOfChars
415 NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
416 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
420 int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
421 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429 /// Data required by the IMF from the callback.
431 /// <since_tizen> 3 </since_tizen>
432 public class ImfCallbackData : global::System.IDisposable
434 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
438 /// <since_tizen> 3 </since_tizen>
439 protected bool swigCMemOwn;
441 internal IntPtr GetImfCallbackDataPtr()
443 return (IntPtr)swigCPtr;
446 internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
448 swigCMemOwn = cMemoryOwn;
449 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
452 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
454 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
457 //A Flag to check who called Dispose(). (By User or DisposeQueue)
458 private bool isDisposeQueued = false;
460 /// A Flat to check if it is already disposed.
462 /// <since_tizen> 3 </since_tizen>
463 protected bool disposed = false;
469 /// <since_tizen> 3 </since_tizen>
472 if (!isDisposeQueued)
474 isDisposeQueued = true;
475 DisposeQueue.Instance.Add(this);
480 /// The dispose pattern.
482 /// <since_tizen> 3 </since_tizen>
483 public void Dispose()
485 //Throw excpetion if Dispose() is called in separate thread.
486 if (!Window.IsInstalled())
488 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
493 Dispose(DisposeTypes.Implicit);
497 Dispose(DisposeTypes.Explicit);
498 System.GC.SuppressFinalize(this);
505 /// <since_tizen> 3 </since_tizen>
506 protected virtual void Dispose(DisposeTypes type)
513 if (type == DisposeTypes.Explicit)
516 //Release your own managed resources here.
517 //You should release all of your own disposable objects here.
521 //Release your own unmanaged resources here.
522 //You should not access any managed member here except static instance.
523 //because the execution order of Finalizes is non-deterministic.
525 if (swigCPtr.Handle != IntPtr.Zero)
530 NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
532 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
538 internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
540 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
541 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
546 /// The default constructor.
548 /// <since_tizen> 3 </since_tizen>
549 public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
551 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
557 /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
558 /// <param name="aCursorPosition">The new position of the cursor.</param>
559 /// <param name="aCurrentText">The current text string.</param>
560 /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
561 /// <since_tizen> 3 </since_tizen>
562 public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 /// The current text string.
570 /// Please do not use! this will be deprecated
571 /// <since_tizen> 3 </since_tizen>
572 [Obsolete("Please do not use! This will be deprecated! Please use CurrentText instead!")]
573 [EditorBrowsable(EditorBrowsableState.Never)]
574 public string currentText
578 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
579 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
583 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
584 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
590 /// The current text string.
592 /// <since_tizen> 4 </since_tizen>
593 public string CurrentText
597 NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
598 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602 string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
609 /// The current text string.
611 /// Please do not use! this will be deprecated
612 /// <since_tizen> 3 </since_tizen>
613 [Obsolete("Please do not use! This will be deprecated! Please use CursorPosition instead!")]
614 [EditorBrowsable(EditorBrowsableState.Never)]
615 public int cursorPosition
619 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
620 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
624 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
625 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
631 /// The current text string.
633 /// <since_tizen> 4 </since_tizen>
634 public int CursorPosition
638 NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
639 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643 int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
644 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
650 /// If the cursor position needs to be updated.
652 /// Please do not use! this will be deprecated
653 /// <since_tizen> 3 </since_tizen>
654 [Obsolete("Please do not use! This will be deprecated! Please use Update instead!")]
655 [EditorBrowsable(EditorBrowsableState.Never)]
660 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
661 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
665 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
666 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
672 /// If the cursor position needs to be updated.
674 /// <since_tizen> 4 </since_tizen>
679 NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
680 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
684 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
685 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691 /// Flags if preedit reset is required.
693 /// Please do not use! this will be deprecated
694 /// <since_tizen> 3 </since_tizen>
695 [Obsolete("Please do not use! This will be deprecated! Please use PreeditResetRequired instead!")]
696 [EditorBrowsable(EditorBrowsableState.Never)]
697 public bool preeditResetRequired
701 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
702 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
706 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
707 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
713 /// Flags if preedit reset is required.
715 /// <since_tizen> 4 </since_tizen>
716 public bool PreeditResetRequired
720 NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
721 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
725 bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
726 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
734 /// Destroy the context of the IMF.<br/>
736 /// <since_tizen> 5 </since_tizen>
737 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
738 [EditorBrowsable(EditorBrowsableState.Never)]
739 public void DestroyContext()
741 NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
742 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
746 /// Destroy the context of the IMF.<br/>
748 /// <since_tizen> 4 </since_tizen>
749 /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
750 [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")]
751 [EditorBrowsable(EditorBrowsableState.Never)]
752 public void Finalize()
758 /// Retrieves a handle to the instance of the ImfManager.
760 /// <returns>A handle to the ImfManager.</returns>
761 /// <since_tizen> 3 </since_tizen>
762 public static ImfManager Get()
764 ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
765 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
770 /// Activates the IMF.<br/>
771 /// It means that the text editing is started somewhere.<br/>
772 /// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
774 /// <since_tizen> 3 </since_tizen>
775 public void Activate()
777 NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
778 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
782 /// Deactivates the IMF.<br/>
783 /// It means that the text editing is finished somewhere.
785 /// <since_tizen> 3 </since_tizen>
786 public void Deactivate()
788 NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
789 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 /// Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.<br/>
794 /// If true, then the keyboard will be restored (activated) after focus is regained.
796 /// <returns>The restoration status.</returns>
797 /// <since_tizen> 3 </since_tizen>
798 public bool RestoreAfterFocusLost()
800 bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
801 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
806 /// Sets the status whether the IMF has to restore the keyboard after losing focus.
808 /// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
809 /// <since_tizen> 3 </since_tizen>
810 public void SetRestoreAfterFocusLost(bool toggle)
812 NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
813 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
817 /// Sends a message reset to the preedit state or the IMF module.
819 /// <since_tizen> 3 </since_tizen>
820 public new void Reset()
822 NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
823 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
827 /// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
829 /// <since_tizen> 3 </since_tizen>
830 public void NotifyCursorPosition()
832 NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
833 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
837 /// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
839 /// <param name="cursorPosition">The position of the cursor.</param>
840 /// <since_tizen> 3 </since_tizen>
841 public void SetCursorPosition(uint cursorPosition)
843 NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
844 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
848 /// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
850 /// <returns>The current position of the cursor.</returns>
851 /// <since_tizen> 3 </since_tizen>
852 public uint GetCursorPosition()
854 uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
855 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
860 /// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
862 /// <param name="text">The text string surrounding the current cursor point.</param>
863 /// <since_tizen> 3 </since_tizen>
864 public void SetSurroundingText(string text)
866 NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
867 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871 /// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
873 /// <returns>The surrounding text.</returns>
874 /// <since_tizen> 3 </since_tizen>
875 public string GetSurroundingText()
877 string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
878 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
883 /// Notifies the IMF context that text input is set to multiline or not.
885 /// <param name="multiLine">True if multiline text input is used.</param>
886 /// <since_tizen> 3 </since_tizen>
887 public void NotifyTextInputMultiLine(bool multiLine)
889 NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
890 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
894 /// Returns the text direction of the keyboard's current input language.
896 /// <returns>The direction of the text.</returns>
897 /// <since_tizen> 3 </since_tizen>
898 public ImfManager.TextDirection GetTextDirection()
900 ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
901 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
906 /// Provides the size and the position of the keyboard.<br/>
907 /// The position is relative to whether the keyboard is visible or not.<br/>
908 /// If the keyboard is not visible, then the position will be off the screen.<br/>
909 /// If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
910 /// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
912 /// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
913 /// <since_tizen> 3 </since_tizen>
914 public Rectangle GetInputMethodArea()
916 Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
917 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
921 internal void ApplyOptions(InputMethodOptions options)
923 NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
924 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
928 /// Sets up the input-panel specific data.
930 /// <param name="text">The specific data to be set to the input panel.</param>
931 /// <since_tizen> 3 </since_tizen>
932 public void SetInputPanelUserData(string text)
934 NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939 /// Gets the specific data of the current active input panel.
941 /// <param name="text">The specific data to be received from the input panel.</param>
942 /// <since_tizen> 4 </since_tizen>
943 public void GetInputPanelUserData(out string text)
945 NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
946 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
950 /// Gets the state of the current active input panel.
952 /// <returns>The state of the input panel.</returns>
953 /// <since_tizen> 3 </since_tizen>
954 public ImfManager.State GetInputPanelState()
956 ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 /// Sets the return key on the input panel to be visible or invisible.<br/>
963 /// The default is true.
965 /// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
966 /// <since_tizen> 3 </since_tizen>
967 public void SetReturnKeyState(bool visible)
969 NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
970 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
974 /// Enables to show the input panel automatically when focused.
976 /// <param name="enabled">If true, the input panel will be shown when focused.</param>
977 /// <since_tizen> 3 </since_tizen>
978 public void AutoEnableInputPanel(bool enabled)
980 NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 /// Shows the input panel.
987 /// <since_tizen> 3 </since_tizen>
988 public void ShowInputPanel()
990 NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
995 /// Hides the input panel.
997 /// <since_tizen> 3 </since_tizen>
998 public void HideInputPanel()
1000 NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
1001 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 /// Gets the keyboard type.<br/>
1006 /// The default keyboard type is SoftwareKeyboard.
1008 /// <returns>The keyboard type.</returns>
1009 /// <since_tizen> 4 </since_tizen>
1010 public ImfManager.KeyboardType GetKeyboardType()
1012 ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1018 /// Gets the current language locale of the input panel.<br/>
1019 /// For example, en_US, en_GB, en_PH, fr_FR, ...
1021 /// <returns>The current language locale of the input panel.</returns>
1022 /// <since_tizen> 4 </since_tizen>
1023 public string GetInputPanelLocale()
1025 string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
1026 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031 /// The constructor.
1033 /// <since_tizen> 3 </since_tizen>
1034 public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
1036 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1040 /// ImfManager activated event arguments.
1042 /// Please do not use! this will be deprecated
1043 /// <since_tizen> 3 </since_tizen>
1044 [Obsolete("Please do not use! This will be deprecated! Please use ActivatedEventArgs instead!")]
1045 [EditorBrowsable(EditorBrowsableState.Never)]
1046 public class ImfManagerActivatedEventArgs : EventArgs
1051 /// <since_tizen> 3 </since_tizen>
1052 public ImfManager ImfManager
1059 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1060 private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
1061 private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
1062 private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
1065 /// ImfManager activated event.
1067 ///Please do not use! this will be deprecated
1068 /// <since_tizen> 3 </since_tizen>
1069 [Obsolete("Please do not use! This will be deprecated! Please use Activated instead!")]
1070 [EditorBrowsable(EditorBrowsableState.Never)]
1071 public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
1075 if (_imfManagerActivatedEventHandler == null)
1077 _imfManagerActivatedEventCallback = OnImfManagerActivated;
1078 ActivatedSignal().Connect(_imfManagerActivatedEventCallback);
1081 _imfManagerActivatedEventHandler += value;
1085 _imfManagerActivatedEventHandler -= value;
1087 if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null)
1089 ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback);
1094 private void OnImfManagerActivated(global::System.IntPtr data)
1096 ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs();
1100 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1103 if (_imfManagerActivatedEventHandler != null)
1105 _imfManagerActivatedEventHandler(this, e);
1110 /// ImfManager activated event arguments.
1112 /// <since_tizen> 4 </since_tizen>
1113 public class ActivatedEventArgs : EventArgs
1118 /// <since_tizen> 4 </since_tizen>
1119 public ImfManager ImfManager
1126 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1127 private delegate void ActivatedEventCallbackType(IntPtr data);
1128 private ActivatedEventCallbackType _activatedEventCallback;
1129 private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
1132 /// ImfManager activated.
1134 /// <since_tizen> 4 </since_tizen>
1135 public event EventHandler<ActivatedEventArgs> Activated
1139 if (_activatedEventHandler == null)
1141 _activatedEventCallback = OnActivated;
1142 ActivatedSignal().Connect(_activatedEventCallback);
1145 _activatedEventHandler += value;
1149 _activatedEventHandler -= value;
1151 if (_activatedEventHandler == null && _activatedEventCallback != null)
1153 ActivatedSignal().Disconnect(_activatedEventCallback);
1158 private void OnActivated(IntPtr data)
1160 ActivatedEventArgs e = new ActivatedEventArgs();
1164 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1167 if (_activatedEventHandler != null)
1169 _activatedEventHandler(this, e);
1174 /// ImfManager activated signal.
1176 /// Please do not use! this will be internal
1177 /// <since_tizen> 3 </since_tizen>
1178 [Obsolete("Please do not use! This will be deprecated!")]
1179 [EditorBrowsable(EditorBrowsableState.Never)]
1180 public ActivatedSignalType ActivatedSignal()
1182 ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
1183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1188 /// ImfManager event received event arguments.
1190 /// Please do not use! this will be deprecated
1191 /// <since_tizen> 3 </since_tizen>
1192 [Obsolete("Please do not use! This will be deprecated! Please use EventReceivedEventArgs instead!")]
1193 [EditorBrowsable(EditorBrowsableState.Never)]
1194 public class ImfManagerEventReceivedEventArgs : EventArgs
1199 /// <since_tizen> 3 </since_tizen>
1200 public ImfManager ImfManager
1207 private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
1208 private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
1209 private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
1212 /// ImfManager event received.
1214 ///Please do not use! this will be deprecated
1215 /// <since_tizen> 3 </since_tizen>
1216 [Obsolete("Please do not use! This will be deprecated! Please use EventReceived instead!")]
1217 [EditorBrowsable(EditorBrowsableState.Never)]
1218 public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
1222 if (_imfManagerEventReceivedEventHandler == null)
1224 _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived;
1225 EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback);
1228 _imfManagerEventReceivedEventHandler += value;
1232 _imfManagerEventReceivedEventHandler -= value;
1234 if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null)
1236 EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback);
1241 private void OnImfManagerEventReceived(global::System.IntPtr data)
1243 ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
1247 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1250 if (_imfManagerEventReceivedEventHandler != null)
1252 _imfManagerEventReceivedEventHandler(this, e);
1257 /// ImfManager event received event arguments.
1259 /// <since_tizen> 4 </since_tizen>
1260 public class EventReceivedEventArgs : EventArgs
1265 /// <since_tizen> 4 </since_tizen>
1266 public ImfManager ImfManager
1275 /// <since_tizen> 4 </since_tizen>
1276 public ImfEventData ImfEventData
1283 private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
1284 private EventReceivedEventCallbackType _eventReceivedEventCallback;
1285 private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
1288 /// ImfManager event received.
1290 /// <since_tizen> 4 </since_tizen>
1291 public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
1295 if (_eventReceivedEventHandler == null)
1297 _eventReceivedEventCallback = OnEventReceived;
1298 EventReceivedSignal().Connect(_eventReceivedEventCallback);
1301 _eventReceivedEventHandler += value;
1305 _eventReceivedEventHandler -= value;
1307 if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
1309 EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
1314 private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
1316 ImfCallbackData imfCallbackData = null;
1318 EventReceivedEventArgs e = new EventReceivedEventArgs();
1320 if (imfManager != null)
1322 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
1324 if (imfEventData != null)
1326 e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
1329 if (_eventReceivedEventHandler != null)
1331 imfCallbackData = _eventReceivedEventHandler(this, e);
1333 if (imfCallbackData != null)
1335 return imfCallbackData.GetImfCallbackDataPtr();
1339 return new ImfCallbackData().GetImfCallbackDataPtr();
1344 /// ImfManager event received signal.
1346 /// Please do not use! this will be internal
1347 /// <since_tizen> 3 </since_tizen>
1348 [Obsolete("Please do not use! This will be deprecated!")]
1349 [EditorBrowsable(EditorBrowsableState.Never)]
1350 public ImfEventSignalType EventReceivedSignal()
1352 ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
1353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1358 /// ImfManager status changed event arguments.
1360 ///Please do not use! this will be deprecated
1361 /// <since_tizen> 3 </since_tizen>
1362 [Obsolete("Please do not use! This will be deprecated! Please use StatusChangedEventArgs instead!")]
1363 [EditorBrowsable(EditorBrowsableState.Never)]
1364 public class ImfManagerStatusChangedEventArgs : EventArgs
1369 /// <since_tizen> 3 </since_tizen>
1370 public ImfManager ImfManager
1377 private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
1378 private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
1379 private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
1382 /// ImfManager status changed.
1384 /// Please do not use! this will be deprecated
1385 /// <since_tizen> 3 </since_tizen>
1386 [Obsolete("Please do not use! This will be deprecated! Please use StatusChanged instead!")]
1387 [EditorBrowsable(EditorBrowsableState.Never)]
1388 public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
1392 if (_imfManagerStatusChangedEventHandler == null)
1394 _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged;
1395 StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback);
1398 _imfManagerStatusChangedEventHandler += value;
1402 _imfManagerStatusChangedEventHandler -= value;
1404 if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null)
1406 StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback);
1411 private void OnImfManagerStatusChanged(global::System.IntPtr data)
1413 ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
1417 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1420 if (_imfManagerStatusChangedEventHandler != null)
1422 _imfManagerStatusChangedEventHandler(this, e);
1427 /// ImfManager status changed event arguments.
1429 /// <since_tizen> 4 </since_tizen>
1430 public class StatusChangedEventArgs : EventArgs
1433 /// ImfManager status
1435 /// <since_tizen> 4 </since_tizen>
1436 public bool StatusChanged
1443 private delegate void StatusChangedEventCallbackType(bool statusChanged);
1444 private StatusChangedEventCallbackType _statusChangedEventCallback;
1445 private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
1448 /// ImfManager status changed.
1450 /// <since_tizen> 4 </since_tizen>
1451 public event EventHandler<StatusChangedEventArgs> StatusChanged
1455 if (_statusChangedEventHandler == null)
1457 _statusChangedEventCallback = OnStatusChanged;
1458 StatusChangedSignal().Connect(_statusChangedEventCallback);
1461 _statusChangedEventHandler += value;
1465 _statusChangedEventHandler -= value;
1467 if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
1469 StatusChangedSignal().Disconnect(_statusChangedEventCallback);
1474 private void OnStatusChanged(bool statusChanged)
1476 StatusChangedEventArgs e = new StatusChangedEventArgs();
1478 e.StatusChanged = statusChanged;
1480 if (_statusChangedEventHandler != null)
1482 _statusChangedEventHandler(this, e);
1487 /// ImfManager status changed signal.
1489 ///Please do not use! this will be internal
1490 /// <since_tizen> 3 </since_tizen>
1491 [Obsolete("Please do not use! This will be deprecated!")]
1492 [EditorBrowsable(EditorBrowsableState.Never)]
1493 public StatusSignalType StatusChangedSignal()
1495 StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
1496 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1501 /// ImfManager resized event arguments.
1503 ///Please do not use! this will be deprecated
1504 /// <since_tizen> 3 </since_tizen>
1505 [Obsolete("Please do not use! This will be deprecated! Please use ResizedEventArgs instead!")]
1506 [EditorBrowsable(EditorBrowsableState.Never)]
1507 public class ImfManagerResizedEventArgs : EventArgs
1512 /// <since_tizen> 3 </since_tizen>
1513 public ImfManager ImfManager
1520 private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
1521 private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
1522 private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
1525 /// ImfManager resized event.
1527 ///Please do not use! this will be deprecated
1528 /// <since_tizen> 3 </since_tizen>
1529 [Obsolete("Please do not use! This will be deprecated! Please use Resized instead!")]
1530 [EditorBrowsable(EditorBrowsableState.Never)]
1531 public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
1535 if (_imfManagerResizedEventHandler == null)
1537 _imfManagerResizedEventCallback = OnImfManagerResized;
1538 ResizedSignal().Connect(_imfManagerResizedEventCallback);
1541 _imfManagerResizedEventHandler += value;
1545 _imfManagerResizedEventHandler -= value;
1547 if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null)
1549 ResizedSignal().Disconnect(_imfManagerResizedEventCallback);
1554 private void OnImfManagerResized(IntPtr data)
1556 ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
1560 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1563 if (_imfManagerResizedEventHandler != null)
1565 _imfManagerResizedEventHandler(this, e);
1570 /// ImfManager resized event.
1572 /// <since_tizen> 4 </since_tizen>
1573 public class ResizedEventArgs : EventArgs
1578 /// <since_tizen> 4 </since_tizen>
1586 private delegate void ResizedEventCallbackType(int resized);
1587 private ResizedEventCallbackType _resizedEventCallback;
1588 private event EventHandler<ResizedEventArgs> _resizedEventHandler;
1591 /// ImfManager resized.
1593 /// <since_tizen> 4 </since_tizen>
1594 public event EventHandler<ResizedEventArgs> Resized
1598 if (_resizedEventHandler == null)
1600 _resizedEventCallback = OnResized;
1601 ResizedSignal().Connect(_resizedEventCallback);
1604 _resizedEventHandler += value;
1608 _resizedEventHandler -= value;
1610 if (_resizedEventHandler == null && _resizedEventCallback != null)
1612 ResizedSignal().Disconnect(_resizedEventCallback);
1617 private void OnResized(int resized)
1619 ResizedEventArgs e = new ResizedEventArgs();
1620 e.Resized = resized;
1622 if (_resizedEventHandler != null)
1624 _resizedEventHandler(this, e);
1629 /// ImfManager resized signal.
1631 ///Please do not use! this will be internal
1632 /// <since_tizen> 3 </since_tizen>
1633 [Obsolete("Please do not use! This will be deprecated!")]
1634 [EditorBrowsable(EditorBrowsableState.Never)]
1635 public KeyboardResizedSignalType ResizedSignal()
1637 KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
1638 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1643 /// ImfManager language changed event arguments.
1645 ///Please do not use! this will be deprecated
1646 /// <since_tizen> 3 </since_tizen>
1647 [Obsolete("Please do not use! This will be deprecated! Please use LanguageChangedEventArgs instead!")]
1648 [EditorBrowsable(EditorBrowsableState.Never)]
1649 public class ImfManagerLanguageChangedEventArgs : EventArgs
1654 /// <since_tizen> 3 </since_tizen>
1655 public ImfManager ImfManager
1662 private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
1663 private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
1664 private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
1667 /// ImfManager language changed event.
1669 ///Please do not use! this will be deprecated
1670 /// <since_tizen> 3 </since_tizen>
1671 [Obsolete("Please do not use! This will be deprecated! Please use LanguageChanged instead!")]
1672 [EditorBrowsable(EditorBrowsableState.Never)]
1673 public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
1677 if (_imfManagerLanguageChangedEventHandler == null)
1679 _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged;
1680 LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback);
1683 _imfManagerLanguageChangedEventHandler += value;
1687 _imfManagerLanguageChangedEventHandler -= value;
1689 if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null)
1691 LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback);
1696 private void OnImfManagerLanguageChanged(IntPtr data)
1698 ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
1702 e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
1705 if (_imfManagerLanguageChangedEventHandler != null)
1707 _imfManagerLanguageChangedEventHandler(this, e);
1712 /// ImfManager language changed event args.
1714 /// <since_tizen> 4 </since_tizen>
1715 public class LanguageChangedEventArgs : EventArgs
1718 /// language changed.
1720 /// <since_tizen> 4 </since_tizen>
1721 public int LanguageChanged
1728 private delegate void LanguageChangedEventCallbackType(int languageChanged);
1729 private LanguageChangedEventCallbackType _languageChangedEventCallback;
1730 private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
1733 /// ImfManager language changed.
1735 /// <since_tizen> 4 </since_tizen>
1736 public event EventHandler<LanguageChangedEventArgs> LanguageChanged
1740 if (_languageChangedEventHandler == null)
1742 _languageChangedEventCallback = OnLanguageChanged;
1743 LanguageChangedSignal().Connect(_languageChangedEventCallback);
1746 _languageChangedEventHandler += value;
1750 _languageChangedEventHandler -= value;
1752 if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
1754 LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
1759 private void OnLanguageChanged(int languageChanged)
1761 LanguageChangedEventArgs e = new LanguageChangedEventArgs();
1762 e.LanguageChanged = languageChanged;
1764 if (_languageChangedEventHandler != null)
1766 _languageChangedEventHandler(this, e);
1771 /// ImfManager language changed signal.
1773 ///Please do not use! this will be internal
1774 /// <since_tizen> 3 </since_tizen>
1775 [Obsolete("Please do not use! This will be deprecated!")]
1776 [EditorBrowsable(EditorBrowsableState.Never)]
1777 public LanguageChangedSignalType LanguageChangedSignal()
1779 LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
1780 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1785 /// ImfManager keyboard type changed event arguments.
1787 /// <since_tizen> 4 </since_tizen>
1788 public class KeyboardTypeChangedEventArgs : EventArgs
1791 /// ImfManager keyboard type
1793 /// <since_tizen> 4 </since_tizen>
1794 public KeyboardType KeyboardType
1801 private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
1802 private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
1803 private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
1806 /// ImfManager keyboard type changed.
1808 /// <since_tizen> 4 </since_tizen>
1809 public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
1813 if (_keyboardTypeChangedEventHandler == null)
1815 _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
1816 KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
1819 _keyboardTypeChangedEventHandler += value;
1823 _keyboardTypeChangedEventHandler -= value;
1825 if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
1827 KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
1832 private void OnKeyboardTypeChanged(KeyboardType type)
1834 KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
1836 e.KeyboardType = type;
1838 if (_keyboardTypeChangedEventHandler != null)
1840 _keyboardTypeChangedEventHandler(this, e);
1844 internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
1846 KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
1847 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1852 /// The direction of the text.
1854 /// <since_tizen> 3 </since_tizen>
1855 public enum TextDirection
1868 /// Events that are generated by the IMF.
1870 /// <since_tizen> 3 </since_tizen>
1871 public enum ImfEvent
1876 /// <since_tizen> 4 </since_tizen>
1879 /// Pre-Edit changed.
1881 /// <since_tizen> 4 </since_tizen>
1884 /// Commit received.
1886 /// <since_tizen> 4 </since_tizen>
1889 /// An event to delete a range of characters from the string.
1891 /// <since_tizen> 4 </since_tizen>
1894 /// An event to query string and the cursor position.
1896 /// <since_tizen> 4 </since_tizen>
1899 /// Private command sent from the input panel.
1901 /// <since_tizen> 4 </since_tizen>
1906 /// Enumeration for the state of the input panel.
1908 /// <since_tizen> 3 </since_tizen>
1914 /// <since_tizen> 4 </since_tizen>
1917 /// Input panel is shown.
1919 /// <since_tizen> 4 </since_tizen>
1922 /// Input panel is hidden.
1924 /// <since_tizen> 4 </since_tizen>
1927 /// Input panel in process of being shown.
1929 /// <since_tizen> 4 </since_tizen>
1934 /// Enumeration for the types of keyboard.
1936 /// <since_tizen> 4 </since_tizen>
1937 public enum KeyboardType
1940 /// Software keyboard (virtual keyboard) is default.
1942 /// <since_tizen> 4 </since_tizen>
1945 /// Hardware keyboard.
1947 /// <since_tizen> 4 </since_tizen>