637 lines
25 KiB
C#
637 lines
25 KiB
C#
|
|
// This file was generated by the Gtk# code generator.
|
||
|
|
// Any changes made will be lost if regenerated.
|
||
|
|
|
||
|
|
namespace GLib {
|
||
|
|
|
||
|
|
using System;
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Runtime.InteropServices;
|
||
|
|
using static GLib.AbiStructExtension;
|
||
|
|
|
||
|
|
#region Autogenerated code
|
||
|
|
public partial class FileEnumerator : GLib.Object {
|
||
|
|
|
||
|
|
public FileEnumerator (IntPtr raw) : base(raw) {}
|
||
|
|
|
||
|
|
protected FileEnumerator() : base(IntPtr.Zero)
|
||
|
|
{
|
||
|
|
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
|
||
|
|
}
|
||
|
|
|
||
|
|
static NextFileNativeDelegate NextFile_cb_delegate;
|
||
|
|
static NextFileNativeDelegate NextFileVMCallback {
|
||
|
|
get {
|
||
|
|
if (NextFile_cb_delegate == null)
|
||
|
|
NextFile_cb_delegate = new NextFileNativeDelegate (NextFile_cb);
|
||
|
|
return NextFile_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideNextFile (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideNextFile (gtype, NextFileVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideNextFile (GLib.GType gtype, NextFileNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("next_file"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr NextFileNativeDelegate (IntPtr inst, IntPtr cancellable, out IntPtr error);
|
||
|
|
|
||
|
|
static IntPtr NextFile_cb (IntPtr inst, IntPtr cancellable, out IntPtr error)
|
||
|
|
{
|
||
|
|
error = IntPtr.Zero;
|
||
|
|
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
GLib.FileInfo __result;
|
||
|
|
__result = __obj.OnNextFile (GLib.Object.GetObject(cancellable) as GLib.Cancellable);
|
||
|
|
return __result == null ? IntPtr.Zero : __result.Handle;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideNextFile")]
|
||
|
|
protected virtual GLib.FileInfo OnNextFile (GLib.Cancellable cancellable)
|
||
|
|
{
|
||
|
|
return InternalNextFile (cancellable);
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.FileInfo InternalNextFile (GLib.Cancellable cancellable)
|
||
|
|
{
|
||
|
|
NextFileNativeDelegate unmanaged = class_abi.BaseOverride<NextFileNativeDelegate>(this.LookupGType(), "next_file");
|
||
|
|
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
|
||
|
|
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
IntPtr __result = unmanaged (this.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
||
|
|
return GLib.Object.GetObject(__result) as GLib.FileInfo;
|
||
|
|
}
|
||
|
|
|
||
|
|
static CloseFnNativeDelegate CloseFn_cb_delegate;
|
||
|
|
static CloseFnNativeDelegate CloseFnVMCallback {
|
||
|
|
get {
|
||
|
|
if (CloseFn_cb_delegate == null)
|
||
|
|
CloseFn_cb_delegate = new CloseFnNativeDelegate (CloseFn_cb);
|
||
|
|
return CloseFn_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseFn (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideCloseFn (gtype, CloseFnVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseFn (GLib.GType gtype, CloseFnNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close_fn"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool CloseFnNativeDelegate (IntPtr inst, IntPtr cancellable, out IntPtr error);
|
||
|
|
|
||
|
|
static bool CloseFn_cb (IntPtr inst, IntPtr cancellable, out IntPtr error)
|
||
|
|
{
|
||
|
|
error = IntPtr.Zero;
|
||
|
|
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
bool __result;
|
||
|
|
__result = __obj.OnCloseFn (GLib.Object.GetObject(cancellable) as GLib.Cancellable);
|
||
|
|
return __result;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideCloseFn")]
|
||
|
|
protected virtual bool OnCloseFn (GLib.Cancellable cancellable)
|
||
|
|
{
|
||
|
|
return InternalCloseFn (cancellable);
|
||
|
|
}
|
||
|
|
|
||
|
|
private bool InternalCloseFn (GLib.Cancellable cancellable)
|
||
|
|
{
|
||
|
|
CloseFnNativeDelegate unmanaged = class_abi.BaseOverride<CloseFnNativeDelegate>(this.LookupGType(), "close_fn");
|
||
|
|
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
|
||
|
|
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
bool __result = unmanaged (this.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
||
|
|
return __result;
|
||
|
|
}
|
||
|
|
|
||
|
|
static NextFilesAsyncNativeDelegate NextFilesAsync_cb_delegate;
|
||
|
|
static NextFilesAsyncNativeDelegate NextFilesAsyncVMCallback {
|
||
|
|
get {
|
||
|
|
if (NextFilesAsync_cb_delegate == null)
|
||
|
|
NextFilesAsync_cb_delegate = new NextFilesAsyncNativeDelegate (NextFilesAsync_cb);
|
||
|
|
return NextFilesAsync_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideNextFilesAsync (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideNextFilesAsync (gtype, NextFilesAsyncVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideNextFilesAsync (GLib.GType gtype, NextFilesAsyncNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("next_files_async"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void NextFilesAsyncNativeDelegate (IntPtr inst, int num_files, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
|
||
|
|
|
||
|
|
static void NextFilesAsync_cb (IntPtr inst, int num_files, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker (cb, user_data);
|
||
|
|
__obj.OnNextFilesAsync (num_files, io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideNextFilesAsync")]
|
||
|
|
protected virtual void OnNextFilesAsync (int num_files, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
|
||
|
|
{
|
||
|
|
InternalNextFilesAsync (num_files, io_priority, cancellable, cb);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalNextFilesAsync (int num_files, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
|
||
|
|
{
|
||
|
|
NextFilesAsyncNativeDelegate unmanaged = class_abi.BaseOverride<NextFilesAsyncNativeDelegate>(this.LookupGType(), "next_files_async");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
|
||
|
|
cb_wrapper.PersistUntilCalled ();
|
||
|
|
unmanaged (this.Handle, num_files, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||
|
|
}
|
||
|
|
|
||
|
|
static NextFilesFinishNativeDelegate NextFilesFinish_cb_delegate;
|
||
|
|
static NextFilesFinishNativeDelegate NextFilesFinishVMCallback {
|
||
|
|
get {
|
||
|
|
if (NextFilesFinish_cb_delegate == null)
|
||
|
|
NextFilesFinish_cb_delegate = new NextFilesFinishNativeDelegate (NextFilesFinish_cb);
|
||
|
|
return NextFilesFinish_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideNextFilesFinish (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideNextFilesFinish (gtype, NextFilesFinishVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
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(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr NextFilesFinishNativeDelegate (IntPtr inst, IntPtr result, out IntPtr error);
|
||
|
|
|
||
|
|
static IntPtr NextFilesFinish_cb (IntPtr inst, IntPtr result, out IntPtr error)
|
||
|
|
{
|
||
|
|
error = IntPtr.Zero;
|
||
|
|
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
GLib.FileInfo[] __result;
|
||
|
|
__result = __obj.OnNextFilesFinish (GLib.AsyncResultAdapter.GetObject (result, false));
|
||
|
|
return new GLib.List(__result, typeof (GLib.FileInfo), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (GLib.FileInfo), true, true).Handle;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideNextFilesFinish")]
|
||
|
|
protected virtual GLib.FileInfo[] OnNextFilesFinish (GLib.IAsyncResult result)
|
||
|
|
{
|
||
|
|
return InternalNextFilesFinish (result);
|
||
|
|
}
|
||
|
|
|
||
|
|
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.Marshaller.ListPtrToArray<GLib.FileInfo, GLib.FileInfo> (__result, true, true);
|
||
|
|
}
|
||
|
|
|
||
|
|
static CloseAsyncNativeDelegate CloseAsync_cb_delegate;
|
||
|
|
static CloseAsyncNativeDelegate CloseAsyncVMCallback {
|
||
|
|
get {
|
||
|
|
if (CloseAsync_cb_delegate == null)
|
||
|
|
CloseAsync_cb_delegate = new CloseAsyncNativeDelegate (CloseAsync_cb);
|
||
|
|
return CloseAsync_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseAsync (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideCloseAsync (gtype, CloseAsyncVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseAsync (GLib.GType gtype, CloseAsyncNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close_async"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void CloseAsyncNativeDelegate (IntPtr inst, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
|
||
|
|
|
||
|
|
static void CloseAsync_cb (IntPtr inst, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker (cb, user_data);
|
||
|
|
__obj.OnCloseAsync (io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideCloseAsync")]
|
||
|
|
protected virtual void OnCloseAsync (int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
|
||
|
|
{
|
||
|
|
InternalCloseAsync (io_priority, cancellable, cb);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalCloseAsync (int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
|
||
|
|
{
|
||
|
|
CloseAsyncNativeDelegate unmanaged = class_abi.BaseOverride<CloseAsyncNativeDelegate>(this.LookupGType(), "close_async");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
|
||
|
|
cb_wrapper.PersistUntilCalled ();
|
||
|
|
unmanaged (this.Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||
|
|
}
|
||
|
|
|
||
|
|
static CloseFinishNativeDelegate CloseFinish_cb_delegate;
|
||
|
|
static CloseFinishNativeDelegate CloseFinishVMCallback {
|
||
|
|
get {
|
||
|
|
if (CloseFinish_cb_delegate == null)
|
||
|
|
CloseFinish_cb_delegate = new CloseFinishNativeDelegate (CloseFinish_cb);
|
||
|
|
return CloseFinish_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseFinish (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideCloseFinish (gtype, CloseFinishVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideCloseFinish (GLib.GType gtype, CloseFinishNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close_finish"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool CloseFinishNativeDelegate (IntPtr inst, IntPtr result, out IntPtr error);
|
||
|
|
|
||
|
|
static bool CloseFinish_cb (IntPtr inst, IntPtr result, out IntPtr error)
|
||
|
|
{
|
||
|
|
error = IntPtr.Zero;
|
||
|
|
|
||
|
|
try {
|
||
|
|
FileEnumerator __obj = GLib.Object.GetObject (inst, false) as FileEnumerator;
|
||
|
|
bool __result;
|
||
|
|
__result = __obj.OnCloseFinish (GLib.AsyncResultAdapter.GetObject (result, false));
|
||
|
|
return __result;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.FileEnumerator), ConnectionMethod="OverrideCloseFinish")]
|
||
|
|
protected virtual bool OnCloseFinish (GLib.IAsyncResult result)
|
||
|
|
{
|
||
|
|
return InternalCloseFinish (result);
|
||
|
|
}
|
||
|
|
|
||
|
|
private bool InternalCloseFinish (GLib.IAsyncResult result)
|
||
|
|
{
|
||
|
|
CloseFinishNativeDelegate unmanaged = class_abi.BaseOverride<CloseFinishNativeDelegate>(this.LookupGType(), "close_finish");
|
||
|
|
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
|
||
|
|
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
bool __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 __result;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// Internal representation of the wrapped structure ABI.
|
||
|
|
static GLib.AbiStruct _class_abi = null;
|
||
|
|
static public unsafe new GLib.AbiStruct class_abi {
|
||
|
|
get {
|
||
|
|
if (_class_abi == null)
|
||
|
|
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
|
||
|
|
new GLib.AbiField("next_file"
|
||
|
|
, GLib.Object.class_abi.Fields
|
||
|
|
, (uint) sizeof( IntPtr ) // next_file
|
||
|
|
, null
|
||
|
|
, "close_fn"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("close_fn"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // close_fn
|
||
|
|
, "next_file"
|
||
|
|
, "next_files_async"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("next_files_async"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // next_files_async
|
||
|
|
, "close_fn"
|
||
|
|
, "next_files_finish"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("next_files_finish"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // next_files_finish
|
||
|
|
, "next_files_async"
|
||
|
|
, "close_async"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("close_async"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // close_async
|
||
|
|
, "next_files_finish"
|
||
|
|
, "close_finish"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("close_finish"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // close_finish
|
||
|
|
, "close_async"
|
||
|
|
, "_g_reserved1"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved1"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved1
|
||
|
|
, "close_finish"
|
||
|
|
, "_g_reserved2"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved2"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved2
|
||
|
|
, "_g_reserved1"
|
||
|
|
, "_g_reserved3"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved3"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved3
|
||
|
|
, "_g_reserved2"
|
||
|
|
, "_g_reserved4"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved4"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved4
|
||
|
|
, "_g_reserved3"
|
||
|
|
, "_g_reserved5"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved5"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved5
|
||
|
|
, "_g_reserved4"
|
||
|
|
, "_g_reserved6"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved6"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved6
|
||
|
|
, "_g_reserved5"
|
||
|
|
, "_g_reserved7"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved7"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved7
|
||
|
|
, "_g_reserved6"
|
||
|
|
, null
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
});
|
||
|
|
|
||
|
|
return _class_abi;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// End of the ABI representation.
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool d_g_file_enumerator_close(IntPtr raw, IntPtr cancellable, out IntPtr error);
|
||
|
|
static d_g_file_enumerator_close g_file_enumerator_close = FuncLoader.LoadFunction<d_g_file_enumerator_close>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_close"));
|
||
|
|
|
||
|
|
public unsafe bool Close(GLib.Cancellable cancellable) {
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
bool raw_ret = g_file_enumerator_close(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
||
|
|
bool ret = raw_ret;
|
||
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_file_enumerator_close_async(IntPtr raw, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
|
||
|
|
static d_g_file_enumerator_close_async g_file_enumerator_close_async = FuncLoader.LoadFunction<d_g_file_enumerator_close_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_close_async"));
|
||
|
|
|
||
|
|
public void CloseAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
|
||
|
|
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
|
||
|
|
cb_wrapper.PersistUntilCalled ();
|
||
|
|
g_file_enumerator_close_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool d_g_file_enumerator_close_finish(IntPtr raw, IntPtr result, out IntPtr error);
|
||
|
|
static d_g_file_enumerator_close_finish g_file_enumerator_close_finish = FuncLoader.LoadFunction<d_g_file_enumerator_close_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_close_finish"));
|
||
|
|
|
||
|
|
public unsafe bool CloseFinish(GLib.IAsyncResult result) {
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
bool raw_ret = g_file_enumerator_close_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
|
||
|
|
bool ret = raw_ret;
|
||
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_file_enumerator_get_child(IntPtr raw, IntPtr info);
|
||
|
|
static d_g_file_enumerator_get_child g_file_enumerator_get_child = FuncLoader.LoadFunction<d_g_file_enumerator_get_child>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_get_child"));
|
||
|
|
|
||
|
|
public GLib.IFile GetChild(GLib.FileInfo info) {
|
||
|
|
IntPtr raw_ret = g_file_enumerator_get_child(Handle, info == null ? IntPtr.Zero : info.Handle);
|
||
|
|
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_file_enumerator_get_type();
|
||
|
|
static d_g_file_enumerator_get_type g_file_enumerator_get_type = FuncLoader.LoadFunction<d_g_file_enumerator_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_get_type"));
|
||
|
|
|
||
|
|
public static new GLib.GType GType {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_file_enumerator_get_type();
|
||
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool d_g_file_enumerator_has_pending(IntPtr raw);
|
||
|
|
static d_g_file_enumerator_has_pending g_file_enumerator_has_pending = FuncLoader.LoadFunction<d_g_file_enumerator_has_pending>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_has_pending"));
|
||
|
|
|
||
|
|
public bool HasPending {
|
||
|
|
get {
|
||
|
|
bool raw_ret = g_file_enumerator_has_pending(Handle);
|
||
|
|
bool ret = raw_ret;
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool d_g_file_enumerator_is_closed(IntPtr raw);
|
||
|
|
static d_g_file_enumerator_is_closed g_file_enumerator_is_closed = FuncLoader.LoadFunction<d_g_file_enumerator_is_closed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_is_closed"));
|
||
|
|
|
||
|
|
public bool IsClosed {
|
||
|
|
get {
|
||
|
|
bool raw_ret = g_file_enumerator_is_closed(Handle);
|
||
|
|
bool ret = raw_ret;
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate bool d_g_file_enumerator_iterate(IntPtr raw, IntPtr out_info, IntPtr out_child, IntPtr cancellable, out IntPtr error);
|
||
|
|
static d_g_file_enumerator_iterate g_file_enumerator_iterate = FuncLoader.LoadFunction<d_g_file_enumerator_iterate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_iterate"));
|
||
|
|
|
||
|
|
public unsafe bool Iterate(GLib.FileInfo out_info, GLib.IFile out_child, GLib.Cancellable cancellable) {
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
bool raw_ret = g_file_enumerator_iterate(Handle, out_info == null ? IntPtr.Zero : out_info.Handle, out_child == null ? IntPtr.Zero : ((out_child is GLib.Object) ? (out_child as GLib.Object).Handle : (out_child as GLib.FileAdapter).Handle), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
||
|
|
bool ret = raw_ret;
|
||
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_file_enumerator_next_file(IntPtr raw, IntPtr cancellable, out IntPtr error);
|
||
|
|
static d_g_file_enumerator_next_file g_file_enumerator_next_file = FuncLoader.LoadFunction<d_g_file_enumerator_next_file>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_next_file"));
|
||
|
|
|
||
|
|
public unsafe GLib.FileInfo NextFile(GLib.Cancellable cancellable) {
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
IntPtr raw_ret = g_file_enumerator_next_file(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
||
|
|
GLib.FileInfo ret = GLib.Object.GetObject(raw_ret) as GLib.FileInfo;
|
||
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_file_enumerator_next_files_async(IntPtr raw, int num_files, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
|
||
|
|
static d_g_file_enumerator_next_files_async g_file_enumerator_next_files_async = FuncLoader.LoadFunction<d_g_file_enumerator_next_files_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_next_files_async"));
|
||
|
|
|
||
|
|
public void NextFilesAsync(int num_files, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
|
||
|
|
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
|
||
|
|
cb_wrapper.PersistUntilCalled ();
|
||
|
|
g_file_enumerator_next_files_async(Handle, num_files, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_file_enumerator_next_files_finish(IntPtr raw, IntPtr result, out IntPtr error);
|
||
|
|
static d_g_file_enumerator_next_files_finish g_file_enumerator_next_files_finish = FuncLoader.LoadFunction<d_g_file_enumerator_next_files_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_next_files_finish"));
|
||
|
|
|
||
|
|
public unsafe GLib.FileInfo[] NextFilesFinish(GLib.IAsyncResult result) {
|
||
|
|
IntPtr error = IntPtr.Zero;
|
||
|
|
IntPtr raw_ret = g_file_enumerator_next_files_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
|
||
|
|
GLib.FileInfo[] ret = GLib.Marshaller.ListPtrToArray<GLib.FileInfo, GLib.FileInfo> (raw_ret, true, true);
|
||
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_file_enumerator_set_pending(IntPtr raw, bool pending);
|
||
|
|
static d_g_file_enumerator_set_pending g_file_enumerator_set_pending = FuncLoader.LoadFunction<d_g_file_enumerator_set_pending>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_enumerator_set_pending"));
|
||
|
|
|
||
|
|
public bool Pending {
|
||
|
|
set {
|
||
|
|
g_file_enumerator_set_pending(Handle, value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// Internal representation of the wrapped structure ABI.
|
||
|
|
static GLib.AbiStruct _abi_info = null;
|
||
|
|
static public unsafe new GLib.AbiStruct abi_info {
|
||
|
|
get {
|
||
|
|
if (_abi_info == null)
|
||
|
|
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
|
||
|
|
new GLib.AbiField("priv"
|
||
|
|
, GLib.Object.abi_info.Fields
|
||
|
|
, (uint) sizeof( IntPtr ) // priv
|
||
|
|
, null
|
||
|
|
, null
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
});
|
||
|
|
|
||
|
|
return _abi_info;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// End of the ABI representation.
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
}
|
||
|
|
}
|