Beispiel #1
0
 static void OverrideGetLength(GLib.GType gtype, GetLengthNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_length"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Beispiel #2
0
        private uint InternalGetLength()
        {
            GetLengthNativeDelegate unmanaged = class_abi.BaseOverride <GetLengthNativeDelegate>(this.LookupGType(), "get_length");

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

            uint __result = unmanaged(this.Handle);

            return(__result);
        }
Beispiel #3
0
        private uint InternalGetLength()
        {
            GetLengthNativeDelegate unmanaged = null;

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

            uint __result = unmanaged(this.Handle);

            return(__result);
        }
Beispiel #4
0
		static void OverrideGetLength (GLib.GType gtype, GetLengthNativeDelegate callback)
		{
			GtkEntryBufferClass class_iface = GetClassStruct (gtype, false);
			class_iface.GetLength = callback;
			OverrideClassStruct (gtype, class_iface);
		}