[NUI] Add Tizen.NUI.CommonUI project (#883)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_page_transition.eo.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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Page {
11
12 /// <summary>Page transition for <see cref="Efl.Ui.Pager"/>
13 /// A page transition is essential to <see cref="Efl.Ui.Pager"/> object and invoked whenever pages are rearranged or scrolled (see <see cref="Efl.Ui.Pager"/>).</summary>
14 [Efl.Page.Transition.NativeMethods]
15 public class Transition : Efl.Object, Efl.Eo.IWrapper
16 {
17     ///<summary>Pointer to the native class description.</summary>
18     public override System.IntPtr NativeClass
19     {
20         get
21         {
22             if (((object)this).GetType() == typeof(Transition))
23             {
24                 return GetEflClassStatic();
25             }
26             else
27             {
28                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
29             }
30         }
31     }
32
33     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
34         efl_page_transition_class_get();
35     /// <summary>Initializes a new instance of the <see cref="Transition"/> class.</summary>
36     /// <param name="parent">Parent instance.</param>
37     public Transition(Efl.Object parent= null
38             ) : base(efl_page_transition_class_get(), typeof(Transition), parent)
39     {
40         FinishInstantiation();
41     }
42
43     /// <summary>Initializes a new instance of the <see cref="Transition"/> class.
44     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
45     /// <param name="raw">The native pointer to be wrapped.</param>
46     protected Transition(System.IntPtr raw) : base(raw)
47     {
48             }
49
50     /// <summary>Initializes a new instance of the <see cref="Transition"/> class.
51     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
52     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
53     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
54     /// <param name="parent">The Efl.Object parent of this instance.</param>
55     protected Transition(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
56     {
57     }
58
59     /// <summary>Verifies if the given object is equal to this one.</summary>
60     /// <param name="instance">The object to compare to.</param>
61     /// <returns>True if both objects point to the same native object.</returns>
62     public override bool Equals(object instance)
63     {
64         var other = instance as Efl.Object;
65         if (other == null)
66         {
67             return false;
68         }
69         return this.NativeHandle == other.NativeHandle;
70     }
71
72     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
73     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
74     public override int GetHashCode()
75     {
76         return this.NativeHandle.ToInt32();
77     }
78
79     /// <summary>Turns the native pointer into a string representation.</summary>
80     /// <returns>A string with the type and the native pointer for this object.</returns>
81     public override String ToString()
82     {
83         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
84     }
85
86     /// <summary>set object</summary>
87     /// <param name="pager">pager object</param>
88     /// <param name="group">a dummy object for layer adjustment</param>
89     virtual public void Bind(Efl.Ui.Pager pager, Efl.Canvas.Group group) {
90                                                          Efl.Page.Transition.NativeMethods.efl_page_transition_bind_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),pager, group);
91         Eina.Error.RaiseIfUnhandledException();
92                                          }
93     private static IntPtr GetEflClassStatic()
94     {
95         return Efl.Page.Transition.efl_page_transition_class_get();
96     }
97     /// <summary>Wrapper for native methods and virtual method delegates.
98     /// For internal use by generated code only.</summary>
99     public new class NativeMethods : Efl.Object.NativeMethods
100     {
101         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
102         /// <summary>Gets the list of Eo operations to override.</summary>
103         /// <returns>The list of Eo operations to be overload.</returns>
104         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
105         {
106             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
107             var methods = Efl.Eo.Globals.GetUserMethods(type);
108
109             if (efl_page_transition_bind_static_delegate == null)
110             {
111                 efl_page_transition_bind_static_delegate = new efl_page_transition_bind_delegate(bind);
112             }
113
114             if (methods.FirstOrDefault(m => m.Name == "Bind") != null)
115             {
116                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_page_transition_bind"), func = Marshal.GetFunctionPointerForDelegate(efl_page_transition_bind_static_delegate) });
117             }
118
119             descs.AddRange(base.GetEoOps(type));
120             return descs;
121         }
122         /// <summary>Returns the Eo class for the native methods of this class.</summary>
123         /// <returns>The native class pointer.</returns>
124         public override IntPtr GetEflClass()
125         {
126             return Efl.Page.Transition.efl_page_transition_class_get();
127         }
128
129         #pragma warning disable CA1707, SA1300, SA1600
130
131         
132         private delegate void efl_page_transition_bind_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Ui.Pager pager, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Group group);
133
134         
135         public delegate void efl_page_transition_bind_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Ui.Pager pager, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Group group);
136
137         public static Efl.Eo.FunctionWrapper<efl_page_transition_bind_api_delegate> efl_page_transition_bind_ptr = new Efl.Eo.FunctionWrapper<efl_page_transition_bind_api_delegate>(Module, "efl_page_transition_bind");
138
139         private static void bind(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Pager pager, Efl.Canvas.Group group)
140         {
141             Eina.Log.Debug("function efl_page_transition_bind was called");
142             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
143             if (wrapper != null)
144             {
145                                                             
146                 try
147                 {
148                     ((Transition)wrapper).Bind(pager, group);
149                 }
150                 catch (Exception e)
151                 {
152                     Eina.Log.Warning($"Callback error: {e.ToString()}");
153                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
154                 }
155
156                                         
157             }
158             else
159             {
160                 efl_page_transition_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), pager, group);
161             }
162         }
163
164         private static efl_page_transition_bind_delegate efl_page_transition_bind_static_delegate;
165
166         #pragma warning restore CA1707, SA1300, SA1600
167
168 }
169 }
170 }
171
172 }
173