static void OverrideGetDisplay(GLib.GType gtype, GetDisplayNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_display")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private string InternalGetDisplay(GLib.IAppInfo info, GLib.List files) { GetDisplayNativeDelegate unmanaged = class_abi.BaseOverride <GetDisplayNativeDelegate>(this.LookupGType(), "get_display"); if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle); return(GLib.Marshaller.PtrToStringGFree(__result)); }
private string InternalGetDisplay(GLib.IAppInfo info, GLib.List files) { GetDisplayNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_display")); unmanaged = (GetDisplayNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetDisplayNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle); return(GLib.Marshaller.PtrToStringGFree(__result)); }
static void OverrideGetDisplay (GLib.GType gtype, GetDisplayNativeDelegate callback) { GAppLaunchContextClass class_iface = GetClassStruct (gtype, false); class_iface.GetDisplay = callback; OverrideClassStruct (gtype, class_iface); }