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 CustomMeta : IEquatable<CustomMeta> {
17 public static Gst.CustomMeta Zero = new Gst.CustomMeta ();
19 public static Gst.CustomMeta New(IntPtr raw) {
20 if (raw == IntPtr.Zero)
21 return Gst.CustomMeta.Zero;
22 return (Gst.CustomMeta) Marshal.PtrToStructure (raw, typeof (Gst.CustomMeta));
25 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
26 static extern IntPtr gst_custom_meta_get_structure(IntPtr raw);
28 public Gst.Structure Structure {
30 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
31 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
32 IntPtr raw_ret = gst_custom_meta_get_structure(this_as_native);
33 Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
34 ReadNative (this_as_native, ref this);
35 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
40 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
41 static extern bool gst_custom_meta_has_name(IntPtr raw, IntPtr name);
43 public bool HasName(string name) {
44 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
45 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
46 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
47 bool raw_ret = gst_custom_meta_has_name(this_as_native, native_name);
49 ReadNative (this_as_native, ref this);
50 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
51 GLib.Marshaller.Free (native_name);
55 static void ReadNative (IntPtr native, ref Gst.CustomMeta target)
57 target = New (native);
60 public bool Equals (CustomMeta other)
62 return true && Meta.Equals (other.Meta);
65 public override bool Equals (object other)
67 return other is CustomMeta && Equals ((CustomMeta) other);
70 public override int GetHashCode ()
72 return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode ();
75 private static GLib.GType GType {
76 get { return GLib.GType.Pointer; }