summaryrefslogtreecommitdiff
path: root/sources/generated/Gst_DebugCategory.cs
blob: d355e32825c64b6658333746d17e26e6374d621a (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
// 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 DebugCategory : IEquatable<DebugCategory> {

		private Gst.DebugLevel threshold;
		private uint color;
		private string name;
		private string description;

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

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

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

		public void Free() {
			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);
			gst_debug_category_free(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

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

		public void ResetThreshold() {
			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);
			gst_debug_category_reset_threshold(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

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

		public bool Equals (DebugCategory other)
		{
			return true && threshold.Equals (other.threshold) && color.Equals (other.color) && name.Equals (other.name) && description.Equals (other.description);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ threshold.GetHashCode () ^ color.GetHashCode () ^ name.GetHashCode () ^ description.GetHashCode ();
		}

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