-/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
namespace Tizen.NUI
{
/// <summary>
- /// Specifically manages the ecore input method framework which enables the virtual or hardware keyboards.
+ /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
/// </summary>
public class ImfManager : BaseHandle
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
+ /// <summary>
+ /// Dispose
+ /// </summary>
+ /// <param name="type">Dispose Type</param>
+ /// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
if (disposed)
public class ImfEventData : global::System.IDisposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ /// <summary>
+ /// swigCMemOwn
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected bool swigCMemOwn;
internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
//A Flag to check who called Dispose(). (By User or DisposeQueue)
private bool isDisposeQueued = false;
- //A Flat to check if it is already disposed.
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected bool disposed = false;
-
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
~ImfEventData()
{
if (!isDisposeQueued)
/// <summary>
/// The dispose pattern.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Dispose()
{
//Throw excpetion if Dispose() is called in separate thread.
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(DisposeTypes type)
{
if (disposed)
/// <summary>
/// The default constructor.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <param name="aPredictiveString">The pre-edit or the commit string.</param>
/// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
/// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
+ /// <since_tizen> 3 </since_tizen>
public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <summary>
/// The pre-edit or the commit string.
/// </summary>
- //Please do not use! this will be deprecated
+ /// /// <since_tizen> 3 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
public string predictiveString
{
/// <summary>
/// The pre-edit or the commit string.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public string PredictiveString
{
set
/// <summary>
/// The name of the event from the IMF.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public ImfManager.ImfEvent EventName
{
set
/// <summary>
/// The start position from the current cursor position to start deleting characters.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public int CursorOffset
{
set
/// <summary>
/// The number of characters to delete from the cursorOffset.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public int NumberOfChars
{
set
public class ImfCallbackData : global::System.IDisposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ /// <summary>
+ /// swigCMemOwn
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected bool swigCMemOwn;
internal IntPtr GetImfCallbackDataPtr()
//A Flag to check who called Dispose(). (By User or DisposeQueue)
private bool isDisposeQueued = false;
- //A Flat to check if it is already disposed.
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected bool disposed = false;
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
~ImfCallbackData()
{
if (!isDisposeQueued)
/// <summary>
/// The dispose pattern.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Dispose()
{
//Throw excpetion if Dispose() is called in separate thread.
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(DisposeTypes type)
{
if (disposed)
/// <summary>
/// The default constructor.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <param name="aCursorPosition">The new position of the cursor.</param>
/// <param name="aCurrentText">The current text string.</param>
/// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
+ /// <since_tizen> 3 </since_tizen>
public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <summary>
/// The current text string.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public string CurrentText
{
set
/// <summary>
/// The current text string.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public int CursorPosition
{
set
/// <summary>
/// If the cursor position needs to be updated.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public bool Update
{
set
/// <summary>
/// Flags if preedit reset is required.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public bool PreeditResetRequired
{
set
}
/// <summary>
+ /// Finalize the IMF.<br/>
+ /// </summary>
+ public void Finalize()
+ {
+ NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Retrieves a handle to the instance of the ImfManager.
/// </summary>
/// <returns>A handle to the ImfManager.</returns>
+ /// <since_tizen> 3 </since_tizen>
public static ImfManager Get()
{
ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
/// It means that the text editing is started somewhere.<br/>
/// If the hardware keyboard isn't connected, then it will show the virtual keyboard.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Activate()
{
NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
/// Deactivates the IMF.<br/>
/// It means that the text editing is finished somewhere.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Deactivate()
{
NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
/// If true, then the keyboard will be restored (activated) after focus is regained.
/// </summary>
/// <returns>The restoration status.</returns>
+ /// <since_tizen> 3 </since_tizen>
public bool RestoreAfterFocusLost()
{
bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
/// Sets the status whether the IMF has to restore the keyboard after losing focus.
/// </summary>
/// <param name="toggle">True means that keyboard should be restored after the focus is lost and regained.</param>
+ /// <since_tizen> 3 </since_tizen>
public void SetRestoreAfterFocusLost(bool toggle)
{
NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
/// <summary>
/// Sends a message reset to the preedit state or the IMF module.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public new void Reset()
{
NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
/// <summary>
/// Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void NotifyCursorPosition()
{
NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
/// Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
/// </summary>
/// <param name="cursorPosition">The position of the cursor.</param>
+ /// <since_tizen> 3 </since_tizen>
public void SetCursorPosition(uint cursorPosition)
{
NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
/// Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
/// </summary>
/// <returns>The current position of the cursor.</returns>
+ /// <since_tizen> 3 </since_tizen>
public uint GetCursorPosition()
{
uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
/// A method to store the string required by the IMF, this is used to provide predictive word suggestions.
/// </summary>
/// <param name="text">The text string surrounding the current cursor point.</param>
+ /// <since_tizen> 3 </since_tizen>
public void SetSurroundingText(string text)
{
NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
/// Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
/// </summary>
/// <returns>The surrounding text.</returns>
+ /// <since_tizen> 3 </since_tizen>
public string GetSurroundingText()
{
string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
/// Notifies the IMF context that text input is set to multiline or not.
/// </summary>
/// <param name="multiLine">True if multiline text input is used.</param>
+ /// <since_tizen> 3 </since_tizen>
public void NotifyTextInputMultiLine(bool multiLine)
{
NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
/// Returns the text direction of the keyboard's current input language.
/// </summary>
/// <returns>The direction of the text.</returns>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager.TextDirection GetTextDirection()
{
ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
/// the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
/// </summary>
/// <returns>Rectangle which is keyboard panel x, y, width, height.</returns>
+ /// <since_tizen> 3 </since_tizen>
public Rectangle GetInputMethodArea()
{
Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
/// Sets up the input-panel specific data.
/// </summary>
/// <param name="text">The specific data to be set to the input panel.</param>
+ /// <since_tizen> 3 </since_tizen>
public void SetInputPanelUserData(string text)
{
NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
/// Gets the specific data of the current active input panel.
/// </summary>
/// <param name="text">The specific data to be received from the input panel.</param>
+ /// <since_tizen> 3 </since_tizen>
public void GetInputPanelUserData(out string text)
{
NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
/// Gets the state of the current active input panel.
/// </summary>
/// <returns>The state of the input panel.</returns>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager.State GetInputPanelState()
{
ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
/// The default is true.
/// </summary>
/// <param name="visible">True if the return key is visible (enabled), false otherwise.</param>
+ /// <since_tizen> 3 </since_tizen>
public void SetReturnKeyState(bool visible)
{
NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
/// Enables to show the input panel automatically when focused.
/// </summary>
/// <param name="enabled">If true, the input panel will be shown when focused.</param>
+ /// <since_tizen> 3 </since_tizen>
public void AutoEnableInputPanel(bool enabled)
{
NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
/// <summary>
/// Shows the input panel.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void ShowInputPanel()
{
NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
/// <summary>
/// Hides the input panel.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void HideInputPanel()
{
NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
/// The default keyboard type is SoftwareKeyboard.
/// </summary>
/// <returns>The keyboard type.</returns>
+ /// <since_tizen> 4 </since_tizen>
public ImfManager.KeyboardType GetKeyboardType()
{
ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
/// For example, en_US, en_GB, en_PH, fr_FR, ...
/// </summary>
/// <returns>The current language locale of the input panel.</returns>
+ /// <since_tizen> 4 </since_tizen>
public string GetInputPanelLocale()
{
string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
/// <summary>
/// The constructor.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
[EditorBrowsable(EditorBrowsableState.Never)]
public class ImfManagerActivatedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
/// </summary>
public class ActivatedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
/// <summary>
/// ImfManager activated.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<ActivatedEventArgs> Activated
{
add
[EditorBrowsable(EditorBrowsableState.Never)]
public class ImfManagerEventReceivedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
/// </summary>
public class EventReceivedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
set;
}
+ /// <summary>
+ /// ImfEventData
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfEventData ImfEventData
{
get;
/// <summary>
/// ImfManager event received.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
{
add
/// <summary>
/// ImfManager event received signal.
/// </summary>
- //Please do not use! this will be internal
- [EditorBrowsable(EditorBrowsableState.Never)]
+ //Please do not use! this will be internal
+ [EditorBrowsable(EditorBrowsableState.Never)]
public ImfEventSignalType EventReceivedSignal()
{
ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
[EditorBrowsable(EditorBrowsableState.Never)]
public class ImfManagerStatusChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
/// </summary>
public class StatusChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager status
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public bool StatusChanged
{
get;
/// <summary>
/// ImfManager status changed.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<StatusChangedEventArgs> StatusChanged
{
add
[EditorBrowsable(EditorBrowsableState.Never)]
public class ImfManagerResizedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
}
}
- private delegate void ResizedEventCallbackType();
+ /// <summary>
+ /// ImfManager resized event.
+ /// </summary>
+ public class ResizedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// resized.
+ /// </summary>
+ public int Resized
+ {
+ get;
+ set;
+ }
+ }
+
+ private delegate void ResizedEventCallbackType(int resized);
private ResizedEventCallbackType _resizedEventCallback;
- private event EventHandler _resizedEventHandler;
+ private event EventHandler<ResizedEventArgs> _resizedEventHandler;
/// <summary>
/// ImfManager resized.
/// </summary>
- public event EventHandler Resized
+ /// <since_tizen> 4 </since_tizen>
+ public event EventHandler<ResizedEventArgs> Resized
{
add
{
}
}
- private void OnResized()
+ private void OnResized(int resized)
{
+ ResizedEventArgs e = new ResizedEventArgs();
+ e.Resized = resized;
+
if (_resizedEventHandler != null)
{
- _resizedEventHandler(this, null);
+ _resizedEventHandler(this, e);
}
}
/// </summary>
//Please do not use! this will be internal
[EditorBrowsable(EditorBrowsableState.Never)]
- public ImfVoidSignalType ResizedSignal()
+ public KeyboardResizedSignalType ResizedSignal()
{
- ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
+ KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public class ImfManagerLanguageChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public ImfManager ImfManager
{
get;
}
}
- private delegate void LanguageChangedEventCallbackType();
+ /// <summary>
+ /// ImfManager language changed event args.
+ /// </summary>
+ public class LanguageChangedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// language changed.
+ /// </summary>
+ public int LanguageChanged
+ {
+ get;
+ set;
+ }
+ }
+
+ private delegate void LanguageChangedEventCallbackType(int languageChanged);
private LanguageChangedEventCallbackType _languageChangedEventCallback;
- private event EventHandler _languageChangedEventHandler;
+ private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
/// <summary>
/// ImfManager language changed.
/// </summary>
- public event EventHandler LanguageChanged
+ /// <since_tizen> 4 </since_tizen>
+ public event EventHandler<LanguageChangedEventArgs> LanguageChanged
{
add
{
}
}
- private void OnLanguageChanged()
+ private void OnLanguageChanged(int languageChanged)
{
+ LanguageChangedEventArgs e = new LanguageChangedEventArgs();
+ e.LanguageChanged = languageChanged;
+
if (_languageChangedEventHandler != null)
{
- _languageChangedEventHandler(this, null);
+ _languageChangedEventHandler(this, e);
}
}
/// </summary>
//Please do not use! this will be internal
[EditorBrowsable(EditorBrowsableState.Never)]
- public ImfVoidSignalType LanguageChangedSignal()
+ public LanguageChangedSignalType LanguageChangedSignal()
{
- ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
+ LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// </summary>
public class KeyboardTypeChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// ImfManager keyboard type
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public KeyboardType KeyboardType
{
get;
/// <summary>
/// ImfManager keyboard type changed.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
{
add
/// <summary>
/// The direction of the text.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public enum TextDirection
{
/// <summary>
/// <summary>
/// Events that are generated by the IMF.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum ImfEvent
{
/// <summary>
/// </summary>
Preedit,
/// <summary>
- /// Commit recieved.
+ /// Commit received.
/// </summary>
Commit,
/// <summary>
/// <summary>
/// Enumeration for the state of the input panel.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum State
{
/// <summary>
/// <summary>
/// Enumeration for the types of keyboard.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum KeyboardType
{
/// <summary>
HardwareKeyboard
}
}
-}
+}
\ No newline at end of file