示例#1
0
 static void OverrideTagRemoved(GLib.GType gtype, TagRemovedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("tag_removed"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private void InternalTagRemoved(Gtk.TextTag tag)
        {
            TagRemovedNativeDelegate unmanaged = class_abi.BaseOverride <TagRemovedNativeDelegate>(this.LookupGType(), "tag_removed");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, tag == null ? IntPtr.Zero : tag.Handle);
        }
        private void InternalTagRemoved(Gtk.TextTag tag)
        {
            TagRemovedNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("tag_removed"));
                unmanaged = (TagRemovedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TagRemovedNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, tag == null ? IntPtr.Zero : tag.Handle);
        }
示例#4
0
		static void OverrideTagRemoved (GLib.GType gtype, TagRemovedNativeDelegate callback)
		{
			GtkTextTagTableClass class_iface = GetClassStruct (gtype, false);
			class_iface.TagRemoved = callback;
			OverrideClassStruct (gtype, class_iface);
		}