static void OverrideGetObject(GLib.GType gtype, GetObjectNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_object")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Atk.Object InternalGetObject(int i) { GetObjectNativeDelegate unmanaged = class_abi.BaseOverride <GetObjectNativeDelegate>(this.LookupGType(), "get_object"); if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, i); return(GLib.Object.GetObject(__result) as Atk.Object); }
private Atk.Object InternalGetObject(int i) { GetObjectNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_object")); unmanaged = (GetObjectNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetObjectNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, i); return(GLib.Object.GetObject(__result) as Atk.Object); }
static void OverrideGetObject (GLib.GType gtype, GetObjectNativeDelegate callback) { AtkHyperlinkClass class_iface = GetClassStruct (gtype, false); class_iface.GetObject = callback; OverrideClassStruct (gtype, class_iface); }