static void OverridePan(GLib.GType gtype, PanNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("pan")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalPan(Gtk.PanDirection direction, double offset) { PanNativeDelegate unmanaged = class_abi.BaseOverride <PanNativeDelegate>(this.LookupGType(), "pan"); if (unmanaged == null) { return; } unmanaged(this.Handle, (int)direction, offset); }
private void InternalPan(Gtk.PanDirection direction, double offset) { PanNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("pan")); unmanaged = (PanNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PanNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, (int)direction, offset); }