static void OverrideColorSet(GLib.GType gtype, ColorSetNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("color_set")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalColorSet() { ColorSetNativeDelegate unmanaged = class_abi.BaseOverride <ColorSetNativeDelegate>(this.LookupGType(), "color_set"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private void InternalColorSet() { ColorSetNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("color_set")); unmanaged = (ColorSetNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ColorSetNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }
static void OverrideColorSet (GLib.GType gtype, ColorSetNativeDelegate callback) { GtkColorButtonClass class_iface = GetClassStruct (gtype, false); class_iface.ColorSet = callback; OverrideClassStruct (gtype, class_iface); }