1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
8 /// <summary>Bidirectionaltext type</summary>
9 public enum TextBidirectionalType
11 /// <summary>Natural text type, same as neutral</summary>
13 /// <summary>Neutral text type, same as natural</summary>
15 /// <summary>Left to right text type</summary>
17 /// <summary>Right to left text type</summary>
19 /// <summary>Inherit text type</summary>
21 /// <summary>@internal EVAS_BIDI_DIRECTION_ANY_RTL is not made for public. It should be opened to public when it is accepted to EFL upstream.</summary>
25 namespace Efl { namespace Ui {
26 /// <summary>This structure includes all the information about content changes.
27 /// It's meant to be used to implement undo/redo.</summary>
28 [StructLayout(LayoutKind.Sequential)]
29 public struct TextChangeInfo
31 /// <summary>The content added/removed</summary>
32 public System.String Content;
33 /// <summary>The position where it was added/removed</summary>
35 /// <summary>The length of content in characters (not bytes, actual unicode characters)</summary>
37 /// <summary><c>true</c> if the content was inserted, <c>false</c> if removei</summary>
39 /// <summary><c>true</c> if can be merged with the previous one. Used for example with insertion when something is already selected</summary>
41 ///<summary>Constructor for TextChangeInfo.</summary>
42 public TextChangeInfo(
43 System.String Content=default(System.String),
44 uint Position=default(uint),
45 uint Length=default(uint),
46 bool Insert=default(bool),
47 bool Merge=default(bool) )
49 this.Content = Content;
50 this.Position = Position;
56 public static implicit operator TextChangeInfo(IntPtr ptr)
58 var tmp = (TextChangeInfo.NativeStruct)Marshal.PtrToStructure(ptr, typeof(TextChangeInfo.NativeStruct));
62 ///<summary>Internal wrapper for struct TextChangeInfo.</summary>
63 [StructLayout(LayoutKind.Sequential)]
64 public struct NativeStruct
66 ///<summary>Internal wrapper for field Content</summary>
67 public System.IntPtr Content;
72 ///<summary>Internal wrapper for field Insert</summary>
73 public System.Byte Insert;
74 ///<summary>Internal wrapper for field Merge</summary>
75 public System.Byte Merge;
76 ///<summary>Implicit conversion to the internal/marshalling representation.</summary>
77 public static implicit operator TextChangeInfo.NativeStruct(TextChangeInfo _external_struct)
79 var _internal_struct = new TextChangeInfo.NativeStruct();
80 _internal_struct.Content = Eina.MemoryNative.StrDup(_external_struct.Content);
81 _internal_struct.Position = _external_struct.Position;
82 _internal_struct.Length = _external_struct.Length;
83 _internal_struct.Insert = _external_struct.Insert ? (byte)1 : (byte)0;
84 _internal_struct.Merge = _external_struct.Merge ? (byte)1 : (byte)0;
85 return _internal_struct;
88 ///<summary>Implicit conversion to the managed representation.</summary>
89 public static implicit operator TextChangeInfo(TextChangeInfo.NativeStruct _internal_struct)
91 var _external_struct = new TextChangeInfo();
92 _external_struct.Content = Eina.StringConversion.NativeUtf8ToManagedString(_internal_struct.Content);
93 _external_struct.Position = _internal_struct.Position;
94 _external_struct.Length = _internal_struct.Length;
95 _external_struct.Insert = _internal_struct.Insert != 0;
96 _external_struct.Merge = _internal_struct.Merge != 0;
97 return _external_struct;