static void OverrideTagAdded(GLib.GType gtype, TagAddedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("tag_added")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalTagAdded(Gtk.TextTag tag) { TagAddedNativeDelegate unmanaged = class_abi.BaseOverride <TagAddedNativeDelegate>(this.LookupGType(), "tag_added"); if (unmanaged == null) { return; } unmanaged(this.Handle, tag == null ? IntPtr.Zero : tag.Handle); }
private void InternalTagAdded(Gtk.TextTag tag) { TagAddedNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("tag_added")); unmanaged = (TagAddedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TagAddedNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, tag == null ? IntPtr.Zero : tag.Handle); }
static void OverrideTagAdded (GLib.GType gtype, TagAddedNativeDelegate callback) { GtkTextTagTableClass class_iface = GetClassStruct (gtype, false); class_iface.TagAdded = callback; OverrideClassStruct (gtype, class_iface); }