[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_InputStyleChangedSignal")]
public static extern global::System.IntPtr InputStyleChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_CursorPositionChangedSignal")]
+ public static extern global::System.IntPtr CursorPositionChangedSignal(global::System.Runtime.InteropServices.HandleRef pTextEditor);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_MaxLengthReachedSignal")]
public static extern global::System.IntPtr MaxLengthReachedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_TextChangedSignal")]
public static extern global::System.IntPtr TextChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_CursorPositionChangedSignal")]
+ public static extern global::System.IntPtr CursorPositionChangedSignal(global::System.Runtime.InteropServices.HandleRef pTextField);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_MaxLengthReachedSignal")]
public static extern global::System.IntPtr MaxLengthReachedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
{
this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
}
+
+ if (textEditorCursorPositionChangedCallbackDelegate != null)
+ {
+ this.CursorPositionChangedSignal().Disconnect(textEditorCursorPositionChangedCallbackDelegate);
+ }
}
base.Dispose(type);
private EventHandler<ScrollStateChangedEventArgs> textEditorScrollStateChangedEventHandler;
private ScrollStateChangedCallbackDelegate textEditorScrollStateChangedCallbackDelegate;
+ private EventHandler<CursorPositionChangedEventArgs> textEditorCursorPositionChangedEventHandler;
+ private CursorPositionChangedCallbackDelegate textEditorCursorPositionChangedCallbackDelegate;
+
private EventHandler<MaxLengthReachedEventArgs> textEditorMaxLengthReachedEventHandler;
private MaxLengthReachedCallbackDelegate textEditorMaxLengthReachedCallbackDelegate;
private delegate void ScrollStateChangedCallbackDelegate(IntPtr textEditor, ScrollState state);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void CursorPositionChangedCallbackDelegate(IntPtr textEditor, uint oldPosition);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void MaxLengthReachedCallbackDelegate(IntPtr textEditor);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
}
/// <summary>
+ /// The CursorPositionChanged event.
+ /// </summary>
+ /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<CursorPositionChangedEventArgs> CursorPositionChanged
+ {
+ add
+ {
+ if (textEditorCursorPositionChangedEventHandler == null)
+ {
+ textEditorCursorPositionChangedCallbackDelegate = (OnCursorPositionChanged);
+ CursorPositionChangedSignal().Connect(textEditorCursorPositionChangedCallbackDelegate);
+ }
+ textEditorCursorPositionChangedEventHandler += value;
+ }
+ remove
+ {
+ if (textEditorCursorPositionChangedEventHandler == null && CursorPositionChangedSignal().Empty() == false)
+ {
+ this.CursorPositionChangedSignal().Disconnect(textEditorCursorPositionChangedCallbackDelegate);
+ }
+ textEditorCursorPositionChangedEventHandler -= value;
+ }
+ }
+
+ /// <summary>
/// The MaxLengthReached event.
/// </summary>
/// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
return ret;
}
+ internal TextEditorSignal CursorPositionChangedSignal()
+ {
+ TextEditorSignal ret = new TextEditorSignal(Interop.TextEditor.CursorPositionChangedSignal(SwigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
internal TextEditorSignal MaxLengthReachedSignal()
{
TextEditorSignal ret = new TextEditorSignal(Interop.TextEditor.MaxLengthReachedSignal(SwigCPtr), false);
}
}
+ private void OnCursorPositionChanged(IntPtr textEditor, uint oldPosition)
+ {
+ if (textEditorCursorPositionChangedEventHandler != null)
+ {
+ CursorPositionChangedEventArgs e = new CursorPositionChangedEventArgs();
+
+ // Populate all members of "e" (CursorPositionChangedEventArgs) with real data
+ e.OldCursorPosition = oldPosition;
+
+ //here we send all data to user event handlers
+ textEditorCursorPositionChangedEventHandler?.Invoke(this, e);
+ }
+ }
+
private void OnMaxLengthReached(IntPtr textEditor)
{
if (textEditorMaxLengthReachedEventHandler != null)
[EditorBrowsable(EditorBrowsableState.Never)]
public InputFilterType Type { get; set; }
}
+
+ /// <summary>
+ /// The CursorPositionChanged event arguments.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class CursorPositionChangedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// cursor postion before the change.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint OldCursorPosition { get; set; }
+ }
}
\ No newline at end of file
//because the execution order of Finalizes is non-deterministic.
if (this.HasBody())
{
+ if (textFieldCursorPositionChangedCallbackDelegate != null)
+ {
+ this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate);
+ }
+
if (textFieldMaxLengthReachedCallbackDelegate != null)
{
this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
{
private EventHandler<TextChangedEventArgs> textFieldTextChangedEventHandler;
private TextChangedCallbackDelegate textFieldTextChangedCallbackDelegate;
+ private EventHandler<CursorPositionChangedEventArgs> textFieldCursorPositionChangedEventHandler;
+ private CursorPositionChangedCallbackDelegate textFieldCursorPositionChangedCallbackDelegate;
private EventHandler<MaxLengthReachedEventArgs> textFieldMaxLengthReachedEventHandler;
private MaxLengthReachedCallbackDelegate textFieldMaxLengthReachedCallbackDelegate;
private EventHandler<AnchorClickedEventArgs> textFieldAnchorClickedEventHandler;
private delegate void TextChangedCallbackDelegate(IntPtr textField);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void CursorPositionChangedCallbackDelegate(IntPtr textField, uint oldPosition);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
}
/// <summary>
+ /// The CursorPositionChanged event.
+ /// </summary>
+ /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<CursorPositionChangedEventArgs> CursorPositionChanged
+ {
+ add
+ {
+ if (textFieldCursorPositionChangedEventHandler == null)
+ {
+ textFieldCursorPositionChangedCallbackDelegate = (OnCursorPositionChanged);
+ CursorPositionChangedSignal().Connect(textFieldCursorPositionChangedCallbackDelegate);
+ }
+ textFieldCursorPositionChangedEventHandler += value;
+ }
+ remove
+ {
+ if (textFieldCursorPositionChangedEventHandler == null && CursorPositionChangedSignal().Empty() == false)
+ {
+ this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate);
+ }
+ textFieldCursorPositionChangedEventHandler -= value;
+ }
+ }
+
+ /// <summary>
/// The MaxLengthReached event.
/// </summary>
/// <since_tizen> 3 </since_tizen>
return ret;
}
+ internal TextFieldSignal CursorPositionChangedSignal()
+ {
+ TextFieldSignal ret = new TextFieldSignal(Interop.TextField.CursorPositionChangedSignal(SwigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
internal TextFieldSignal MaxLengthReachedSignal()
{
TextFieldSignal ret = new TextFieldSignal(Interop.TextField.MaxLengthReachedSignal(SwigCPtr), false);
}
}
+ private void OnCursorPositionChanged(IntPtr textField, uint oldPosition)
+ {
+ if (textFieldCursorPositionChangedEventHandler != null)
+ {
+ CursorPositionChangedEventArgs e = new CursorPositionChangedEventArgs();
+
+ // Populate all members of "e" (CursorPositionChangedEventArgs) with real data
+ e.OldCursorPosition = oldPosition;
+
+ //here we send all data to user event handlers
+ textFieldCursorPositionChangedEventHandler?.Invoke(this, e);
+ }
+ }
+
private void OnMaxLengthReached(IntPtr textField)
{
if (textFieldMaxLengthReachedEventHandler != null)