summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/StaticPadTemplate.cs
blob: 82d56686c4a7d83671fdb71681209b5c07a33e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct StaticPadTemplate : IEquatable<StaticPadTemplate> {

		public string NameTemplate;
		public Gst.PadDirection Direction;
		public Gst.PadPresence Presence;
		public Gst.StaticCaps StaticCaps;

		public static Gst.StaticPadTemplate Zero = new Gst.StaticPadTemplate ();

		public static Gst.StaticPadTemplate New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gst.StaticPadTemplate.Zero;
			return (Gst.StaticPadTemplate) Marshal.PtrToStructure (raw, typeof (Gst.StaticPadTemplate));
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_static_pad_template_get(IntPtr raw);

		public Gst.PadTemplate Get() {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr raw_ret = gst_static_pad_template_get(this_as_native);
			Gst.PadTemplate ret = GLib.Object.GetObject(raw_ret) as Gst.PadTemplate;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_static_pad_template_get_caps(IntPtr raw);

		public Gst.Caps Caps { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				IntPtr raw_ret = gst_static_pad_template_get_caps(this_as_native);
				Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		static void ReadNative (IntPtr native, ref Gst.StaticPadTemplate target)
		{
			target = New (native);
		}

		public bool Equals (StaticPadTemplate other)
		{
			return true && NameTemplate.Equals (other.NameTemplate) && Direction.Equals (other.Direction) && Presence.Equals (other.Presence) && StaticCaps.Equals (other.StaticCaps);
		}

		public override bool Equals (object other)
		{
			return other is StaticPadTemplate && Equals ((StaticPadTemplate) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ NameTemplate.GetHashCode () ^ Direction.GetHashCode () ^ Presence.GetHashCode () ^ StaticCaps.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}