1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
10 /// <summary>Efl media player interface</summary>
11 [Efl.IPlayerConcrete.NativeMethods]
12 public interface IPlayer :
13 Efl.Eo.IWrapper, IDisposable
15 /// <summary>Whether or not the playable can be played.</summary>
16 /// <returns><c>true</c> if the object have playable data, <c>false</c> otherwise</returns>
18 /// <summary>Get play/pause state of the media file.</summary>
19 /// <returns><c>true</c> if playing, <c>false</c> otherwise.</returns>
21 /// <summary>Set play/pause state of the media file.
22 /// This functions sets the currently playing status of the video. Using this function to play or pause the video doesn't alter it's current position.</summary>
23 /// <param name="play"><c>true</c> if playing, <c>false</c> otherwise.</param>
24 void SetPlay(bool play);
25 /// <summary>Get the position in the media file.
26 /// The position is returned as the number of seconds since the beginning of the media file.</summary>
27 /// <returns>The position (in seconds).</returns>
29 /// <summary>Set the position in the media file.
30 /// This functions sets the current position of the media file to "sec", this only works on seekable streams. Setting the position doesn't change the playing state of the media file.</summary>
31 /// <param name="sec">The position (in seconds).</param>
32 void SetPos(double sec);
33 /// <summary>Get how much of the file has been played.
34 /// This function gets the progress in playing the file, the return value is in the [0, 1] range.</summary>
35 /// <returns>The progress within the [0, 1] range.</returns>
37 /// <summary>Control the play speed of the media file.
38 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
39 /// <returns>The play speed in the [0, infinity) range.</returns>
40 double GetPlaySpeed();
41 /// <summary>Control the play speed of the media file.
42 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
43 /// <param name="speed">The play speed in the [0, infinity) range.</param>
44 void SetPlaySpeed(double speed);
45 /// <summary>Control the audio volume.
46 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
47 /// <returns>The volume level</returns>
49 /// <summary>Control the audio volume.
50 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
51 /// <param name="volume">The volume level</param>
52 void SetVolume(double volume);
53 /// <summary>This property controls the audio mute state.</summary>
54 /// <returns>The mute state. <c>true</c> or <c>false</c>.</returns>
56 /// <summary>This property controls the audio mute state.</summary>
57 /// <param name="mute">The mute state. <c>true</c> or <c>false</c>.</param>
58 void SetMute(bool mute);
59 /// <summary>Get the length of play for the media file.</summary>
60 /// <returns>The length of the stream in seconds.</returns>
62 /// <summary>Get whether the media file is seekable.</summary>
63 /// <returns><c>true</c> if seekable.</returns>
65 /// <summary>Start a playing playable object.</summary>
67 /// <summary>Stop playable object.</summary>
69 /// <summary>Whether or not the playable can be played.</summary>
70 /// <value><c>true</c> if the object have playable data, <c>false</c> otherwise</value>
74 /// <summary>Get play/pause state of the media file.</summary>
75 /// <value><c>true</c> if playing, <c>false</c> otherwise.</value>
80 /// <summary>Get the position in the media file.
81 /// The position is returned as the number of seconds since the beginning of the media file.</summary>
82 /// <value>The position (in seconds).</value>
87 /// <summary>Get how much of the file has been played.
88 /// This function gets the progress in playing the file, the return value is in the [0, 1] range.</summary>
89 /// <value>The progress within the [0, 1] range.</value>
93 /// <summary>Control the play speed of the media file.
94 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
95 /// <value>The play speed in the [0, infinity) range.</value>
100 /// <summary>Control the audio volume.
101 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
102 /// <value>The volume level</value>
107 /// <summary>This property controls the audio mute state.</summary>
108 /// <value>The mute state. <c>true</c> or <c>false</c>.</value>
113 /// <summary>Get the length of play for the media file.</summary>
114 /// <value>The length of the stream in seconds.</value>
118 /// <summary>Get whether the media file is seekable.</summary>
119 /// <value><c>true</c> if seekable.</value>
124 /// <summary>Efl media player interface</summary>
125 sealed public class IPlayerConcrete :
130 ///<summary>Pointer to the native class description.</summary>
131 public System.IntPtr NativeClass
135 if (((object)this).GetType() == typeof(IPlayerConcrete))
137 return GetEflClassStatic();
141 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
146 private System.IntPtr handle;
147 ///<summary>Pointer to the native instance.</summary>
148 public System.IntPtr NativeHandle
150 get { return handle; }
153 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
154 efl_player_interface_get();
155 /// <summary>Initializes a new instance of the <see cref="IPlayer"/> class.
156 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
157 private IPlayerConcrete(System.IntPtr raw)
161 ///<summary>Destructor.</summary>
167 ///<summary>Releases the underlying native instance.</summary>
168 private void Dispose(bool disposing)
170 if (handle != System.IntPtr.Zero)
173 handle = IntPtr.Zero;
175 IntPtr gcHandlePtr = IntPtr.Zero;
178 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
182 Monitor.Enter(Efl.All.InitLock);
183 if (Efl.All.MainLoopInitialized)
185 Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
188 Monitor.Exit(Efl.All.InitLock);
194 ///<summary>Releases the underlying native instance.</summary>
195 public void Dispose()
198 GC.SuppressFinalize(this);
201 /// <summary>Verifies if the given object is equal to this one.</summary>
202 /// <param name="instance">The object to compare to.</param>
203 /// <returns>True if both objects point to the same native object.</returns>
204 public override bool Equals(object instance)
206 var other = instance as Efl.Object;
211 return this.NativeHandle == other.NativeHandle;
214 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
215 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
216 public override int GetHashCode()
218 return this.NativeHandle.ToInt32();
221 /// <summary>Turns the native pointer into a string representation.</summary>
222 /// <returns>A string with the type and the native pointer for this object.</returns>
223 public override String ToString()
225 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
228 /// <summary>Whether or not the playable can be played.</summary>
229 /// <returns><c>true</c> if the object have playable data, <c>false</c> otherwise</returns>
230 public bool GetPlayable() {
231 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_playable_get_ptr.Value.Delegate(this.NativeHandle);
232 Eina.Error.RaiseIfUnhandledException();
235 /// <summary>Get play/pause state of the media file.</summary>
236 /// <returns><c>true</c> if playing, <c>false</c> otherwise.</returns>
237 public bool GetPlay() {
238 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_play_get_ptr.Value.Delegate(this.NativeHandle);
239 Eina.Error.RaiseIfUnhandledException();
242 /// <summary>Set play/pause state of the media file.
243 /// This functions sets the currently playing status of the video. Using this function to play or pause the video doesn't alter it's current position.</summary>
244 /// <param name="play"><c>true</c> if playing, <c>false</c> otherwise.</param>
245 public void SetPlay(bool play) {
246 Efl.IPlayerConcrete.NativeMethods.efl_player_play_set_ptr.Value.Delegate(this.NativeHandle,play);
247 Eina.Error.RaiseIfUnhandledException();
249 /// <summary>Get the position in the media file.
250 /// The position is returned as the number of seconds since the beginning of the media file.</summary>
251 /// <returns>The position (in seconds).</returns>
252 public double GetPos() {
253 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_pos_get_ptr.Value.Delegate(this.NativeHandle);
254 Eina.Error.RaiseIfUnhandledException();
257 /// <summary>Set the position in the media file.
258 /// This functions sets the current position of the media file to "sec", this only works on seekable streams. Setting the position doesn't change the playing state of the media file.</summary>
259 /// <param name="sec">The position (in seconds).</param>
260 public void SetPos(double sec) {
261 Efl.IPlayerConcrete.NativeMethods.efl_player_pos_set_ptr.Value.Delegate(this.NativeHandle,sec);
262 Eina.Error.RaiseIfUnhandledException();
264 /// <summary>Get how much of the file has been played.
265 /// This function gets the progress in playing the file, the return value is in the [0, 1] range.</summary>
266 /// <returns>The progress within the [0, 1] range.</returns>
267 public double GetProgress() {
268 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_progress_get_ptr.Value.Delegate(this.NativeHandle);
269 Eina.Error.RaiseIfUnhandledException();
272 /// <summary>Control the play speed of the media file.
273 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
274 /// <returns>The play speed in the [0, infinity) range.</returns>
275 public double GetPlaySpeed() {
276 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_play_speed_get_ptr.Value.Delegate(this.NativeHandle);
277 Eina.Error.RaiseIfUnhandledException();
280 /// <summary>Control the play speed of the media file.
281 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
282 /// <param name="speed">The play speed in the [0, infinity) range.</param>
283 public void SetPlaySpeed(double speed) {
284 Efl.IPlayerConcrete.NativeMethods.efl_player_play_speed_set_ptr.Value.Delegate(this.NativeHandle,speed);
285 Eina.Error.RaiseIfUnhandledException();
287 /// <summary>Control the audio volume.
288 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
289 /// <returns>The volume level</returns>
290 public double GetVolume() {
291 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_volume_get_ptr.Value.Delegate(this.NativeHandle);
292 Eina.Error.RaiseIfUnhandledException();
295 /// <summary>Control the audio volume.
296 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
297 /// <param name="volume">The volume level</param>
298 public void SetVolume(double volume) {
299 Efl.IPlayerConcrete.NativeMethods.efl_player_volume_set_ptr.Value.Delegate(this.NativeHandle,volume);
300 Eina.Error.RaiseIfUnhandledException();
302 /// <summary>This property controls the audio mute state.</summary>
303 /// <returns>The mute state. <c>true</c> or <c>false</c>.</returns>
304 public bool GetMute() {
305 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_mute_get_ptr.Value.Delegate(this.NativeHandle);
306 Eina.Error.RaiseIfUnhandledException();
309 /// <summary>This property controls the audio mute state.</summary>
310 /// <param name="mute">The mute state. <c>true</c> or <c>false</c>.</param>
311 public void SetMute(bool mute) {
312 Efl.IPlayerConcrete.NativeMethods.efl_player_mute_set_ptr.Value.Delegate(this.NativeHandle,mute);
313 Eina.Error.RaiseIfUnhandledException();
315 /// <summary>Get the length of play for the media file.</summary>
316 /// <returns>The length of the stream in seconds.</returns>
317 public double GetLength() {
318 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_length_get_ptr.Value.Delegate(this.NativeHandle);
319 Eina.Error.RaiseIfUnhandledException();
322 /// <summary>Get whether the media file is seekable.</summary>
323 /// <returns><c>true</c> if seekable.</returns>
324 public bool GetSeekable() {
325 var _ret_var = Efl.IPlayerConcrete.NativeMethods.efl_player_seekable_get_ptr.Value.Delegate(this.NativeHandle);
326 Eina.Error.RaiseIfUnhandledException();
329 /// <summary>Start a playing playable object.</summary>
330 public void Start() {
331 Efl.IPlayerConcrete.NativeMethods.efl_player_start_ptr.Value.Delegate(this.NativeHandle);
332 Eina.Error.RaiseIfUnhandledException();
334 /// <summary>Stop playable object.</summary>
336 Efl.IPlayerConcrete.NativeMethods.efl_player_stop_ptr.Value.Delegate(this.NativeHandle);
337 Eina.Error.RaiseIfUnhandledException();
339 /// <summary>Whether or not the playable can be played.</summary>
340 /// <value><c>true</c> if the object have playable data, <c>false</c> otherwise</value>
341 public bool Playable {
342 get { return GetPlayable(); }
344 /// <summary>Get play/pause state of the media file.</summary>
345 /// <value><c>true</c> if playing, <c>false</c> otherwise.</value>
347 get { return GetPlay(); }
348 set { SetPlay(value); }
350 /// <summary>Get the position in the media file.
351 /// The position is returned as the number of seconds since the beginning of the media file.</summary>
352 /// <value>The position (in seconds).</value>
354 get { return GetPos(); }
355 set { SetPos(value); }
357 /// <summary>Get how much of the file has been played.
358 /// This function gets the progress in playing the file, the return value is in the [0, 1] range.</summary>
359 /// <value>The progress within the [0, 1] range.</value>
360 public double Progress {
361 get { return GetProgress(); }
363 /// <summary>Control the play speed of the media file.
364 /// This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.</summary>
365 /// <value>The play speed in the [0, infinity) range.</value>
366 public double PlaySpeed {
367 get { return GetPlaySpeed(); }
368 set { SetPlaySpeed(value); }
370 /// <summary>Control the audio volume.
371 /// Controls the audio volume of the stream being played. This has nothing to do with the system volume. This volume will be multiplied by the system volume. e.g.: if the current volume level is 0.5, and the system volume is 50%, it will be 0.5 * 0.5 = 0.25.</summary>
372 /// <value>The volume level</value>
373 public double Volume {
374 get { return GetVolume(); }
375 set { SetVolume(value); }
377 /// <summary>This property controls the audio mute state.</summary>
378 /// <value>The mute state. <c>true</c> or <c>false</c>.</value>
380 get { return GetMute(); }
381 set { SetMute(value); }
383 /// <summary>Get the length of play for the media file.</summary>
384 /// <value>The length of the stream in seconds.</value>
385 public double Length {
386 get { return GetLength(); }
388 /// <summary>Get whether the media file is seekable.</summary>
389 /// <value><c>true</c> if seekable.</value>
390 public bool Seekable {
391 get { return GetSeekable(); }
393 private static IntPtr GetEflClassStatic()
395 return Efl.IPlayerConcrete.efl_player_interface_get();
397 /// <summary>Wrapper for native methods and virtual method delegates.
398 /// For internal use by generated code only.</summary>
399 public class NativeMethods : Efl.Eo.NativeClass
401 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
402 /// <summary>Gets the list of Eo operations to override.</summary>
403 /// <returns>The list of Eo operations to be overload.</returns>
404 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
406 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
407 var methods = Efl.Eo.Globals.GetUserMethods(type);
409 if (efl_player_playable_get_static_delegate == null)
411 efl_player_playable_get_static_delegate = new efl_player_playable_get_delegate(playable_get);
414 if (methods.FirstOrDefault(m => m.Name == "GetPlayable") != null)
416 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_playable_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_playable_get_static_delegate) });
419 if (efl_player_play_get_static_delegate == null)
421 efl_player_play_get_static_delegate = new efl_player_play_get_delegate(play_get);
424 if (methods.FirstOrDefault(m => m.Name == "GetPlay") != null)
426 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_play_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_play_get_static_delegate) });
429 if (efl_player_play_set_static_delegate == null)
431 efl_player_play_set_static_delegate = new efl_player_play_set_delegate(play_set);
434 if (methods.FirstOrDefault(m => m.Name == "SetPlay") != null)
436 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_play_set"), func = Marshal.GetFunctionPointerForDelegate(efl_player_play_set_static_delegate) });
439 if (efl_player_pos_get_static_delegate == null)
441 efl_player_pos_get_static_delegate = new efl_player_pos_get_delegate(pos_get);
444 if (methods.FirstOrDefault(m => m.Name == "GetPos") != null)
446 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_pos_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_pos_get_static_delegate) });
449 if (efl_player_pos_set_static_delegate == null)
451 efl_player_pos_set_static_delegate = new efl_player_pos_set_delegate(pos_set);
454 if (methods.FirstOrDefault(m => m.Name == "SetPos") != null)
456 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_pos_set"), func = Marshal.GetFunctionPointerForDelegate(efl_player_pos_set_static_delegate) });
459 if (efl_player_progress_get_static_delegate == null)
461 efl_player_progress_get_static_delegate = new efl_player_progress_get_delegate(progress_get);
464 if (methods.FirstOrDefault(m => m.Name == "GetProgress") != null)
466 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_progress_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_progress_get_static_delegate) });
469 if (efl_player_play_speed_get_static_delegate == null)
471 efl_player_play_speed_get_static_delegate = new efl_player_play_speed_get_delegate(play_speed_get);
474 if (methods.FirstOrDefault(m => m.Name == "GetPlaySpeed") != null)
476 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_play_speed_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_play_speed_get_static_delegate) });
479 if (efl_player_play_speed_set_static_delegate == null)
481 efl_player_play_speed_set_static_delegate = new efl_player_play_speed_set_delegate(play_speed_set);
484 if (methods.FirstOrDefault(m => m.Name == "SetPlaySpeed") != null)
486 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_play_speed_set"), func = Marshal.GetFunctionPointerForDelegate(efl_player_play_speed_set_static_delegate) });
489 if (efl_player_volume_get_static_delegate == null)
491 efl_player_volume_get_static_delegate = new efl_player_volume_get_delegate(volume_get);
494 if (methods.FirstOrDefault(m => m.Name == "GetVolume") != null)
496 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_volume_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_volume_get_static_delegate) });
499 if (efl_player_volume_set_static_delegate == null)
501 efl_player_volume_set_static_delegate = new efl_player_volume_set_delegate(volume_set);
504 if (methods.FirstOrDefault(m => m.Name == "SetVolume") != null)
506 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_volume_set"), func = Marshal.GetFunctionPointerForDelegate(efl_player_volume_set_static_delegate) });
509 if (efl_player_mute_get_static_delegate == null)
511 efl_player_mute_get_static_delegate = new efl_player_mute_get_delegate(mute_get);
514 if (methods.FirstOrDefault(m => m.Name == "GetMute") != null)
516 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_mute_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_mute_get_static_delegate) });
519 if (efl_player_mute_set_static_delegate == null)
521 efl_player_mute_set_static_delegate = new efl_player_mute_set_delegate(mute_set);
524 if (methods.FirstOrDefault(m => m.Name == "SetMute") != null)
526 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_mute_set"), func = Marshal.GetFunctionPointerForDelegate(efl_player_mute_set_static_delegate) });
529 if (efl_player_length_get_static_delegate == null)
531 efl_player_length_get_static_delegate = new efl_player_length_get_delegate(length_get);
534 if (methods.FirstOrDefault(m => m.Name == "GetLength") != null)
536 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_length_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_length_get_static_delegate) });
539 if (efl_player_seekable_get_static_delegate == null)
541 efl_player_seekable_get_static_delegate = new efl_player_seekable_get_delegate(seekable_get);
544 if (methods.FirstOrDefault(m => m.Name == "GetSeekable") != null)
546 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_seekable_get"), func = Marshal.GetFunctionPointerForDelegate(efl_player_seekable_get_static_delegate) });
549 if (efl_player_start_static_delegate == null)
551 efl_player_start_static_delegate = new efl_player_start_delegate(start);
554 if (methods.FirstOrDefault(m => m.Name == "Start") != null)
556 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_start"), func = Marshal.GetFunctionPointerForDelegate(efl_player_start_static_delegate) });
559 if (efl_player_stop_static_delegate == null)
561 efl_player_stop_static_delegate = new efl_player_stop_delegate(stop);
564 if (methods.FirstOrDefault(m => m.Name == "Stop") != null)
566 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_player_stop"), func = Marshal.GetFunctionPointerForDelegate(efl_player_stop_static_delegate) });
571 /// <summary>Returns the Eo class for the native methods of this class.</summary>
572 /// <returns>The native class pointer.</returns>
573 public override IntPtr GetEflClass()
575 return Efl.IPlayerConcrete.efl_player_interface_get();
578 #pragma warning disable CA1707, SA1300, SA1600
580 [return: MarshalAs(UnmanagedType.U1)]
581 private delegate bool efl_player_playable_get_delegate(System.IntPtr obj, System.IntPtr pd);
583 [return: MarshalAs(UnmanagedType.U1)]
584 public delegate bool efl_player_playable_get_api_delegate(System.IntPtr obj);
586 public static Efl.Eo.FunctionWrapper<efl_player_playable_get_api_delegate> efl_player_playable_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_playable_get_api_delegate>(Module, "efl_player_playable_get");
588 private static bool playable_get(System.IntPtr obj, System.IntPtr pd)
590 Eina.Log.Debug("function efl_player_playable_get was called");
591 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
594 bool _ret_var = default(bool);
597 _ret_var = ((IPlayer)wrapper).GetPlayable();
601 Eina.Log.Warning($"Callback error: {e.ToString()}");
602 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
610 return efl_player_playable_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
614 private static efl_player_playable_get_delegate efl_player_playable_get_static_delegate;
616 [return: MarshalAs(UnmanagedType.U1)]
617 private delegate bool efl_player_play_get_delegate(System.IntPtr obj, System.IntPtr pd);
619 [return: MarshalAs(UnmanagedType.U1)]
620 public delegate bool efl_player_play_get_api_delegate(System.IntPtr obj);
622 public static Efl.Eo.FunctionWrapper<efl_player_play_get_api_delegate> efl_player_play_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_play_get_api_delegate>(Module, "efl_player_play_get");
624 private static bool play_get(System.IntPtr obj, System.IntPtr pd)
626 Eina.Log.Debug("function efl_player_play_get was called");
627 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
630 bool _ret_var = default(bool);
633 _ret_var = ((IPlayer)wrapper).GetPlay();
637 Eina.Log.Warning($"Callback error: {e.ToString()}");
638 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
646 return efl_player_play_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
650 private static efl_player_play_get_delegate efl_player_play_get_static_delegate;
653 private delegate void efl_player_play_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool play);
656 public delegate void efl_player_play_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool play);
658 public static Efl.Eo.FunctionWrapper<efl_player_play_set_api_delegate> efl_player_play_set_ptr = new Efl.Eo.FunctionWrapper<efl_player_play_set_api_delegate>(Module, "efl_player_play_set");
660 private static void play_set(System.IntPtr obj, System.IntPtr pd, bool play)
662 Eina.Log.Debug("function efl_player_play_set was called");
663 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
669 ((IPlayer)wrapper).SetPlay(play);
673 Eina.Log.Warning($"Callback error: {e.ToString()}");
674 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
681 efl_player_play_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), play);
685 private static efl_player_play_set_delegate efl_player_play_set_static_delegate;
688 private delegate double efl_player_pos_get_delegate(System.IntPtr obj, System.IntPtr pd);
691 public delegate double efl_player_pos_get_api_delegate(System.IntPtr obj);
693 public static Efl.Eo.FunctionWrapper<efl_player_pos_get_api_delegate> efl_player_pos_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_pos_get_api_delegate>(Module, "efl_player_pos_get");
695 private static double pos_get(System.IntPtr obj, System.IntPtr pd)
697 Eina.Log.Debug("function efl_player_pos_get was called");
698 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
701 double _ret_var = default(double);
704 _ret_var = ((IPlayer)wrapper).GetPos();
708 Eina.Log.Warning($"Callback error: {e.ToString()}");
709 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
717 return efl_player_pos_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
721 private static efl_player_pos_get_delegate efl_player_pos_get_static_delegate;
724 private delegate void efl_player_pos_set_delegate(System.IntPtr obj, System.IntPtr pd, double sec);
727 public delegate void efl_player_pos_set_api_delegate(System.IntPtr obj, double sec);
729 public static Efl.Eo.FunctionWrapper<efl_player_pos_set_api_delegate> efl_player_pos_set_ptr = new Efl.Eo.FunctionWrapper<efl_player_pos_set_api_delegate>(Module, "efl_player_pos_set");
731 private static void pos_set(System.IntPtr obj, System.IntPtr pd, double sec)
733 Eina.Log.Debug("function efl_player_pos_set was called");
734 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
740 ((IPlayer)wrapper).SetPos(sec);
744 Eina.Log.Warning($"Callback error: {e.ToString()}");
745 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
752 efl_player_pos_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), sec);
756 private static efl_player_pos_set_delegate efl_player_pos_set_static_delegate;
759 private delegate double efl_player_progress_get_delegate(System.IntPtr obj, System.IntPtr pd);
762 public delegate double efl_player_progress_get_api_delegate(System.IntPtr obj);
764 public static Efl.Eo.FunctionWrapper<efl_player_progress_get_api_delegate> efl_player_progress_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_progress_get_api_delegate>(Module, "efl_player_progress_get");
766 private static double progress_get(System.IntPtr obj, System.IntPtr pd)
768 Eina.Log.Debug("function efl_player_progress_get was called");
769 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
772 double _ret_var = default(double);
775 _ret_var = ((IPlayer)wrapper).GetProgress();
779 Eina.Log.Warning($"Callback error: {e.ToString()}");
780 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
788 return efl_player_progress_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
792 private static efl_player_progress_get_delegate efl_player_progress_get_static_delegate;
795 private delegate double efl_player_play_speed_get_delegate(System.IntPtr obj, System.IntPtr pd);
798 public delegate double efl_player_play_speed_get_api_delegate(System.IntPtr obj);
800 public static Efl.Eo.FunctionWrapper<efl_player_play_speed_get_api_delegate> efl_player_play_speed_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_play_speed_get_api_delegate>(Module, "efl_player_play_speed_get");
802 private static double play_speed_get(System.IntPtr obj, System.IntPtr pd)
804 Eina.Log.Debug("function efl_player_play_speed_get was called");
805 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
808 double _ret_var = default(double);
811 _ret_var = ((IPlayer)wrapper).GetPlaySpeed();
815 Eina.Log.Warning($"Callback error: {e.ToString()}");
816 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
824 return efl_player_play_speed_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
828 private static efl_player_play_speed_get_delegate efl_player_play_speed_get_static_delegate;
831 private delegate void efl_player_play_speed_set_delegate(System.IntPtr obj, System.IntPtr pd, double speed);
834 public delegate void efl_player_play_speed_set_api_delegate(System.IntPtr obj, double speed);
836 public static Efl.Eo.FunctionWrapper<efl_player_play_speed_set_api_delegate> efl_player_play_speed_set_ptr = new Efl.Eo.FunctionWrapper<efl_player_play_speed_set_api_delegate>(Module, "efl_player_play_speed_set");
838 private static void play_speed_set(System.IntPtr obj, System.IntPtr pd, double speed)
840 Eina.Log.Debug("function efl_player_play_speed_set was called");
841 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
847 ((IPlayer)wrapper).SetPlaySpeed(speed);
851 Eina.Log.Warning($"Callback error: {e.ToString()}");
852 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
859 efl_player_play_speed_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), speed);
863 private static efl_player_play_speed_set_delegate efl_player_play_speed_set_static_delegate;
866 private delegate double efl_player_volume_get_delegate(System.IntPtr obj, System.IntPtr pd);
869 public delegate double efl_player_volume_get_api_delegate(System.IntPtr obj);
871 public static Efl.Eo.FunctionWrapper<efl_player_volume_get_api_delegate> efl_player_volume_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_volume_get_api_delegate>(Module, "efl_player_volume_get");
873 private static double volume_get(System.IntPtr obj, System.IntPtr pd)
875 Eina.Log.Debug("function efl_player_volume_get was called");
876 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
879 double _ret_var = default(double);
882 _ret_var = ((IPlayer)wrapper).GetVolume();
886 Eina.Log.Warning($"Callback error: {e.ToString()}");
887 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
895 return efl_player_volume_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
899 private static efl_player_volume_get_delegate efl_player_volume_get_static_delegate;
902 private delegate void efl_player_volume_set_delegate(System.IntPtr obj, System.IntPtr pd, double volume);
905 public delegate void efl_player_volume_set_api_delegate(System.IntPtr obj, double volume);
907 public static Efl.Eo.FunctionWrapper<efl_player_volume_set_api_delegate> efl_player_volume_set_ptr = new Efl.Eo.FunctionWrapper<efl_player_volume_set_api_delegate>(Module, "efl_player_volume_set");
909 private static void volume_set(System.IntPtr obj, System.IntPtr pd, double volume)
911 Eina.Log.Debug("function efl_player_volume_set was called");
912 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
918 ((IPlayer)wrapper).SetVolume(volume);
922 Eina.Log.Warning($"Callback error: {e.ToString()}");
923 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
930 efl_player_volume_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), volume);
934 private static efl_player_volume_set_delegate efl_player_volume_set_static_delegate;
936 [return: MarshalAs(UnmanagedType.U1)]
937 private delegate bool efl_player_mute_get_delegate(System.IntPtr obj, System.IntPtr pd);
939 [return: MarshalAs(UnmanagedType.U1)]
940 public delegate bool efl_player_mute_get_api_delegate(System.IntPtr obj);
942 public static Efl.Eo.FunctionWrapper<efl_player_mute_get_api_delegate> efl_player_mute_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_mute_get_api_delegate>(Module, "efl_player_mute_get");
944 private static bool mute_get(System.IntPtr obj, System.IntPtr pd)
946 Eina.Log.Debug("function efl_player_mute_get was called");
947 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
950 bool _ret_var = default(bool);
953 _ret_var = ((IPlayer)wrapper).GetMute();
957 Eina.Log.Warning($"Callback error: {e.ToString()}");
958 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
966 return efl_player_mute_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
970 private static efl_player_mute_get_delegate efl_player_mute_get_static_delegate;
973 private delegate void efl_player_mute_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool mute);
976 public delegate void efl_player_mute_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool mute);
978 public static Efl.Eo.FunctionWrapper<efl_player_mute_set_api_delegate> efl_player_mute_set_ptr = new Efl.Eo.FunctionWrapper<efl_player_mute_set_api_delegate>(Module, "efl_player_mute_set");
980 private static void mute_set(System.IntPtr obj, System.IntPtr pd, bool mute)
982 Eina.Log.Debug("function efl_player_mute_set was called");
983 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
989 ((IPlayer)wrapper).SetMute(mute);
993 Eina.Log.Warning($"Callback error: {e.ToString()}");
994 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1001 efl_player_mute_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mute);
1005 private static efl_player_mute_set_delegate efl_player_mute_set_static_delegate;
1008 private delegate double efl_player_length_get_delegate(System.IntPtr obj, System.IntPtr pd);
1011 public delegate double efl_player_length_get_api_delegate(System.IntPtr obj);
1013 public static Efl.Eo.FunctionWrapper<efl_player_length_get_api_delegate> efl_player_length_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_length_get_api_delegate>(Module, "efl_player_length_get");
1015 private static double length_get(System.IntPtr obj, System.IntPtr pd)
1017 Eina.Log.Debug("function efl_player_length_get was called");
1018 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1019 if (wrapper != null)
1021 double _ret_var = default(double);
1024 _ret_var = ((IPlayer)wrapper).GetLength();
1028 Eina.Log.Warning($"Callback error: {e.ToString()}");
1029 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1037 return efl_player_length_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1041 private static efl_player_length_get_delegate efl_player_length_get_static_delegate;
1043 [return: MarshalAs(UnmanagedType.U1)]
1044 private delegate bool efl_player_seekable_get_delegate(System.IntPtr obj, System.IntPtr pd);
1046 [return: MarshalAs(UnmanagedType.U1)]
1047 public delegate bool efl_player_seekable_get_api_delegate(System.IntPtr obj);
1049 public static Efl.Eo.FunctionWrapper<efl_player_seekable_get_api_delegate> efl_player_seekable_get_ptr = new Efl.Eo.FunctionWrapper<efl_player_seekable_get_api_delegate>(Module, "efl_player_seekable_get");
1051 private static bool seekable_get(System.IntPtr obj, System.IntPtr pd)
1053 Eina.Log.Debug("function efl_player_seekable_get was called");
1054 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1055 if (wrapper != null)
1057 bool _ret_var = default(bool);
1060 _ret_var = ((IPlayer)wrapper).GetSeekable();
1064 Eina.Log.Warning($"Callback error: {e.ToString()}");
1065 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1073 return efl_player_seekable_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1077 private static efl_player_seekable_get_delegate efl_player_seekable_get_static_delegate;
1080 private delegate void efl_player_start_delegate(System.IntPtr obj, System.IntPtr pd);
1083 public delegate void efl_player_start_api_delegate(System.IntPtr obj);
1085 public static Efl.Eo.FunctionWrapper<efl_player_start_api_delegate> efl_player_start_ptr = new Efl.Eo.FunctionWrapper<efl_player_start_api_delegate>(Module, "efl_player_start");
1087 private static void start(System.IntPtr obj, System.IntPtr pd)
1089 Eina.Log.Debug("function efl_player_start was called");
1090 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1091 if (wrapper != null)
1096 ((IPlayer)wrapper).Start();
1100 Eina.Log.Warning($"Callback error: {e.ToString()}");
1101 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1108 efl_player_start_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1112 private static efl_player_start_delegate efl_player_start_static_delegate;
1115 private delegate void efl_player_stop_delegate(System.IntPtr obj, System.IntPtr pd);
1118 public delegate void efl_player_stop_api_delegate(System.IntPtr obj);
1120 public static Efl.Eo.FunctionWrapper<efl_player_stop_api_delegate> efl_player_stop_ptr = new Efl.Eo.FunctionWrapper<efl_player_stop_api_delegate>(Module, "efl_player_stop");
1122 private static void stop(System.IntPtr obj, System.IntPtr pd)
1124 Eina.Log.Debug("function efl_player_stop was called");
1125 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1126 if (wrapper != null)
1131 ((IPlayer)wrapper).Stop();
1135 Eina.Log.Warning($"Callback error: {e.ToString()}");
1136 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1143 efl_player_stop_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1147 private static efl_player_stop_delegate efl_player_stop_static_delegate;
1149 #pragma warning restore CA1707, SA1300, SA1600