1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Runtime.InteropServices;
9 #region Autogenerated code
10 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
11 internal delegate void TagMergeFuncNative(IntPtr dest, IntPtr src);
13 internal class TagMergeFuncInvoker {
15 TagMergeFuncNative native_cb;
17 GLib.DestroyNotify __notify;
19 ~TagMergeFuncInvoker ()
26 internal TagMergeFuncInvoker (TagMergeFuncNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
28 internal TagMergeFuncInvoker (TagMergeFuncNative native_cb, IntPtr data) : this (native_cb, data, null) {}
30 internal TagMergeFuncInvoker (TagMergeFuncNative native_cb, IntPtr data, GLib.DestroyNotify notify)
32 this.native_cb = native_cb;
37 internal Gst.TagMergeFunc Handler {
39 return new Gst.TagMergeFunc(InvokeNative);
43 void InvokeNative (GLib.Value dest, GLib.Value src)
45 IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc (dest);
46 IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc (src);
47 native_cb (native_dest, native_src);
48 Marshal.FreeHGlobal (native_dest);
49 Marshal.FreeHGlobal (native_src);
53 internal class TagMergeFuncWrapper {
55 public void NativeCallback (IntPtr dest, IntPtr src)
58 managed ((GLib.Value) Marshal.PtrToStructure (dest, typeof (GLib.Value)), (GLib.Value) Marshal.PtrToStructure (src, typeof (GLib.Value)));
61 } catch (Exception e) {
62 GLib.ExceptionManager.RaiseUnhandledException (e, false);
66 bool release_on_call = false;
69 public void PersistUntilCalled ()
71 release_on_call = true;
72 gch = GCHandle.Alloc (this);
75 internal TagMergeFuncNative NativeDelegate;
76 Gst.TagMergeFunc managed;
78 public TagMergeFuncWrapper (Gst.TagMergeFunc managed)
80 this.managed = managed;
82 NativeDelegate = new TagMergeFuncNative (NativeCallback);
85 public static Gst.TagMergeFunc GetManagedDelegate (TagMergeFuncNative native)
89 TagMergeFuncWrapper wrapper = (TagMergeFuncWrapper) native.Target;
92 return wrapper.managed;