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 bool MemoryIsSpanFunctionNative(IntPtr mem1, IntPtr mem2, UIntPtr offset);
13 internal class MemoryIsSpanFunctionInvoker {
15 MemoryIsSpanFunctionNative native_cb;
17 GLib.DestroyNotify __notify;
19 ~MemoryIsSpanFunctionInvoker ()
26 internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
28 internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb, IntPtr data) : this (native_cb, data, null) {}
30 internal MemoryIsSpanFunctionInvoker (MemoryIsSpanFunctionNative native_cb, IntPtr data, GLib.DestroyNotify notify)
32 this.native_cb = native_cb;
37 internal Gst.MemoryIsSpanFunction Handler {
39 return new Gst.MemoryIsSpanFunction(InvokeNative);
43 bool InvokeNative (Gst.Memory mem1, Gst.Memory mem2, ulong offset)
45 bool __result = native_cb (mem1 == null ? IntPtr.Zero : mem1.Handle, mem2 == null ? IntPtr.Zero : mem2.Handle, new UIntPtr (offset));
50 internal class MemoryIsSpanFunctionWrapper {
52 public bool NativeCallback (IntPtr mem1, IntPtr mem2, UIntPtr offset)
55 bool __ret = managed (mem1 == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem1, typeof (Gst.Memory), false), mem2 == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (mem2, typeof (Gst.Memory), false), (ulong) offset);
59 } catch (Exception e) {
60 GLib.ExceptionManager.RaiseUnhandledException (e, false);
65 bool release_on_call = false;
68 public void PersistUntilCalled ()
70 release_on_call = true;
71 gch = GCHandle.Alloc (this);
74 internal MemoryIsSpanFunctionNative NativeDelegate;
75 Gst.MemoryIsSpanFunction managed;
77 public MemoryIsSpanFunctionWrapper (Gst.MemoryIsSpanFunction managed)
79 this.managed = managed;
81 NativeDelegate = new MemoryIsSpanFunctionNative (NativeCallback);
84 public static Gst.MemoryIsSpanFunction GetManagedDelegate (MemoryIsSpanFunctionNative native)
88 MemoryIsSpanFunctionWrapper wrapper = (MemoryIsSpanFunctionWrapper) native.Target;
91 return wrapper.managed;