[EflSharp] Introduce EflSharp project (#749)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl_canvas_pointer.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 Canvas { 
8 /// <summary>Efl Canvas Pointer interface</summary>
9 [PointerNativeInherit]
10 public interface Pointer : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>Returns whether the mouse pointer is logically inside the canvas.
14 /// When this function is called it will return a value of either <c>false</c> or <c>true</c>, depending on whether a pointer,in or pointer,out event has been called previously.
15 /// 
16 /// A return value of <c>true</c> indicates the mouse is logically inside the canvas, and <c>false</c> implies it is logically outside the canvas.
17 /// 
18 /// A canvas begins with the mouse being assumed outside (<c>false</c>).</summary>
19 /// <param name="seat">The seat to consider, if <c>null</c> then the default seat will be used.</param>
20 /// <returns><c>true</c> if the mouse pointer is inside the canvas, <c>false</c> otherwise</returns>
21 bool GetPointerInside( Efl.Input.Device seat);
22    }
23 /// <summary>Efl Canvas Pointer interface</summary>
24 sealed public class PointerConcrete : 
25
26 Pointer
27    
28 {
29    ///<summary>Pointer to the native class description.</summary>
30    public System.IntPtr NativeClass {
31       get {
32          if (((object)this).GetType() == typeof (PointerConcrete))
33             return Efl.Canvas.PointerNativeInherit.GetEflClassStatic();
34          else
35             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
36       }
37    }
38    private  System.IntPtr handle;
39    ///<summary>Pointer to the native instance.</summary>
40    public System.IntPtr NativeHandle {
41       get { return handle; }
42    }
43    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
44       efl_canvas_pointer_interface_get();
45    ///<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>
46    public PointerConcrete(System.IntPtr raw)
47    {
48       handle = raw;
49       register_event_proxies();
50    }
51    ///<summary>Destructor.</summary>
52    ~PointerConcrete()
53    {
54       Dispose(false);
55    }
56    ///<summary>Releases the underlying native instance.</summary>
57    void Dispose(bool disposing)
58    {
59       if (handle != System.IntPtr.Zero) {
60          Efl.Eo.Globals.efl_unref(handle);
61          handle = System.IntPtr.Zero;
62       }
63    }
64    ///<summary>Releases the underlying native instance.</summary>
65    public void Dispose()
66    {
67       Dispose(true);
68       GC.SuppressFinalize(this);
69    }
70    ///<summary>Casts obj into an instance of this type.</summary>
71    public static PointerConcrete static_cast(Efl.Object obj)
72    {
73       if (obj == null)
74          throw new System.ArgumentNullException("obj");
75       return new PointerConcrete(obj.NativeHandle);
76    }
77    ///<summary>Verifies if the given object is equal to this one.</summary>
78    public override bool Equals(object obj)
79    {
80       var other = obj as Efl.Object;
81       if (other == null)
82          return false;
83       return this.NativeHandle == other.NativeHandle;
84    }
85    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
86    public override int GetHashCode()
87    {
88       return this.NativeHandle.ToInt32();
89    }
90    ///<summary>Turns the native pointer into a string representation.</summary>
91    public override String ToString()
92    {
93       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
94    }
95     void register_event_proxies()
96    {
97    }
98    /// <summary>Returns whether the mouse pointer is logically inside the canvas.
99    /// When this function is called it will return a value of either <c>false</c> or <c>true</c>, depending on whether a pointer,in or pointer,out event has been called previously.
100    /// 
101    /// A return value of <c>true</c> indicates the mouse is logically inside the canvas, and <c>false</c> implies it is logically outside the canvas.
102    /// 
103    /// A canvas begins with the mouse being assumed outside (<c>false</c>).</summary>
104    /// <param name="seat">The seat to consider, if <c>null</c> then the default seat will be used.</param>
105    /// <returns><c>true</c> if the mouse pointer is inside the canvas, <c>false</c> otherwise</returns>
106    public bool GetPointerInside( Efl.Input.Device seat) {
107                          var _ret_var = Efl.Canvas.PointerNativeInherit.efl_canvas_pointer_inside_get_ptr.Value.Delegate(this.NativeHandle, seat);
108       Eina.Error.RaiseIfUnhandledException();
109                   return _ret_var;
110  }
111 }
112 public class PointerNativeInherit  : Efl.Eo.NativeClass{
113    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
114    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
115    {
116       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
117       if (efl_canvas_pointer_inside_get_static_delegate == null)
118       efl_canvas_pointer_inside_get_static_delegate = new efl_canvas_pointer_inside_get_delegate(pointer_inside_get);
119       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_pointer_inside_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_pointer_inside_get_static_delegate)});
120       return descs;
121    }
122    public override IntPtr GetEflClass()
123    {
124       return Efl.Canvas.PointerConcrete.efl_canvas_pointer_interface_get();
125    }
126    public static  IntPtr GetEflClassStatic()
127    {
128       return Efl.Canvas.PointerConcrete.efl_canvas_pointer_interface_get();
129    }
130
131
132     [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_canvas_pointer_inside_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
133
134
135     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_canvas_pointer_inside_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Input.Device, Efl.Eo.NonOwnTag>))]  Efl.Input.Device seat);
136     public static Efl.Eo.FunctionWrapper<efl_canvas_pointer_inside_get_api_delegate> efl_canvas_pointer_inside_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_pointer_inside_get_api_delegate>(_Module, "efl_canvas_pointer_inside_get");
137     private static bool pointer_inside_get(System.IntPtr obj, System.IntPtr pd,  Efl.Input.Device seat)
138    {
139       Eina.Log.Debug("function efl_canvas_pointer_inside_get was called");
140       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
141       if(wrapper != null) {
142                                     bool _ret_var = default(bool);
143          try {
144             _ret_var = ((Pointer)wrapper).GetPointerInside( seat);
145          } catch (Exception e) {
146             Eina.Log.Warning($"Callback error: {e.ToString()}");
147             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
148          }
149                   return _ret_var;
150       } else {
151          return efl_canvas_pointer_inside_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  seat);
152       }
153    }
154    private static efl_canvas_pointer_inside_get_delegate efl_canvas_pointer_inside_get_static_delegate;
155 }
156 } }