f7a13bbf5294ccb2c01a94d92ec8255d9be6238c
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_playable.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 { 
8 /// <summary>Efl media playable interface</summary>
9 [IPlayableNativeInherit]
10 public interface IPlayable : 
11     Efl.Eo.IWrapper, IDisposable
12 {
13     /// <summary>Get the length of play for the media file.</summary>
14 /// <returns>The length of the stream in seconds.</returns>
15 double GetLength();
16     /// <summary></summary>
17 /// <returns></returns>
18 bool GetPlayable();
19     /// <summary>Get whether the media file is seekable.</summary>
20 /// <returns><c>true</c> if seekable.</returns>
21 bool GetSeekable();
22                 /// <summary>Get the length of play for the media file.</summary>
23 /// <value>The length of the stream in seconds.</value>
24     double Length {
25         get ;
26     }
27     /// <summary></summary>
28 /// <value></value>
29     bool Playable {
30         get ;
31     }
32     /// <summary>Get whether the media file is seekable.</summary>
33 /// <value><c>true</c> if seekable.</value>
34     bool Seekable {
35         get ;
36     }
37 }
38 /// <summary>Efl media playable interface</summary>
39 sealed public class IPlayableConcrete : 
40
41 IPlayable
42     
43 {
44     ///<summary>Pointer to the native class description.</summary>
45     public System.IntPtr NativeClass {
46         get {
47             if (((object)this).GetType() == typeof (IPlayableConcrete))
48                 return Efl.IPlayableNativeInherit.GetEflClassStatic();
49             else
50                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
51         }
52     }
53     private  System.IntPtr handle;
54     ///<summary>Pointer to the native instance.</summary>
55     public System.IntPtr NativeHandle {
56         get { return handle; }
57     }
58     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
59         efl_playable_interface_get();
60     ///<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>
61     private IPlayableConcrete(System.IntPtr raw)
62     {
63         handle = raw;
64         RegisterEventProxies();
65     }
66     ///<summary>Destructor.</summary>
67     ~IPlayableConcrete()
68     {
69         Dispose(false);
70     }
71     ///<summary>Releases the underlying native instance.</summary>
72     void Dispose(bool disposing)
73     {
74         if (handle != System.IntPtr.Zero) {
75             Efl.Eo.Globals.efl_unref(handle);
76             handle = System.IntPtr.Zero;
77         }
78     }
79     ///<summary>Releases the underlying native instance.</summary>
80     public void Dispose()
81     {
82         Dispose(true);
83         GC.SuppressFinalize(this);
84     }
85     ///<summary>Verifies if the given object is equal to this one.</summary>
86     public override bool Equals(object obj)
87     {
88         var other = obj as Efl.Object;
89         if (other == null)
90             return false;
91         return this.NativeHandle == other.NativeHandle;
92     }
93     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
94     public override int GetHashCode()
95     {
96         return this.NativeHandle.ToInt32();
97     }
98     ///<summary>Turns the native pointer into a string representation.</summary>
99     public override String ToString()
100     {
101         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
102     }
103     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
104      void RegisterEventProxies()
105     {
106     }
107     /// <summary>Get the length of play for the media file.</summary>
108     /// <returns>The length of the stream in seconds.</returns>
109     public double GetLength() {
110          var _ret_var = Efl.IPlayableNativeInherit.efl_playable_length_get_ptr.Value.Delegate(this.NativeHandle);
111         Eina.Error.RaiseIfUnhandledException();
112         return _ret_var;
113  }
114     /// <summary></summary>
115     /// <returns></returns>
116     public bool GetPlayable() {
117          var _ret_var = Efl.IPlayableNativeInherit.efl_playable_get_ptr.Value.Delegate(this.NativeHandle);
118         Eina.Error.RaiseIfUnhandledException();
119         return _ret_var;
120  }
121     /// <summary>Get whether the media file is seekable.</summary>
122     /// <returns><c>true</c> if seekable.</returns>
123     public bool GetSeekable() {
124          var _ret_var = Efl.IPlayableNativeInherit.efl_playable_seekable_get_ptr.Value.Delegate(this.NativeHandle);
125         Eina.Error.RaiseIfUnhandledException();
126         return _ret_var;
127  }
128     /// <summary>Get the length of play for the media file.</summary>
129 /// <value>The length of the stream in seconds.</value>
130     public double Length {
131         get { return GetLength(); }
132     }
133     /// <summary></summary>
134 /// <value></value>
135     public bool Playable {
136         get { return GetPlayable(); }
137     }
138     /// <summary>Get whether the media file is seekable.</summary>
139 /// <value><c>true</c> if seekable.</value>
140     public bool Seekable {
141         get { return GetSeekable(); }
142     }
143     private static IntPtr GetEflClassStatic()
144     {
145         return Efl.IPlayableConcrete.efl_playable_interface_get();
146     }
147 }
148 public class IPlayableNativeInherit  : Efl.Eo.NativeClass{
149     public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
150     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
151     {
152         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
153         var methods = Efl.Eo.Globals.GetUserMethods(type);
154         if (efl_playable_length_get_static_delegate == null)
155             efl_playable_length_get_static_delegate = new efl_playable_length_get_delegate(length_get);
156         if (methods.FirstOrDefault(m => m.Name == "GetLength") != null)
157             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_playable_length_get"), func = Marshal.GetFunctionPointerForDelegate(efl_playable_length_get_static_delegate)});
158         if (efl_playable_get_static_delegate == null)
159             efl_playable_get_static_delegate = new efl_playable_get_delegate(playable_get);
160         if (methods.FirstOrDefault(m => m.Name == "GetPlayable") != null)
161             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_playable_get"), func = Marshal.GetFunctionPointerForDelegate(efl_playable_get_static_delegate)});
162         if (efl_playable_seekable_get_static_delegate == null)
163             efl_playable_seekable_get_static_delegate = new efl_playable_seekable_get_delegate(seekable_get);
164         if (methods.FirstOrDefault(m => m.Name == "GetSeekable") != null)
165             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_playable_seekable_get"), func = Marshal.GetFunctionPointerForDelegate(efl_playable_seekable_get_static_delegate)});
166         return descs;
167     }
168     public override IntPtr GetEflClass()
169     {
170         return Efl.IPlayableConcrete.efl_playable_interface_get();
171     }
172     public static  IntPtr GetEflClassStatic()
173     {
174         return Efl.IPlayableConcrete.efl_playable_interface_get();
175     }
176
177
178      private delegate double efl_playable_length_get_delegate(System.IntPtr obj, System.IntPtr pd);
179
180
181      public delegate double efl_playable_length_get_api_delegate(System.IntPtr obj);
182      public static Efl.Eo.FunctionWrapper<efl_playable_length_get_api_delegate> efl_playable_length_get_ptr = new Efl.Eo.FunctionWrapper<efl_playable_length_get_api_delegate>(_Module, "efl_playable_length_get");
183      private static double length_get(System.IntPtr obj, System.IntPtr pd)
184     {
185         Eina.Log.Debug("function efl_playable_length_get was called");
186         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
187         if(wrapper != null) {
188                         double _ret_var = default(double);
189             try {
190                 _ret_var = ((IPlayable)wrapper).GetLength();
191             } catch (Exception e) {
192                 Eina.Log.Warning($"Callback error: {e.ToString()}");
193                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
194             }
195         return _ret_var;
196         } else {
197             return efl_playable_length_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
198         }
199     }
200     private static efl_playable_length_get_delegate efl_playable_length_get_static_delegate;
201
202
203      [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_playable_get_delegate(System.IntPtr obj, System.IntPtr pd);
204
205
206      [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_playable_get_api_delegate(System.IntPtr obj);
207      public static Efl.Eo.FunctionWrapper<efl_playable_get_api_delegate> efl_playable_get_ptr = new Efl.Eo.FunctionWrapper<efl_playable_get_api_delegate>(_Module, "efl_playable_get");
208      private static bool playable_get(System.IntPtr obj, System.IntPtr pd)
209     {
210         Eina.Log.Debug("function efl_playable_get was called");
211         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
212         if(wrapper != null) {
213                         bool _ret_var = default(bool);
214             try {
215                 _ret_var = ((IPlayable)wrapper).GetPlayable();
216             } catch (Exception e) {
217                 Eina.Log.Warning($"Callback error: {e.ToString()}");
218                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
219             }
220         return _ret_var;
221         } else {
222             return efl_playable_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
223         }
224     }
225     private static efl_playable_get_delegate efl_playable_get_static_delegate;
226
227
228      [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_playable_seekable_get_delegate(System.IntPtr obj, System.IntPtr pd);
229
230
231      [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_playable_seekable_get_api_delegate(System.IntPtr obj);
232      public static Efl.Eo.FunctionWrapper<efl_playable_seekable_get_api_delegate> efl_playable_seekable_get_ptr = new Efl.Eo.FunctionWrapper<efl_playable_seekable_get_api_delegate>(_Module, "efl_playable_seekable_get");
233      private static bool seekable_get(System.IntPtr obj, System.IntPtr pd)
234     {
235         Eina.Log.Debug("function efl_playable_seekable_get was called");
236         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
237         if(wrapper != null) {
238                         bool _ret_var = default(bool);
239             try {
240                 _ret_var = ((IPlayable)wrapper).GetSeekable();
241             } catch (Exception e) {
242                 Eina.Log.Warning($"Callback error: {e.ToString()}");
243                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
244             }
245         return _ret_var;
246         } else {
247             return efl_playable_seekable_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
248         }
249     }
250     private static efl_playable_seekable_get_delegate efl_playable_seekable_get_static_delegate;
251 }
252