Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / CustomMeta.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 CustomMeta : IEquatable<CustomMeta> {
14
15                 public Gst.Meta Meta;
16
17                 public static Gst.CustomMeta Zero = new Gst.CustomMeta ();
18
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));
23                 }
24
25                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
26                 static extern IntPtr gst_custom_meta_get_structure(IntPtr raw);
27
28                 public Gst.Structure Structure { 
29                         get {
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);
36                                 return ret;
37                         }
38                 }
39
40                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
41                 static extern bool gst_custom_meta_has_name(IntPtr raw, IntPtr name);
42
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);
48                         bool ret = raw_ret;
49                         ReadNative (this_as_native, ref this);
50                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
51                         GLib.Marshaller.Free (native_name);
52                         return ret;
53                 }
54
55                 static void ReadNative (IntPtr native, ref Gst.CustomMeta target)
56                 {
57                         target = New (native);
58                 }
59
60                 public bool Equals (CustomMeta other)
61                 {
62                         return true && Meta.Equals (other.Meta);
63                 }
64
65                 public override bool Equals (object other)
66                 {
67                         return other is CustomMeta && Equals ((CustomMeta) other);
68                 }
69
70                 public override int GetHashCode ()
71                 {
72                         return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode ();
73                 }
74
75                 private static GLib.GType GType {
76                         get { return GLib.GType.Pointer; }
77                 }
78 #endregion
79         }
80 }