Пример #1
0
 static void OverrideCleanup(GLib.GType gtype, CleanupNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cleanup"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Пример #2
0
        private void InternalCleanup()
        {
            CleanupNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("cleanup"));
                unmanaged = (CleanupNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CleanupNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Пример #3
0
		static void OverrideCleanup (Gst.GLib.GType gtype, CleanupNativeDelegate callback)
		{
			GstTaskPoolClass class_iface = GetClassStruct (gtype, false);
			class_iface.Cleanup = callback;
			OverrideClassStruct (gtype, class_iface);
		}