static void OverrideBracketMatched(GLib.GType gtype, BracketMatchedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("bracket_matched")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalBracketMatched(Gtk.TextIter iter, GtkSource.BracketMatchType state) { BracketMatchedNativeDelegate unmanaged = class_abi.BaseOverride <BracketMatchedNativeDelegate>(this.LookupGType(), "bracket_matched"); if (unmanaged == null) { return; } IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc(iter); unmanaged(this.Handle, native_iter, (int)state); Marshal.FreeHGlobal(native_iter); }