Files
KioskApp/GtkSharp/Source/Libs/GioSharp/Generated/GLib/VolumeAdapter.cs

282 lines
11 KiB
C#
Raw Normal View History

2024-09-15 22:40:48 +02:00
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class VolumeAdapter : GLib.GInterfaceAdapter, GLib.IVolume {
GLib.Object implementor;
public VolumeAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_type();
static d_g_volume_get_type g_volume_get_type = FuncLoader.LoadFunction<d_g_volume_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_volume_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IVolume GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IVolume GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj as IVolume == null)
return new VolumeAdapter (obj.Handle);
else
return obj as IVolume;
}
[GLib.Signal("changed")]
public event System.EventHandler Changed {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("changed", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("changed", value);
}
}
[GLib.Signal("removed")]
public event System.EventHandler Removed {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("removed", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("removed", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_volume_can_eject(IntPtr raw);
static d_g_volume_can_eject g_volume_can_eject = FuncLoader.LoadFunction<d_g_volume_can_eject>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_can_eject"));
public bool CanEject() {
bool raw_ret = g_volume_can_eject(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_volume_can_mount(IntPtr raw);
static d_g_volume_can_mount g_volume_can_mount = FuncLoader.LoadFunction<d_g_volume_can_mount>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_can_mount"));
public bool CanMount() {
bool raw_ret = g_volume_can_mount(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_volume_eject_with_operation(IntPtr raw, int flags, IntPtr mount_operation, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_volume_eject_with_operation g_volume_eject_with_operation = FuncLoader.LoadFunction<d_g_volume_eject_with_operation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_eject_with_operation"));
public void EjectWithOperation(GLib.MountUnmountFlags flags, GLib.MountOperation mount_operation, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_volume_eject_with_operation(Handle, (int) flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_volume_eject_with_operation_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_volume_eject_with_operation_finish g_volume_eject_with_operation_finish = FuncLoader.LoadFunction<d_g_volume_eject_with_operation_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_eject_with_operation_finish"));
public bool EjectWithOperationFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_volume_eject_with_operation_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_volume_enumerate_identifiers(IntPtr raw);
static d_g_volume_enumerate_identifiers g_volume_enumerate_identifiers = FuncLoader.LoadFunction<d_g_volume_enumerate_identifiers>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_enumerate_identifiers"));
public string EnumerateIdentifiers() {
IntPtr raw_ret = g_volume_enumerate_identifiers(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_activation_root(IntPtr raw);
static d_g_volume_get_activation_root g_volume_get_activation_root = FuncLoader.LoadFunction<d_g_volume_get_activation_root>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_activation_root"));
public GLib.IFile ActivationRoot {
get {
IntPtr raw_ret = g_volume_get_activation_root(Handle);
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_drive(IntPtr raw);
static d_g_volume_get_drive g_volume_get_drive = FuncLoader.LoadFunction<d_g_volume_get_drive>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_drive"));
public GLib.IDrive Drive {
get {
IntPtr raw_ret = g_volume_get_drive(Handle);
GLib.IDrive ret = GLib.DriveAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_icon(IntPtr raw);
static d_g_volume_get_icon g_volume_get_icon = FuncLoader.LoadFunction<d_g_volume_get_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_icon"));
public GLib.IIcon Icon {
get {
IntPtr raw_ret = g_volume_get_icon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_identifier(IntPtr raw, IntPtr kind);
static d_g_volume_get_identifier g_volume_get_identifier = FuncLoader.LoadFunction<d_g_volume_get_identifier>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_identifier"));
public string GetIdentifier(string kind) {
IntPtr native_kind = GLib.Marshaller.StringToPtrGStrdup (kind);
IntPtr raw_ret = g_volume_get_identifier(Handle, native_kind);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_kind);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_mount(IntPtr raw);
static d_g_volume_get_mount g_volume_get_mount = FuncLoader.LoadFunction<d_g_volume_get_mount>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_mount"));
public GLib.IMount MountInstance {
get {
IntPtr raw_ret = g_volume_get_mount(Handle);
GLib.IMount ret = GLib.MountAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_name(IntPtr raw);
static d_g_volume_get_name g_volume_get_name = FuncLoader.LoadFunction<d_g_volume_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_name"));
public string Name {
get {
IntPtr raw_ret = g_volume_get_name(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_sort_key(IntPtr raw);
static d_g_volume_get_sort_key g_volume_get_sort_key = FuncLoader.LoadFunction<d_g_volume_get_sort_key>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_sort_key"));
public string SortKey {
get {
IntPtr raw_ret = g_volume_get_sort_key(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_symbolic_icon(IntPtr raw);
static d_g_volume_get_symbolic_icon g_volume_get_symbolic_icon = FuncLoader.LoadFunction<d_g_volume_get_symbolic_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_symbolic_icon"));
public GLib.IIcon SymbolicIcon {
get {
IntPtr raw_ret = g_volume_get_symbolic_icon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_volume_get_uuid(IntPtr raw);
static d_g_volume_get_uuid g_volume_get_uuid = FuncLoader.LoadFunction<d_g_volume_get_uuid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_get_uuid"));
public string Uuid {
get {
IntPtr raw_ret = g_volume_get_uuid(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_volume_mount(IntPtr raw, int flags, IntPtr mount_operation, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_volume_mount g_volume_mount = FuncLoader.LoadFunction<d_g_volume_mount>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_mount"));
public void Mount(GLib.MountMountFlags flags, GLib.MountOperation mount_operation, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_volume_mount(Handle, (int) flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_volume_mount_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_volume_mount_finish g_volume_mount_finish = FuncLoader.LoadFunction<d_g_volume_mount_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_mount_finish"));
public bool MountFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_volume_mount_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 bool d_g_volume_should_automount(IntPtr raw);
static d_g_volume_should_automount g_volume_should_automount = FuncLoader.LoadFunction<d_g_volume_should_automount>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_should_automount"));
public bool ShouldAutomount() {
bool raw_ret = g_volume_should_automount(Handle);
bool ret = raw_ret;
return ret;
}
#endregion
}
}