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 ControlBindingConvertNative(IntPtr binding, double src_value, IntPtr dest_value);
13 internal class ControlBindingConvertInvoker {
15 ControlBindingConvertNative native_cb;
17 GLib.DestroyNotify __notify;
19 ~ControlBindingConvertInvoker ()
26 internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb) : this (native_cb, IntPtr.Zero, null) {}
28 internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb, IntPtr data) : this (native_cb, data, null) {}
30 internal ControlBindingConvertInvoker (ControlBindingConvertNative native_cb, IntPtr data, GLib.DestroyNotify notify)
32 this.native_cb = native_cb;
37 internal Gst.ControlBindingConvert Handler {
39 return new Gst.ControlBindingConvert(InvokeNative);
43 void InvokeNative (Gst.ControlBinding binding, double src_value, GLib.Value dest_value)
45 IntPtr native_dest_value = GLib.Marshaller.StructureToPtrAlloc (dest_value);
46 native_cb (binding == null ? IntPtr.Zero : binding.Handle, src_value, native_dest_value);
47 Marshal.FreeHGlobal (native_dest_value);
51 internal class ControlBindingConvertWrapper {
53 public void NativeCallback (IntPtr binding, double src_value, IntPtr dest_value)
56 managed (GLib.Object.GetObject(binding) as Gst.ControlBinding, src_value, (GLib.Value) Marshal.PtrToStructure (dest_value, typeof (GLib.Value)));
59 } catch (Exception e) {
60 GLib.ExceptionManager.RaiseUnhandledException (e, false);
64 bool release_on_call = false;
67 public void PersistUntilCalled ()
69 release_on_call = true;
70 gch = GCHandle.Alloc (this);
73 internal ControlBindingConvertNative NativeDelegate;
74 Gst.ControlBindingConvert managed;
76 public ControlBindingConvertWrapper (Gst.ControlBindingConvert managed)
78 this.managed = managed;
80 NativeDelegate = new ControlBindingConvertNative (NativeCallback);
83 public static Gst.ControlBindingConvert GetManagedDelegate (ControlBindingConvertNative native)
87 ControlBindingConvertWrapper wrapper = (ControlBindingConvertWrapper) native.Target;
90 return wrapper.managed;