static void OverrideCanTruncate(GLib.GType gtype, CanTruncateNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("can_truncate")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalCanTruncate() { CanTruncateNativeDelegate unmanaged = class_abi.BaseOverride <CanTruncateNativeDelegate>(this.LookupGType(), "can_truncate"); if (unmanaged == null) { return(false); } bool __result = unmanaged(this.Handle); return(__result); }
private bool InternalCanTruncate() { CanTruncateNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("can_truncate")); unmanaged = (CanTruncateNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CanTruncateNativeDelegate)); } if (unmanaged == null) { return(false); } bool __result = unmanaged(this.Handle); return(__result); }
static void OverrideCanTruncate (GLib.GType gtype, CanTruncateNativeDelegate callback) { GFileIOStreamClass class_iface = GetClassStruct (gtype, false); class_iface.CanTruncate = callback; OverrideClassStruct (gtype, class_iface); }