Merging gst-build
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / StaticCaps.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         [StructLayout(LayoutKind.Sequential)]
13         public partial struct StaticCaps : IEquatable<StaticCaps> {
14
15                 private IntPtr _caps;
16                 public Gst.Caps Caps {
17                         get {
18                                 return _caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (_caps, typeof (Gst.Caps), false);
19                         }
20                         set {
21                                 _caps = value == null ? IntPtr.Zero : value.Handle;
22                         }
23                 }
24                 public string String;
25                 [MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
26                 private IntPtr[] _gstGstReserved;
27
28                 public static Gst.StaticCaps Zero = new Gst.StaticCaps ();
29
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));
34                 }
35
36                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37                 static extern void gst_static_caps_cleanup(IntPtr raw);
38
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);
45                 }
46
47                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
48                 static extern IntPtr gst_static_caps_get(IntPtr raw);
49
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);
57                         return ret;
58                 }
59
60                 static void ReadNative (IntPtr native, ref Gst.StaticCaps target)
61                 {
62                         target = New (native);
63                 }
64
65                 public bool Equals (StaticCaps other)
66                 {
67                         return true && Caps.Equals (other.Caps) && String.Equals (other.String);
68                 }
69
70                 public override bool Equals (object other)
71                 {
72                         return other is StaticCaps && Equals ((StaticCaps) other);
73                 }
74
75                 public override int GetHashCode ()
76                 {
77                         return this.GetType ().FullName.GetHashCode () ^ Caps.GetHashCode () ^ String.GetHashCode ();
78                 }
79
80                 private static GLib.GType GType {
81                         get { return GLib.GType.Pointer; }
82                 }
83 #endregion
84         }
85 }