static void OverrideScrollChild(GLib.GType gtype, ScrollChildNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("scroll_child")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalScrollChild(Gtk.ScrollType scroll, bool horizontal) { ScrollChildNativeDelegate unmanaged = class_abi.BaseOverride <ScrollChildNativeDelegate>(this.LookupGType(), "scroll_child"); if (unmanaged == null) { return; } unmanaged(this.Handle, (int)scroll, horizontal); }
private void InternalScrollChild(Gtk.ScrollType scroll, bool horizontal) { ScrollChildNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("scroll_child")); unmanaged = (ScrollChildNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ScrollChildNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, (int)scroll, horizontal); }
static void OverrideScrollChild (GLib.GType gtype, ScrollChildNativeDelegate callback) { GtkScrolledWindowClass class_iface = GetClassStruct (gtype, false); class_iface.ScrollChild = callback; OverrideClassStruct (gtype, class_iface); }