864 lines
32 KiB
C#
864 lines
32 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 Vfs : GLib.Object {
|
|
|
|
public Vfs (IntPtr raw) : base(raw) {}
|
|
|
|
protected Vfs() : base(IntPtr.Zero)
|
|
{
|
|
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
|
|
}
|
|
|
|
static IsActiveNativeDelegate IsActive_cb_delegate;
|
|
static IsActiveNativeDelegate IsActiveVMCallback {
|
|
get {
|
|
if (IsActive_cb_delegate == null)
|
|
IsActive_cb_delegate = new IsActiveNativeDelegate (IsActive_cb);
|
|
return IsActive_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideIsActive (GLib.GType gtype)
|
|
{
|
|
OverrideIsActive (gtype, IsActiveVMCallback);
|
|
}
|
|
|
|
static void OverrideIsActive (GLib.GType gtype, IsActiveNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("is_active"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool IsActiveNativeDelegate (IntPtr inst);
|
|
|
|
static bool IsActive_cb (IntPtr inst)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
bool __result;
|
|
__result = __obj.OnIsActive ();
|
|
return __result;
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideIsActive")]
|
|
protected virtual bool OnIsActive ()
|
|
{
|
|
return InternalIsActive ();
|
|
}
|
|
|
|
private bool InternalIsActive ()
|
|
{
|
|
IsActiveNativeDelegate unmanaged = class_abi.BaseOverride<IsActiveNativeDelegate>(this.LookupGType(), "is_active");
|
|
if (unmanaged == null) return false;
|
|
|
|
bool __result = unmanaged (this.Handle);
|
|
return __result;
|
|
}
|
|
|
|
static GetFileForPathNativeDelegate GetFileForPath_cb_delegate;
|
|
static GetFileForPathNativeDelegate GetFileForPathVMCallback {
|
|
get {
|
|
if (GetFileForPath_cb_delegate == null)
|
|
GetFileForPath_cb_delegate = new GetFileForPathNativeDelegate (GetFileForPath_cb);
|
|
return GetFileForPath_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideGetFileForPath (GLib.GType gtype)
|
|
{
|
|
OverrideGetFileForPath (gtype, GetFileForPathVMCallback);
|
|
}
|
|
|
|
static void OverrideGetFileForPath (GLib.GType gtype, GetFileForPathNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_file_for_path"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr GetFileForPathNativeDelegate (IntPtr inst, IntPtr path);
|
|
|
|
static IntPtr GetFileForPath_cb (IntPtr inst, IntPtr path)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
GLib.IFile __result;
|
|
__result = __obj.OnGetFileForPath (GLib.Marshaller.Utf8PtrToString (path));
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.FileAdapter).Handle);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideGetFileForPath")]
|
|
protected virtual GLib.IFile OnGetFileForPath (string path)
|
|
{
|
|
return InternalGetFileForPath (path);
|
|
}
|
|
|
|
private GLib.IFile InternalGetFileForPath (string path)
|
|
{
|
|
GetFileForPathNativeDelegate unmanaged = class_abi.BaseOverride<GetFileForPathNativeDelegate>(this.LookupGType(), "get_file_for_path");
|
|
if (unmanaged == null) return null;
|
|
|
|
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
|
|
IntPtr __result = unmanaged (this.Handle, native_path);
|
|
GLib.Marshaller.Free (native_path);
|
|
return GLib.FileAdapter.GetObject (__result, false);
|
|
}
|
|
|
|
static GetFileForUriNativeDelegate GetFileForUri_cb_delegate;
|
|
static GetFileForUriNativeDelegate GetFileForUriVMCallback {
|
|
get {
|
|
if (GetFileForUri_cb_delegate == null)
|
|
GetFileForUri_cb_delegate = new GetFileForUriNativeDelegate (GetFileForUri_cb);
|
|
return GetFileForUri_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideGetFileForUri (GLib.GType gtype)
|
|
{
|
|
OverrideGetFileForUri (gtype, GetFileForUriVMCallback);
|
|
}
|
|
|
|
static void OverrideGetFileForUri (GLib.GType gtype, GetFileForUriNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_file_for_uri"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr GetFileForUriNativeDelegate (IntPtr inst, IntPtr uri);
|
|
|
|
static IntPtr GetFileForUri_cb (IntPtr inst, IntPtr uri)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
GLib.IFile __result;
|
|
__result = __obj.OnGetFileForUri (GLib.Marshaller.Utf8PtrToString (uri));
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.FileAdapter).Handle);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideGetFileForUri")]
|
|
protected virtual GLib.IFile OnGetFileForUri (string uri)
|
|
{
|
|
return InternalGetFileForUri (uri);
|
|
}
|
|
|
|
private GLib.IFile InternalGetFileForUri (string uri)
|
|
{
|
|
GetFileForUriNativeDelegate unmanaged = class_abi.BaseOverride<GetFileForUriNativeDelegate>(this.LookupGType(), "get_file_for_uri");
|
|
if (unmanaged == null) return null;
|
|
|
|
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
|
|
IntPtr __result = unmanaged (this.Handle, native_uri);
|
|
GLib.Marshaller.Free (native_uri);
|
|
return GLib.FileAdapter.GetObject (__result, false);
|
|
}
|
|
|
|
static ParseNameNativeDelegate ParseName_cb_delegate;
|
|
static ParseNameNativeDelegate ParseNameVMCallback {
|
|
get {
|
|
if (ParseName_cb_delegate == null)
|
|
ParseName_cb_delegate = new ParseNameNativeDelegate (ParseName_cb);
|
|
return ParseName_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideParseName (GLib.GType gtype)
|
|
{
|
|
OverrideParseName (gtype, ParseNameVMCallback);
|
|
}
|
|
|
|
static void OverrideParseName (GLib.GType gtype, ParseNameNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse_name"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr ParseNameNativeDelegate (IntPtr inst, IntPtr parse_name);
|
|
|
|
static IntPtr ParseName_cb (IntPtr inst, IntPtr parse_name)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
GLib.IFile __result;
|
|
__result = __obj.OnParseName (GLib.Marshaller.Utf8PtrToString (parse_name));
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.FileAdapter).Handle);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideParseName")]
|
|
protected virtual GLib.IFile OnParseName (string parse_name)
|
|
{
|
|
return InternalParseName (parse_name);
|
|
}
|
|
|
|
private GLib.IFile InternalParseName (string parse_name)
|
|
{
|
|
ParseNameNativeDelegate unmanaged = class_abi.BaseOverride<ParseNameNativeDelegate>(this.LookupGType(), "parse_name");
|
|
if (unmanaged == null) return null;
|
|
|
|
IntPtr native_parse_name = GLib.Marshaller.StringToPtrGStrdup (parse_name);
|
|
IntPtr __result = unmanaged (this.Handle, native_parse_name);
|
|
GLib.Marshaller.Free (native_parse_name);
|
|
return GLib.FileAdapter.GetObject (__result, false);
|
|
}
|
|
|
|
static LocalFileAddInfoNativeDelegate LocalFileAddInfo_cb_delegate;
|
|
static LocalFileAddInfoNativeDelegate LocalFileAddInfoVMCallback {
|
|
get {
|
|
if (LocalFileAddInfo_cb_delegate == null)
|
|
LocalFileAddInfo_cb_delegate = new LocalFileAddInfoNativeDelegate (LocalFileAddInfo_cb);
|
|
return LocalFileAddInfo_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLocalFileAddInfo (GLib.GType gtype)
|
|
{
|
|
OverrideLocalFileAddInfo (gtype, LocalFileAddInfoVMCallback);
|
|
}
|
|
|
|
static void OverrideLocalFileAddInfo (GLib.GType gtype, LocalFileAddInfoNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("local_file_add_info"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void LocalFileAddInfoNativeDelegate (IntPtr inst, IntPtr filename, ulong device, IntPtr attribute_matcher, IntPtr info, IntPtr cancellable, IntPtr extra_data, out GLib.DestroyNotify free_extra_data);
|
|
|
|
static void LocalFileAddInfo_cb (IntPtr inst, IntPtr filename, ulong device, IntPtr attribute_matcher, IntPtr info, IntPtr cancellable, IntPtr extra_data, out GLib.DestroyNotify free_extra_data)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
__obj.OnLocalFileAddInfo (GLib.Marshaller.Utf8PtrToString (filename), device, attribute_matcher == IntPtr.Zero ? null : (GLib.FileAttributeMatcher) GLib.Opaque.GetOpaque (attribute_matcher, typeof (GLib.FileAttributeMatcher), false), GLib.Object.GetObject(info) as GLib.FileInfo, GLib.Object.GetObject(cancellable) as GLib.Cancellable, extra_data, out free_extra_data);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideLocalFileAddInfo")]
|
|
protected virtual void OnLocalFileAddInfo (string filename, ulong device, GLib.FileAttributeMatcher attribute_matcher, GLib.FileInfo info, GLib.Cancellable cancellable, IntPtr extra_data, out GLib.DestroyNotify free_extra_data)
|
|
{
|
|
InternalLocalFileAddInfo (filename, device, attribute_matcher, info, cancellable, extra_data, out free_extra_data);
|
|
}
|
|
|
|
private void InternalLocalFileAddInfo (string filename, ulong device, GLib.FileAttributeMatcher attribute_matcher, GLib.FileInfo info, GLib.Cancellable cancellable, IntPtr extra_data, out GLib.DestroyNotify free_extra_data)
|
|
{
|
|
LocalFileAddInfoNativeDelegate unmanaged = class_abi.BaseOverride<LocalFileAddInfoNativeDelegate>(this.LookupGType(), "local_file_add_info");
|
|
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
|
|
|
|
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
|
|
unmanaged (this.Handle, native_filename, device, attribute_matcher == null ? IntPtr.Zero : attribute_matcher.Handle, info == null ? IntPtr.Zero : info.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, extra_data, out free_extra_data);
|
|
GLib.Marshaller.Free (native_filename);
|
|
}
|
|
|
|
static AddWritableNamespacesNativeDelegate AddWritableNamespaces_cb_delegate;
|
|
static AddWritableNamespacesNativeDelegate AddWritableNamespacesVMCallback {
|
|
get {
|
|
if (AddWritableNamespaces_cb_delegate == null)
|
|
AddWritableNamespaces_cb_delegate = new AddWritableNamespacesNativeDelegate (AddWritableNamespaces_cb);
|
|
return AddWritableNamespaces_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAddWritableNamespaces (GLib.GType gtype)
|
|
{
|
|
OverrideAddWritableNamespaces (gtype, AddWritableNamespacesVMCallback);
|
|
}
|
|
|
|
static void OverrideAddWritableNamespaces (GLib.GType gtype, AddWritableNamespacesNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_writable_namespaces"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AddWritableNamespacesNativeDelegate (IntPtr inst, IntPtr list);
|
|
|
|
static void AddWritableNamespaces_cb (IntPtr inst, IntPtr list)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
__obj.OnAddWritableNamespaces (list == IntPtr.Zero ? null : (GLib.FileAttributeInfoList) GLib.Opaque.GetOpaque (list, typeof (GLib.FileAttributeInfoList), false));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideAddWritableNamespaces")]
|
|
protected virtual void OnAddWritableNamespaces (GLib.FileAttributeInfoList list)
|
|
{
|
|
InternalAddWritableNamespaces (list);
|
|
}
|
|
|
|
private void InternalAddWritableNamespaces (GLib.FileAttributeInfoList list)
|
|
{
|
|
AddWritableNamespacesNativeDelegate unmanaged = class_abi.BaseOverride<AddWritableNamespacesNativeDelegate>(this.LookupGType(), "add_writable_namespaces");
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, list == null ? IntPtr.Zero : list.Handle);
|
|
}
|
|
|
|
static LocalFileSetAttributesNativeDelegate LocalFileSetAttributes_cb_delegate;
|
|
static LocalFileSetAttributesNativeDelegate LocalFileSetAttributesVMCallback {
|
|
get {
|
|
if (LocalFileSetAttributes_cb_delegate == null)
|
|
LocalFileSetAttributes_cb_delegate = new LocalFileSetAttributesNativeDelegate (LocalFileSetAttributes_cb);
|
|
return LocalFileSetAttributes_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLocalFileSetAttributes (GLib.GType gtype)
|
|
{
|
|
OverrideLocalFileSetAttributes (gtype, LocalFileSetAttributesVMCallback);
|
|
}
|
|
|
|
static void OverrideLocalFileSetAttributes (GLib.GType gtype, LocalFileSetAttributesNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("local_file_set_attributes"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool LocalFileSetAttributesNativeDelegate (IntPtr inst, IntPtr filename, IntPtr info, int flags, IntPtr cancellable, out IntPtr error);
|
|
|
|
static bool LocalFileSetAttributes_cb (IntPtr inst, IntPtr filename, IntPtr info, int flags, IntPtr cancellable, out IntPtr error)
|
|
{
|
|
error = IntPtr.Zero;
|
|
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
bool __result;
|
|
__result = __obj.OnLocalFileSetAttributes (GLib.Marshaller.Utf8PtrToString (filename), GLib.Object.GetObject(info) as GLib.FileInfo, (GLib.FileQueryInfoFlags) flags, 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.Vfs), ConnectionMethod="OverrideLocalFileSetAttributes")]
|
|
protected virtual bool OnLocalFileSetAttributes (string filename, GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable cancellable)
|
|
{
|
|
return InternalLocalFileSetAttributes (filename, info, flags, cancellable);
|
|
}
|
|
|
|
private bool InternalLocalFileSetAttributes (string filename, GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable cancellable)
|
|
{
|
|
LocalFileSetAttributesNativeDelegate unmanaged = class_abi.BaseOverride<LocalFileSetAttributesNativeDelegate>(this.LookupGType(), "local_file_set_attributes");
|
|
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
|
|
|
|
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
|
|
IntPtr error = IntPtr.Zero;
|
|
bool __result = unmanaged (this.Handle, native_filename, info == null ? IntPtr.Zero : info.Handle, (int) flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
|
|
GLib.Marshaller.Free (native_filename);
|
|
return __result;
|
|
}
|
|
|
|
static LocalFileRemovedNativeDelegate LocalFileRemoved_cb_delegate;
|
|
static LocalFileRemovedNativeDelegate LocalFileRemovedVMCallback {
|
|
get {
|
|
if (LocalFileRemoved_cb_delegate == null)
|
|
LocalFileRemoved_cb_delegate = new LocalFileRemovedNativeDelegate (LocalFileRemoved_cb);
|
|
return LocalFileRemoved_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLocalFileRemoved (GLib.GType gtype)
|
|
{
|
|
OverrideLocalFileRemoved (gtype, LocalFileRemovedVMCallback);
|
|
}
|
|
|
|
static void OverrideLocalFileRemoved (GLib.GType gtype, LocalFileRemovedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("local_file_removed"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void LocalFileRemovedNativeDelegate (IntPtr inst, IntPtr filename);
|
|
|
|
static void LocalFileRemoved_cb (IntPtr inst, IntPtr filename)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
__obj.OnLocalFileRemoved (GLib.Marshaller.Utf8PtrToString (filename));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideLocalFileRemoved")]
|
|
protected virtual void OnLocalFileRemoved (string filename)
|
|
{
|
|
InternalLocalFileRemoved (filename);
|
|
}
|
|
|
|
private void InternalLocalFileRemoved (string filename)
|
|
{
|
|
LocalFileRemovedNativeDelegate unmanaged = class_abi.BaseOverride<LocalFileRemovedNativeDelegate>(this.LookupGType(), "local_file_removed");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
|
|
unmanaged (this.Handle, native_filename);
|
|
GLib.Marshaller.Free (native_filename);
|
|
}
|
|
|
|
static LocalFileMovedNativeDelegate LocalFileMoved_cb_delegate;
|
|
static LocalFileMovedNativeDelegate LocalFileMovedVMCallback {
|
|
get {
|
|
if (LocalFileMoved_cb_delegate == null)
|
|
LocalFileMoved_cb_delegate = new LocalFileMovedNativeDelegate (LocalFileMoved_cb);
|
|
return LocalFileMoved_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLocalFileMoved (GLib.GType gtype)
|
|
{
|
|
OverrideLocalFileMoved (gtype, LocalFileMovedVMCallback);
|
|
}
|
|
|
|
static void OverrideLocalFileMoved (GLib.GType gtype, LocalFileMovedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("local_file_moved"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void LocalFileMovedNativeDelegate (IntPtr inst, IntPtr source, IntPtr dest);
|
|
|
|
static void LocalFileMoved_cb (IntPtr inst, IntPtr source, IntPtr dest)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
__obj.OnLocalFileMoved (GLib.Marshaller.Utf8PtrToString (source), GLib.Marshaller.Utf8PtrToString (dest));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideLocalFileMoved")]
|
|
protected virtual void OnLocalFileMoved (string source, string dest)
|
|
{
|
|
InternalLocalFileMoved (source, dest);
|
|
}
|
|
|
|
private void InternalLocalFileMoved (string source, string dest)
|
|
{
|
|
LocalFileMovedNativeDelegate unmanaged = class_abi.BaseOverride<LocalFileMovedNativeDelegate>(this.LookupGType(), "local_file_moved");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_source = GLib.Marshaller.StringToPtrGStrdup (source);
|
|
IntPtr native_dest = GLib.Marshaller.StringToPtrGStrdup (dest);
|
|
unmanaged (this.Handle, native_source, native_dest);
|
|
GLib.Marshaller.Free (native_source);
|
|
GLib.Marshaller.Free (native_dest);
|
|
}
|
|
|
|
static DeserializeIconNativeDelegate DeserializeIcon_cb_delegate;
|
|
static DeserializeIconNativeDelegate DeserializeIconVMCallback {
|
|
get {
|
|
if (DeserializeIcon_cb_delegate == null)
|
|
DeserializeIcon_cb_delegate = new DeserializeIconNativeDelegate (DeserializeIcon_cb);
|
|
return DeserializeIcon_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideDeserializeIcon (GLib.GType gtype)
|
|
{
|
|
OverrideDeserializeIcon (gtype, DeserializeIconVMCallback);
|
|
}
|
|
|
|
static void OverrideDeserializeIcon (GLib.GType gtype, DeserializeIconNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deserialize_icon"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr DeserializeIconNativeDelegate (IntPtr inst, IntPtr value);
|
|
|
|
static IntPtr DeserializeIcon_cb (IntPtr inst, IntPtr value)
|
|
{
|
|
try {
|
|
Vfs __obj = GLib.Object.GetObject (inst, false) as Vfs;
|
|
GLib.IIcon __result;
|
|
__result = __obj.OnDeserializeIcon (new GLib.Variant(value));
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.IconAdapter).Handle);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.Vfs), ConnectionMethod="OverrideDeserializeIcon")]
|
|
protected virtual GLib.IIcon OnDeserializeIcon (GLib.Variant value)
|
|
{
|
|
return InternalDeserializeIcon (value);
|
|
}
|
|
|
|
private GLib.IIcon InternalDeserializeIcon (GLib.Variant value)
|
|
{
|
|
DeserializeIconNativeDelegate unmanaged = class_abi.BaseOverride<DeserializeIconNativeDelegate>(this.LookupGType(), "deserialize_icon");
|
|
if (unmanaged == null) return null;
|
|
|
|
IntPtr __result = unmanaged (this.Handle, value == null ? IntPtr.Zero : value.Handle);
|
|
return GLib.IconAdapter.GetObject (__result, false);
|
|
}
|
|
|
|
|
|
// 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("is_active"
|
|
, GLib.Object.class_abi.Fields
|
|
, (uint) sizeof( IntPtr ) // is_active
|
|
, null
|
|
, "get_file_for_path"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("get_file_for_path"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // get_file_for_path
|
|
, "is_active"
|
|
, "get_file_for_uri"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("get_file_for_uri"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // get_file_for_uri
|
|
, "get_file_for_path"
|
|
, "get_supported_uri_schemes"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("get_supported_uri_schemes"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // get_supported_uri_schemes
|
|
, "get_file_for_uri"
|
|
, "parse_name"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("parse_name"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // parse_name
|
|
, "get_supported_uri_schemes"
|
|
, "local_file_add_info"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("local_file_add_info"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // local_file_add_info
|
|
, "parse_name"
|
|
, "add_writable_namespaces"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("add_writable_namespaces"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // add_writable_namespaces
|
|
, "local_file_add_info"
|
|
, "local_file_set_attributes"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("local_file_set_attributes"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // local_file_set_attributes
|
|
, "add_writable_namespaces"
|
|
, "local_file_removed"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("local_file_removed"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // local_file_removed
|
|
, "local_file_set_attributes"
|
|
, "local_file_moved"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("local_file_moved"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // local_file_moved
|
|
, "local_file_removed"
|
|
, "deserialize_icon"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("deserialize_icon"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // deserialize_icon
|
|
, "local_file_moved"
|
|
, "_g_reserved1"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved1"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved1
|
|
, "deserialize_icon"
|
|
, "_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"
|
|
, null
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
});
|
|
|
|
return _class_abi;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_default();
|
|
static d_g_vfs_get_default g_vfs_get_default = FuncLoader.LoadFunction<d_g_vfs_get_default>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_default"));
|
|
|
|
public static GLib.Vfs Default {
|
|
get {
|
|
IntPtr raw_ret = g_vfs_get_default();
|
|
GLib.Vfs ret = GLib.Object.GetObject(raw_ret) as GLib.Vfs;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_file_for_path(IntPtr raw, IntPtr path);
|
|
static d_g_vfs_get_file_for_path g_vfs_get_file_for_path = FuncLoader.LoadFunction<d_g_vfs_get_file_for_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_file_for_path"));
|
|
|
|
public GLib.IFile GetFileForPath(string path) {
|
|
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
|
|
IntPtr raw_ret = g_vfs_get_file_for_path(Handle, native_path);
|
|
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
|
|
GLib.Marshaller.Free (native_path);
|
|
return ret;
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_file_for_uri(IntPtr raw, IntPtr uri);
|
|
static d_g_vfs_get_file_for_uri g_vfs_get_file_for_uri = FuncLoader.LoadFunction<d_g_vfs_get_file_for_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_file_for_uri"));
|
|
|
|
public GLib.IFile GetFileForUri(string uri) {
|
|
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
|
|
IntPtr raw_ret = g_vfs_get_file_for_uri(Handle, native_uri);
|
|
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
|
|
GLib.Marshaller.Free (native_uri);
|
|
return ret;
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_local();
|
|
static d_g_vfs_get_local g_vfs_get_local = FuncLoader.LoadFunction<d_g_vfs_get_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_local"));
|
|
|
|
public static GLib.Vfs Local {
|
|
get {
|
|
IntPtr raw_ret = g_vfs_get_local();
|
|
GLib.Vfs ret = GLib.Object.GetObject(raw_ret) as GLib.Vfs;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_supported_uri_schemes(IntPtr raw);
|
|
static d_g_vfs_get_supported_uri_schemes g_vfs_get_supported_uri_schemes = FuncLoader.LoadFunction<d_g_vfs_get_supported_uri_schemes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_supported_uri_schemes"));
|
|
|
|
public string SupportedUriSchemes {
|
|
get {
|
|
IntPtr raw_ret = g_vfs_get_supported_uri_schemes(Handle);
|
|
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_get_type();
|
|
static d_g_vfs_get_type g_vfs_get_type = FuncLoader.LoadFunction<d_g_vfs_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_get_type"));
|
|
|
|
public static new GLib.GType GType {
|
|
get {
|
|
IntPtr raw_ret = g_vfs_get_type();
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool d_g_vfs_is_active(IntPtr raw);
|
|
static d_g_vfs_is_active g_vfs_is_active = FuncLoader.LoadFunction<d_g_vfs_is_active>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_is_active"));
|
|
|
|
public bool IsActive {
|
|
get {
|
|
bool raw_ret = g_vfs_is_active(Handle);
|
|
bool ret = raw_ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_vfs_parse_name(IntPtr raw, IntPtr parse_name);
|
|
static d_g_vfs_parse_name g_vfs_parse_name = FuncLoader.LoadFunction<d_g_vfs_parse_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_parse_name"));
|
|
|
|
public GLib.IFile ParseName(string parse_name) {
|
|
IntPtr native_parse_name = GLib.Marshaller.StringToPtrGStrdup (parse_name);
|
|
IntPtr raw_ret = g_vfs_parse_name(Handle, native_parse_name);
|
|
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
|
|
GLib.Marshaller.Free (native_parse_name);
|
|
return ret;
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool d_g_vfs_register_uri_scheme(IntPtr raw, IntPtr scheme, GLibSharp.VfsFileLookupFuncNative uri_func, IntPtr uri_data, GLib.DestroyNotify uri_destroy, GLibSharp.VfsFileLookupFuncNative parse_name_func, IntPtr parse_name_data, GLib.DestroyNotify parse_name_destroy);
|
|
static d_g_vfs_register_uri_scheme g_vfs_register_uri_scheme = FuncLoader.LoadFunction<d_g_vfs_register_uri_scheme>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_register_uri_scheme"));
|
|
|
|
public bool RegisterUriScheme(string scheme, GLib.VfsFileLookupFunc uri_func, GLib.DestroyNotify uri_destroy, GLib.VfsFileLookupFunc parse_name_func) {
|
|
IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme);
|
|
GLibSharp.VfsFileLookupFuncWrapper uri_func_wrapper = new GLibSharp.VfsFileLookupFuncWrapper (uri_func);
|
|
GLibSharp.VfsFileLookupFuncWrapper parse_name_func_wrapper = new GLibSharp.VfsFileLookupFuncWrapper (parse_name_func);
|
|
IntPtr parse_name_data;
|
|
GLib.DestroyNotify parse_name_destroy;
|
|
if (parse_name_func == null) {
|
|
parse_name_data = IntPtr.Zero;
|
|
parse_name_destroy = null;
|
|
} else {
|
|
parse_name_data = (IntPtr) GCHandle.Alloc (parse_name_func_wrapper);
|
|
parse_name_destroy = GLib.DestroyHelper.NotifyHandler;
|
|
}
|
|
bool raw_ret = g_vfs_register_uri_scheme(Handle, native_scheme, uri_func_wrapper.NativeDelegate, IntPtr.Zero, uri_destroy, parse_name_func_wrapper.NativeDelegate, parse_name_data, parse_name_destroy);
|
|
bool ret = raw_ret;
|
|
GLib.Marshaller.Free (native_scheme);
|
|
return ret;
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool d_g_vfs_unregister_uri_scheme(IntPtr raw, IntPtr scheme);
|
|
static d_g_vfs_unregister_uri_scheme g_vfs_unregister_uri_scheme = FuncLoader.LoadFunction<d_g_vfs_unregister_uri_scheme>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_vfs_unregister_uri_scheme"));
|
|
|
|
public bool UnregisterUriScheme(string scheme) {
|
|
IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme);
|
|
bool raw_ret = g_vfs_unregister_uri_scheme(Handle, native_scheme);
|
|
bool ret = raw_ret;
|
|
GLib.Marshaller.Free (native_scheme);
|
|
return ret;
|
|
}
|
|
|
|
|
|
// 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 (GLib.Object.abi_info.Fields);
|
|
|
|
return _abi_info;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
#endregion
|
|
}
|
|
}
|