[NUI] Sync dalihub - Add C# layout (#816)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_average_model.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.ComponentModel;
7 namespace Efl { namespace Ui { 
8 /// <summary>Class to be used to store object item size for List/Grid View.
9 /// This model provide the same feature as <see cref="Efl.Ui.ExactModel"/> except for the <see cref="Efl.IModel.GetProperty"/> &quot;<c>total</c>.width&quot; and &quot;<c>total</c>.height&quot; which reflect an estimated value of the total size by using the currently know size from its children as an average size for all its children. As more children fill &quot;<c>self</c>.width&quot; and &quot;<c>self</c>.height&quot;, this model will figure out a more precise answer. Once all children size is known, the result will be exact and the same as <see cref="Efl.Ui.ExactModel"/>.
10 /// 
11 /// This model only supporting vertical list at this point.</summary>
12 [AverageModelNativeInherit]
13 public class AverageModel : Efl.Ui.ExactModel, Efl.Eo.IWrapper
14 {
15     ///<summary>Pointer to the native class description.</summary>
16     public override System.IntPtr NativeClass {
17         get {
18             if (((object)this).GetType() == typeof (AverageModel))
19                 return Efl.Ui.AverageModelNativeInherit.GetEflClassStatic();
20             else
21                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
22         }
23     }
24     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
25         efl_ui_average_model_class_get();
26     ///<summary>Creates a new instance.</summary>
27     ///<param name="parent">Parent instance.</param>
28     ///<param name="model">Model that is/will be See <see cref="Efl.Ui.IView.SetModel"/></param>
29     ///<param name="index">Position of this object in the parent model. See <see cref="Efl.CompositeModel.SetIndex"/></param>
30     public AverageModel(Efl.Object parent
31             , Efl.IModel model, uint? index = null) :
32         base(efl_ui_average_model_class_get(), typeof(AverageModel), parent)
33     {
34         if (Efl.Eo.Globals.ParamHelperCheck(model))
35             SetModel(Efl.Eo.Globals.GetParamHelper(model));
36         if (Efl.Eo.Globals.ParamHelperCheck(index))
37             SetIndex(Efl.Eo.Globals.GetParamHelper(index));
38         FinishInstantiation();
39     }
40     ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
41     protected AverageModel(System.IntPtr raw) : base(raw)
42     {
43                 RegisterEventProxies();
44     }
45     ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
46     protected AverageModel(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
47     ///<summary>Verifies if the given object is equal to this one.</summary>
48     public override bool Equals(object obj)
49     {
50         var other = obj as Efl.Object;
51         if (other == null)
52             return false;
53         return this.NativeHandle == other.NativeHandle;
54     }
55     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
56     public override int GetHashCode()
57     {
58         return this.NativeHandle.ToInt32();
59     }
60     ///<summary>Turns the native pointer into a string representation.</summary>
61     public override String ToString()
62     {
63         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
64     }
65     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
66     protected override void RegisterEventProxies()
67     {
68         base.RegisterEventProxies();
69     }
70     private static IntPtr GetEflClassStatic()
71     {
72         return Efl.Ui.AverageModel.efl_ui_average_model_class_get();
73     }
74 }
75 public class AverageModelNativeInherit : Efl.Ui.ExactModelNativeInherit{
76     public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
77     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
78     {
79         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
80         var methods = Efl.Eo.Globals.GetUserMethods(type);
81         descs.AddRange(base.GetEoOps(type));
82         return descs;
83     }
84     public override IntPtr GetEflClass()
85     {
86         return Efl.Ui.AverageModel.efl_ui_average_model_class_get();
87     }
88     public static new  IntPtr GetEflClassStatic()
89     {
90         return Efl.Ui.AverageModel.efl_ui_average_model_class_get();
91     }
92 }
93 } }