/// <returns><c>true</c> if seekable.</returns>
bool GetSeekable();
/// <summary>Get the length of play for the media file.</summary>
-/// <value>The length of the stream in seconds.</value>
+ /// <value>The length of the stream in seconds.</value>
double Length {
get ;
}
- bool Playable {
+ bool Playable {
get ;
}
/// <summary>Get whether the media file is seekable.</summary>
-/// <value><c>true</c> if seekable.</value>
+ /// <value><c>true</c> if seekable.</value>
bool Seekable {
get ;
}
}
/// <summary>Efl media playable interface</summary>
-sealed public class IPlayableConcrete :
-
-IPlayable
+sealed public class IPlayableConcrete :
+ Efl.Eo.EoWrapper
+ , IPlayable
{
///<summary>Pointer to the native class description.</summary>
- public System.IntPtr NativeClass
+ public override System.IntPtr NativeClass
{
get
{
}
}
- private System.IntPtr handle;
- ///<summary>Pointer to the native instance.</summary>
- public System.IntPtr NativeHandle
- {
- get { return handle; }
- }
-
- [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
+ [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
efl_playable_interface_get();
/// <summary>Initializes a new instance of the <see cref="IPlayable"/> class.
/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
- private IPlayableConcrete(System.IntPtr raw)
- {
- handle = raw;
- }
- ///<summary>Destructor.</summary>
- ~IPlayableConcrete()
- {
- Dispose(false);
- }
-
- ///<summary>Releases the underlying native instance.</summary>
- private void Dispose(bool disposing)
- {
- if (handle != System.IntPtr.Zero)
- {
- IntPtr h = handle;
- handle = IntPtr.Zero;
-
- IntPtr gcHandlePtr = IntPtr.Zero;
- if (disposing)
- {
- Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
- }
- else
- {
- Monitor.Enter(Efl.All.InitLock);
- if (Efl.All.MainLoopInitialized)
- {
- Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
- }
-
- Monitor.Exit(Efl.All.InitLock);
- }
- }
-
- }
-
- ///<summary>Releases the underlying native instance.</summary>
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
- /// <summary>Verifies if the given object is equal to this one.</summary>
- /// <param name="instance">The object to compare to.</param>
- /// <returns>True if both objects point to the same native object.</returns>
- public override bool Equals(object instance)
- {
- var other = instance as Efl.Object;
- if (other == null)
- {
- return false;
- }
- return this.NativeHandle == other.NativeHandle;
- }
-
- /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
- /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
- public override int GetHashCode()
- {
- return this.NativeHandle.ToInt32();
- }
-
- /// <summary>Turns the native pointer into a string representation.</summary>
- /// <returns>A string with the type and the native pointer for this object.</returns>
- public override String ToString()
+ private IPlayableConcrete(System.IntPtr raw) : base(raw)
{
- return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
}
/// <summary>Get the length of play for the media file.</summary>
return _ret_var;
}
/// <summary>Get the length of play for the media file.</summary>
-/// <value>The length of the stream in seconds.</value>
+ /// <value>The length of the stream in seconds.</value>
public double Length {
get { return GetLength(); }
}
- public bool Playable {
+ public bool Playable {
get { return GetPlayable(); }
}
/// <summary>Get whether the media file is seekable.</summary>
-/// <value><c>true</c> if seekable.</value>
+ /// <value><c>true</c> if seekable.</value>
public bool Seekable {
get { return GetSeekable(); }
}
return Efl.IPlayableConcrete.efl_playable_interface_get();
}
- #pragma warning disable CA1707, SA1300, SA1600
+ #pragma warning disable CA1707, CS1591, SA1300, SA1600
private delegate double efl_playable_length_get_delegate(System.IntPtr obj, System.IntPtr pd);
private static double length_get(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_playable_length_get was called");
- Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
- if (wrapper != null)
+ var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
+ if (ws != null)
{
double _ret_var = default(double);
try
{
- _ret_var = ((IPlayable)wrapper).GetLength();
+ _ret_var = ((IPlayable)ws.Target).GetLength();
}
catch (Exception e)
{
private static bool playable_get(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_playable_get was called");
- Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
- if (wrapper != null)
+ var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
+ if (ws != null)
{
bool _ret_var = default(bool);
try
{
- _ret_var = ((IPlayable)wrapper).GetPlayable();
+ _ret_var = ((IPlayable)ws.Target).GetPlayable();
}
catch (Exception e)
{
private static bool seekable_get(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_playable_seekable_get was called");
- Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
- if (wrapper != null)
+ var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
+ if (ws != null)
{
bool _ret_var = default(bool);
try
{
- _ret_var = ((IPlayable)wrapper).GetSeekable();
+ _ret_var = ((IPlayable)ws.Target).GetSeekable();
}
catch (Exception e)
{
private static efl_playable_seekable_get_delegate efl_playable_seekable_get_static_delegate;
- #pragma warning restore CA1707, SA1300, SA1600
+ #pragma warning restore CA1707, CS1591, SA1300, SA1600
}
}