Example #1
0
 static void OverrideNextFilesFinish(GLib.GType gtype, NextFilesFinishNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("next_files_finish"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private GLib.FileInfo[] InternalNextFilesFinish(GLib.IAsyncResult result)
        {
            NextFilesFinishNativeDelegate unmanaged = class_abi.BaseOverride <NextFilesFinishNativeDelegate>(this.LookupGType(), "next_files_finish");

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

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);

            return((GLib.FileInfo[])GLib.Marshaller.ListPtrToArray(__result, typeof(GLib.List), true, true, typeof(GLib.FileInfo)));
        }
        private GLib.FileInfo[] InternalNextFilesFinish(GLib.IAsyncResult result)
        {
            NextFilesFinishNativeDelegate unmanaged = null;

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

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);

            return((GLib.FileInfo[])GLib.Marshaller.ListPtrToArray(__result, typeof(GLib.List), true, true, typeof(GLib.FileInfo)));
        }
Example #4
0
		static void OverrideNextFilesFinish (GLib.GType gtype, NextFilesFinishNativeDelegate callback)
		{
			GFileEnumeratorClass class_iface = GetClassStruct (gtype, false);
			class_iface.NextFilesFinish = callback;
			OverrideClassStruct (gtype, class_iface);
		}