Example #1
0
 static void OverrideDeleteText(GLib.GType gtype, DeleteTextNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("delete_text"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private uint InternalDeleteText(uint position, uint n_chars)
        {
            DeleteTextNativeDelegate unmanaged = class_abi.BaseOverride <DeleteTextNativeDelegate>(this.LookupGType(), "delete_text");

            if (unmanaged == null)
            {
                return(0);
            }

            uint __result = unmanaged(this.Handle, position, n_chars);

            return(__result);
        }
Example #3
0
        private uint InternalDeleteText(uint position, uint n_chars)
        {
            DeleteTextNativeDelegate unmanaged = null;

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

            uint __result = unmanaged(this.Handle, position, n_chars);

            return(__result);
        }
Example #4
0
		static void OverrideDeleteText (GLib.GType gtype, DeleteTextNativeDelegate callback)
		{
			GtkEntryBufferClass class_iface = GetClassStruct (gtype, false);
			class_iface.DeleteText = callback;
			OverrideClassStruct (gtype, class_iface);
		}