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 TocEntry : IEquatable<TocEntry> {
16 public static Gst.TocEntry Zero = new Gst.TocEntry ();
18 public static Gst.TocEntry New(IntPtr raw) {
19 if (raw == IntPtr.Zero)
20 return Gst.TocEntry.Zero;
21 return (Gst.TocEntry) Marshal.PtrToStructure (raw, typeof (Gst.TocEntry));
24 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25 static extern IntPtr gst_toc_entry_new(int type, IntPtr uid);
27 public static TocEntry New(Gst.TocEntryType type, string uid)
29 IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid);
30 TocEntry result = TocEntry.New (gst_toc_entry_new((int) type, native_uid));
31 GLib.Marshaller.Free (native_uid);
35 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
36 static extern IntPtr gst_toc_entry_get_type();
38 public static GLib.GType GType {
40 IntPtr raw_ret = gst_toc_entry_get_type();
41 GLib.GType ret = new GLib.GType(raw_ret);
46 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
47 static extern void gst_toc_entry_append_sub_entry(IntPtr raw, IntPtr subentry);
49 public void AppendSubEntry(Gst.TocEntry subentry) {
50 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
51 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
52 IntPtr native_subentry = GLib.Marshaller.StructureToPtrAlloc (subentry);
53 gst_toc_entry_append_sub_entry(this_as_native, native_subentry);
54 ReadNative (this_as_native, ref this);
55 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
56 Marshal.FreeHGlobal (native_subentry);
59 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
60 static extern int gst_toc_entry_get_entry_type(IntPtr raw);
62 public Gst.TocEntryType EntryType {
64 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
65 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
66 int raw_ret = gst_toc_entry_get_entry_type(this_as_native);
67 Gst.TocEntryType ret = (Gst.TocEntryType) raw_ret;
68 ReadNative (this_as_native, ref this);
69 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
74 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
75 static extern bool gst_toc_entry_get_loop(IntPtr raw, out int loop_type, out int repeat_count);
77 public bool GetLoop(out Gst.TocLoopType loop_type, out int repeat_count) {
78 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
79 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
81 bool raw_ret = gst_toc_entry_get_loop(this_as_native, out native_loop_type, out repeat_count);
83 ReadNative (this_as_native, ref this);
84 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
85 loop_type = (Gst.TocLoopType) native_loop_type;
89 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90 static extern IntPtr gst_toc_entry_get_parent(IntPtr raw);
92 public Gst.TocEntry Parent {
94 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
95 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
96 IntPtr raw_ret = gst_toc_entry_get_parent(this_as_native);
97 Gst.TocEntry ret = Gst.TocEntry.New (raw_ret);
98 ReadNative (this_as_native, ref this);
99 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
104 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
105 static extern bool gst_toc_entry_get_start_stop_times(IntPtr raw, out long start, out long stop);
107 public bool GetStartStopTimes(out long start, out long stop) {
108 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
109 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
110 bool raw_ret = gst_toc_entry_get_start_stop_times(this_as_native, out start, out stop);
112 ReadNative (this_as_native, ref this);
113 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
117 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
118 static extern IntPtr gst_toc_entry_get_sub_entries(IntPtr raw);
120 public GLib.List[] SubEntries {
122 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
123 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
124 IntPtr raw_ret = gst_toc_entry_get_sub_entries(this_as_native);
125 GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GLib.List));
126 ReadNative (this_as_native, ref this);
127 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
132 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
133 static extern IntPtr gst_toc_entry_get_tags(IntPtr raw);
135 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136 static extern void gst_toc_entry_set_tags(IntPtr raw, IntPtr tags);
138 public Gst.TagList Tags {
140 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
141 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
142 IntPtr raw_ret = gst_toc_entry_get_tags(this_as_native);
143 Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false);
144 ReadNative (this_as_native, ref this);
145 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
149 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
150 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
152 gst_toc_entry_set_tags(this_as_native, value == null ? IntPtr.Zero : value.Handle);
153 ReadNative (this_as_native, ref this);
154 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
158 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
159 static extern IntPtr gst_toc_entry_get_toc(IntPtr raw);
163 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
164 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
165 IntPtr raw_ret = gst_toc_entry_get_toc(this_as_native);
166 Gst.Toc ret = Gst.Toc.New (raw_ret);
167 ReadNative (this_as_native, ref this);
168 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
173 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174 static extern IntPtr gst_toc_entry_get_uid(IntPtr raw);
178 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
179 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
180 IntPtr raw_ret = gst_toc_entry_get_uid(this_as_native);
181 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
182 ReadNative (this_as_native, ref this);
183 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
188 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
189 static extern bool gst_toc_entry_is_alternative(IntPtr raw);
191 public bool IsAlternative {
193 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
194 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
195 bool raw_ret = gst_toc_entry_is_alternative(this_as_native);
197 ReadNative (this_as_native, ref this);
198 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
203 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
204 static extern bool gst_toc_entry_is_sequence(IntPtr raw);
206 public bool IsSequence {
208 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
209 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
210 bool raw_ret = gst_toc_entry_is_sequence(this_as_native);
212 ReadNative (this_as_native, ref this);
213 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
218 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
219 static extern void gst_toc_entry_merge_tags(IntPtr raw, IntPtr tags, int mode);
221 public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) {
222 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
223 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
224 gst_toc_entry_merge_tags(this_as_native, tags == null ? IntPtr.Zero : tags.Handle, (int) mode);
225 ReadNative (this_as_native, ref this);
226 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
229 public void MergeTags(Gst.TagMergeMode mode) {
230 MergeTags (null, mode);
233 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234 static extern void gst_toc_entry_set_loop(IntPtr raw, int loop_type, int repeat_count);
236 public void SetLoop(Gst.TocLoopType loop_type, int repeat_count) {
237 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
238 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
239 gst_toc_entry_set_loop(this_as_native, (int) loop_type, repeat_count);
240 ReadNative (this_as_native, ref this);
241 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
244 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
245 static extern void gst_toc_entry_set_start_stop_times(IntPtr raw, long start, long stop);
247 public void SetStartStopTimes(long start, long stop) {
248 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
249 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
250 gst_toc_entry_set_start_stop_times(this_as_native, start, stop);
251 ReadNative (this_as_native, ref this);
252 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
255 static void ReadNative (IntPtr native, ref Gst.TocEntry target)
257 target = New (native);
260 public bool Equals (TocEntry other)
265 public override bool Equals (object other)
267 return other is TocEntry && Equals ((TocEntry) other);
270 public override int GetHashCode ()
272 return this.GetType ().FullName.GetHashCode ();
275 public static explicit operator GLib.Value (Gst.TocEntry boxed)
277 GLib.Value val = GLib.Value.Empty;
278 val.Init (Gst.TocEntry.GType);
283 public static explicit operator Gst.TocEntry (GLib.Value val)
285 return (Gst.TocEntry) val.Val;