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