예제 #1
0
 static void OverrideCancel(GLib.GType gtype, CancelNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
예제 #2
0
        private void InternalCancel()
        {
            CancelNativeDelegate unmanaged = class_abi.BaseOverride <CancelNativeDelegate>(this.LookupGType(), "cancel");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
예제 #3
0
        private bool InternalCancel()
        {
            CancelNativeDelegate unmanaged = class_abi.BaseOverride <CancelNativeDelegate>(this.LookupGType(), "cancel");

            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle);

            return(__result);
        }
예제 #4
0
        private void InternalCancel()
        {
            CancelNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle);
        }
예제 #5
0
		static void OverrideCancel (GLib.GType gtype, CancelNativeDelegate callback)
		{
			GtkAssistantClass class_iface = GetClassStruct (gtype, false);
			class_iface.Cancel = callback;
			OverrideClassStruct (gtype, class_iface);
		}