1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 [StructLayout(LayoutKind.Sequential)]
13 public partial struct StaticCaps : IEquatable<StaticCaps> {
16 public Gst.Caps Caps {
18 return _caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_caps, typeof (Gst.Caps), false);
21 _caps = value == null ? IntPtr.Zero : value.Handle;
25 [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
26 private IntPtr[] _gstGstReserved;
28 public static Gst.StaticCaps Zero = new Gst.StaticCaps ();
30 public static Gst.StaticCaps New(IntPtr raw) {
31 if (raw == IntPtr.Zero)
32 return Gst.StaticCaps.Zero;
33 return (Gst.StaticCaps) Marshal.PtrToStructure (raw, typeof (Gst.StaticCaps));
36 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37 static extern void gst_static_caps_cleanup(IntPtr raw);
39 public void Cleanup() {
40 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
41 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
42 gst_static_caps_cleanup(this_as_native);
43 ReadNative (this_as_native, ref this);
44 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
47 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
48 static extern IntPtr gst_static_caps_get(IntPtr raw);
50 public Gst.Caps Get() {
51 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
52 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
53 IntPtr raw_ret = gst_static_caps_get(this_as_native);
54 Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
55 ReadNative (this_as_native, ref this);
56 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
60 static void ReadNative (IntPtr native, ref Gst.StaticCaps target)
62 target = New (native);
65 public bool Equals (StaticCaps other)
67 return true && Caps.Equals (other.Caps) && String.Equals (other.String);
70 public override bool Equals (object other)
72 return other is StaticCaps && Equals ((StaticCaps) other);
75 public override int GetHashCode ()
77 return this.GetType ().FullName.GetHashCode () ^ Caps.GetHashCode () ^ String.GetHashCode ();
80 private static GLib.GType GType {
81 get { return GLib.GType.Pointer; }