Esempio n. 1
0
 static void OverrideCanceled(GLib.GType gtype, CanceledNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private void InternalCanceled()
        {
            CanceledNativeDelegate unmanaged = class_abi.BaseOverride <CanceledNativeDelegate>(this.LookupGType(), "cancel");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Esempio n. 3
0
        private void InternalCanceled()
        {
            CanceledNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle);
        }
Esempio n. 4
0
		static void OverrideCanceled (GLib.GType gtype, CanceledNativeDelegate callback)
		{
			gtksharp_menushell_override_cancel (gtype.GetClassPtr (), callback);
		}
Esempio n. 5
0
		static extern void gtksharp_menushell_override_cancel (IntPtr class_struct, CanceledNativeDelegate cb);