97 lines
3.9 KiB
C#
97 lines
3.9 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 IOModule : GLib.Object {
|
||
|
|
|
||
|
|
public IOModule (IntPtr raw) : base(raw) {}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_io_module_new(IntPtr filename);
|
||
|
|
static d_g_io_module_new g_io_module_new = FuncLoader.LoadFunction<d_g_io_module_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_module_new"));
|
||
|
|
|
||
|
|
public IOModule (string filename) : base (IntPtr.Zero)
|
||
|
|
{
|
||
|
|
if (GetType () != typeof (IOModule)) {
|
||
|
|
var vals = new List<GLib.Value> ();
|
||
|
|
var names = new List<string> ();
|
||
|
|
CreateNativeObject (names.ToArray (), vals.ToArray ());
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
|
||
|
|
Raw = g_io_module_new(native_filename);
|
||
|
|
GLib.Marshaller.Free (native_filename);
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_io_module_get_type();
|
||
|
|
static d_g_io_module_get_type g_io_module_get_type = FuncLoader.LoadFunction<d_g_io_module_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_module_get_type"));
|
||
|
|
|
||
|
|
public static new GLib.GType GType {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_io_module_get_type();
|
||
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_io_module_load(IntPtr raw);
|
||
|
|
static d_g_io_module_load g_io_module_load = FuncLoader.LoadFunction<d_g_io_module_load>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_module_load"));
|
||
|
|
|
||
|
|
public void Load() {
|
||
|
|
g_io_module_load(Handle);
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_io_module_query();
|
||
|
|
static d_g_io_module_query g_io_module_query = FuncLoader.LoadFunction<d_g_io_module_query>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_module_query"));
|
||
|
|
|
||
|
|
public static string Query() {
|
||
|
|
IntPtr raw_ret = g_io_module_query();
|
||
|
|
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_io_module_unload(IntPtr raw);
|
||
|
|
static d_g_io_module_unload g_io_module_unload = FuncLoader.LoadFunction<d_g_io_module_unload>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_module_unload"));
|
||
|
|
|
||
|
|
public void Unload() {
|
||
|
|
g_io_module_unload(Handle);
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_io_modules_load_all_in_directory(IntPtr dirname);
|
||
|
|
static d_g_io_modules_load_all_in_directory g_io_modules_load_all_in_directory = FuncLoader.LoadFunction<d_g_io_modules_load_all_in_directory>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_modules_load_all_in_directory"));
|
||
|
|
|
||
|
|
public static GLib.IOModule[] LoadAllInDirectory(string dirname) {
|
||
|
|
IntPtr native_dirname = GLib.Marshaller.StringToPtrGStrdup (dirname);
|
||
|
|
IntPtr raw_ret = g_io_modules_load_all_in_directory(native_dirname);
|
||
|
|
GLib.IOModule[] ret = GLib.Marshaller.ListPtrToArray<GLib.IOModule, GLib.IOModule> (raw_ret, true, true);
|
||
|
|
GLib.Marshaller.Free (native_dirname);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void d_g_io_modules_scan_all_in_directory(IntPtr dirname);
|
||
|
|
static d_g_io_modules_scan_all_in_directory g_io_modules_scan_all_in_directory = FuncLoader.LoadFunction<d_g_io_modules_scan_all_in_directory>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_io_modules_scan_all_in_directory"));
|
||
|
|
|
||
|
|
public static void ScanAllInDirectory(string dirname) {
|
||
|
|
IntPtr native_dirname = GLib.Marshaller.StringToPtrGStrdup (dirname);
|
||
|
|
g_io_modules_scan_all_in_directory(native_dirname);
|
||
|
|
GLib.Marshaller.Free (native_dirname);
|
||
|
|
}
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
}
|
||
|
|
}
|