gstreamer/sources/generated/Gst.Audio/StreamVolumeAdapter.cs
Thibault Saunier 2d00f898fb Move generated files to dedicated folders named by namespace
Making it cleaner and simpler to navigate and removing previous
ugly and now useless hack where we were renaming files ourself
to make meson happy.
2018-03-11 21:47:35 -03:00

148 lines
4 KiB
C#

// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Audio {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class StreamVolumeAdapter : GLib.GInterfaceAdapter, Gst.Audio.IStreamVolume {
[StructLayout (LayoutKind.Sequential)]
struct GstStreamVolumeInterface {
}
static GstStreamVolumeInterface iface;
static StreamVolumeAdapter ()
{
GLib.GType.Register (_gtype, typeof (StreamVolumeAdapter));
}
static void Initialize (IntPtr ptr, IntPtr data)
{
}
GLib.Object implementor;
public StreamVolumeAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public StreamVolumeAdapter (IStreamVolumeImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public StreamVolumeAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_stream_volume_get_type();
private static GLib.GType _gtype = new GLib.GType (gst_stream_volume_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IStreamVolume GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IStreamVolume GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IStreamVolumeImplementor)
return new StreamVolumeAdapter (obj as IStreamVolumeImplementor);
else if (obj as IStreamVolume == null)
return new StreamVolumeAdapter (obj.Handle);
else
return obj as IStreamVolume;
}
public IStreamVolumeImplementor Implementor {
get {
return implementor as IStreamVolumeImplementor;
}
}
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_stream_volume_get_mute(IntPtr raw);
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_stream_volume_set_mute(IntPtr raw, bool mute);
[GLib.Property ("mute")]
public bool Mute {
get {
bool raw_ret = gst_stream_volume_get_mute(Handle);
bool ret = raw_ret;
return ret;
}
set {
gst_stream_volume_set_mute(Handle, value);
}
}
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern double gst_stream_volume_convert_volume(int from, int to, double val);
public static double ConvertVolume(Gst.Audio.StreamVolumeFormat from, Gst.Audio.StreamVolumeFormat to, double val) {
double raw_ret = gst_stream_volume_convert_volume((int) from, (int) to, val);
double ret = raw_ret;
return ret;
}
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern double gst_stream_volume_get_volume(IntPtr raw, int format);
public double GetVolume(Gst.Audio.StreamVolumeFormat format) {
double raw_ret = gst_stream_volume_get_volume(Handle, (int) format);
double ret = raw_ret;
return ret;
}
[DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_stream_volume_set_volume(IntPtr raw, int format, double val);
public void SetVolume(Gst.Audio.StreamVolumeFormat format, double val) {
gst_stream_volume_set_volume(Handle, (int) format, val);
}
#endregion
}
}