4501020e01e261b6c6555c272a80f5e0d1d6a216
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_text_types.eot.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { 
8 /// <summary>Bidirectionaltext type</summary>
9 public enum TextBidirectionalType
10 {
11 /// <summary>Natural text type, same as neutral</summary>
12 Natural = 0,
13 /// <summary>Neutral text type, same as natural</summary>
14 Neutral = 0,
15 /// <summary>Left to right text type</summary>
16 Ltr = 1,
17 /// <summary>Right to left text type</summary>
18 Rtl = 2,
19 /// <summary>Inherit text type</summary>
20 Inherit = 3,
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>
22 AnyRtl = 4,
23 }
24
25 namespace Efl { namespace Ui { 
26 /// <summary>This structure includes all the information about content changes.
27 /// It&apos;s meant to be used to implement undo/redo.</summary>
28 [StructLayout(LayoutKind.Sequential)]
29 public struct TextChangeInfo
30 {
31     /// <summary>The content added/removed</summary>
32     public System.String Content;
33     /// <summary>The position where it was added/removed</summary>
34     public uint Position;
35     /// <summary>The length of content in characters (not bytes, actual unicode characters)</summary>
36     public uint Length;
37     /// <summary><c>true</c> if the content was inserted, <c>false</c> if removei</summary>
38     public bool Insert;
39     /// <summary><c>true</c> if can be merged with the previous one. Used for example with insertion when something is already selected</summary>
40     public bool Merge;
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)    )
48     {
49         this.Content = Content;
50         this.Position = Position;
51         this.Length = Length;
52         this.Insert = Insert;
53         this.Merge = Merge;
54     }
55
56     public static implicit operator TextChangeInfo(IntPtr ptr)
57     {
58         var tmp = (TextChangeInfo.NativeStruct)Marshal.PtrToStructure(ptr, typeof(TextChangeInfo.NativeStruct));
59         return tmp;
60     }
61
62     ///<summary>Internal wrapper for struct TextChangeInfo.</summary>
63     [StructLayout(LayoutKind.Sequential)]
64     public struct NativeStruct
65     {
66         ///<summary>Internal wrapper for field Content</summary>
67         public System.IntPtr Content;
68         
69         public uint Position;
70         
71         public uint Length;
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)
78         {
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;
86         }
87
88         ///<summary>Implicit conversion to the managed representation.</summary>
89         public static implicit operator TextChangeInfo(TextChangeInfo.NativeStruct _internal_struct)
90         {
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;
98         }
99
100     }
101
102 }
103
104 } }