static void OverrideSkip(GLib.GType gtype, SkipNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("skip"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Beispiel #2
0
        private long InternalSkip(ulong count, GLib.Cancellable cancellable)
        {
            SkipNativeDelegate unmanaged = class_abi.BaseOverride <SkipNativeDelegate>(this.LookupGType(), "skip");

            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, new UIntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((long)__result);
        }
        private long InternalSkip(ulong count, GLib.Cancellable cancellable)
        {
            SkipNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("skip"));
                unmanaged = (SkipNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SkipNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, new UIntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((long)__result);
        }
Beispiel #4
0
		static void OverrideSkip (GLib.GType gtype, SkipNativeDelegate callback)
		{
			GInputStreamClass class_iface = GetClassStruct (gtype, false);
			class_iface.Skip = callback;
			OverrideClassStruct (gtype, class_iface);
		}