Example #1
0
 static void OverrideApply(GLib.GType gtype, ApplyNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("apply"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private void InternalApply()
        {
            ApplyNativeDelegate unmanaged = class_abi.BaseOverride <ApplyNativeDelegate>(this.LookupGType(), "apply");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Example #3
0
        private void InternalApply()
        {
            ApplyNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle);
        }
Example #4
0
		static void OverrideApply (GLib.GType gtype, ApplyNativeDelegate callback)
		{
			GtkAssistantClass class_iface = GetClassStruct (gtype, false);
			class_iface.Apply = callback;
			OverrideClassStruct (gtype, class_iface);
		}