static void OverrideDragEnd(GLib.GType gtype, DragEndNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("drag_end")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalDragEnd(double offset_x, double offset_y) { DragEndNativeDelegate unmanaged = class_abi.BaseOverride <DragEndNativeDelegate>(this.LookupGType(), "drag_end"); if (unmanaged == null) { return; } unmanaged(this.Handle, offset_x, offset_y); }
private void InternalDragEnd(double offset_x, double offset_y) { DragEndNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("drag_end")); unmanaged = (DragEndNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragEndNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, offset_x, offset_y); }
static void OverrideDragEnd (GLib.GType gtype, DragEndNativeDelegate callback) { GtkWidgetClass class_iface = GetClassStruct (gtype, false); class_iface.DragEnd = callback; OverrideClassStruct (gtype, class_iface); }