Replace DllImport with a better multiplatform solution

This commit is contained in:
cra0zy 2018-01-17 21:31:39 +01:00
parent 1a1c8d4185
commit 543a29569b
215 changed files with 2366 additions and 2610 deletions

View File

@ -15,7 +15,6 @@ public class GAssembly
public string Metadata { get; private set; } public string Metadata { get; private set; }
public string[] Deps { get; set; } public string[] Deps { get; set; }
public string[] NativeDeps { get; set; }
public string ExtraArgs { get; set; } public string ExtraArgs { get; set; }
public GAssembly(string name) public GAssembly(string name)
@ -78,46 +77,4 @@ public class GAssembly
if (Cake.DirectoryExists(GDir)) if (Cake.DirectoryExists(GDir))
Cake.DeleteDirectory(GDir, new DeleteDirectorySettings { Recursive = true, Force = true }); Cake.DeleteDirectory(GDir, new DeleteDirectorySettings { Recursive = true, Force = true });
} }
public void GenerateLinuxStubs()
{
var basedir = P.Combine("..", "..", Dir);
var lines = new List<string>();
if (Cake.DirectoryExists(P.Combine(basedir, "linux-x86")))
Cake.DeleteDirectory(P.Combine(basedir, "linux-x86"), new DeleteDirectorySettings { Recursive = true, Force = true });
Cake.CreateDirectory(P.Combine(basedir, "linux-x86"));
if (Cake.DirectoryExists(P.Combine(basedir, "linux-x64")))
Cake.DeleteDirectory(P.Combine(basedir, "linux-x64"), new DeleteDirectorySettings { Recursive = true, Force = true });
Cake.CreateDirectory(P.Combine(basedir, "linux-x64"));
if (Cake.DirectoryExists(P.Combine(basedir, "linux-arm")))
Cake.DeleteDirectory(P.Combine(basedir, "linux-arm"), new DeleteDirectorySettings { Recursive = true, Force = true });
Cake.CreateDirectory(P.Combine(basedir, "linux-arm"));
lines.Add("<configuration>");
for (int i = 0; i < NativeDeps.Length; i += 2)
{
lines.Add(" <dllmap dll=\"" + NativeDeps[i + 1] +"\" target=\"" + NativeDeps[i] + "\"/>");
// Generate x86 stubs
Cake.CreateDirectory(P.Combine(basedir, "linux-x86"));
Cake.StartProcess("gcc", "-m32 -shared -o " + NativeDeps[i] + " empty.c");
Cake.StartProcess("gcc", "-m32 -Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x86", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
// Generate x64 stubs
Cake.CreateDirectory(P.Combine(basedir, "linux-x64"));
Cake.StartProcess("gcc", "-shared -o " + NativeDeps[i] + " empty.c");
Cake.StartProcess("gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x64", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
// Generate arm stubs
Cake.CreateDirectory(P.Combine(basedir, "linux-arm"));
Cake.StartProcess("arm-none-eabi-gcc", "-shared -o " + NativeDeps[i] + " empty.c");
Cake.StartProcess("arm-none-eabi-gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-arm", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
}
lines.Add("</configuration>");
F.WriteAllLines(P.Combine(basedir, Name + ".dll.config"), lines.ToArray());
}
} }

View File

@ -11,46 +11,28 @@ class Settings
{ {
AssemblyList = new List<GAssembly>() AssemblyList = new List<GAssembly>()
{ {
new GAssembly("GLibSharp") new GAssembly("GLibSharp"),
{
NativeDeps = new[] {
"libglib-2.0.so.0", "libglib-2.0-0.dll",
"libgobject-2.0.so.0", "libgobject-2.0-0.dll",
"libgthread-2.0.so.0", "libgthread-2.0-0.dll"
}
},
new GAssembly("GioSharp") new GAssembly("GioSharp")
{ {
Deps = new[] { "GLibSharp" }, Deps = new[] { "GLibSharp" },
NativeDeps = new[] { "libgio-2.0.so.0", "libgio-2.0-0.dll" }
}, },
new GAssembly("AtkSharp") new GAssembly("AtkSharp")
{ {
Deps = new[] { "GLibSharp" }, Deps = new[] { "GLibSharp" },
NativeDeps = new[] { "libatk-1.0.so.0", "libatk-1.0-0.dll" },
ExtraArgs = "--abi-cs-usings=Atk,GLib" ExtraArgs = "--abi-cs-usings=Atk,GLib"
}, },
new GAssembly("CairoSharp") new GAssembly("CairoSharp"),
{
NativeDeps = new[] { "libcairo.so.2", "libcairo-2.dll" }
},
new GAssembly("PangoSharp") new GAssembly("PangoSharp")
{ {
Deps = new[] { "GLibSharp", "CairoSharp" }, Deps = new[] { "GLibSharp", "CairoSharp" }
NativeDeps = new[] { "libpango-1.0.so.0", "libpango-1.0-0.dll" }
}, },
new GAssembly("GdkSharp") new GAssembly("GdkSharp")
{ {
Deps = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" }, Deps = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" }
NativeDeps = new[] {
"libgdk-3.so.0", "libgdk-3-0.dll",
"libgdk_pixbuf-2.0.so.0", "libgdk_pixbuf-2.0-0.dll"
}
}, },
new GAssembly("GtkSharp") new GAssembly("GtkSharp")
{ {
Deps = new[] { "GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" }, Deps = new[] { "GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" },
NativeDeps = new[] { "libgtk-3.so.0", "libgtk-3-0.dll" },
ExtraArgs = "--abi-cs-usings=Gtk,GLib" ExtraArgs = "--abi-cs-usings=Gtk,GLib"
} }
}; };

View File

@ -20,11 +20,6 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="linux-x86\*" PackagePath="runtimes\linux-x86\native" Visible="false" /> <Compile Include="..\Shared\*.cs" />
<Content Include="linux-x64\*" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="linux-arm\*" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="*.dll.config" PackagePath="lib\netstandard2.0">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,3 +0,0 @@
<configuration>
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
</configuration>

View File

@ -27,11 +27,12 @@ namespace Atk {
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
public partial class Global { public partial class Global {
[DllImport ("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint atk_add_global_event_listener (GLib.Signal.EmissionHookNative hook, IntPtr event_type);
public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) delegate uint d_atk_add_global_event_listener(GLib.Signal.EmissionHookNative hook, IntPtr event_type);
static d_atk_add_global_event_listener atk_add_global_event_listener = Marshal.GetDelegateForFunctionPointer<d_atk_add_global_event_listener>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_add_global_event_listener"));
public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type)
{ {
IntPtr native_event_type = GLib.Marshaller.StringToPtrGStrdup (event_type); IntPtr native_event_type = GLib.Marshaller.StringToPtrGStrdup (event_type);
uint id = atk_add_global_event_listener (new GLib.Signal.EmissionHookMarshaler (hook).Callback, native_event_type); uint id = atk_add_global_event_listener (new GLib.Signal.EmissionHookMarshaler (hook).Callback, native_event_type);

View File

@ -15,11 +15,6 @@
<OutputPath>..\..\..\BuildOutput\Release</OutputPath> <OutputPath>..\..\..\BuildOutput\Release</OutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="linux-x86\*" PackagePath="runtimes\linux-x86\native" Visible="false" /> <Compile Include="..\Shared\*.cs" />
<Content Include="linux-x64\*" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="linux-arm\*" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="*.dll.config" PackagePath="lib\netstandard2.0">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,3 +0,0 @@
<configuration>
<dllmap dll="libcairo-2.dll" target="libcairo.so.2"/>
</configuration>

View File

@ -60,7 +60,7 @@ namespace Cairo {
} }
public ImageSurface (IntPtr data, Format format, int width, int height, int stride) public ImageSurface (IntPtr data, Format format, int width, int height, int stride)
: base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true) : base (NativeMethods.cairo_image_surface_create_for_data2 (data, format, width, height, stride), true)
{ {
} }

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,8 @@ namespace GLib {
public partial class Bytes : GLib.Opaque, IComparable<Bytes>, IEquatable<Bytes> public partial class Bytes : GLib.Opaque, IComparable<Bytes>, IEquatable<Bytes>
{ {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_get_type();
static extern IntPtr g_bytes_get_type (); static d_g_bytes_get_type g_bytes_get_type = Marshal.GetDelegateForFunctionPointer<d_g_bytes_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -40,56 +40,56 @@ namespace GLib {
public Bytes (IntPtr raw) : base (raw) {} public Bytes (IntPtr raw) : base (raw) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_new(byte [] data, UIntPtr size);
static extern IntPtr g_bytes_new (byte [] data, UIntPtr size); static d_g_bytes_new g_bytes_new = Marshal.GetDelegateForFunctionPointer<d_g_bytes_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new"));
public Bytes (byte [] data) public Bytes (byte [] data)
{ {
Raw = g_bytes_new (data, new UIntPtr ((ulong)data.Length)); Raw = g_bytes_new (data, new UIntPtr ((ulong)data.Length));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_new_from_bytes(IntPtr raw, UIntPtr offset, UIntPtr length);
static extern IntPtr g_bytes_new_from_bytes (IntPtr raw, UIntPtr offset, UIntPtr length); static d_g_bytes_new_from_bytes g_bytes_new_from_bytes = Marshal.GetDelegateForFunctionPointer<d_g_bytes_new_from_bytes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_from_bytes"));
public Bytes (Bytes bytes, ulong offset, ulong length) public Bytes (Bytes bytes, ulong offset, ulong length)
{ {
Raw = g_bytes_new_from_bytes (bytes.Handle, new UIntPtr (offset), new UIntPtr (length)); Raw = g_bytes_new_from_bytes (bytes.Handle, new UIntPtr (offset), new UIntPtr (length));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_new_take(byte [] data, UIntPtr size);
static extern IntPtr g_bytes_new_take (byte [] data, UIntPtr size); static d_g_bytes_new_take g_bytes_new_take = Marshal.GetDelegateForFunctionPointer<d_g_bytes_new_take>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_take"));
public static Bytes NewTake (byte [] data) public static Bytes NewTake (byte [] data)
{ {
return new Bytes (g_bytes_new_take (data, new UIntPtr ((ulong)data.Length))); return new Bytes (g_bytes_new_take (data, new UIntPtr ((ulong)data.Length)));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_new_static(byte [] data, UIntPtr size);
static extern IntPtr g_bytes_new_static (byte [] data, UIntPtr size); static d_g_bytes_new_static g_bytes_new_static = Marshal.GetDelegateForFunctionPointer<d_g_bytes_new_static>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_static"));
public static Bytes NewStatic (byte [] data) public static Bytes NewStatic (byte [] data)
{ {
return new Bytes (g_bytes_new_static (data, new UIntPtr ((ulong)data.Length))); return new Bytes (g_bytes_new_static (data, new UIntPtr ((ulong)data.Length)));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_bytes_compare(IntPtr raw, IntPtr bytes);
static extern int g_bytes_compare (IntPtr raw, IntPtr bytes); static d_g_bytes_compare g_bytes_compare = Marshal.GetDelegateForFunctionPointer<d_g_bytes_compare>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_compare"));
public int CompareTo (Bytes bytes) public int CompareTo (Bytes bytes)
{ {
return g_bytes_compare (Handle, bytes.Handle); return g_bytes_compare (Handle, bytes.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_bytes_equal(IntPtr raw, IntPtr bytes2);
static extern bool g_bytes_equal (IntPtr raw, IntPtr bytes2); static d_g_bytes_equal g_bytes_equal = Marshal.GetDelegateForFunctionPointer<d_g_bytes_equal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_equal"));
public bool Equals (Bytes other) public bool Equals (Bytes other)
{ {
return g_bytes_equal (Handle, other.Handle); return g_bytes_equal (Handle, other.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate UIntPtr d_g_bytes_get_size(IntPtr raw);
static extern UIntPtr g_bytes_get_size (IntPtr raw); static d_g_bytes_get_size g_bytes_get_size = Marshal.GetDelegateForFunctionPointer<d_g_bytes_get_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_size"));
public ulong Size { public ulong Size {
get { get {
@ -97,16 +97,16 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_bytes_hash(IntPtr raw);
static extern uint g_bytes_hash (IntPtr raw); static d_g_bytes_hash g_bytes_hash = Marshal.GetDelegateForFunctionPointer<d_g_bytes_hash>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_hash"));
public uint GetHash () public uint GetHash ()
{ {
return g_bytes_hash (Handle); return g_bytes_hash (Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_get_data(IntPtr raw, out UIntPtr size);
static extern IntPtr g_bytes_get_data (IntPtr raw, out UIntPtr size); static d_g_bytes_get_data g_bytes_get_data = Marshal.GetDelegateForFunctionPointer<d_g_bytes_get_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_data"));
public byte [] Data { public byte [] Data {
get { get {
@ -124,8 +124,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_bytes_ref(IntPtr raw);
static extern IntPtr g_bytes_ref (IntPtr raw); static d_g_bytes_ref g_bytes_ref = Marshal.GetDelegateForFunctionPointer<d_g_bytes_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_ref"));
protected override void Ref (IntPtr raw) protected override void Ref (IntPtr raw)
{ {
@ -135,8 +135,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_bytes_unref(IntPtr raw);
static extern void g_bytes_unref (IntPtr raw); static d_g_bytes_unref g_bytes_unref = Marshal.GetDelegateForFunctionPointer<d_g_bytes_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_unref"));
protected override void Unref (IntPtr raw) protected override void Unref (IntPtr raw)
{ {

View File

@ -16,43 +16,43 @@ namespace GLib {
int i2; int i2;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_cond_broadcast(IntPtr raw);
static extern void g_cond_broadcast(IntPtr raw); static d_g_cond_broadcast g_cond_broadcast = Marshal.GetDelegateForFunctionPointer<d_g_cond_broadcast>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_broadcast"));
public void Broadcast() { public void Broadcast() {
g_cond_broadcast(Handle); g_cond_broadcast(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_cond_clear(IntPtr raw);
static extern void g_cond_clear(IntPtr raw); static d_g_cond_clear g_cond_clear = Marshal.GetDelegateForFunctionPointer<d_g_cond_clear>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_clear"));
public void Clear() { public void Clear() {
g_cond_clear(Handle); g_cond_clear(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_cond_init(IntPtr raw);
static extern void g_cond_init(IntPtr raw); static d_g_cond_init g_cond_init = Marshal.GetDelegateForFunctionPointer<d_g_cond_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_init"));
public void Init() { public void Init() {
g_cond_init(Handle); g_cond_init(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_cond_signal(IntPtr raw);
static extern void g_cond_signal(IntPtr raw); static d_g_cond_signal g_cond_signal = Marshal.GetDelegateForFunctionPointer<d_g_cond_signal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_signal"));
public void Signal() { public void Signal() {
g_cond_signal(Handle); g_cond_signal(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_cond_wait(IntPtr raw, IntPtr mutex);
static extern void g_cond_wait(IntPtr raw, IntPtr mutex); static d_g_cond_wait g_cond_wait = Marshal.GetDelegateForFunctionPointer<d_g_cond_wait>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait"));
public void Wait(GLib.Mutex mutex) { public void Wait(GLib.Mutex mutex) {
g_cond_wait(Handle, mutex == null ? IntPtr.Zero : mutex.Handle); g_cond_wait(Handle, mutex == null ? IntPtr.Zero : mutex.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time);
static extern bool g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time); static d_g_cond_wait_until g_cond_wait_until = Marshal.GetDelegateForFunctionPointer<d_g_cond_wait_until>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait_until"));
public bool WaitUntil(GLib.Mutex mutex, long end_time) { public bool WaitUntil(GLib.Mutex mutex, long end_time) {
bool raw_ret = g_cond_wait_until(Handle, mutex == null ? IntPtr.Zero : mutex.Handle, end_time); bool raw_ret = g_cond_wait_until(Handle, mutex == null ? IntPtr.Zero : mutex.Handle, end_time);

View File

@ -11,8 +11,8 @@ namespace GLib {
#region Autogenerated code #region Autogenerated code
public partial class Date : GLib.Opaque { public partial class Date : GLib.Opaque {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_get_type();
static extern IntPtr g_date_get_type(); static d_g_date_get_type g_date_get_type = Marshal.GetDelegateForFunctionPointer<d_g_date_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -22,43 +22,43 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_add_days(IntPtr raw, uint n_days);
static extern void g_date_add_days(IntPtr raw, uint n_days); static d_g_date_add_days g_date_add_days = Marshal.GetDelegateForFunctionPointer<d_g_date_add_days>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_days"));
public void AddDays(uint n_days) { public void AddDays(uint n_days) {
g_date_add_days(Handle, n_days); g_date_add_days(Handle, n_days);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_add_months(IntPtr raw, uint n_months);
static extern void g_date_add_months(IntPtr raw, uint n_months); static d_g_date_add_months g_date_add_months = Marshal.GetDelegateForFunctionPointer<d_g_date_add_months>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_months"));
public void AddMonths(uint n_months) { public void AddMonths(uint n_months) {
g_date_add_months(Handle, n_months); g_date_add_months(Handle, n_months);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_add_years(IntPtr raw, uint n_years);
static extern void g_date_add_years(IntPtr raw, uint n_years); static d_g_date_add_years g_date_add_years = Marshal.GetDelegateForFunctionPointer<d_g_date_add_years>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_years"));
public void AddYears(uint n_years) { public void AddYears(uint n_years) {
g_date_add_years(Handle, n_years); g_date_add_years(Handle, n_years);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date);
static extern void g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date); static d_g_date_clamp g_date_clamp = Marshal.GetDelegateForFunctionPointer<d_g_date_clamp>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clamp"));
public void Clamp(GLib.Date min_date, GLib.Date max_date) { public void Clamp(GLib.Date min_date, GLib.Date max_date) {
g_date_clamp(Handle, min_date == null ? IntPtr.Zero : min_date.Handle, max_date == null ? IntPtr.Zero : max_date.Handle); g_date_clamp(Handle, min_date == null ? IntPtr.Zero : min_date.Handle, max_date == null ? IntPtr.Zero : max_date.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_clear(IntPtr raw, uint n_dates);
static extern void g_date_clear(IntPtr raw, uint n_dates); static d_g_date_clear g_date_clear = Marshal.GetDelegateForFunctionPointer<d_g_date_clear>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clear"));
public void Clear(uint n_dates) { public void Clear(uint n_dates) {
g_date_clear(Handle, n_dates); g_date_clear(Handle, n_dates);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_compare(IntPtr raw, IntPtr rhs);
static extern int g_date_compare(IntPtr raw, IntPtr rhs); static d_g_date_compare g_date_compare = Marshal.GetDelegateForFunctionPointer<d_g_date_compare>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_compare"));
public int Compare(GLib.Date rhs) { public int Compare(GLib.Date rhs) {
int raw_ret = g_date_compare(Handle, rhs == null ? IntPtr.Zero : rhs.Handle); int raw_ret = g_date_compare(Handle, rhs == null ? IntPtr.Zero : rhs.Handle);
@ -66,8 +66,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_days_between(IntPtr raw, IntPtr date2);
static extern int g_date_days_between(IntPtr raw, IntPtr date2); static d_g_date_days_between g_date_days_between = Marshal.GetDelegateForFunctionPointer<d_g_date_days_between>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_days_between"));
public int DaysBetween(GLib.Date date2) { public int DaysBetween(GLib.Date date2) {
int raw_ret = g_date_days_between(Handle, date2 == null ? IntPtr.Zero : date2.Handle); int raw_ret = g_date_days_between(Handle, date2 == null ? IntPtr.Zero : date2.Handle);
@ -75,11 +75,11 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_date_get_day(IntPtr raw);
static extern byte g_date_get_day(IntPtr raw); static d_g_date_get_day g_date_get_day = Marshal.GetDelegateForFunctionPointer<d_g_date_get_day>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_day(IntPtr raw, byte day);
static extern void g_date_set_day(IntPtr raw, byte day); static d_g_date_set_day g_date_set_day = Marshal.GetDelegateForFunctionPointer<d_g_date_set_day>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_day"));
public byte Day { public byte Day {
get { get {
@ -92,8 +92,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_get_day_of_year(IntPtr raw);
static extern uint g_date_get_day_of_year(IntPtr raw); static d_g_date_get_day_of_year g_date_get_day_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_day_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day_of_year"));
public uint DayOfYear { public uint DayOfYear {
get { get {
@ -103,8 +103,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_get_iso8601_week_of_year(IntPtr raw);
static extern uint g_date_get_iso8601_week_of_year(IntPtr raw); static d_g_date_get_iso8601_week_of_year g_date_get_iso8601_week_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_iso8601_week_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_iso8601_week_of_year"));
public uint Iso8601WeekOfYear { public uint Iso8601WeekOfYear {
get { get {
@ -114,11 +114,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_get_julian(IntPtr raw);
static extern uint g_date_get_julian(IntPtr raw); static d_g_date_get_julian g_date_get_julian = Marshal.GetDelegateForFunctionPointer<d_g_date_get_julian>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_julian"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_julian(IntPtr raw, uint julian_date);
static extern void g_date_set_julian(IntPtr raw, uint julian_date); static d_g_date_set_julian g_date_set_julian = Marshal.GetDelegateForFunctionPointer<d_g_date_set_julian>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_julian"));
public uint Julian { public uint Julian {
get { get {
@ -131,8 +131,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_get_monday_week_of_year(IntPtr raw);
static extern uint g_date_get_monday_week_of_year(IntPtr raw); static d_g_date_get_monday_week_of_year g_date_get_monday_week_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_monday_week_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_week_of_year"));
public uint MondayWeekOfYear { public uint MondayWeekOfYear {
get { get {
@ -142,11 +142,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_get_month(IntPtr raw);
static extern int g_date_get_month(IntPtr raw); static d_g_date_get_month g_date_get_month = Marshal.GetDelegateForFunctionPointer<d_g_date_get_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_month"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_month(IntPtr raw, int month);
static extern void g_date_set_month(IntPtr raw, int month); static d_g_date_set_month g_date_set_month = Marshal.GetDelegateForFunctionPointer<d_g_date_set_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_month"));
public int Month { public int Month {
get { get {
@ -159,8 +159,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_get_sunday_week_of_year(IntPtr raw);
static extern uint g_date_get_sunday_week_of_year(IntPtr raw); static d_g_date_get_sunday_week_of_year g_date_get_sunday_week_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_sunday_week_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_week_of_year"));
public uint SundayWeekOfYear { public uint SundayWeekOfYear {
get { get {
@ -170,8 +170,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_get_weekday(IntPtr raw);
static extern int g_date_get_weekday(IntPtr raw); static d_g_date_get_weekday g_date_get_weekday = Marshal.GetDelegateForFunctionPointer<d_g_date_get_weekday>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_weekday"));
public int Weekday { public int Weekday {
get { get {
@ -181,11 +181,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate ushort d_g_date_get_year(IntPtr raw);
static extern ushort g_date_get_year(IntPtr raw); static d_g_date_get_year g_date_get_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_year"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_year(IntPtr raw, ushort year);
static extern void g_date_set_year(IntPtr raw, ushort year); static d_g_date_set_year g_date_set_year = Marshal.GetDelegateForFunctionPointer<d_g_date_set_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_year"));
public ushort Year { public ushort Year {
get { get {
@ -198,8 +198,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_is_first_of_month(IntPtr raw);
static extern bool g_date_is_first_of_month(IntPtr raw); static d_g_date_is_first_of_month g_date_is_first_of_month = Marshal.GetDelegateForFunctionPointer<d_g_date_is_first_of_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_first_of_month"));
public bool IsFirstOfMonth { public bool IsFirstOfMonth {
get { get {
@ -209,8 +209,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_is_last_of_month(IntPtr raw);
static extern bool g_date_is_last_of_month(IntPtr raw); static d_g_date_is_last_of_month g_date_is_last_of_month = Marshal.GetDelegateForFunctionPointer<d_g_date_is_last_of_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_last_of_month"));
public bool IsLastOfMonth { public bool IsLastOfMonth {
get { get {
@ -220,22 +220,22 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_order(IntPtr raw, IntPtr date2);
static extern void g_date_order(IntPtr raw, IntPtr date2); static d_g_date_order g_date_order = Marshal.GetDelegateForFunctionPointer<d_g_date_order>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_order"));
public void Order(GLib.Date date2) { public void Order(GLib.Date date2) {
g_date_order(Handle, date2 == null ? IntPtr.Zero : date2.Handle); g_date_order(Handle, date2 == null ? IntPtr.Zero : date2.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_dmy(IntPtr raw, byte day, int month, ushort y);
static extern void g_date_set_dmy(IntPtr raw, byte day, int month, ushort y); static d_g_date_set_dmy g_date_set_dmy = Marshal.GetDelegateForFunctionPointer<d_g_date_set_dmy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_dmy"));
public void SetDmy(byte day, int month, ushort y) { public void SetDmy(byte day, int month, ushort y) {
g_date_set_dmy(Handle, day, month, y); g_date_set_dmy(Handle, day, month, y);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_parse(IntPtr raw, IntPtr str);
static extern void g_date_set_parse(IntPtr raw, IntPtr str); static d_g_date_set_parse g_date_set_parse = Marshal.GetDelegateForFunctionPointer<d_g_date_set_parse>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_parse"));
public string Parse { public string Parse {
set { set {
@ -245,8 +245,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_time(IntPtr raw, int time_);
static extern void g_date_set_time(IntPtr raw, int time_); static d_g_date_set_time g_date_set_time = Marshal.GetDelegateForFunctionPointer<d_g_date_set_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time"));
[Obsolete] [Obsolete]
public int Time { public int Time {
@ -255,8 +255,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_time_t(IntPtr raw, IntPtr timet);
static extern void g_date_set_time_t(IntPtr raw, IntPtr timet); static d_g_date_set_time_t g_date_set_time_t = Marshal.GetDelegateForFunctionPointer<d_g_date_set_time_t>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_t"));
public long TimeT { public long TimeT {
set { set {
@ -264,8 +264,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_set_time_val(IntPtr raw, IntPtr value);
static extern void g_date_set_time_val(IntPtr raw, IntPtr value); static d_g_date_set_time_val g_date_set_time_val = Marshal.GetDelegateForFunctionPointer<d_g_date_set_time_val>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_val"));
public GLib.TimeVal TimeVal { public GLib.TimeVal TimeVal {
set { set {
@ -276,36 +276,36 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_subtract_days(IntPtr raw, uint n_days);
static extern void g_date_subtract_days(IntPtr raw, uint n_days); static d_g_date_subtract_days g_date_subtract_days = Marshal.GetDelegateForFunctionPointer<d_g_date_subtract_days>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_days"));
public void SubtractDays(uint n_days) { public void SubtractDays(uint n_days) {
g_date_subtract_days(Handle, n_days); g_date_subtract_days(Handle, n_days);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_subtract_months(IntPtr raw, uint n_months);
static extern void g_date_subtract_months(IntPtr raw, uint n_months); static d_g_date_subtract_months g_date_subtract_months = Marshal.GetDelegateForFunctionPointer<d_g_date_subtract_months>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_months"));
public void SubtractMonths(uint n_months) { public void SubtractMonths(uint n_months) {
g_date_subtract_months(Handle, n_months); g_date_subtract_months(Handle, n_months);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_subtract_years(IntPtr raw, uint n_years);
static extern void g_date_subtract_years(IntPtr raw, uint n_years); static d_g_date_subtract_years g_date_subtract_years = Marshal.GetDelegateForFunctionPointer<d_g_date_subtract_years>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_years"));
public void SubtractYears(uint n_years) { public void SubtractYears(uint n_years) {
g_date_subtract_years(Handle, n_years); g_date_subtract_years(Handle, n_years);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_to_struct_tm(IntPtr raw, IntPtr tm);
static extern void g_date_to_struct_tm(IntPtr raw, IntPtr tm); static d_g_date_to_struct_tm g_date_to_struct_tm = Marshal.GetDelegateForFunctionPointer<d_g_date_to_struct_tm>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_to_struct_tm"));
public void ToStructTm(IntPtr tm) { public void ToStructTm(IntPtr tm) {
g_date_to_struct_tm(Handle, tm); g_date_to_struct_tm(Handle, tm);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid(IntPtr raw);
static extern bool g_date_valid(IntPtr raw); static d_g_date_valid g_date_valid = Marshal.GetDelegateForFunctionPointer<d_g_date_valid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid"));
public bool Valid() { public bool Valid() {
bool raw_ret = g_date_valid(Handle); bool raw_ret = g_date_valid(Handle);
@ -313,8 +313,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_date_get_days_in_month(int month, ushort year);
static extern byte g_date_get_days_in_month(int month, ushort year); static d_g_date_get_days_in_month g_date_get_days_in_month = Marshal.GetDelegateForFunctionPointer<d_g_date_get_days_in_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_days_in_month"));
public static byte GetDaysInMonth(int month, ushort year) { public static byte GetDaysInMonth(int month, ushort year) {
byte raw_ret = g_date_get_days_in_month(month, year); byte raw_ret = g_date_get_days_in_month(month, year);
@ -322,8 +322,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_date_get_monday_weeks_in_year(ushort year);
static extern byte g_date_get_monday_weeks_in_year(ushort year); static d_g_date_get_monday_weeks_in_year g_date_get_monday_weeks_in_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_monday_weeks_in_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_weeks_in_year"));
public static byte GetMondayWeeksInYear(ushort year) { public static byte GetMondayWeeksInYear(ushort year) {
byte raw_ret = g_date_get_monday_weeks_in_year(year); byte raw_ret = g_date_get_monday_weeks_in_year(year);
@ -331,8 +331,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_date_get_sunday_weeks_in_year(ushort year);
static extern byte g_date_get_sunday_weeks_in_year(ushort year); static d_g_date_get_sunday_weeks_in_year g_date_get_sunday_weeks_in_year = Marshal.GetDelegateForFunctionPointer<d_g_date_get_sunday_weeks_in_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_weeks_in_year"));
public static byte GetSundayWeeksInYear(ushort year) { public static byte GetSundayWeeksInYear(ushort year) {
byte raw_ret = g_date_get_sunday_weeks_in_year(year); byte raw_ret = g_date_get_sunday_weeks_in_year(year);
@ -340,8 +340,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_is_leap_year(ushort year);
static extern bool g_date_is_leap_year(ushort year); static d_g_date_is_leap_year g_date_is_leap_year = Marshal.GetDelegateForFunctionPointer<d_g_date_is_leap_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_leap_year"));
public static bool IsLeapYear(ushort year) { public static bool IsLeapYear(ushort year) {
bool raw_ret = g_date_is_leap_year(year); bool raw_ret = g_date_is_leap_year(year);
@ -349,8 +349,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate UIntPtr d_g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date);
static extern UIntPtr g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date); static d_g_date_strftime g_date_strftime = Marshal.GetDelegateForFunctionPointer<d_g_date_strftime>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_strftime"));
public static ulong Strftime(string s, string format, GLib.Date date) { public static ulong Strftime(string s, string format, GLib.Date date) {
IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s);
@ -362,8 +362,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_day(byte day);
static extern bool g_date_valid_day(byte day); static d_g_date_valid_day g_date_valid_day = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_day>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_day"));
public static bool ValidDay(byte day) { public static bool ValidDay(byte day) {
bool raw_ret = g_date_valid_day(day); bool raw_ret = g_date_valid_day(day);
@ -371,8 +371,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_dmy(byte day, int month, ushort year);
static extern bool g_date_valid_dmy(byte day, int month, ushort year); static d_g_date_valid_dmy g_date_valid_dmy = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_dmy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_dmy"));
public static bool ValidDmy(byte day, int month, ushort year) { public static bool ValidDmy(byte day, int month, ushort year) {
bool raw_ret = g_date_valid_dmy(day, month, year); bool raw_ret = g_date_valid_dmy(day, month, year);
@ -380,8 +380,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_julian(uint julian_date);
static extern bool g_date_valid_julian(uint julian_date); static d_g_date_valid_julian g_date_valid_julian = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_julian>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_julian"));
public static bool ValidJulian(uint julian_date) { public static bool ValidJulian(uint julian_date) {
bool raw_ret = g_date_valid_julian(julian_date); bool raw_ret = g_date_valid_julian(julian_date);
@ -389,8 +389,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_month(int month);
static extern bool g_date_valid_month(int month); static d_g_date_valid_month g_date_valid_month = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_month"));
public static bool ValidMonth(int month) { public static bool ValidMonth(int month) {
bool raw_ret = g_date_valid_month(month); bool raw_ret = g_date_valid_month(month);
@ -398,8 +398,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_weekday(int weekday);
static extern bool g_date_valid_weekday(int weekday); static d_g_date_valid_weekday g_date_valid_weekday = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_weekday>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_weekday"));
public static bool ValidWeekday(int weekday) { public static bool ValidWeekday(int weekday) {
bool raw_ret = g_date_valid_weekday(weekday); bool raw_ret = g_date_valid_weekday(weekday);
@ -407,8 +407,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_valid_year(ushort year);
static extern bool g_date_valid_year(ushort year); static d_g_date_valid_year g_date_valid_year = Marshal.GetDelegateForFunctionPointer<d_g_date_valid_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_year"));
public static bool ValidYear(ushort year) { public static bool ValidYear(ushort year) {
bool raw_ret = g_date_valid_year(year); bool raw_ret = g_date_valid_year(year);
@ -418,32 +418,32 @@ namespace GLib {
public Date(IntPtr raw) : base(raw) {} public Date(IntPtr raw) : base(raw) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_new();
static extern IntPtr g_date_new(); static d_g_date_new g_date_new = Marshal.GetDelegateForFunctionPointer<d_g_date_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new"));
public Date () public Date ()
{ {
Raw = g_date_new(); Raw = g_date_new();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_new_dmy(byte day, int month, ushort year);
static extern IntPtr g_date_new_dmy(byte day, int month, ushort year); static d_g_date_new_dmy g_date_new_dmy = Marshal.GetDelegateForFunctionPointer<d_g_date_new_dmy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_dmy"));
public Date (byte day, int month, ushort year) public Date (byte day, int month, ushort year)
{ {
Raw = g_date_new_dmy(day, month, year); Raw = g_date_new_dmy(day, month, year);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_new_julian(uint julian_day);
static extern IntPtr g_date_new_julian(uint julian_day); static d_g_date_new_julian g_date_new_julian = Marshal.GetDelegateForFunctionPointer<d_g_date_new_julian>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_julian"));
public Date (uint julian_day) public Date (uint julian_day)
{ {
Raw = g_date_new_julian(julian_day); Raw = g_date_new_julian(julian_day);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_free(IntPtr raw);
static extern void g_date_free(IntPtr raw); static d_g_date_free g_date_free = Marshal.GetDelegateForFunctionPointer<d_g_date_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_free"));
protected override void Free (IntPtr raw) protected override void Free (IntPtr raw)
{ {

View File

@ -11,8 +11,8 @@ namespace GLib {
#region Autogenerated code #region Autogenerated code
public partial class DateTime : GLib.Opaque { public partial class DateTime : GLib.Opaque {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_get_type();
static extern IntPtr g_date_time_get_type(); static d_g_date_time_get_type g_date_time_get_type = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -22,8 +22,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add(IntPtr raw, long timespan);
static extern IntPtr g_date_time_add(IntPtr raw, long timespan); static d_g_date_time_add g_date_time_add = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add"));
public GLib.DateTime Add(long timespan) { public GLib.DateTime Add(long timespan) {
IntPtr raw_ret = g_date_time_add(Handle, timespan); IntPtr raw_ret = g_date_time_add(Handle, timespan);
@ -31,8 +31,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_days(IntPtr raw, int days);
static extern IntPtr g_date_time_add_days(IntPtr raw, int days); static d_g_date_time_add_days g_date_time_add_days = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_days>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_days"));
public GLib.DateTime AddDays(int days) { public GLib.DateTime AddDays(int days) {
IntPtr raw_ret = g_date_time_add_days(Handle, days); IntPtr raw_ret = g_date_time_add_days(Handle, days);
@ -40,8 +40,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds);
static extern IntPtr g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds); static d_g_date_time_add_full g_date_time_add_full = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_full>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_full"));
public GLib.DateTime AddFull(int years, int months, int days, int hours, int minutes, double seconds) { public GLib.DateTime AddFull(int years, int months, int days, int hours, int minutes, double seconds) {
IntPtr raw_ret = g_date_time_add_full(Handle, years, months, days, hours, minutes, seconds); IntPtr raw_ret = g_date_time_add_full(Handle, years, months, days, hours, minutes, seconds);
@ -49,8 +49,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_hours(IntPtr raw, int hours);
static extern IntPtr g_date_time_add_hours(IntPtr raw, int hours); static d_g_date_time_add_hours g_date_time_add_hours = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_hours>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_hours"));
public GLib.DateTime AddHours(int hours) { public GLib.DateTime AddHours(int hours) {
IntPtr raw_ret = g_date_time_add_hours(Handle, hours); IntPtr raw_ret = g_date_time_add_hours(Handle, hours);
@ -58,8 +58,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_minutes(IntPtr raw, int minutes);
static extern IntPtr g_date_time_add_minutes(IntPtr raw, int minutes); static d_g_date_time_add_minutes g_date_time_add_minutes = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_minutes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_minutes"));
public GLib.DateTime AddMinutes(int minutes) { public GLib.DateTime AddMinutes(int minutes) {
IntPtr raw_ret = g_date_time_add_minutes(Handle, minutes); IntPtr raw_ret = g_date_time_add_minutes(Handle, minutes);
@ -67,8 +67,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_months(IntPtr raw, int months);
static extern IntPtr g_date_time_add_months(IntPtr raw, int months); static d_g_date_time_add_months g_date_time_add_months = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_months>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_months"));
public GLib.DateTime AddMonths(int months) { public GLib.DateTime AddMonths(int months) {
IntPtr raw_ret = g_date_time_add_months(Handle, months); IntPtr raw_ret = g_date_time_add_months(Handle, months);
@ -76,8 +76,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_seconds(IntPtr raw, double seconds);
static extern IntPtr g_date_time_add_seconds(IntPtr raw, double seconds); static d_g_date_time_add_seconds g_date_time_add_seconds = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_seconds>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_seconds"));
public GLib.DateTime AddSeconds(double seconds) { public GLib.DateTime AddSeconds(double seconds) {
IntPtr raw_ret = g_date_time_add_seconds(Handle, seconds); IntPtr raw_ret = g_date_time_add_seconds(Handle, seconds);
@ -85,8 +85,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_weeks(IntPtr raw, int weeks);
static extern IntPtr g_date_time_add_weeks(IntPtr raw, int weeks); static d_g_date_time_add_weeks g_date_time_add_weeks = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_weeks>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_weeks"));
public GLib.DateTime AddWeeks(int weeks) { public GLib.DateTime AddWeeks(int weeks) {
IntPtr raw_ret = g_date_time_add_weeks(Handle, weeks); IntPtr raw_ret = g_date_time_add_weeks(Handle, weeks);
@ -94,8 +94,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_add_years(IntPtr raw, int years);
static extern IntPtr g_date_time_add_years(IntPtr raw, int years); static d_g_date_time_add_years g_date_time_add_years = Marshal.GetDelegateForFunctionPointer<d_g_date_time_add_years>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_years"));
public GLib.DateTime AddYears(int years) { public GLib.DateTime AddYears(int years) {
IntPtr raw_ret = g_date_time_add_years(Handle, years); IntPtr raw_ret = g_date_time_add_years(Handle, years);
@ -103,8 +103,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_date_time_difference(IntPtr raw, IntPtr begin);
static extern long g_date_time_difference(IntPtr raw, IntPtr begin); static d_g_date_time_difference g_date_time_difference = Marshal.GetDelegateForFunctionPointer<d_g_date_time_difference>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_difference"));
public long Difference(GLib.DateTime begin) { public long Difference(GLib.DateTime begin) {
long raw_ret = g_date_time_difference(Handle, begin == null ? IntPtr.Zero : begin.Handle); long raw_ret = g_date_time_difference(Handle, begin == null ? IntPtr.Zero : begin.Handle);
@ -112,8 +112,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_format(IntPtr raw, IntPtr format);
static extern IntPtr g_date_time_format(IntPtr raw, IntPtr format); static d_g_date_time_format g_date_time_format = Marshal.GetDelegateForFunctionPointer<d_g_date_time_format>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_format"));
public string Format(string format) { public string Format(string format) {
IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format);
@ -123,8 +123,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_day_of_month(IntPtr raw);
static extern int g_date_time_get_day_of_month(IntPtr raw); static d_g_date_time_get_day_of_month g_date_time_get_day_of_month = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_day_of_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_month"));
public int DayOfMonth { public int DayOfMonth {
get { get {
@ -134,8 +134,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_day_of_week(IntPtr raw);
static extern int g_date_time_get_day_of_week(IntPtr raw); static d_g_date_time_get_day_of_week g_date_time_get_day_of_week = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_day_of_week>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_week"));
public int DayOfWeek { public int DayOfWeek {
get { get {
@ -145,8 +145,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_day_of_year(IntPtr raw);
static extern int g_date_time_get_day_of_year(IntPtr raw); static d_g_date_time_get_day_of_year g_date_time_get_day_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_day_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_year"));
public int DayOfYear { public int DayOfYear {
get { get {
@ -156,8 +156,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_hour(IntPtr raw);
static extern int g_date_time_get_hour(IntPtr raw); static d_g_date_time_get_hour g_date_time_get_hour = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_hour>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_hour"));
public int Hour { public int Hour {
get { get {
@ -167,8 +167,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_microsecond(IntPtr raw);
static extern int g_date_time_get_microsecond(IntPtr raw); static d_g_date_time_get_microsecond g_date_time_get_microsecond = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_microsecond>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_microsecond"));
public int Microsecond { public int Microsecond {
get { get {
@ -178,8 +178,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_minute(IntPtr raw);
static extern int g_date_time_get_minute(IntPtr raw); static d_g_date_time_get_minute g_date_time_get_minute = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_minute>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_minute"));
public int Minute { public int Minute {
get { get {
@ -189,8 +189,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_month(IntPtr raw);
static extern int g_date_time_get_month(IntPtr raw); static d_g_date_time_get_month g_date_time_get_month = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_month>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_month"));
public int Month { public int Month {
get { get {
@ -200,8 +200,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_second(IntPtr raw);
static extern int g_date_time_get_second(IntPtr raw); static d_g_date_time_get_second g_date_time_get_second = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_second>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_second"));
public int Second { public int Second {
get { get {
@ -211,8 +211,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate double d_g_date_time_get_seconds(IntPtr raw);
static extern double g_date_time_get_seconds(IntPtr raw); static d_g_date_time_get_seconds g_date_time_get_seconds = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_seconds>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_seconds"));
public double Seconds { public double Seconds {
get { get {
@ -222,8 +222,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_get_timezone_abbreviation(IntPtr raw);
static extern IntPtr g_date_time_get_timezone_abbreviation(IntPtr raw); static d_g_date_time_get_timezone_abbreviation g_date_time_get_timezone_abbreviation = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_timezone_abbreviation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_timezone_abbreviation"));
public string TimezoneAbbreviation { public string TimezoneAbbreviation {
get { get {
@ -233,8 +233,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_date_time_get_utc_offset(IntPtr raw);
static extern long g_date_time_get_utc_offset(IntPtr raw); static d_g_date_time_get_utc_offset g_date_time_get_utc_offset = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_utc_offset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_utc_offset"));
public long UtcOffset { public long UtcOffset {
get { get {
@ -244,8 +244,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_week_numbering_year(IntPtr raw);
static extern int g_date_time_get_week_numbering_year(IntPtr raw); static d_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_week_numbering_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_numbering_year"));
public int WeekNumberingYear { public int WeekNumberingYear {
get { get {
@ -255,8 +255,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_week_of_year(IntPtr raw);
static extern int g_date_time_get_week_of_year(IntPtr raw); static d_g_date_time_get_week_of_year g_date_time_get_week_of_year = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_week_of_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_of_year"));
public int WeekOfYear { public int WeekOfYear {
get { get {
@ -266,8 +266,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_get_year(IntPtr raw);
static extern int g_date_time_get_year(IntPtr raw); static d_g_date_time_get_year g_date_time_get_year = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_year>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_year"));
public int Year { public int Year {
get { get {
@ -277,15 +277,15 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day);
static extern void g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day); static d_g_date_time_get_ymd g_date_time_get_ymd = Marshal.GetDelegateForFunctionPointer<d_g_date_time_get_ymd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_ymd"));
public void GetYmd(out int year, out int month, out int day) { public void GetYmd(out int year, out int month, out int day) {
g_date_time_get_ymd(Handle, out year, out month, out day); g_date_time_get_ymd(Handle, out year, out month, out day);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_time_is_daylight_savings(IntPtr raw);
static extern bool g_date_time_is_daylight_savings(IntPtr raw); static d_g_date_time_is_daylight_savings g_date_time_is_daylight_savings = Marshal.GetDelegateForFunctionPointer<d_g_date_time_is_daylight_savings>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_is_daylight_savings"));
public bool IsDaylightSavings { public bool IsDaylightSavings {
get { get {
@ -295,8 +295,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_to_local(IntPtr raw);
static extern IntPtr g_date_time_to_local(IntPtr raw); static d_g_date_time_to_local g_date_time_to_local = Marshal.GetDelegateForFunctionPointer<d_g_date_time_to_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_local"));
public GLib.DateTime ToLocal() { public GLib.DateTime ToLocal() {
IntPtr raw_ret = g_date_time_to_local(Handle); IntPtr raw_ret = g_date_time_to_local(Handle);
@ -304,8 +304,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_time_to_timeval(IntPtr raw, IntPtr tv);
static extern bool g_date_time_to_timeval(IntPtr raw, IntPtr tv); static d_g_date_time_to_timeval g_date_time_to_timeval = Marshal.GetDelegateForFunctionPointer<d_g_date_time_to_timeval>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timeval"));
public bool ToTimeval(GLib.TimeVal tv) { public bool ToTimeval(GLib.TimeVal tv) {
IntPtr native_tv = GLib.Marshaller.StructureToPtrAlloc (tv); IntPtr native_tv = GLib.Marshaller.StructureToPtrAlloc (tv);
@ -316,8 +316,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_to_timezone(IntPtr raw, IntPtr tz);
static extern IntPtr g_date_time_to_timezone(IntPtr raw, IntPtr tz); static d_g_date_time_to_timezone g_date_time_to_timezone = Marshal.GetDelegateForFunctionPointer<d_g_date_time_to_timezone>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timezone"));
public GLib.DateTime ToTimezone(GLib.TimeZone tz) { public GLib.DateTime ToTimezone(GLib.TimeZone tz) {
IntPtr raw_ret = g_date_time_to_timezone(Handle, tz == null ? IntPtr.Zero : tz.Handle); IntPtr raw_ret = g_date_time_to_timezone(Handle, tz == null ? IntPtr.Zero : tz.Handle);
@ -325,8 +325,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_date_time_to_unix(IntPtr raw);
static extern long g_date_time_to_unix(IntPtr raw); static d_g_date_time_to_unix g_date_time_to_unix = Marshal.GetDelegateForFunctionPointer<d_g_date_time_to_unix>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_unix"));
public long ToUnix() { public long ToUnix() {
long raw_ret = g_date_time_to_unix(Handle); long raw_ret = g_date_time_to_unix(Handle);
@ -334,8 +334,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_to_utc(IntPtr raw);
static extern IntPtr g_date_time_to_utc(IntPtr raw); static d_g_date_time_to_utc g_date_time_to_utc = Marshal.GetDelegateForFunctionPointer<d_g_date_time_to_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_utc"));
public GLib.DateTime ToUtc() { public GLib.DateTime ToUtc() {
IntPtr raw_ret = g_date_time_to_utc(Handle); IntPtr raw_ret = g_date_time_to_utc(Handle);
@ -343,8 +343,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_date_time_compare(IntPtr dt1, IntPtr dt2);
static extern int g_date_time_compare(IntPtr dt1, IntPtr dt2); static d_g_date_time_compare g_date_time_compare = Marshal.GetDelegateForFunctionPointer<d_g_date_time_compare>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_compare"));
public static int Compare(IntPtr dt1, IntPtr dt2) { public static int Compare(IntPtr dt1, IntPtr dt2) {
int raw_ret = g_date_time_compare(dt1, dt2); int raw_ret = g_date_time_compare(dt1, dt2);
@ -352,8 +352,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_date_time_equal(IntPtr dt1, IntPtr dt2);
static extern bool g_date_time_equal(IntPtr dt1, IntPtr dt2); static d_g_date_time_equal g_date_time_equal = Marshal.GetDelegateForFunctionPointer<d_g_date_time_equal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_equal"));
public static bool Equal(IntPtr dt1, IntPtr dt2) { public static bool Equal(IntPtr dt1, IntPtr dt2) {
bool raw_ret = g_date_time_equal(dt1, dt2); bool raw_ret = g_date_time_equal(dt1, dt2);
@ -361,8 +361,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_date_time_hash(IntPtr datetime);
static extern uint g_date_time_hash(IntPtr datetime); static d_g_date_time_hash g_date_time_hash = Marshal.GetDelegateForFunctionPointer<d_g_date_time_hash>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_hash"));
public static uint Hash(IntPtr datetime) { public static uint Hash(IntPtr datetime) {
uint raw_ret = g_date_time_hash(datetime); uint raw_ret = g_date_time_hash(datetime);
@ -372,16 +372,16 @@ namespace GLib {
public DateTime(IntPtr raw) : base(raw) {} public DateTime(IntPtr raw) : base(raw) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds);
static extern IntPtr g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds); static d_g_date_time_new g_date_time_new = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new"));
public DateTime (GLib.TimeZone tz, int year, int month, int day, int hour, int minute, double seconds) public DateTime (GLib.TimeZone tz, int year, int month, int day, int hour, int minute, double seconds)
{ {
Raw = g_date_time_new(tz == null ? IntPtr.Zero : tz.Handle, year, month, day, hour, minute, seconds); Raw = g_date_time_new(tz == null ? IntPtr.Zero : tz.Handle, year, month, day, hour, minute, seconds);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_from_timeval_local(IntPtr tv);
static extern IntPtr g_date_time_new_from_timeval_local(IntPtr tv); static d_g_date_time_new_from_timeval_local g_date_time_new_from_timeval_local = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_from_timeval_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_local"));
public DateTime (GLib.TimeVal tv) public DateTime (GLib.TimeVal tv)
{ {
@ -391,8 +391,8 @@ namespace GLib {
Marshal.FreeHGlobal (native_tv); Marshal.FreeHGlobal (native_tv);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_from_timeval_utc(IntPtr tv);
static extern IntPtr g_date_time_new_from_timeval_utc(IntPtr tv); static d_g_date_time_new_from_timeval_utc g_date_time_new_from_timeval_utc = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_from_timeval_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_utc"));
public static DateTime NewFromTimevalUtc(GLib.TimeVal tv) public static DateTime NewFromTimevalUtc(GLib.TimeVal tv)
{ {
@ -403,16 +403,16 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_from_unix_local(long t);
static extern IntPtr g_date_time_new_from_unix_local(long t); static d_g_date_time_new_from_unix_local g_date_time_new_from_unix_local = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_from_unix_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_local"));
public DateTime (long t) public DateTime (long t)
{ {
Raw = g_date_time_new_from_unix_local(t); Raw = g_date_time_new_from_unix_local(t);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_from_unix_utc(long t);
static extern IntPtr g_date_time_new_from_unix_utc(long t); static d_g_date_time_new_from_unix_utc g_date_time_new_from_unix_utc = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_from_unix_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_utc"));
public static DateTime NewFromUnixUtc(long t) public static DateTime NewFromUnixUtc(long t)
{ {
@ -420,32 +420,32 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds);
static extern IntPtr g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds); static d_g_date_time_new_local g_date_time_new_local = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_local"));
public DateTime (int year, int month, int day, int hour, int minute, double seconds) public DateTime (int year, int month, int day, int hour, int minute, double seconds)
{ {
Raw = g_date_time_new_local(year, month, day, hour, minute, seconds); Raw = g_date_time_new_local(year, month, day, hour, minute, seconds);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_now(IntPtr tz);
static extern IntPtr g_date_time_new_now(IntPtr tz); static d_g_date_time_new_now g_date_time_new_now = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_now>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now"));
public DateTime (GLib.TimeZone tz) public DateTime (GLib.TimeZone tz)
{ {
Raw = g_date_time_new_now(tz == null ? IntPtr.Zero : tz.Handle); Raw = g_date_time_new_now(tz == null ? IntPtr.Zero : tz.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_now_local();
static extern IntPtr g_date_time_new_now_local(); static d_g_date_time_new_now_local g_date_time_new_now_local = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_now_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_local"));
public DateTime () public DateTime ()
{ {
Raw = g_date_time_new_now_local(); Raw = g_date_time_new_now_local();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_now_utc();
static extern IntPtr g_date_time_new_now_utc(); static d_g_date_time_new_now_utc g_date_time_new_now_utc = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_now_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_utc"));
public static DateTime NewNowUtc() public static DateTime NewNowUtc()
{ {
@ -453,8 +453,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds);
static extern IntPtr g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds); static d_g_date_time_new_utc g_date_time_new_utc = Marshal.GetDelegateForFunctionPointer<d_g_date_time_new_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_utc"));
public static DateTime NewUtc(int year, int month, int day, int hour, int minute, double seconds) public static DateTime NewUtc(int year, int month, int day, int hour, int minute, double seconds)
{ {
@ -462,8 +462,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_date_time_ref(IntPtr raw);
static extern IntPtr g_date_time_ref(IntPtr raw); static d_g_date_time_ref g_date_time_ref = Marshal.GetDelegateForFunctionPointer<d_g_date_time_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_ref"));
protected override void Ref (IntPtr raw) protected override void Ref (IntPtr raw)
{ {
@ -473,8 +473,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_date_time_unref(IntPtr raw);
static extern void g_date_time_unref(IntPtr raw); static d_g_date_time_unref g_date_time_unref = Marshal.GetDelegateForFunctionPointer<d_g_date_time_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_unref"));
protected override void Unref (IntPtr raw) protected override void Unref (IntPtr raw)
{ {

View File

@ -26,11 +26,11 @@ namespace GLib {
public class FileUtils public class FileUtils
{ {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_file_get_contents(IntPtr filename, out IntPtr contents, out int length, out IntPtr error);
extern static bool g_file_get_contents (IntPtr filename, out IntPtr contents, out int length, out IntPtr error); static d_g_file_get_contents g_file_get_contents = Marshal.GetDelegateForFunctionPointer<d_g_file_get_contents>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_file_get_contents"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_file_get_contents_utf8(IntPtr filename, out IntPtr contents, out int length, out IntPtr error);
extern static bool g_file_get_contents_utf8 (IntPtr filename, out IntPtr contents, out int length, out IntPtr error); static d_g_file_get_contents_utf8 g_file_get_contents_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_file_get_contents_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_file_get_contents_utf8"));
public static string GetFileContents (string filename) public static string GetFileContents (string filename)
{ {

View File

@ -60,8 +60,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_clear_error(ref IntPtr errptr);
static extern void g_clear_error (ref IntPtr errptr); static d_g_clear_error g_clear_error = Marshal.GetDelegateForFunctionPointer<d_g_clear_error>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_clear_error"));
~GException () ~GException ()
{ {
g_clear_error (ref errptr); g_clear_error (ref errptr);

View File

@ -30,4 +30,4 @@
</namespace> </namespace>
<symbol type="manual" cname="GKeyFile" name="GLib.KeyFile" /> <symbol type="manual" cname="GKeyFile" name="GLib.KeyFile" />
<symbol type="manual" cname="gvariant" name="GLib.Variant" /> <symbol type="manual" cname="gvariant" name="GLib.Variant" />
</api> </api>

View File

@ -15,11 +15,6 @@
<OutputPath>..\..\..\BuildOutput\Release</OutputPath> <OutputPath>..\..\..\BuildOutput\Release</OutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="linux-x86\*" PackagePath="runtimes\linux-x86\native" Visible="false" /> <Compile Include="..\Shared\*.cs" />
<Content Include="linux-x64\*" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="linux-arm\*" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="*.dll.config" PackagePath="lib\netstandard2.0">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,5 +0,0 @@
<configuration>
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
<dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0.so.0"/>
</configuration>

View File

@ -27,16 +27,16 @@ namespace GLib {
IntPtr handle; IntPtr handle;
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_string_free(IntPtr mem, bool free_segments);
static extern IntPtr g_string_free (IntPtr mem, bool free_segments); static d_g_string_free g_string_free = Marshal.GetDelegateForFunctionPointer<d_g_string_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_free"));
~GString () ~GString ()
{ {
g_string_free (handle, true); g_string_free (handle, true);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_string_new(IntPtr text);
static extern IntPtr g_string_new (IntPtr text); static d_g_string_new g_string_new = Marshal.GetDelegateForFunctionPointer<d_g_string_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_new"));
public GString (string text) public GString (string text)
{ {

View File

@ -431,37 +431,37 @@ namespace GLib {
return GType.Is (ValFromInstancePtr (raw), this); return GType.Is (ValFromInstancePtr (raw), this);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_class_peek(IntPtr gtype);
static extern IntPtr g_type_class_peek (IntPtr gtype); static d_g_type_class_peek g_type_class_peek = Marshal.GetDelegateForFunctionPointer<d_g_type_class_peek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_peek"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_class_ref(IntPtr gtype);
static extern IntPtr g_type_class_ref (IntPtr gtype); static d_g_type_class_ref g_type_class_ref = Marshal.GetDelegateForFunctionPointer<d_g_type_class_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_default_interface_peek(IntPtr gtype);
static extern IntPtr g_type_default_interface_peek (IntPtr gtype); static d_g_type_default_interface_peek g_type_default_interface_peek = Marshal.GetDelegateForFunctionPointer<d_g_type_default_interface_peek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_peek"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_default_interface_ref(IntPtr gtype);
static extern IntPtr g_type_default_interface_ref (IntPtr gtype); static d_g_type_default_interface_ref g_type_default_interface_ref = Marshal.GetDelegateForFunctionPointer<d_g_type_default_interface_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_from_name(string name);
static extern IntPtr g_type_from_name (string name); static d_g_type_from_name g_type_from_name = Marshal.GetDelegateForFunctionPointer<d_g_type_from_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_from_name"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_type_init();
static extern void g_type_init (); static d_g_type_init g_type_init = Marshal.GetDelegateForFunctionPointer<d_g_type_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_init"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_name(IntPtr raw);
static extern IntPtr g_type_name (IntPtr raw); static d_g_type_name g_type_name = Marshal.GetDelegateForFunctionPointer<d_g_type_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_name"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_parent(IntPtr type);
static extern IntPtr g_type_parent (IntPtr type); static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer<d_g_type_parent>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_type_query(IntPtr type, out GTypeQuery query);
static extern void g_type_query (IntPtr type, out GTypeQuery query); static d_g_type_query g_type_query = Marshal.GetDelegateForFunctionPointer<d_g_type_query>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_query"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_register_static(IntPtr parent, IntPtr name, ref GTypeInfo info, int flags);
static extern IntPtr g_type_register_static (IntPtr parent, IntPtr name, ref GTypeInfo info, int flags); static d_g_type_register_static g_type_register_static = Marshal.GetDelegateForFunctionPointer<d_g_type_register_static>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_register_static"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_type_is_a(IntPtr type, IntPtr is_a_type);
static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type); static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer<d_g_type_is_a>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a"));
} }
} }

View File

@ -27,13 +27,9 @@ namespace GLib {
public class Global public class Global
{ {
//this is a static class //this is a static class
private Global () {} private Global () {}
internal const string GLibNativeDll = "libglib-2.0-0.dll";
internal const string GObjectNativeDll = "libgobject-2.0-0.dll";
internal static bool IsWindowsPlatform { internal static bool IsWindowsPlatform {
get { get {
switch (Environment.OSVersion.Platform) { switch (Environment.OSVersion.Platform) {
@ -59,11 +55,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_set_prgname(IntPtr name);
static extern void g_set_prgname (IntPtr name); static d_g_set_prgname g_set_prgname = Marshal.GetDelegateForFunctionPointer<d_g_set_prgname>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_prgname"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_get_prgname();
static extern IntPtr g_get_prgname (); static d_g_get_prgname g_get_prgname = Marshal.GetDelegateForFunctionPointer<d_g_get_prgname>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_prgname"));
public static string ApplicationName { public static string ApplicationName {
get { get {
@ -76,14 +72,14 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_set_application_name(IntPtr name);
static extern void g_set_application_name (IntPtr name); static d_g_set_application_name g_set_application_name = Marshal.GetDelegateForFunctionPointer<d_g_set_application_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_application_name"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_get_application_name();
static extern IntPtr g_get_application_name (); static d_g_get_application_name g_get_application_name = Marshal.GetDelegateForFunctionPointer<d_g_get_application_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_application_name"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_format_size_for_display(long size);
static extern IntPtr g_format_size_for_display (long size); static d_g_format_size_for_display g_format_size_for_display = Marshal.GetDelegateForFunctionPointer<d_g_format_size_for_display>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_format_size_for_display"));
static public string FormatSizeForDisplay (long size) static public string FormatSizeForDisplay (long size)
{ {

View File

@ -323,104 +323,104 @@ namespace GLib {
return (IOChannelError) g_io_channel_error_from_errno (en); return (IOChannelError) g_io_channel_error_from_errno (en);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_unix_new(int fd);
static extern IntPtr g_io_channel_unix_new (int fd); static d_g_io_channel_unix_new g_io_channel_unix_new = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_unix_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_new"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_new_file(IntPtr filename, IntPtr mode, out IntPtr error);
static extern IntPtr g_io_channel_new_file (IntPtr filename, IntPtr mode, out IntPtr error); static d_g_io_channel_new_file g_io_channel_new_file = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_new_file>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_new_file_utf8(IntPtr filename, IntPtr mode, out IntPtr error);
static extern IntPtr g_io_channel_new_file_utf8 (IntPtr filename, IntPtr mode, out IntPtr error); static d_g_io_channel_new_file_utf8 g_io_channel_new_file_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_new_file_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file_utf8"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_error_quark();
static extern int g_io_channel_error_quark (); static d_g_io_channel_error_quark g_io_channel_error_quark = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_error_quark>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_quark"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_error_from_errno(int en);
static extern int g_io_channel_error_from_errno (int en); static d_g_io_channel_error_from_errno g_io_channel_error_from_errno = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_error_from_errno>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_from_errno"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_flush(IntPtr raw, out IntPtr error);
static extern int g_io_channel_flush (IntPtr raw, out IntPtr error); static d_g_io_channel_flush g_io_channel_flush = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_flush>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_flush"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_init(IntPtr raw);
static extern void g_io_channel_init (IntPtr raw); static d_g_io_channel_init g_io_channel_init = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_init"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_read_chars(IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error);
static extern int g_io_channel_read_chars (IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error); static d_g_io_channel_read_chars g_io_channel_read_chars = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_read_chars>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_chars"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_read_line(IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error);
static extern int g_io_channel_read_line (IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error); static d_g_io_channel_read_line g_io_channel_read_line = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_read_line>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_line"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_read_to_end(IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error);
static extern int g_io_channel_read_to_end (IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error); static d_g_io_channel_read_to_end g_io_channel_read_to_end = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_read_to_end>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_to_end"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_read_unichar(IntPtr raw, out uint thechar, out IntPtr error);
static extern int g_io_channel_read_unichar (IntPtr raw, out uint thechar, out IntPtr error); static d_g_io_channel_read_unichar g_io_channel_read_unichar = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_read_unichar>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_unichar"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_seek_position(IntPtr raw, long offset, int type, out IntPtr error);
static extern int g_io_channel_seek_position (IntPtr raw, long offset, int type, out IntPtr error); static d_g_io_channel_seek_position g_io_channel_seek_position = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_seek_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_seek_position"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_shutdown(IntPtr raw, bool flush, out IntPtr err);
static extern int g_io_channel_shutdown (IntPtr raw, bool flush, out IntPtr err); static d_g_io_channel_shutdown g_io_channel_shutdown = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_shutdown>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_shutdown"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_write_chars(IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error);
static extern int g_io_channel_write_chars (IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error); static d_g_io_channel_write_chars g_io_channel_write_chars = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_write_chars>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_chars"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_write_unichar(IntPtr raw, uint thechar, out IntPtr error);
static extern int g_io_channel_write_unichar (IntPtr raw, uint thechar, out IntPtr error); static d_g_io_channel_write_unichar g_io_channel_write_unichar = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_write_unichar>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_unichar"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_get_buffer_condition(IntPtr raw);
static extern int g_io_channel_get_buffer_condition (IntPtr raw); static d_g_io_channel_get_buffer_condition g_io_channel_get_buffer_condition = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_buffer_condition>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_condition"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_io_channel_get_buffered(IntPtr raw);
static extern bool g_io_channel_get_buffered (IntPtr raw); static d_g_io_channel_get_buffered g_io_channel_get_buffered = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_buffered>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffered"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_set_buffered(IntPtr raw, bool buffered);
static extern void g_io_channel_set_buffered (IntPtr raw, bool buffered); static d_g_io_channel_set_buffered g_io_channel_set_buffered = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_buffered>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffered"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate UIntPtr d_g_io_channel_get_buffer_size(IntPtr raw);
static extern UIntPtr g_io_channel_get_buffer_size (IntPtr raw); static d_g_io_channel_get_buffer_size g_io_channel_get_buffer_size = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_size"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_set_buffer_size(IntPtr raw, UIntPtr size);
static extern void g_io_channel_set_buffer_size (IntPtr raw, UIntPtr size); static d_g_io_channel_set_buffer_size g_io_channel_set_buffer_size = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffer_size"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_io_channel_get_close_on_unref(IntPtr raw);
static extern bool g_io_channel_get_close_on_unref (IntPtr raw); static d_g_io_channel_get_close_on_unref g_io_channel_get_close_on_unref = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_close_on_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_close_on_unref"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_set_close_on_unref(IntPtr raw, bool do_close);
static extern void g_io_channel_set_close_on_unref (IntPtr raw, bool do_close); static d_g_io_channel_set_close_on_unref g_io_channel_set_close_on_unref = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_close_on_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_close_on_unref"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_get_encoding(IntPtr raw);
static extern IntPtr g_io_channel_get_encoding (IntPtr raw); static d_g_io_channel_get_encoding g_io_channel_get_encoding = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_encoding>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_encoding"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_set_encoding(IntPtr raw, IntPtr encoding, out IntPtr error);
static extern int g_io_channel_set_encoding (IntPtr raw, IntPtr encoding, out IntPtr error); static d_g_io_channel_set_encoding g_io_channel_set_encoding = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_encoding>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_encoding"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_get_flags(IntPtr raw);
static extern int g_io_channel_get_flags (IntPtr raw); static d_g_io_channel_get_flags g_io_channel_get_flags = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_flags>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_flags"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_set_flags(IntPtr raw, int flags, out IntPtr error);
static extern int g_io_channel_set_flags (IntPtr raw, int flags, out IntPtr error); static d_g_io_channel_set_flags g_io_channel_set_flags = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_flags>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_flags"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_get_line_term(IntPtr raw, out int length);
static extern IntPtr g_io_channel_get_line_term (IntPtr raw, out int length); static d_g_io_channel_get_line_term g_io_channel_get_line_term = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_get_line_term>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_line_term"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_set_line_term(IntPtr raw, byte[] term, int length);
static extern void g_io_channel_set_line_term (IntPtr raw, byte[] term, int length); static d_g_io_channel_set_line_term g_io_channel_set_line_term = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_set_line_term>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_line_term"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_io_channel_unix_get_fd(IntPtr raw);
static extern int g_io_channel_unix_get_fd (IntPtr raw); static d_g_io_channel_unix_get_fd g_io_channel_unix_get_fd = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_unix_get_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_get_fd"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_channel_ref(IntPtr raw);
static extern IntPtr g_io_channel_ref (IntPtr raw); static d_g_io_channel_ref g_io_channel_ref = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_ref"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_io_channel_unref(IntPtr raw);
static extern void g_io_channel_unref (IntPtr raw); static d_g_io_channel_unref g_io_channel_unref = Marshal.GetDelegateForFunctionPointer<d_g_io_channel_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unref"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_io_add_watch_full(IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify);
static extern uint g_io_add_watch_full (IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify); static d_g_io_add_watch_full g_io_add_watch_full = Marshal.GetDelegateForFunctionPointer<d_g_io_add_watch_full>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_add_watch_full"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_io_create_watch(IntPtr raw, int condition);
static extern IntPtr g_io_create_watch (IntPtr raw, int condition); static d_g_io_create_watch g_io_create_watch = Marshal.GetDelegateForFunctionPointer<d_g_io_create_watch>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_create_watch"));
} }
public delegate bool IOFunc (IOChannel source, IOCondition condition); public delegate bool IOFunc (IOChannel source, IOCondition condition);

View File

@ -69,8 +69,8 @@ namespace GLib {
{ {
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_idle_add(IdleHandlerInternal d, IntPtr data);
static extern uint g_idle_add (IdleHandlerInternal d, IntPtr data); static d_g_idle_add g_idle_add = Marshal.GetDelegateForFunctionPointer<d_g_idle_add>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add"));
public static uint Add (IdleHandler hndlr) public static uint Add (IdleHandler hndlr)
{ {
@ -84,8 +84,8 @@ namespace GLib {
return p.ID; return p.ID;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_idle_add_full(int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify);
static extern uint g_idle_add_full (int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify); static d_g_idle_add_full g_idle_add_full = Marshal.GetDelegateForFunctionPointer<d_g_idle_add_full>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add_full"));
public static uint Add (IdleHandler hndlr, Priority priority) public static uint Add (IdleHandler hndlr, Priority priority)
{ {

View File

@ -33,8 +33,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_ref_sink(IntPtr raw);
private static extern void g_object_ref_sink (IntPtr raw); static d_g_object_ref_sink g_object_ref_sink = Marshal.GetDelegateForFunctionPointer<d_g_object_ref_sink>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref_sink"));
protected override IntPtr Raw { protected override IntPtr Raw {
get { get {
@ -47,14 +47,14 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_object_is_floating(IntPtr raw);
static extern bool g_object_is_floating (IntPtr raw); static d_g_object_is_floating g_object_is_floating = Marshal.GetDelegateForFunctionPointer<d_g_object_is_floating>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_is_floating"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_force_floating(IntPtr raw);
static extern void g_object_force_floating (IntPtr raw); static d_g_object_force_floating g_object_force_floating = Marshal.GetDelegateForFunctionPointer<d_g_object_force_floating>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_force_floating"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_unref(IntPtr raw);
static extern void g_object_unref (IntPtr raw); static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer<d_g_object_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref"));
public bool IsFloating { public bool IsFloating {
get { get {

View File

@ -539,125 +539,125 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_free(IntPtr raw);
static extern void g_key_file_free (IntPtr raw); static d_g_key_file_free g_key_file_free = Marshal.GetDelegateForFunctionPointer<d_g_key_file_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_free"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_get_boolean(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern bool g_key_file_get_boolean (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_boolean g_key_file_get_boolean = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
static extern IntPtr g_key_file_get_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); static d_g_key_file_get_boolean_list g_key_file_get_boolean_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_boolean_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean_list"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern IntPtr g_key_file_get_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_comment g_key_file_get_comment = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_comment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_comment"));
[DllImport (Global.GLibNativeDll)] delegate double d_g_key_file_get_double(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern double g_key_file_get_double (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_double g_key_file_get_double = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_double_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
static extern IntPtr g_key_file_get_double_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); static d_g_key_file_get_double_list g_key_file_get_double_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_double_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double_list"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_groups(IntPtr raw, IntPtr dummy);
static extern IntPtr g_key_file_get_groups (IntPtr raw, IntPtr dummy); static d_g_key_file_get_groups g_key_file_get_groups = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_groups>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_groups"));
[DllImport (Global.GLibNativeDll)] delegate int d_g_key_file_get_integer(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern int g_key_file_get_integer (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_integer g_key_file_get_integer = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_integer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
static extern IntPtr g_key_file_get_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); static d_g_key_file_get_integer_list g_key_file_get_integer_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_integer_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer_list"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_keys(IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error);
static extern IntPtr g_key_file_get_keys (IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error); static d_g_key_file_get_keys g_key_file_get_keys = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_keys>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_keys"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error);
static extern IntPtr g_key_file_get_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error); static d_g_key_file_get_locale_string g_key_file_get_locale_string = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_locale_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error);
static extern IntPtr g_key_file_get_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error); static d_g_key_file_get_locale_string_list g_key_file_get_locale_string_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_locale_string_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string_list"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_start_group(IntPtr raw);
static extern IntPtr g_key_file_get_start_group (IntPtr raw); static d_g_key_file_get_start_group g_key_file_get_start_group = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_start_group>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_start_group"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_string(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern IntPtr g_key_file_get_string (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_string g_key_file_get_string = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error);
static extern IntPtr g_key_file_get_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error); static d_g_key_file_get_string_list g_key_file_get_string_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_string_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string_list"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_get_value(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern IntPtr g_key_file_get_value (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_get_value g_key_file_get_value = Marshal.GetDelegateForFunctionPointer<d_g_key_file_get_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_value"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_has_group(IntPtr raw, IntPtr group_name);
static extern bool g_key_file_has_group (IntPtr raw, IntPtr group_name); static d_g_key_file_has_group g_key_file_has_group = Marshal.GetDelegateForFunctionPointer<d_g_key_file_has_group>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_group"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_has_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern bool g_key_file_has_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_has_key g_key_file_has_key = Marshal.GetDelegateForFunctionPointer<d_g_key_file_has_key>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_key"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_load_from_data(IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error);
static extern bool g_key_file_load_from_data (IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error); static d_g_key_file_load_from_data g_key_file_load_from_data = Marshal.GetDelegateForFunctionPointer<d_g_key_file_load_from_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_load_from_data_dirs(IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error);
static extern bool g_key_file_load_from_data_dirs (IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error); static d_g_key_file_load_from_data_dirs g_key_file_load_from_data_dirs = Marshal.GetDelegateForFunctionPointer<d_g_key_file_load_from_data_dirs>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data_dirs"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_load_from_dirs(IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error);
static extern bool g_key_file_load_from_dirs (IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error); static d_g_key_file_load_from_dirs g_key_file_load_from_dirs = Marshal.GetDelegateForFunctionPointer<d_g_key_file_load_from_dirs>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_dirs"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_load_from_file(IntPtr raw, IntPtr file, int flags, out IntPtr error);
static extern bool g_key_file_load_from_file (IntPtr raw, IntPtr file, int flags, out IntPtr error); static d_g_key_file_load_from_file g_key_file_load_from_file = Marshal.GetDelegateForFunctionPointer<d_g_key_file_load_from_file>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_file"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_new();
static extern IntPtr g_key_file_new (); static d_g_key_file_new g_key_file_new = Marshal.GetDelegateForFunctionPointer<d_g_key_file_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_new"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_remove_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern bool g_key_file_remove_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_remove_comment g_key_file_remove_comment = Marshal.GetDelegateForFunctionPointer<d_g_key_file_remove_comment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_comment"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_remove_group(IntPtr raw, IntPtr group_name, out IntPtr error);
static extern bool g_key_file_remove_group (IntPtr raw, IntPtr group_name, out IntPtr error); static d_g_key_file_remove_group g_key_file_remove_group = Marshal.GetDelegateForFunctionPointer<d_g_key_file_remove_group>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_group"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_remove_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
static extern bool g_key_file_remove_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); static d_g_key_file_remove_key g_key_file_remove_key = Marshal.GetDelegateForFunctionPointer<d_g_key_file_remove_key>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_key"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_boolean(IntPtr raw, IntPtr group_name, IntPtr key, bool value);
static extern void g_key_file_set_boolean (IntPtr raw, IntPtr group_name, IntPtr key, bool value); static d_g_key_file_set_boolean g_key_file_set_boolean = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list);
static extern void g_key_file_set_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list); static d_g_key_file_set_boolean_list g_key_file_set_boolean_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_boolean_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean_list"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_key_file_set_comment(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error);
static extern bool g_key_file_set_comment (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error); static d_g_key_file_set_comment g_key_file_set_comment = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_comment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_comment"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_double(IntPtr raw, IntPtr group_name, IntPtr key, double value);
static extern void g_key_file_set_double (IntPtr raw, IntPtr group_name, IntPtr key, double value); static d_g_key_file_set_double g_key_file_set_double = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_double_list(IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list);
static extern void g_key_file_set_double_list (IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list); static d_g_key_file_set_double_list g_key_file_set_double_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_double_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double_list"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_integer(IntPtr raw, IntPtr group_name, IntPtr key, int value);
static extern void g_key_file_set_integer (IntPtr raw, IntPtr group_name, IntPtr key, int value); static d_g_key_file_set_integer g_key_file_set_integer = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_integer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list);
static extern void g_key_file_set_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list); static d_g_key_file_set_integer_list g_key_file_set_integer_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_integer_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer_list"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_list_separator(IntPtr raw, byte separator);
static extern void g_key_file_set_list_separator (IntPtr raw, byte separator); static d_g_key_file_set_list_separator g_key_file_set_list_separator = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_list_separator>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_list_separator"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value);
static extern void g_key_file_set_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value); static d_g_key_file_set_locale_string g_key_file_set_locale_string = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_locale_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length);
static extern void g_key_file_set_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length); static d_g_key_file_set_locale_string_list g_key_file_set_locale_string_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_locale_string_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string_list"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value);
static extern void g_key_file_set_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); static d_g_key_file_set_string g_key_file_set_string = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list);
static extern void g_key_file_set_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list); static d_g_key_file_set_string_list g_key_file_set_string_list = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_string_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string_list"));
[DllImport (Global.GLibNativeDll)] delegate void d_g_key_file_set_value(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value);
static extern void g_key_file_set_value (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); static d_g_key_file_set_value g_key_file_set_value = Marshal.GetDelegateForFunctionPointer<d_g_key_file_set_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_value"));
[DllImport (Global.GLibNativeDll)] delegate IntPtr d_g_key_file_to_data(IntPtr raw, out UIntPtr length, IntPtr dummy);
static extern IntPtr g_key_file_to_data (IntPtr raw, out UIntPtr length, IntPtr dummy); static d_g_key_file_to_data g_key_file_to_data = Marshal.GetDelegateForFunctionPointer<d_g_key_file_to_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_to_data"));
} }
} }

View File

@ -26,24 +26,24 @@ namespace GLib {
public class List : ListBase { public class List : ListBase {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_list_copy(IntPtr l);
static extern IntPtr g_list_copy (IntPtr l); static d_g_list_copy g_list_copy = Marshal.GetDelegateForFunctionPointer<d_g_list_copy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_copy"));
public override object Clone () public override object Clone ()
{ {
return new List (g_list_copy (Handle)); return new List (g_list_copy (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_list_length(IntPtr l);
static extern int g_list_length (IntPtr l); static d_g_list_length g_list_length = Marshal.GetDelegateForFunctionPointer<d_g_list_length>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_length"));
internal override int Length (IntPtr list) internal override int Length (IntPtr list)
{ {
return g_list_length (list); return g_list_length (list);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_list_free(IntPtr l);
static extern void g_list_free(IntPtr l); static d_g_list_free g_list_free = Marshal.GetDelegateForFunctionPointer<d_g_list_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_free"));
internal override void Free (IntPtr list) internal override void Free (IntPtr list)
{ {
@ -51,24 +51,24 @@ namespace GLib {
g_list_free (list); g_list_free (list);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_list_append(IntPtr l, IntPtr raw);
static extern IntPtr g_list_append (IntPtr l, IntPtr raw); static d_g_list_append g_list_append = Marshal.GetDelegateForFunctionPointer<d_g_list_append>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_append"));
internal override IntPtr Append (IntPtr list, IntPtr raw) internal override IntPtr Append (IntPtr list, IntPtr raw)
{ {
return g_list_append (list, raw); return g_list_append (list, raw);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_list_prepend(IntPtr l, IntPtr raw);
static extern IntPtr g_list_prepend (IntPtr l, IntPtr raw); static d_g_list_prepend g_list_prepend = Marshal.GetDelegateForFunctionPointer<d_g_list_prepend>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_prepend"));
internal override IntPtr Prepend (IntPtr list, IntPtr raw) internal override IntPtr Prepend (IntPtr list, IntPtr raw)
{ {
return g_list_prepend (list, raw); return g_list_prepend (list, raw);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_list_nth_data(IntPtr l, uint n);
static extern IntPtr g_list_nth_data (IntPtr l, uint n); static d_g_list_nth_data g_list_nth_data = Marshal.GetDelegateForFunctionPointer<d_g_list_nth_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_nth_data"));
internal override IntPtr NthData (uint n) internal override IntPtr NthData (uint n)
{ {

View File

@ -190,8 +190,8 @@ namespace GLib {
return fullname + "Adapter"; return fullname + "Adapter";
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_unref(IntPtr item);
static extern void g_object_unref (IntPtr item); static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer<d_g_object_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref"));
public void Empty () public void Empty ()
{ {

View File

@ -123,8 +123,8 @@ namespace GLib {
handlers = new System.Collections.Generic.Dictionary<uint, GCHandle> (); handlers = new System.Collections.Generic.Dictionary<uint, GCHandle> ();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_logv(IntPtr log_domain, LogLevelFlags flags, IntPtr message);
static extern void g_logv (IntPtr log_domain, LogLevelFlags flags, IntPtr message); static d_g_logv g_logv = Marshal.GetDelegateForFunctionPointer<d_g_logv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_logv"));
public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args) public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args)
{ {
@ -135,8 +135,8 @@ namespace GLib {
Marshaller.Free (nmessage); Marshaller.Free (nmessage);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_log_set_handler(IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data);
static extern uint g_log_set_handler (IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data); static d_g_log_set_handler g_log_set_handler = Marshal.GetDelegateForFunctionPointer<d_g_log_set_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_handler"));
public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc) public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc)
{ {
@ -152,8 +152,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_log_remove_handler(IntPtr log_domain, uint handler_id);
static extern uint g_log_remove_handler (IntPtr log_domain, uint handler_id); static d_g_log_remove_handler g_log_remove_handler = Marshal.GetDelegateForFunctionPointer<d_g_log_remove_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_remove_handler"));
public static void RemoveLogHandler (string logDomain, uint handlerID) public static void RemoveLogHandler (string logDomain, uint handlerID)
{ {
@ -167,8 +167,8 @@ namespace GLib {
Marshaller.Free (ndom); Marshaller.Free (ndom);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate PrintFuncNative d_g_set_print_handler(PrintFuncNative handler);
static extern PrintFuncNative g_set_print_handler (PrintFuncNative handler); static d_g_set_print_handler g_set_print_handler = Marshal.GetDelegateForFunctionPointer<d_g_set_print_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_print_handler"));
public static PrintFunc SetPrintHandler (PrintFunc handler) public static PrintFunc SetPrintHandler (PrintFunc handler)
{ {
@ -178,8 +178,8 @@ namespace GLib {
return helper.Invoker; return helper.Invoker;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate PrintFuncNative d_g_set_printerr_handler(PrintFuncNative handler);
static extern PrintFuncNative g_set_printerr_handler (PrintFuncNative handler); static d_g_set_printerr_handler g_set_printerr_handler = Marshal.GetDelegateForFunctionPointer<d_g_set_printerr_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_printerr_handler"));
public static PrintFunc SetPrintErrorHandler (PrintFunc handler) public static PrintFunc SetPrintErrorHandler (PrintFunc handler)
{ {
@ -189,8 +189,8 @@ namespace GLib {
return helper.Invoker; return helper.Invoker;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_log_default_handler(IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data);
static extern void g_log_default_handler (IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data); static d_g_log_default_handler g_log_default_handler = Marshal.GetDelegateForFunctionPointer<d_g_log_default_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_default_handler"));
public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message) public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message)
@ -202,16 +202,16 @@ namespace GLib {
Marshaller.Free (nmess); Marshaller.Free (nmess);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate LogLevelFlags d_g_log_set_always_fatal(LogLevelFlags fatal_mask);
extern static LogLevelFlags g_log_set_always_fatal (LogLevelFlags fatal_mask); static d_g_log_set_always_fatal g_log_set_always_fatal = Marshal.GetDelegateForFunctionPointer<d_g_log_set_always_fatal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_always_fatal"));
public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask) public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask)
{ {
return g_log_set_always_fatal (fatalMask); return g_log_set_always_fatal (fatalMask);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate LogLevelFlags d_g_log_set_fatal_mask(IntPtr log_domain, LogLevelFlags fatal_mask);
extern static LogLevelFlags g_log_set_fatal_mask (IntPtr log_domain, LogLevelFlags fatal_mask); static d_g_log_set_fatal_mask g_log_set_fatal_mask = Marshal.GetDelegateForFunctionPointer<d_g_log_set_fatal_mask>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_fatal_mask"));
public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask) public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask)
{ {
@ -244,8 +244,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate LogFuncNative d_g_log_set_default_handler(LogFuncNative log_func, IntPtr user_data);
extern static LogFuncNative g_log_set_default_handler (LogFuncNative log_func, IntPtr user_data); static d_g_log_set_default_handler g_log_set_default_handler = Marshal.GetDelegateForFunctionPointer<d_g_log_set_default_handler>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_default_handler"));
public static LogFunc SetDefaultHandler (LogFunc log_func) public static LogFunc SetDefaultHandler (LogFunc log_func)
{ {

View File

@ -27,16 +27,16 @@ namespace GLib {
public class MainContext { public class MainContext {
IntPtr handle; IntPtr handle;
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_main_context_new();
static extern IntPtr g_main_context_new (); static d_g_main_context_new g_main_context_new = Marshal.GetDelegateForFunctionPointer<d_g_main_context_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_new"));
public MainContext () public MainContext ()
{ {
handle = g_main_context_new (); handle = g_main_context_new ();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_context_ref(IntPtr raw);
static extern void g_main_context_ref (IntPtr raw); static d_g_main_context_ref g_main_context_ref = Marshal.GetDelegateForFunctionPointer<d_g_main_context_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_ref"));
public MainContext (IntPtr raw) public MainContext (IntPtr raw)
{ {
@ -50,8 +50,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_context_unref(IntPtr raw);
static extern void g_main_context_unref (IntPtr raw); static d_g_main_context_unref g_main_context_unref = Marshal.GetDelegateForFunctionPointer<d_g_main_context_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_unref"));
~MainContext () ~MainContext ()
{ {
@ -59,8 +59,8 @@ namespace GLib {
handle = IntPtr.Zero; handle = IntPtr.Zero;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_main_context_default();
static extern IntPtr g_main_context_default (); static d_g_main_context_default g_main_context_default = Marshal.GetDelegateForFunctionPointer<d_g_main_context_default>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_default"));
public static MainContext Default { public static MainContext Default {
get { get {
@ -68,8 +68,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_main_context_thread_default();
static extern IntPtr g_main_context_thread_default (); static d_g_main_context_thread_default g_main_context_thread_default = Marshal.GetDelegateForFunctionPointer<d_g_main_context_thread_default>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_thread_default"));
public MainContext ThreadDefault { public MainContext ThreadDefault {
get { get {
@ -79,16 +79,16 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_context_push_thread_default(IntPtr raw);
static extern void g_main_context_push_thread_default (IntPtr raw); static d_g_main_context_push_thread_default g_main_context_push_thread_default = Marshal.GetDelegateForFunctionPointer<d_g_main_context_push_thread_default>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_push_thread_default"));
public void PushThreadDefault () public void PushThreadDefault ()
{ {
g_main_context_push_thread_default (handle); g_main_context_push_thread_default (handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_context_pop_thread_default(IntPtr raw);
static extern void g_main_context_pop_thread_default (IntPtr raw); static d_g_main_context_pop_thread_default g_main_context_pop_thread_default = Marshal.GetDelegateForFunctionPointer<d_g_main_context_pop_thread_default>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pop_thread_default"));
public void PopThreadDefault () public void PopThreadDefault ()
{ {
@ -96,8 +96,8 @@ namespace GLib {
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_main_context_iteration(IntPtr raw, bool may_block);
static extern bool g_main_context_iteration (IntPtr raw, bool may_block); static d_g_main_context_iteration g_main_context_iteration = Marshal.GetDelegateForFunctionPointer<d_g_main_context_iteration>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_iteration"));
public bool RunIteration (bool may_block) public bool RunIteration (bool may_block)
{ {
@ -109,8 +109,8 @@ namespace GLib {
return RunIteration (false); return RunIteration (false);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_main_context_pending(IntPtr raw);
static extern bool g_main_context_pending (IntPtr raw); static d_g_main_context_pending g_main_context_pending = Marshal.GetDelegateForFunctionPointer<d_g_main_context_pending>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pending"));
public bool HasPendingEvents public bool HasPendingEvents
{ {
@ -119,8 +119,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_context_wakeup(IntPtr raw);
static extern void g_main_context_wakeup (IntPtr raw); static d_g_main_context_wakeup g_main_context_wakeup = Marshal.GetDelegateForFunctionPointer<d_g_main_context_wakeup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_wakeup"));
public void Wakeup () public void Wakeup ()
{ {
@ -142,8 +142,8 @@ namespace GLib {
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_main_depth();
static extern int g_main_depth (); static d_g_main_depth g_main_depth = Marshal.GetDelegateForFunctionPointer<d_g_main_depth>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_depth"));
public static int Depth { public static int Depth {
get { return g_main_depth (); } get { return g_main_depth (); }
} }

View File

@ -25,8 +25,8 @@ namespace GLib {
public class MainLoop { public class MainLoop {
private IntPtr handle; private IntPtr handle;
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_main_loop_new(IntPtr context, bool isRunning);
static extern IntPtr g_main_loop_new (IntPtr context, bool isRunning); static d_g_main_loop_new g_main_loop_new = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_new"));
public MainLoop () : this (MainContext.Default) { } public MainLoop () : this (MainContext.Default) { }
@ -37,8 +37,8 @@ namespace GLib {
handle = g_main_loop_new (context.Handle, is_running); handle = g_main_loop_new (context.Handle, is_running);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_loop_unref(IntPtr loop);
static extern void g_main_loop_unref (IntPtr loop); static d_g_main_loop_unref g_main_loop_unref = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_unref"));
~MainLoop () ~MainLoop ()
{ {
@ -46,8 +46,8 @@ namespace GLib {
handle = IntPtr.Zero; handle = IntPtr.Zero;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_main_loop_is_running(IntPtr loop);
static extern bool g_main_loop_is_running (IntPtr loop); static d_g_main_loop_is_running g_main_loop_is_running = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_is_running>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_is_running"));
public bool IsRunning { public bool IsRunning {
get { get {
@ -55,24 +55,24 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_loop_run(IntPtr loop);
static extern void g_main_loop_run (IntPtr loop); static d_g_main_loop_run g_main_loop_run = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_run>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_run"));
public void Run () public void Run ()
{ {
g_main_loop_run (handle); g_main_loop_run (handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_main_loop_quit(IntPtr loop);
static extern void g_main_loop_quit (IntPtr loop); static d_g_main_loop_quit g_main_loop_quit = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_quit>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_quit"));
public void Quit () public void Quit ()
{ {
g_main_loop_quit (handle); g_main_loop_quit (handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_main_loop_get_context(IntPtr loop);
static extern IntPtr g_main_loop_get_context (IntPtr loop); static d_g_main_loop_get_context g_main_loop_get_context = Marshal.GetDelegateForFunctionPointer<d_g_main_loop_get_context>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_get_context"));
public MainContext Context { public MainContext Context {
get { get {

View File

@ -66,8 +66,8 @@ namespace GLib {
static FreeFunc free; static FreeFunc free;
static GType boxed_type = GType.Invalid; static GType boxed_type = GType.Invalid;
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_boxed_type_register_static(IntPtr typename, CopyFunc copy_func, FreeFunc free_func);
static extern IntPtr g_boxed_type_register_static (IntPtr typename, CopyFunc copy_func, FreeFunc free_func); static d_g_boxed_type_register_static g_boxed_type_register_static = Marshal.GetDelegateForFunctionPointer<d_g_boxed_type_register_static>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_boxed_type_register_static"));
public static GType GType { public static GType GType {
get { get {

View File

@ -29,8 +29,8 @@ namespace GLib {
public class Markup { public class Markup {
private Markup () {} private Markup () {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_markup_escape_text(IntPtr text, int len);
static extern IntPtr g_markup_escape_text (IntPtr text, int len); static d_g_markup_escape_text g_markup_escape_text = Marshal.GetDelegateForFunctionPointer<d_g_markup_escape_text>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_markup_escape_text"));
static public string EscapeText (string s) static public string EscapeText (string s)
{ {

View File

@ -30,8 +30,8 @@ namespace GLib {
private Marshaller () {} private Marshaller () {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_free(IntPtr mem);
static extern void g_free (IntPtr mem); static d_g_free g_free = Marshal.GetDelegateForFunctionPointer<d_g_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_free"));
public static void Free (IntPtr ptr) public static void Free (IntPtr ptr)
{ {
@ -47,23 +47,15 @@ namespace GLib {
g_free (ptrs [i]); g_free (ptrs [i]);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_filename_to_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
static extern IntPtr g_filename_to_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); static d_g_filename_to_utf8 g_filename_to_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_filename_to_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_to_utf8"));
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_filename_to_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
public static string FilenamePtrToString (IntPtr ptr) public static string FilenamePtrToString (IntPtr ptr)
{ {
if (ptr == IntPtr.Zero) return null; if (ptr == IntPtr.Zero) return null;
IntPtr dummy, error; IntPtr dummy, error;
IntPtr utf8; IntPtr utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error);
if (Global.IsWindowsPlatform)
utf8 = g_filename_to_utf8_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error);
else
utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error);
if (error != IntPtr.Zero) if (error != IntPtr.Zero)
throw new GLib.GException (error); throw new GLib.GException (error);
@ -124,11 +116,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_filename_from_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
static extern IntPtr g_filename_from_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); static d_g_filename_from_utf8 g_filename_from_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_filename_from_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_from_utf8"));
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_filename_from_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
public static IntPtr StringToFilenamePtr (string str) public static IntPtr StringToFilenamePtr (string str)
{ {
@ -137,13 +126,7 @@ namespace GLib {
IntPtr dummy, error; IntPtr dummy, error;
IntPtr utf8 = StringToPtrGStrdup (str); IntPtr utf8 = StringToPtrGStrdup (str);
IntPtr result = g_filename_from_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error);
IntPtr result;
if (Global.IsWindowsPlatform)
result = g_filename_from_utf8_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error);
else
result = g_filename_from_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error);
g_free (utf8); g_free (utf8);
if (error != IntPtr.Zero) if (error != IntPtr.Zero)
@ -194,8 +177,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_strfreev(IntPtr mem);
static extern void g_strfreev (IntPtr mem); static d_g_strfreev g_strfreev = Marshal.GetDelegateForFunctionPointer<d_g_strfreev>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_strfreev"));
public static void StrFreeV (IntPtr null_term_array) public static void StrFreeV (IntPtr null_term_array)
{ {
@ -239,8 +222,8 @@ namespace GLib {
return members; return members;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_malloc(UIntPtr size);
static extern IntPtr g_malloc(UIntPtr size); static d_g_malloc g_malloc = Marshal.GetDelegateForFunctionPointer<d_g_malloc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc"));
public static IntPtr Malloc (ulong size) public static IntPtr Malloc (ulong size)
{ {
@ -260,11 +243,11 @@ namespace GLib {
return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset); return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_malloc0(UIntPtr size);
static extern IntPtr g_malloc0 (UIntPtr size); static d_g_malloc0 g_malloc0 = Marshal.GetDelegateForFunctionPointer<d_g_malloc0>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc0"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_unichar_to_utf8(uint c, IntPtr buf);
static extern int g_unichar_to_utf8 (uint c, IntPtr buf); static d_g_unichar_to_utf8 g_unichar_to_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_unichar_to_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_unichar_to_utf8"));
public static char GUnicharToChar (uint ucs4_char) public static char GUnicharToChar (uint ucs4_char)
{ {
@ -288,8 +271,8 @@ namespace GLib {
return PtrToStringGFree (buf); return PtrToStringGFree (buf);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_utf16_to_ucs4(ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3);
static extern IntPtr g_utf16_to_ucs4 (ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3); static d_g_utf16_to_ucs4 g_utf16_to_ucs4 = Marshal.GetDelegateForFunctionPointer<d_g_utf16_to_ucs4>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf16_to_ucs4"));
public static uint CharToGUnichar (char c) public static uint CharToGUnichar (char c)
{ {

View File

@ -16,29 +16,29 @@ namespace GLib {
int i2; int i2;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_mutex_clear(IntPtr raw);
static extern void g_mutex_clear(IntPtr raw); static d_g_mutex_clear g_mutex_clear = Marshal.GetDelegateForFunctionPointer<d_g_mutex_clear>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_clear"));
public void Clear() { public void Clear() {
g_mutex_clear(Handle); g_mutex_clear(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_mutex_init(IntPtr raw);
static extern void g_mutex_init(IntPtr raw); static d_g_mutex_init g_mutex_init = Marshal.GetDelegateForFunctionPointer<d_g_mutex_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_init"));
public void Init() { public void Init() {
g_mutex_init(Handle); g_mutex_init(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_mutex_lock(IntPtr raw);
static extern void g_mutex_lock(IntPtr raw); static d_g_mutex_lock g_mutex_lock = Marshal.GetDelegateForFunctionPointer<d_g_mutex_lock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_lock"));
public void Lock() { public void Lock() {
g_mutex_lock(Handle); g_mutex_lock(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_mutex_trylock(IntPtr raw);
static extern bool g_mutex_trylock(IntPtr raw); static d_g_mutex_trylock g_mutex_trylock = Marshal.GetDelegateForFunctionPointer<d_g_mutex_trylock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_trylock"));
public bool Trylock() { public bool Trylock() {
bool raw_ret = g_mutex_trylock(Handle); bool raw_ret = g_mutex_trylock(Handle);
@ -46,8 +46,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_mutex_unlock(IntPtr raw);
static extern void g_mutex_unlock(IntPtr raw); static d_g_mutex_unlock g_mutex_unlock = Marshal.GetDelegateForFunctionPointer<d_g_mutex_unlock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_unlock"));
public void Unlock() { public void Unlock() {
g_mutex_unlock(Handle); g_mutex_unlock(Handle);

View File

@ -22,8 +22,8 @@ namespace GLib {
public delegate void NotifyHandler (object o, NotifyArgs args); public delegate void NotifyHandler (object o, NotifyArgs args);
public class NotifyArgs : GLib.SignalArgs { public class NotifyArgs : GLib.SignalArgs {
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_get_name(IntPtr pspec);
static extern IntPtr g_param_spec_get_name (IntPtr pspec); static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name"));
public string Property { public string Property {
get { get {

View File

@ -77,11 +77,11 @@ namespace GLib {
public static bool WarnOnFinalize { get; set; } public static bool WarnOnFinalize { get; set; }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_ref(IntPtr raw);
static extern IntPtr g_object_ref (IntPtr raw); static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_unref(IntPtr raw);
static extern void g_object_unref (IntPtr raw); static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer<d_g_object_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref"));
public static Object TryGetObject (IntPtr o) public static Object TryGetObject (IntPtr o)
{ {
@ -401,8 +401,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_get_name(IntPtr pspec);
static extern IntPtr g_param_spec_get_name (IntPtr pspec); static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name"));
static IntPtr ConstructorCallback (IntPtr gtypeval, uint n_construct_properties, IntPtr construct_properties) static IntPtr ConstructorCallback (IntPtr gtypeval, uint n_construct_properties, IntPtr construct_properties)
{ {
@ -440,8 +440,8 @@ namespace GLib {
return raw; return raw;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_class_override_property(IntPtr klass, uint prop_id, IntPtr name);
static extern void g_object_class_override_property (IntPtr klass, uint prop_id, IntPtr name); static d_g_object_class_override_property g_object_class_override_property = Marshal.GetDelegateForFunctionPointer<d_g_object_class_override_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_override_property"));
public static void OverrideProperty (IntPtr oclass, uint property_id, string name) public static void OverrideProperty (IntPtr oclass, uint property_id, string name)
{ {
@ -456,8 +456,8 @@ namespace GLib {
idx++; idx++;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name);
static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer<d_g_object_class_find_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property"));
static IntPtr FindClassProperty (GLib.Object o, string name) static IntPtr FindClassProperty (GLib.Object o, string name)
{ {
@ -466,8 +466,8 @@ namespace GLib {
return g_object_class_find_property (gobjectclass, native_name); return g_object_class_find_property (gobjectclass, native_name);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_interface_find_property(IntPtr klass, IntPtr name);
static extern IntPtr g_object_interface_find_property (IntPtr klass, IntPtr name); static d_g_object_interface_find_property g_object_interface_find_property = Marshal.GetDelegateForFunctionPointer<d_g_object_interface_find_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_interface_find_property"));
static IntPtr FindInterfaceProperty (GType type, string name) static IntPtr FindInterfaceProperty (GType type, string name)
{ {
@ -476,8 +476,8 @@ namespace GLib {
return g_object_interface_find_property (g_iface, native_name); return g_object_interface_find_property (g_iface, native_name);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_class_install_property(IntPtr klass, uint prop_id, IntPtr param_spec);
static extern void g_object_class_install_property (IntPtr klass, uint prop_id, IntPtr param_spec); static d_g_object_class_install_property g_object_class_install_property = Marshal.GetDelegateForFunctionPointer<d_g_object_class_install_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_install_property"));
static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write) static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write)
{ {
@ -567,8 +567,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_type_add_interface_static(IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info);
static extern void g_type_add_interface_static (IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info); static d_g_type_add_interface_static g_type_add_interface_static = Marshal.GetDelegateForFunctionPointer<d_g_type_add_interface_static>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_add_interface_static"));
protected internal static GType RegisterGType (System.Type t) protected internal static GType RegisterGType (System.Type t)
{ {
@ -605,16 +605,16 @@ namespace GLib {
CreateNativeObject (new string [0], new GLib.Value [0]); CreateNativeObject (new string [0], new GLib.Value [0]);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_new(IntPtr gtype, IntPtr dummy);
static extern IntPtr g_object_new (IntPtr gtype, IntPtr dummy); static d_g_object_new g_object_new = Marshal.GetDelegateForFunctionPointer<d_g_object_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_new"));
struct GParameter { struct GParameter {
public IntPtr name; public IntPtr name;
public GLib.Value val; public GLib.Value val;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_newv(IntPtr gtype, int n_params, GParameter[] parms);
static extern IntPtr g_object_newv (IntPtr gtype, int n_params, GParameter[] parms); static d_g_object_newv g_object_newv = Marshal.GetDelegateForFunctionPointer<d_g_object_newv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_newv"));
protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals) protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals)
{ {
@ -725,8 +725,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_get_property(IntPtr obj, IntPtr name, ref GLib.Value val);
static extern void g_object_get_property (IntPtr obj, IntPtr name, ref GLib.Value val); static d_g_object_get_property g_object_get_property = Marshal.GetDelegateForFunctionPointer<d_g_object_get_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_get_property"));
public GLib.Value GetProperty (string name) public GLib.Value GetProperty (string name)
{ {
@ -737,8 +737,8 @@ namespace GLib {
return val; return val;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_set_property(IntPtr obj, IntPtr name, ref GLib.Value val);
static extern void g_object_set_property (IntPtr obj, IntPtr name, ref GLib.Value val); static d_g_object_set_property g_object_set_property = Marshal.GetDelegateForFunctionPointer<d_g_object_set_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_set_property"));
public void SetProperty (string name, GLib.Value val) public void SetProperty (string name, GLib.Value val)
{ {
@ -747,8 +747,8 @@ namespace GLib {
GLib.Marshaller.Free (native_name); GLib.Marshaller.Free (native_name);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_notify(IntPtr obj, IntPtr property_name);
static extern void g_object_notify (IntPtr obj, IntPtr property_name); static d_g_object_notify g_object_notify = Marshal.GetDelegateForFunctionPointer<d_g_object_notify>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_notify"));
protected void Notify (string property_name) protected void Notify (string property_name)
{ {
@ -808,11 +808,11 @@ namespace GLib {
Signal.OverrideDefaultHandler (gtype, name, cb); Signal.OverrideDefaultHandler (gtype, name, cb);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] protected delegate void d_g_signal_chain_from_overridden(IntPtr args, ref GLib.Value retval);
protected static extern void g_signal_chain_from_overridden (IntPtr args, ref GLib.Value retval); protected static d_g_signal_chain_from_overridden g_signal_chain_from_overridden = Marshal.GetDelegateForFunctionPointer<d_g_signal_chain_from_overridden>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_chain_from_overridden"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_type_check_instance_is_a(IntPtr obj, IntPtr gtype);
static extern bool g_type_check_instance_is_a (IntPtr obj, IntPtr gtype); static d_g_type_check_instance_is_a g_type_check_instance_is_a = Marshal.GetDelegateForFunctionPointer<d_g_type_check_instance_is_a>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_instance_is_a"));
internal static bool IsObject (IntPtr obj) internal static bool IsObject (IntPtr obj)
{ {

View File

@ -83,7 +83,7 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_type_parent(IntPtr typ);
static extern IntPtr g_type_parent (IntPtr typ); static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer<d_g_type_parent>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent"));
} }
} }

View File

@ -143,62 +143,62 @@ namespace GLib {
public uint param_id; public uint param_id;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_char(IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags);
static extern IntPtr g_param_spec_char (IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags); static d_g_param_spec_char g_param_spec_char = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_char>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_char"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_uchar(IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags);
static extern IntPtr g_param_spec_uchar (IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags); static d_g_param_spec_uchar g_param_spec_uchar = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_uchar>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uchar"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_boolean(IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags);
static extern IntPtr g_param_spec_boolean (IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags); static d_g_param_spec_boolean g_param_spec_boolean = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boolean"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_enum(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags);
static extern IntPtr g_param_spec_enum (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags); static d_g_param_spec_enum g_param_spec_enum = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_enum>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_enum"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_int(IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags);
static extern IntPtr g_param_spec_int (IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags); static d_g_param_spec_int g_param_spec_int = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_uint(IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags);
static extern IntPtr g_param_spec_uint (IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags); static d_g_param_spec_uint g_param_spec_uint = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_uint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_long(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags);
static extern IntPtr g_param_spec_long (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags); static d_g_param_spec_long g_param_spec_long = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_long>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_long"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_ulong(IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags);
static extern IntPtr g_param_spec_ulong (IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags); static d_g_param_spec_ulong g_param_spec_ulong = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_ulong>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_ulong"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_int64(IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags);
static extern IntPtr g_param_spec_int64 (IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags); static d_g_param_spec_int64 g_param_spec_int64 = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_uint64(IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags);
static extern IntPtr g_param_spec_uint64 (IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags); static d_g_param_spec_uint64 g_param_spec_uint64 = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_float(IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags);
static extern IntPtr g_param_spec_float (IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags); static d_g_param_spec_float g_param_spec_float = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_float"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_double(IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags);
static extern IntPtr g_param_spec_double (IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags); static d_g_param_spec_double g_param_spec_double = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_double"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_string(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags);
static extern IntPtr g_param_spec_string (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); static d_g_param_spec_string g_param_spec_string = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_string"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_pointer(IntPtr name, IntPtr nick, IntPtr blurb, int flags);
static extern IntPtr g_param_spec_pointer (IntPtr name, IntPtr nick, IntPtr blurb, int flags); static d_g_param_spec_pointer g_param_spec_pointer = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_pointer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_pointer"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_gtype(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags);
static extern IntPtr g_param_spec_gtype (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); static d_g_param_spec_gtype g_param_spec_gtype = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_gtype>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_gtype"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_boxed(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags);
static extern IntPtr g_param_spec_boxed (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); static d_g_param_spec_boxed g_param_spec_boxed = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_boxed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boxed"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_param_spec_object(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags);
static extern IntPtr g_param_spec_object (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); static d_g_param_spec_object g_param_spec_object = Marshal.GetDelegateForFunctionPointer<d_g_param_spec_object>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_object"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_gtype_get_type();
static extern IntPtr g_gtype_get_type (); static d_g_gtype_get_type g_gtype_get_type = Marshal.GetDelegateForFunctionPointer<d_g_gtype_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_gtype_get_type"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_type_is_a(IntPtr a, IntPtr b);
static extern bool g_type_is_a (IntPtr a, IntPtr b); static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer<d_g_type_is_a>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a"));
} }
} }

View File

@ -24,8 +24,8 @@ namespace GLib {
return (GLib.PollFD) Marshal.PtrToStructure (raw, typeof (GLib.PollFD)); return (GLib.PollFD) Marshal.PtrToStructure (raw, typeof (GLib.PollFD));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_pollfd_get_type();
static extern IntPtr g_pollfd_get_type(); static d_g_pollfd_get_type g_pollfd_get_type = Marshal.GetDelegateForFunctionPointer<d_g_pollfd_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_pollfd_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {

View File

@ -32,8 +32,8 @@ namespace GLib {
internal bool elements_owned = false; internal bool elements_owned = false;
protected System.Type element_type = null; protected System.Type element_type = null;
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_ptr_array_sized_new(uint n_preallocs);
static extern IntPtr g_ptr_array_sized_new (uint n_preallocs); static d_g_ptr_array_sized_new g_ptr_array_sized_new = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_sized_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_sized_new"));
public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned) public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned)
{ {
@ -43,8 +43,8 @@ namespace GLib {
this.elements_owned = elements_owned; this.elements_owned = elements_owned;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_ptr_array_new();
static extern IntPtr g_ptr_array_new (); static d_g_ptr_array_new g_ptr_array_new = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_new"));
public PtrArray (System.Type element_type, bool owned, bool elements_owned) public PtrArray (System.Type element_type, bool owned, bool elements_owned)
{ {
@ -77,11 +77,11 @@ namespace GLib {
GC.SuppressFinalize (this); GC.SuppressFinalize (this);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_ptr_array_free(IntPtr raw, bool free_seg);
static extern void g_ptr_array_free (IntPtr raw, bool free_seg); static d_g_ptr_array_free g_ptr_array_free = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_free"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_unref(IntPtr item);
static extern void g_object_unref (IntPtr item); static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer<d_g_object_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_object_unref"));
void Dispose (bool disposing) void Dispose (bool disposing)
{ {
@ -117,24 +117,24 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_ptr_array_add(IntPtr raw, IntPtr val);
static extern void g_ptr_array_add (IntPtr raw, IntPtr val); static d_g_ptr_array_add g_ptr_array_add = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_add>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_add"));
public void Add (IntPtr val) public void Add (IntPtr val)
{ {
g_ptr_array_add (Handle, val); g_ptr_array_add (Handle, val);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_ptr_array_remove(IntPtr raw, IntPtr data);
static extern void g_ptr_array_remove (IntPtr raw, IntPtr data); static d_g_ptr_array_remove g_ptr_array_remove = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_remove>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove"));
public void Remove (IntPtr data) public void Remove (IntPtr data)
{ {
g_ptr_array_remove (Handle, data); g_ptr_array_remove (Handle, data);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_ptr_array_remove_range(IntPtr raw, uint index, uint length);
static extern void g_ptr_array_remove_range (IntPtr raw, uint index, uint length); static d_g_ptr_array_remove_range g_ptr_array_remove_range = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_remove_range>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove_range"));
public void RemoveRange (IntPtr data, uint index, uint length) public void RemoveRange (IntPtr data, uint index, uint length)
{ {
@ -257,8 +257,8 @@ namespace GLib {
return new ListEnumerator (this); return new ListEnumerator (this);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_ptr_array_copy(IntPtr raw);
static extern IntPtr g_ptr_array_copy (IntPtr raw); static d_g_ptr_array_copy g_ptr_array_copy = Marshal.GetDelegateForFunctionPointer<d_g_ptr_array_copy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_copy"));
// ICloneable // ICloneable
public object Clone () public object Clone ()

View File

@ -18,29 +18,29 @@ namespace GLib {
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_rec_mutex_clear(IntPtr raw);
static extern void g_rec_mutex_clear(IntPtr raw); static d_g_rec_mutex_clear g_rec_mutex_clear = Marshal.GetDelegateForFunctionPointer<d_g_rec_mutex_clear>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_clear"));
public void Clear() { public void Clear() {
g_rec_mutex_clear(Handle); g_rec_mutex_clear(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_rec_mutex_init(IntPtr raw);
static extern void g_rec_mutex_init(IntPtr raw); static d_g_rec_mutex_init g_rec_mutex_init = Marshal.GetDelegateForFunctionPointer<d_g_rec_mutex_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_init"));
public void Init() { public void Init() {
g_rec_mutex_init(Handle); g_rec_mutex_init(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_rec_mutex_lock(IntPtr raw);
static extern void g_rec_mutex_lock(IntPtr raw); static d_g_rec_mutex_lock g_rec_mutex_lock = Marshal.GetDelegateForFunctionPointer<d_g_rec_mutex_lock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_lock"));
public void Lock() { public void Lock() {
g_rec_mutex_lock(Handle); g_rec_mutex_lock(Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_rec_mutex_trylock(IntPtr raw);
static extern bool g_rec_mutex_trylock(IntPtr raw); static d_g_rec_mutex_trylock g_rec_mutex_trylock = Marshal.GetDelegateForFunctionPointer<d_g_rec_mutex_trylock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_trylock"));
public bool Trylock() { public bool Trylock() {
bool raw_ret = g_rec_mutex_trylock(Handle); bool raw_ret = g_rec_mutex_trylock(Handle);
@ -48,8 +48,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_rec_mutex_unlock(IntPtr raw);
static extern void g_rec_mutex_unlock(IntPtr raw); static d_g_rec_mutex_unlock g_rec_mutex_unlock = Marshal.GetDelegateForFunctionPointer<d_g_rec_mutex_unlock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_unlock"));
public void Unlock() { public void Unlock() {
g_rec_mutex_unlock(Handle); g_rec_mutex_unlock(Handle);

View File

@ -26,24 +26,24 @@ namespace GLib {
public class SList : ListBase { public class SList : ListBase {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_slist_copy(IntPtr l);
static extern IntPtr g_slist_copy (IntPtr l); static d_g_slist_copy g_slist_copy = Marshal.GetDelegateForFunctionPointer<d_g_slist_copy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_copy"));
public override object Clone () public override object Clone ()
{ {
return new SList (g_slist_copy (Handle)); return new SList (g_slist_copy (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_slist_length(IntPtr l);
static extern int g_slist_length (IntPtr l); static d_g_slist_length g_slist_length = Marshal.GetDelegateForFunctionPointer<d_g_slist_length>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_length"));
internal override int Length (IntPtr list) internal override int Length (IntPtr list)
{ {
return g_slist_length (list); return g_slist_length (list);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_slist_free(IntPtr l);
static extern void g_slist_free(IntPtr l); static d_g_slist_free g_slist_free = Marshal.GetDelegateForFunctionPointer<d_g_slist_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_free"));
internal override void Free (IntPtr list) internal override void Free (IntPtr list)
{ {
@ -51,16 +51,16 @@ namespace GLib {
g_slist_free (list); g_slist_free (list);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_slist_append(IntPtr l, IntPtr raw);
static extern IntPtr g_slist_append (IntPtr l, IntPtr raw); static d_g_slist_append g_slist_append = Marshal.GetDelegateForFunctionPointer<d_g_slist_append>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_append"));
internal override IntPtr Append (IntPtr list, IntPtr raw) internal override IntPtr Append (IntPtr list, IntPtr raw)
{ {
return g_slist_append (list, raw); return g_slist_append (list, raw);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_slist_prepend(IntPtr l, IntPtr raw);
static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw); static d_g_slist_prepend g_slist_prepend = Marshal.GetDelegateForFunctionPointer<d_g_slist_prepend>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_prepend"));
internal override IntPtr Prepend (IntPtr list, IntPtr raw) internal override IntPtr Prepend (IntPtr list, IntPtr raw)
{ {
@ -68,8 +68,8 @@ namespace GLib {
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_slist_nth_data(IntPtr l, uint n);
static extern IntPtr g_slist_nth_data (IntPtr l, uint n); static d_g_slist_nth_data g_slist_nth_data = Marshal.GetDelegateForFunctionPointer<d_g_slist_nth_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_nth_data"));
internal override IntPtr NthData (uint n) internal override IntPtr NthData (uint n)
{ {

View File

@ -309,7 +309,7 @@ namespace GLib {
ret_obj = ret.Val; ret_obj = ret.Val;
ret.Dispose (); ret.Dispose ();
} else } else
g_signal_emitv (inst_and_params.ArrayPtr, signal_id, gquark, IntPtr.Zero); g_signal_emitv2 (inst_and_params.ArrayPtr, signal_id, gquark, IntPtr.Zero);
foreach (GLib.Value val in vals) foreach (GLib.Value val in vals)
val.Dispose (); val.Dispose ();
@ -357,33 +357,33 @@ namespace GLib {
g_signal_override_class_closure (id, gtype.Val, closure); g_signal_override_class_closure (id, gtype.Val, closure);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr data, IntPtr notify);
static extern IntPtr g_cclosure_new (Delegate cb, IntPtr data, IntPtr notify); static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer<d_g_cclosure_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_signal_get_invocation_hint(IntPtr instance);
static extern IntPtr g_signal_get_invocation_hint (IntPtr instance); static d_g_signal_get_invocation_hint g_signal_get_invocation_hint = Marshal.GetDelegateForFunctionPointer<d_g_signal_get_invocation_hint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_get_invocation_hint"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_signal_emitv(IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value);
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value); static d_g_signal_emitv g_signal_emitv = Marshal.GetDelegateForFunctionPointer<d_g_signal_emitv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_signal_emitv2(IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value);
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value); static d_g_signal_emitv2 g_signal_emitv2 = Marshal.GetDelegateForFunctionPointer<d_g_signal_emitv2>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_signal_lookup(IntPtr name, IntPtr itype);
static extern uint g_signal_lookup (IntPtr name, IntPtr itype); static d_g_signal_lookup g_signal_lookup = Marshal.GetDelegateForFunctionPointer<d_g_signal_lookup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_lookup"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_signal_override_class_closure(uint id, IntPtr gtype, IntPtr closure);
static extern void g_signal_override_class_closure (uint id, IntPtr gtype, IntPtr closure); static d_g_signal_override_class_closure g_signal_override_class_closure = Marshal.GetDelegateForFunctionPointer<d_g_signal_override_class_closure>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_override_class_closure"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_signal_query(uint signal_id, out Query query);
static extern void g_signal_query (uint signal_id, out Query query); static d_g_signal_query g_signal_query = Marshal.GetDelegateForFunctionPointer<d_g_signal_query>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_query"));
//better not to expose g_quark_from_static_string () due to memory allocation issues //better not to expose g_quark_from_static_string () due to memory allocation issues
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_quark_from_string(IntPtr str);
static extern uint g_quark_from_string (IntPtr str); static d_g_quark_from_string g_quark_from_string = Marshal.GetDelegateForFunctionPointer<d_g_quark_from_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_quark_from_string"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate ulong d_g_signal_add_emission_hook(uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy);
static extern ulong g_signal_add_emission_hook (uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy); static d_g_signal_add_emission_hook g_signal_add_emission_hook = Marshal.GetDelegateForFunctionPointer<d_g_signal_add_emission_hook>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_add_emission_hook"));
} }
} }

View File

@ -1,9 +1,9 @@
// SignalAttribute.cs // SignalAttribute.cs
// //
// Author: // Author:
// Ricardo Fernández Pascual <ric@users.sourceforge.net> // Ricardo Fern<EFBFBD>ndez Pascual <ric@users.sourceforge.net>
// //
// Copyright (c) Ricardo Fernández Pascual <ric@users.sourceforge.net> // Copyright (c) Ricardo Fern<EFBFBD>ndez Pascual <ric@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General // modify it under the terms of version 2 of the Lesser GNU General

View File

@ -201,26 +201,26 @@ namespace GLib {
} }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr user_data, ClosureNotify notify);
static extern IntPtr g_cclosure_new (Delegate cb, IntPtr user_data, ClosureNotify notify); static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer<d_g_cclosure_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_closure_new_simple(int closure_size, IntPtr dummy);
static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy); static d_g_closure_new_simple g_closure_new_simple = Marshal.GetDelegateForFunctionPointer<d_g_closure_new_simple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_closure_set_marshal(IntPtr closure, ClosureMarshal marshaler);
static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler); static d_g_closure_set_marshal g_closure_set_marshal = Marshal.GetDelegateForFunctionPointer<d_g_closure_set_marshal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_closure_add_finalize_notifier(IntPtr closure, IntPtr dummy, ClosureNotify notify);
static extern void g_closure_add_finalize_notifier (IntPtr closure, IntPtr dummy, ClosureNotify notify); static d_g_closure_add_finalize_notifier g_closure_add_finalize_notifier = Marshal.GetDelegateForFunctionPointer<d_g_closure_add_finalize_notifier>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_add_finalize_notifier"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_signal_connect_closure(IntPtr obj, IntPtr name, IntPtr closure, bool is_after);
static extern uint g_signal_connect_closure (IntPtr obj, IntPtr name, IntPtr closure, bool is_after); static d_g_signal_connect_closure g_signal_connect_closure = Marshal.GetDelegateForFunctionPointer<d_g_signal_connect_closure>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_connect_closure"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_signal_handler_disconnect(IntPtr instance, uint handler);
static extern void g_signal_handler_disconnect (IntPtr instance, uint handler); static d_g_signal_handler_disconnect g_signal_handler_disconnect = Marshal.GetDelegateForFunctionPointer<d_g_signal_handler_disconnect>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_disconnect"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_signal_handler_is_connected(IntPtr instance, uint handler);
static extern bool g_signal_handler_is_connected (IntPtr instance, uint handler); static d_g_signal_handler_is_connected g_signal_handler_is_connected = Marshal.GetDelegateForFunctionPointer<d_g_signal_handler_is_connected>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_is_connected"));
} }
} }

View File

@ -76,8 +76,8 @@ namespace GLib {
public Source(IntPtr raw) : base(raw) {} public Source(IntPtr raw) : base(raw) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_source_new(IntPtr source_funcs, uint struct_size);
static extern IntPtr g_source_new(IntPtr source_funcs, uint struct_size); static d_g_source_new g_source_new = Marshal.GetDelegateForFunctionPointer<d_g_source_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_new"));
public Source (GLib.SourceFuncs source_funcs, uint struct_size) public Source (GLib.SourceFuncs source_funcs, uint struct_size)
{ {
@ -147,8 +147,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_source_remove(uint tag);
static extern bool g_source_remove (uint tag); static d_g_source_remove g_source_remove = Marshal.GetDelegateForFunctionPointer<d_g_source_remove>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove"));
public static bool Remove (uint tag) public static bool Remove (uint tag)
{ {
@ -163,8 +163,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_source_get_type();
static extern IntPtr g_source_get_type(); static d_g_source_get_type g_source_get_type = Marshal.GetDelegateForFunctionPointer<d_g_source_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -174,8 +174,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_source_get_context(IntPtr raw);
static extern IntPtr g_source_get_context(IntPtr raw); static d_g_source_get_context g_source_get_context = Marshal.GetDelegateForFunctionPointer<d_g_source_get_context>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_context"));
public GLib.MainContext Context { public GLib.MainContext Context {
get { get {
@ -185,11 +185,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_source_get_priority(IntPtr raw);
static extern int g_source_get_priority(IntPtr raw); static d_g_source_get_priority g_source_get_priority = Marshal.GetDelegateForFunctionPointer<d_g_source_get_priority>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_priority"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_priority(IntPtr raw, int priority);
static extern void g_source_set_priority(IntPtr raw, int priority); static d_g_source_set_priority g_source_set_priority = Marshal.GetDelegateForFunctionPointer<d_g_source_set_priority>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_priority"));
public int Priority { public int Priority {
get { get {
@ -202,11 +202,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_source_get_name(IntPtr raw);
static extern IntPtr g_source_get_name(IntPtr raw); static d_g_source_get_name g_source_get_name = Marshal.GetDelegateForFunctionPointer<d_g_source_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_name"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_name(IntPtr raw, IntPtr name);
static extern void g_source_set_name(IntPtr raw, IntPtr name); static d_g_source_set_name g_source_set_name = Marshal.GetDelegateForFunctionPointer<d_g_source_set_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name"));
public string Name { public string Name {
get { get {
@ -221,15 +221,15 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_add_child_source(IntPtr raw, IntPtr child_source);
static extern void g_source_add_child_source(IntPtr raw, IntPtr child_source); static d_g_source_add_child_source g_source_add_child_source = Marshal.GetDelegateForFunctionPointer<d_g_source_add_child_source>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_child_source"));
public void AddChildSource(GLib.Source child_source) { public void AddChildSource(GLib.Source child_source) {
g_source_add_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); g_source_add_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_add_poll(IntPtr raw, IntPtr fd);
static extern void g_source_add_poll(IntPtr raw, IntPtr fd); static d_g_source_add_poll g_source_add_poll = Marshal.GetDelegateForFunctionPointer<d_g_source_add_poll>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_poll"));
public void AddPoll(GLib.PollFD fd) { public void AddPoll(GLib.PollFD fd) {
IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd);
@ -238,8 +238,8 @@ namespace GLib {
Marshal.FreeHGlobal (native_fd); Marshal.FreeHGlobal (native_fd);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_source_attach(IntPtr raw, IntPtr context);
static extern uint g_source_attach(IntPtr raw, IntPtr context); static d_g_source_attach g_source_attach = Marshal.GetDelegateForFunctionPointer<d_g_source_attach>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_attach"));
public uint Attach(GLib.MainContext context) { public uint Attach(GLib.MainContext context) {
uint raw_ret = g_source_attach(Handle, context == null ? IntPtr.Zero : context.Handle); uint raw_ret = g_source_attach(Handle, context == null ? IntPtr.Zero : context.Handle);
@ -251,11 +251,11 @@ namespace GLib {
return Attach (null); return Attach (null);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_source_get_can_recurse(IntPtr raw);
static extern bool g_source_get_can_recurse(IntPtr raw); static d_g_source_get_can_recurse g_source_get_can_recurse = Marshal.GetDelegateForFunctionPointer<d_g_source_get_can_recurse>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_can_recurse"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_can_recurse(IntPtr raw, bool can_recurse);
static extern void g_source_set_can_recurse(IntPtr raw, bool can_recurse); static d_g_source_set_can_recurse g_source_set_can_recurse = Marshal.GetDelegateForFunctionPointer<d_g_source_set_can_recurse>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_can_recurse"));
public bool CanRecurse { public bool CanRecurse {
get { get {
@ -268,8 +268,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_get_current_time(IntPtr raw, IntPtr timeval);
static extern void g_source_get_current_time(IntPtr raw, IntPtr timeval); static d_g_source_get_current_time g_source_get_current_time = Marshal.GetDelegateForFunctionPointer<d_g_source_get_current_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_current_time"));
[Obsolete] [Obsolete]
public void GetCurrentTime(GLib.TimeVal timeval) { public void GetCurrentTime(GLib.TimeVal timeval) {
@ -279,8 +279,8 @@ namespace GLib {
Marshal.FreeHGlobal (native_timeval); Marshal.FreeHGlobal (native_timeval);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_source_get_id(IntPtr raw);
static extern uint g_source_get_id(IntPtr raw); static d_g_source_get_id g_source_get_id = Marshal.GetDelegateForFunctionPointer<d_g_source_get_id>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_id"));
public uint Id { public uint Id {
get { get {
@ -290,11 +290,11 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_source_get_ready_time(IntPtr raw);
static extern long g_source_get_ready_time(IntPtr raw); static d_g_source_get_ready_time g_source_get_ready_time = Marshal.GetDelegateForFunctionPointer<d_g_source_get_ready_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_ready_time"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_ready_time(IntPtr raw, long ready_time);
static extern void g_source_set_ready_time(IntPtr raw, long ready_time); static d_g_source_set_ready_time g_source_set_ready_time = Marshal.GetDelegateForFunctionPointer<d_g_source_set_ready_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_ready_time"));
public long ReadyTime { public long ReadyTime {
get { get {
@ -307,8 +307,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_source_get_time(IntPtr raw);
static extern long g_source_get_time(IntPtr raw); static d_g_source_get_time g_source_get_time = Marshal.GetDelegateForFunctionPointer<d_g_source_get_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_time"));
public long Time { public long Time {
get { get {
@ -318,8 +318,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_source_is_destroyed(IntPtr raw);
static extern bool g_source_is_destroyed(IntPtr raw); static d_g_source_is_destroyed g_source_is_destroyed = Marshal.GetDelegateForFunctionPointer<d_g_source_is_destroyed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_is_destroyed"));
public bool IsDestroyed { public bool IsDestroyed {
get { get {
@ -329,15 +329,15 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events);
static extern void g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events); static d_g_source_modify_unix_fd g_source_modify_unix_fd = Marshal.GetDelegateForFunctionPointer<d_g_source_modify_unix_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_modify_unix_fd"));
public void ModifyUnixFd(IntPtr tag, GLib.IOCondition new_events) { public void ModifyUnixFd(IntPtr tag, GLib.IOCondition new_events) {
g_source_modify_unix_fd(Handle, tag, (int) new_events); g_source_modify_unix_fd(Handle, tag, (int) new_events);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_source_query_unix_fd(IntPtr raw, IntPtr tag);
static extern int g_source_query_unix_fd(IntPtr raw, IntPtr tag); static d_g_source_query_unix_fd g_source_query_unix_fd = Marshal.GetDelegateForFunctionPointer<d_g_source_query_unix_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_query_unix_fd"));
public GLib.IOCondition QueryUnixFd(IntPtr tag) { public GLib.IOCondition QueryUnixFd(IntPtr tag) {
int raw_ret = g_source_query_unix_fd(Handle, tag); int raw_ret = g_source_query_unix_fd(Handle, tag);
@ -345,15 +345,15 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_remove_child_source(IntPtr raw, IntPtr child_source);
static extern void g_source_remove_child_source(IntPtr raw, IntPtr child_source); static d_g_source_remove_child_source g_source_remove_child_source = Marshal.GetDelegateForFunctionPointer<d_g_source_remove_child_source>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_child_source"));
public void RemoveChildSource(GLib.Source child_source) { public void RemoveChildSource(GLib.Source child_source) {
g_source_remove_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); g_source_remove_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_remove_poll(IntPtr raw, IntPtr fd);
static extern void g_source_remove_poll(IntPtr raw, IntPtr fd); static d_g_source_remove_poll g_source_remove_poll = Marshal.GetDelegateForFunctionPointer<d_g_source_remove_poll>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_poll"));
public void RemovePoll(GLib.PollFD fd) { public void RemovePoll(GLib.PollFD fd) {
IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd);
@ -362,15 +362,15 @@ namespace GLib {
Marshal.FreeHGlobal (native_fd); Marshal.FreeHGlobal (native_fd);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_remove_unix_fd(IntPtr raw, IntPtr tag);
static extern void g_source_remove_unix_fd(IntPtr raw, IntPtr tag); static d_g_source_remove_unix_fd g_source_remove_unix_fd = Marshal.GetDelegateForFunctionPointer<d_g_source_remove_unix_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_unix_fd"));
public void RemoveUnixFd(IntPtr tag) { public void RemoveUnixFd(IntPtr tag) {
g_source_remove_unix_fd(Handle, tag); g_source_remove_unix_fd(Handle, tag);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs);
static extern void g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs); static d_g_source_set_callback_indirect g_source_set_callback_indirect = Marshal.GetDelegateForFunctionPointer<d_g_source_set_callback_indirect>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_callback_indirect"));
public void SetCallbackIndirect(IntPtr callback_data, GLib.SourceCallbackFuncs callback_funcs) { public void SetCallbackIndirect(IntPtr callback_data, GLib.SourceCallbackFuncs callback_funcs) {
IntPtr native_callback_funcs = GLib.Marshaller.StructureToPtrAlloc (callback_funcs); IntPtr native_callback_funcs = GLib.Marshaller.StructureToPtrAlloc (callback_funcs);
@ -379,8 +379,8 @@ namespace GLib {
Marshal.FreeHGlobal (native_callback_funcs); Marshal.FreeHGlobal (native_callback_funcs);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_funcs(IntPtr raw, IntPtr value);
static extern void g_source_set_funcs(IntPtr raw, IntPtr value); static d_g_source_set_funcs g_source_set_funcs = Marshal.GetDelegateForFunctionPointer<d_g_source_set_funcs>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_funcs"));
public GLib.SourceFuncs Funcs { public GLib.SourceFuncs Funcs {
set { set {
@ -391,8 +391,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data);
static extern bool g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data); static d_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data = Marshal.GetDelegateForFunctionPointer<d_g_source_remove_by_funcs_user_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_funcs_user_data"));
public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data) { public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data) {
IntPtr native_funcs = GLib.Marshaller.StructureToPtrAlloc (funcs); IntPtr native_funcs = GLib.Marshaller.StructureToPtrAlloc (funcs);
@ -403,8 +403,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_source_remove_by_user_data(IntPtr user_data);
static extern bool g_source_remove_by_user_data(IntPtr user_data); static d_g_source_remove_by_user_data g_source_remove_by_user_data = Marshal.GetDelegateForFunctionPointer<d_g_source_remove_by_user_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_user_data"));
public static bool RemoveByUserData(IntPtr user_data) { public static bool RemoveByUserData(IntPtr user_data) {
bool raw_ret = g_source_remove_by_user_data(user_data); bool raw_ret = g_source_remove_by_user_data(user_data);
@ -412,8 +412,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_set_name_by_id(uint tag, IntPtr name);
static extern void g_source_set_name_by_id(uint tag, IntPtr name); static d_g_source_set_name_by_id g_source_set_name_by_id = Marshal.GetDelegateForFunctionPointer<d_g_source_set_name_by_id>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name_by_id"));
public static void SetNameById(uint tag, string name) { public static void SetNameById(uint tag, string name) {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
@ -421,8 +421,8 @@ namespace GLib {
GLib.Marshaller.Free (native_name); GLib.Marshaller.Free (native_name);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_source_ref(IntPtr raw);
static extern IntPtr g_source_ref(IntPtr raw); static d_g_source_ref g_source_ref = Marshal.GetDelegateForFunctionPointer<d_g_source_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_ref"));
protected override void Ref (IntPtr raw) protected override void Ref (IntPtr raw)
{ {
@ -432,8 +432,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_unref(IntPtr raw);
static extern void g_source_unref(IntPtr raw); static d_g_source_unref g_source_unref = Marshal.GetDelegateForFunctionPointer<d_g_source_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_unref"));
protected override void Unref (IntPtr raw) protected override void Unref (IntPtr raw)
{ {
@ -443,8 +443,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_source_destroy(IntPtr raw);
static extern void g_source_destroy(IntPtr raw); static d_g_source_destroy g_source_destroy = Marshal.GetDelegateForFunctionPointer<d_g_source_destroy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_destroy"));
protected override void Free (IntPtr raw) protected override void Free (IntPtr raw)
{ {

View File

@ -102,19 +102,19 @@ namespace GLib {
this.pid = pid; this.pid = pid;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_spawn_close_pid(int pid);
static extern void g_spawn_close_pid (int pid); static d_g_spawn_close_pid g_spawn_close_pid = Marshal.GetDelegateForFunctionPointer<d_g_spawn_close_pid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_close_pid"));
public void Close () public void Close ()
{ {
g_spawn_close_pid ((int) pid); g_spawn_close_pid ((int) pid);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_spawn_async(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error);
static extern bool g_spawn_async (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); static d_g_spawn_async g_spawn_async = Marshal.GetDelegateForFunctionPointer<d_g_spawn_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_spawn_async_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error);
static extern bool g_spawn_async_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); static d_g_spawn_async_utf8 g_spawn_async_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_spawn_async_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_utf8"));
public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process) public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process)
{ {
@ -139,11 +139,11 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_spawn_async_with_pipes(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error);
static extern bool g_spawn_async_with_pipes (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); static d_g_spawn_async_with_pipes g_spawn_async_with_pipes = Marshal.GetDelegateForFunctionPointer<d_g_spawn_async_with_pipes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async_with_pipes"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_spawn_async_with_pipes_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error);
static extern bool g_spawn_async_with_pipes_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); static d_g_spawn_async_with_pipes_utf8 g_spawn_async_with_pipes_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_spawn_async_with_pipes_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_with_pipes_utf8"));
public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr) public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr)
{ {
@ -183,11 +183,11 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_spawn_sync(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
static extern bool g_spawn_sync (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); static d_g_spawn_sync g_spawn_sync = Marshal.GetDelegateForFunctionPointer<d_g_spawn_sync>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_sync"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_spawn_sync_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
static extern bool g_spawn_sync_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); static d_g_spawn_sync_utf8 g_spawn_sync_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_spawn_sync_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_sync_utf8"));
public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status) public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status)
{ {
@ -212,11 +212,11 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_spawn_command_line_async(IntPtr cmdline, out IntPtr error);
static extern bool g_spawn_command_line_async (IntPtr cmdline, out IntPtr error); static d_g_spawn_command_line_async g_spawn_command_line_async = Marshal.GetDelegateForFunctionPointer<d_g_spawn_command_line_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_async"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_spawn_command_line_async_utf8(IntPtr cmdline, out IntPtr error);
static extern bool g_spawn_command_line_async_utf8 (IntPtr cmdline, out IntPtr error); static d_g_spawn_command_line_async_utf8 g_spawn_command_line_async_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_spawn_command_line_async_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_async_utf8"));
public static bool SpawnCommandLineAsync (string command_line) public static bool SpawnCommandLineAsync (string command_line)
{ {
@ -234,11 +234,11 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_spawn_command_line_sync(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
static extern bool g_spawn_command_line_sync (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); static d_g_spawn_command_line_sync g_spawn_command_line_sync = Marshal.GetDelegateForFunctionPointer<d_g_spawn_command_line_sync>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_sync"));
[DllImport (Global.GLibNativeDll)] delegate bool d_g_spawn_command_line_sync_utf8(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
static extern bool g_spawn_command_line_sync_utf8 (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); static d_g_spawn_command_line_sync_utf8 g_spawn_command_line_sync_utf8 = Marshal.GetDelegateForFunctionPointer<d_g_spawn_command_line_sync_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_sync_utf8"));
public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status) public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status)
{ {

View File

@ -39,8 +39,8 @@ namespace GLib {
return (GLib.TimeVal) Marshal.PtrToStructure (raw, typeof (GLib.TimeVal)); return (GLib.TimeVal) Marshal.PtrToStructure (raw, typeof (GLib.TimeVal));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_time_val_add(IntPtr raw, IntPtr microseconds);
static extern void g_time_val_add(IntPtr raw, IntPtr microseconds); static d_g_time_val_add g_time_val_add = Marshal.GetDelegateForFunctionPointer<d_g_time_val_add>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_add"));
public void Add(long microseconds) { public void Add(long microseconds) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
@ -50,8 +50,8 @@ namespace GLib {
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_val_to_iso8601(IntPtr raw);
static extern IntPtr g_time_val_to_iso8601(IntPtr raw); static d_g_time_val_to_iso8601 g_time_val_to_iso8601 = Marshal.GetDelegateForFunctionPointer<d_g_time_val_to_iso8601>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_to_iso8601"));
public string ToIso8601() { public string ToIso8601() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
@ -63,8 +63,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_);
static extern bool g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_); static d_g_time_val_from_iso8601 g_time_val_from_iso8601 = Marshal.GetDelegateForFunctionPointer<d_g_time_val_from_iso8601>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_from_iso8601"));
public static bool FromIso8601(string iso_date, out GLib.TimeVal time_) { public static bool FromIso8601(string iso_date, out GLib.TimeVal time_) {
IntPtr native_iso_date = GLib.Marshaller.StringToPtrGStrdup (iso_date); IntPtr native_iso_date = GLib.Marshaller.StringToPtrGStrdup (iso_date);

View File

@ -11,8 +11,8 @@ namespace GLib {
#region Autogenerated code #region Autogenerated code
public partial class TimeZone : GLib.Opaque { public partial class TimeZone : GLib.Opaque {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_get_type();
static extern IntPtr g_time_zone_get_type(); static d_g_time_zone_get_type g_time_zone_get_type = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -22,8 +22,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_time_zone_adjust_time(IntPtr raw, int type, long time_);
static extern int g_time_zone_adjust_time(IntPtr raw, int type, long time_); static d_g_time_zone_adjust_time g_time_zone_adjust_time = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_adjust_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_adjust_time"));
public int AdjustTime(int type, long time_) { public int AdjustTime(int type, long time_) {
int raw_ret = g_time_zone_adjust_time(Handle, type, time_); int raw_ret = g_time_zone_adjust_time(Handle, type, time_);
@ -31,8 +31,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_time_zone_find_interval(IntPtr raw, int type, long time_);
static extern int g_time_zone_find_interval(IntPtr raw, int type, long time_); static d_g_time_zone_find_interval g_time_zone_find_interval = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_find_interval>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_find_interval"));
public int FindInterval(int type, long time_) { public int FindInterval(int type, long time_) {
int raw_ret = g_time_zone_find_interval(Handle, type, time_); int raw_ret = g_time_zone_find_interval(Handle, type, time_);
@ -40,8 +40,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_get_abbreviation(IntPtr raw, int interval);
static extern IntPtr g_time_zone_get_abbreviation(IntPtr raw, int interval); static d_g_time_zone_get_abbreviation g_time_zone_get_abbreviation = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_get_abbreviation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_abbreviation"));
public string GetAbbreviation(int interval) { public string GetAbbreviation(int interval) {
IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval); IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval);
@ -49,8 +49,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_time_zone_get_offset(IntPtr raw, int interval);
static extern int g_time_zone_get_offset(IntPtr raw, int interval); static d_g_time_zone_get_offset g_time_zone_get_offset = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_get_offset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_offset"));
public int GetOffset(int interval) { public int GetOffset(int interval) {
int raw_ret = g_time_zone_get_offset(Handle, interval); int raw_ret = g_time_zone_get_offset(Handle, interval);
@ -58,8 +58,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_time_zone_is_dst(IntPtr raw, int interval);
static extern bool g_time_zone_is_dst(IntPtr raw, int interval); static d_g_time_zone_is_dst g_time_zone_is_dst = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_is_dst>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_is_dst"));
public bool IsDst(int interval) { public bool IsDst(int interval) {
bool raw_ret = g_time_zone_is_dst(Handle, interval); bool raw_ret = g_time_zone_is_dst(Handle, interval);
@ -69,8 +69,8 @@ namespace GLib {
public TimeZone(IntPtr raw) : base(raw) {} public TimeZone(IntPtr raw) : base(raw) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_new(IntPtr identifier);
static extern IntPtr g_time_zone_new(IntPtr identifier); static d_g_time_zone_new g_time_zone_new = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new"));
public TimeZone (string identifier) public TimeZone (string identifier)
{ {
@ -79,16 +79,16 @@ namespace GLib {
GLib.Marshaller.Free (native_identifier); GLib.Marshaller.Free (native_identifier);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_new_local();
static extern IntPtr g_time_zone_new_local(); static d_g_time_zone_new_local g_time_zone_new_local = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_new_local>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_local"));
public TimeZone () public TimeZone ()
{ {
Raw = g_time_zone_new_local(); Raw = g_time_zone_new_local();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_new_utc();
static extern IntPtr g_time_zone_new_utc(); static d_g_time_zone_new_utc g_time_zone_new_utc = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_new_utc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_utc"));
public static TimeZone NewUtc() public static TimeZone NewUtc()
{ {
@ -96,8 +96,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_time_zone_ref(IntPtr raw);
static extern IntPtr g_time_zone_ref(IntPtr raw); static d_g_time_zone_ref g_time_zone_ref = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_ref"));
protected override void Ref (IntPtr raw) protected override void Ref (IntPtr raw)
{ {
@ -107,8 +107,8 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_time_zone_unref(IntPtr raw);
static extern void g_time_zone_unref(IntPtr raw); static d_g_time_zone_unref g_time_zone_unref = Marshal.GetDelegateForFunctionPointer<d_g_time_zone_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_unref"));
protected override void Unref (IntPtr raw) protected override void Unref (IntPtr raw)
{ {
@ -143,4 +143,4 @@ namespace GLib {
#endregion #endregion
} }
} }

View File

@ -64,8 +64,8 @@ namespace GLib {
} }
private Timeout () {} private Timeout () {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_timeout_add(uint interval, TimeoutHandlerInternal d, IntPtr data);
static extern uint g_timeout_add (uint interval, TimeoutHandlerInternal d, IntPtr data); static d_g_timeout_add g_timeout_add = Marshal.GetDelegateForFunctionPointer<d_g_timeout_add>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add"));
public static uint Add (uint interval, TimeoutHandler hndlr) public static uint Add (uint interval, TimeoutHandler hndlr)
{ {
@ -79,8 +79,8 @@ namespace GLib {
return p.ID; return p.ID;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_timeout_add_full(int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify);
static extern uint g_timeout_add_full (int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify); static d_g_timeout_add_full g_timeout_add_full = Marshal.GetDelegateForFunctionPointer<d_g_timeout_add_full>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_full"));
public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority) public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority)
{ {
@ -94,8 +94,8 @@ namespace GLib {
return p.ID; return p.ID;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_timeout_add_seconds(uint interval, TimeoutHandlerInternal d, IntPtr data);
static extern uint g_timeout_add_seconds (uint interval, TimeoutHandlerInternal d, IntPtr data); static d_g_timeout_add_seconds g_timeout_add_seconds = Marshal.GetDelegateForFunctionPointer<d_g_timeout_add_seconds>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_seconds"));
public static uint AddSeconds (uint interval, TimeoutHandler hndlr) public static uint AddSeconds (uint interval, TimeoutHandler hndlr)
{ {

View File

@ -155,17 +155,17 @@ namespace GLib {
return false; return false;
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_add_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data);
static extern void g_object_add_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); static d_g_object_add_toggle_ref g_object_add_toggle_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_add_toggle_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_add_toggle_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_remove_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data);
static extern void g_object_remove_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); static d_g_object_remove_toggle_ref g_object_remove_toggle_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_remove_toggle_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_remove_toggle_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_ref(IntPtr raw);
static extern IntPtr g_object_ref (IntPtr raw); static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_object_unref(IntPtr raw);
static extern void g_object_unref (IntPtr raw); static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer<d_g_object_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref"));
} }
} }

View File

@ -383,7 +383,7 @@ namespace GLib {
case PlatformID.Win32S: case PlatformID.Win32S:
case PlatformID.Win32Windows: case PlatformID.Win32Windows:
case PlatformID.WinCE: case PlatformID.WinCE:
g_value_set_long (ref this, (int) val); g_value_set_long2 (ref this, (int) val);
break; break;
default: default:
g_value_set_long (ref this, new IntPtr (val)); g_value_set_long (ref this, new IntPtr (val));
@ -398,7 +398,7 @@ namespace GLib {
case PlatformID.Win32S: case PlatformID.Win32S:
case PlatformID.Win32Windows: case PlatformID.Win32Windows:
case PlatformID.WinCE: case PlatformID.WinCE:
g_value_set_ulong (ref this, (uint) val); g_value_set_ulong2 (ref this, (uint) val);
break; break;
default: default:
g_value_set_ulong (ref this, new UIntPtr (val)); g_value_set_ulong (ref this, new UIntPtr (val));
@ -610,145 +610,145 @@ namespace GLib {
g_value_init (ref this, spec.ValueType.Val); g_value_init (ref this, spec.ValueType.Val);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name);
static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer<d_g_object_class_find_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_type_check_value_holds(ref Value val, IntPtr gtype);
static extern bool g_type_check_value_holds (ref Value val, IntPtr gtype); static d_g_type_check_value_holds g_type_check_value_holds = Marshal.GetDelegateForFunctionPointer<d_g_type_check_value_holds>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_value_holds"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_init(ref GLib.Value val, IntPtr gtype);
static extern void g_value_init (ref GLib.Value val, IntPtr gtype); static d_g_value_init g_value_init = Marshal.GetDelegateForFunctionPointer<d_g_value_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_init"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_unset(ref GLib.Value val);
static extern void g_value_unset (ref GLib.Value val); static d_g_value_unset g_value_unset = Marshal.GetDelegateForFunctionPointer<d_g_value_unset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_unset"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_boolean(ref Value val, bool data);
static extern void g_value_set_boolean (ref Value val, bool data); static d_g_value_set_boolean g_value_set_boolean = Marshal.GetDelegateForFunctionPointer<d_g_value_set_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boolean"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_uchar(ref Value val, byte data);
static extern void g_value_set_uchar (ref Value val, byte data); static d_g_value_set_uchar g_value_set_uchar = Marshal.GetDelegateForFunctionPointer<d_g_value_set_uchar>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uchar"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_char(ref Value val, sbyte data);
static extern void g_value_set_char (ref Value val, sbyte data); static d_g_value_set_char g_value_set_char = Marshal.GetDelegateForFunctionPointer<d_g_value_set_char>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_char"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_boxed(ref Value val, IntPtr data);
static extern void g_value_set_boxed (ref Value val, IntPtr data); static d_g_value_set_boxed g_value_set_boxed = Marshal.GetDelegateForFunctionPointer<d_g_value_set_boxed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boxed"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_double(ref Value val, double data);
static extern void g_value_set_double (ref Value val, double data); static d_g_value_set_double g_value_set_double = Marshal.GetDelegateForFunctionPointer<d_g_value_set_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_double"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_float(ref Value val, float data);
static extern void g_value_set_float (ref Value val, float data); static d_g_value_set_float g_value_set_float = Marshal.GetDelegateForFunctionPointer<d_g_value_set_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_float"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_int(ref Value val, int data);
static extern void g_value_set_int (ref Value val, int data); static d_g_value_set_int g_value_set_int = Marshal.GetDelegateForFunctionPointer<d_g_value_set_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_int64(ref Value val, long data);
static extern void g_value_set_int64 (ref Value val, long data); static d_g_value_set_int64 g_value_set_int64 = Marshal.GetDelegateForFunctionPointer<d_g_value_set_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_long(ref Value val, IntPtr data);
static extern void g_value_set_long (ref Value val, IntPtr data); static d_g_value_set_long g_value_set_long = Marshal.GetDelegateForFunctionPointer<d_g_value_set_long>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_long2(ref Value val, int data);
static extern void g_value_set_long (ref Value val, int data); static d_g_value_set_long2 g_value_set_long2 = Marshal.GetDelegateForFunctionPointer<d_g_value_set_long2>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_uint64(ref Value val, ulong data);
static extern void g_value_set_uint64 (ref Value val, ulong data); static d_g_value_set_uint64 g_value_set_uint64 = Marshal.GetDelegateForFunctionPointer<d_g_value_set_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_object(ref Value val, IntPtr data);
static extern void g_value_set_object (ref Value val, IntPtr data); static d_g_value_set_object g_value_set_object = Marshal.GetDelegateForFunctionPointer<d_g_value_set_object>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_object"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_param(ref Value val, IntPtr data);
static extern void g_value_set_param (ref Value val, IntPtr data); static d_g_value_set_param g_value_set_param = Marshal.GetDelegateForFunctionPointer<d_g_value_set_param>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_param"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_pointer(ref Value val, IntPtr data);
static extern void g_value_set_pointer (ref Value val, IntPtr data); static d_g_value_set_pointer g_value_set_pointer = Marshal.GetDelegateForFunctionPointer<d_g_value_set_pointer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_pointer"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_string(ref Value val, IntPtr data);
static extern void g_value_set_string (ref Value val, IntPtr data); static d_g_value_set_string g_value_set_string = Marshal.GetDelegateForFunctionPointer<d_g_value_set_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_string"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_uint(ref Value val, uint data);
static extern void g_value_set_uint (ref Value val, uint data); static d_g_value_set_uint g_value_set_uint = Marshal.GetDelegateForFunctionPointer<d_g_value_set_uint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_ulong(ref Value val, UIntPtr data);
static extern void g_value_set_ulong (ref Value val, UIntPtr data); static d_g_value_set_ulong g_value_set_ulong = Marshal.GetDelegateForFunctionPointer<d_g_value_set_ulong>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_ulong2(ref Value val, uint data);
static extern void g_value_set_ulong (ref Value val, uint data); static d_g_value_set_ulong2 g_value_set_ulong2 = Marshal.GetDelegateForFunctionPointer<d_g_value_set_ulong2>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_enum(ref Value val, int data);
static extern void g_value_set_enum (ref Value val, int data); static d_g_value_set_enum g_value_set_enum = Marshal.GetDelegateForFunctionPointer<d_g_value_set_enum>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_enum"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_flags(ref Value val, uint data);
static extern void g_value_set_flags (ref Value val, uint data); static d_g_value_set_flags g_value_set_flags = Marshal.GetDelegateForFunctionPointer<d_g_value_set_flags>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_flags"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_set_variant(ref Value val, IntPtr data);
static extern void g_value_set_variant (ref Value val, IntPtr data); static d_g_value_set_variant g_value_set_variant = Marshal.GetDelegateForFunctionPointer<d_g_value_set_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_variant"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_value_get_boolean(ref Value val);
static extern bool g_value_get_boolean (ref Value val); static d_g_value_get_boolean g_value_get_boolean = Marshal.GetDelegateForFunctionPointer<d_g_value_get_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boolean"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_value_get_uchar(ref Value val);
static extern byte g_value_get_uchar (ref Value val); static d_g_value_get_uchar g_value_get_uchar = Marshal.GetDelegateForFunctionPointer<d_g_value_get_uchar>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uchar"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate sbyte d_g_value_get_char(ref Value val);
static extern sbyte g_value_get_char (ref Value val); static d_g_value_get_char g_value_get_char = Marshal.GetDelegateForFunctionPointer<d_g_value_get_char>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_char"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_boxed(ref Value val);
static extern IntPtr g_value_get_boxed (ref Value val); static d_g_value_get_boxed g_value_get_boxed = Marshal.GetDelegateForFunctionPointer<d_g_value_get_boxed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boxed"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate double d_g_value_get_double(ref Value val);
static extern double g_value_get_double (ref Value val); static d_g_value_get_double g_value_get_double = Marshal.GetDelegateForFunctionPointer<d_g_value_get_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_double"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate float d_g_value_get_float(ref Value val);
static extern float g_value_get_float (ref Value val); static d_g_value_get_float g_value_get_float = Marshal.GetDelegateForFunctionPointer<d_g_value_get_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_value_get_int(ref Value val);
static extern int g_value_get_int (ref Value val); static d_g_value_get_int g_value_get_int = Marshal.GetDelegateForFunctionPointer<d_g_value_get_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_value_get_int64(ref Value val);
static extern long g_value_get_int64 (ref Value val); static d_g_value_get_int64 g_value_get_int64 = Marshal.GetDelegateForFunctionPointer<d_g_value_get_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_long(ref Value val);
static extern IntPtr g_value_get_long (ref Value val); static d_g_value_get_long g_value_get_long = Marshal.GetDelegateForFunctionPointer<d_g_value_get_long>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long"));
[DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_long", CallingConvention = CallingConvention.Cdecl)] delegate int d_g_value_get_long_as_int(ref Value val);
static extern int g_value_get_long_as_int (ref Value val); static d_g_value_get_long_as_int g_value_get_long_as_int = Marshal.GetDelegateForFunctionPointer<d_g_value_get_long_as_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate ulong d_g_value_get_uint64(ref Value val);
static extern ulong g_value_get_uint64 (ref Value val); static d_g_value_get_uint64 g_value_get_uint64 = Marshal.GetDelegateForFunctionPointer<d_g_value_get_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint64"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate UIntPtr d_g_value_get_ulong(ref Value val);
static extern UIntPtr g_value_get_ulong (ref Value val); static d_g_value_get_ulong g_value_get_ulong = Marshal.GetDelegateForFunctionPointer<d_g_value_get_ulong>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong"));
[DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_ulong", CallingConvention = CallingConvention.Cdecl)] delegate int d_g_value_get_ulong_as_uint(ref Value val);
static extern int g_value_get_ulong_as_uint (ref Value val); static d_g_value_get_ulong_as_uint g_value_get_ulong_as_uint = Marshal.GetDelegateForFunctionPointer<d_g_value_get_ulong_as_uint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_object(ref Value val);
static extern IntPtr g_value_get_object (ref Value val); static d_g_value_get_object g_value_get_object = Marshal.GetDelegateForFunctionPointer<d_g_value_get_object>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_object"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_param(ref Value val);
static extern IntPtr g_value_get_param (ref Value val); static d_g_value_get_param g_value_get_param = Marshal.GetDelegateForFunctionPointer<d_g_value_get_param>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_param"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_pointer(ref Value val);
static extern IntPtr g_value_get_pointer (ref Value val); static d_g_value_get_pointer g_value_get_pointer = Marshal.GetDelegateForFunctionPointer<d_g_value_get_pointer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_pointer"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_string(ref Value val);
static extern IntPtr g_value_get_string (ref Value val); static d_g_value_get_string g_value_get_string = Marshal.GetDelegateForFunctionPointer<d_g_value_get_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_string"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_value_get_uint(ref Value val);
static extern uint g_value_get_uint (ref Value val); static d_g_value_get_uint g_value_get_uint = Marshal.GetDelegateForFunctionPointer<d_g_value_get_uint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_value_get_enum(ref Value val);
static extern int g_value_get_enum (ref Value val); static d_g_value_get_enum g_value_get_enum = Marshal.GetDelegateForFunctionPointer<d_g_value_get_enum>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_enum"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_value_get_flags(ref Value val);
static extern uint g_value_get_flags (ref Value val); static d_g_value_get_flags g_value_get_flags = Marshal.GetDelegateForFunctionPointer<d_g_value_get_flags>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_flags"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_strv_get_type();
static extern IntPtr g_strv_get_type (); static d_g_strv_get_type g_strv_get_type = Marshal.GetDelegateForFunctionPointer<d_g_strv_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_strv_get_type"));
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_get_variant(ref Value val);
static extern IntPtr g_value_get_variant (ref Value val); static d_g_value_get_variant g_value_get_variant = Marshal.GetDelegateForFunctionPointer<d_g_value_get_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_variant"));
} }
} }

View File

@ -33,8 +33,8 @@ namespace GLib {
static private IList<IntPtr> PendingFrees = new List<IntPtr> (); static private IList<IntPtr> PendingFrees = new List<IntPtr> ();
static private bool idle_queued = false; static private bool idle_queued = false;
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_array_new(uint n_preallocs);
static extern IntPtr g_value_array_new (uint n_preallocs); static d_g_value_array_new g_value_array_new = Marshal.GetDelegateForFunctionPointer<d_g_value_array_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_new"));
public ValueArray (uint n_preallocs) public ValueArray (uint n_preallocs)
{ {
@ -58,8 +58,8 @@ namespace GLib {
GC.SuppressFinalize (this); GC.SuppressFinalize (this);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_array_free(IntPtr raw);
static extern void g_value_array_free (IntPtr raw); static d_g_value_array_free g_value_array_free = Marshal.GetDelegateForFunctionPointer<d_g_value_array_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_free"));
void Dispose (bool disposing) void Dispose (bool disposing)
{ {
@ -116,32 +116,32 @@ namespace GLib {
get { return Native.values; } get { return Native.values; }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_array_append(IntPtr raw, ref GLib.Value val);
static extern void g_value_array_append (IntPtr raw, ref GLib.Value val); static d_g_value_array_append g_value_array_append = Marshal.GetDelegateForFunctionPointer<d_g_value_array_append>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_append"));
public void Append (GLib.Value val) public void Append (GLib.Value val)
{ {
g_value_array_append (Handle, ref val); g_value_array_append (Handle, ref val);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_array_insert(IntPtr raw, uint idx, ref GLib.Value val);
static extern void g_value_array_insert (IntPtr raw, uint idx, ref GLib.Value val); static d_g_value_array_insert g_value_array_insert = Marshal.GetDelegateForFunctionPointer<d_g_value_array_insert>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_insert"));
public void Insert (uint idx, GLib.Value val) public void Insert (uint idx, GLib.Value val)
{ {
g_value_array_insert (Handle, idx, ref val); g_value_array_insert (Handle, idx, ref val);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_array_prepend(IntPtr raw, ref GLib.Value val);
static extern void g_value_array_prepend (IntPtr raw, ref GLib.Value val); static d_g_value_array_prepend g_value_array_prepend = Marshal.GetDelegateForFunctionPointer<d_g_value_array_prepend>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_prepend"));
public void Prepend (GLib.Value val) public void Prepend (GLib.Value val)
{ {
g_value_array_prepend (Handle, ref val); g_value_array_prepend (Handle, ref val);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_value_array_remove(IntPtr raw, uint idx);
static extern void g_value_array_remove (IntPtr raw, uint idx); static d_g_value_array_remove g_value_array_remove = Marshal.GetDelegateForFunctionPointer<d_g_value_array_remove>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_remove"));
public void Remove (uint idx) public void Remove (uint idx)
{ {
@ -153,8 +153,8 @@ namespace GLib {
get { return (int) Native.n_values; } get { return (int) Native.n_values; }
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_array_get_nth(IntPtr raw, uint idx);
static extern IntPtr g_value_array_get_nth (IntPtr raw, uint idx); static d_g_value_array_get_nth g_value_array_get_nth = Marshal.GetDelegateForFunctionPointer<d_g_value_array_get_nth>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_nth"));
public object this [int index] { public object this [int index] {
get { get {
@ -227,8 +227,8 @@ namespace GLib {
return new ListEnumerator (this); return new ListEnumerator (this);
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_array_copy(IntPtr raw);
static extern IntPtr g_value_array_copy (IntPtr raw); static d_g_value_array_copy g_value_array_copy = Marshal.GetDelegateForFunctionPointer<d_g_value_array_copy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_copy"));
// ICloneable // ICloneable
public object Clone () public object Clone ()
@ -236,8 +236,8 @@ namespace GLib {
return new ValueArray (g_value_array_copy (Handle)); return new ValueArray (g_value_array_copy (Handle));
} }
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_value_array_get_type();
static extern IntPtr g_value_array_get_type (); static d_g_value_array_get_type g_value_array_get_type = Marshal.GetDelegateForFunctionPointer<d_g_value_array_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {

View File

@ -38,8 +38,8 @@ namespace GLib {
Dispose (true); Dispose (true);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_variant_unref(IntPtr handle);
static extern void g_variant_unref (IntPtr handle); static d_g_variant_unref g_variant_unref = Marshal.GetDelegateForFunctionPointer<d_g_variant_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_unref"));
void Dispose (bool disposing) void Dispose (bool disposing)
{ {
@ -52,16 +52,16 @@ namespace GLib {
GC.SuppressFinalize (this); GC.SuppressFinalize (this);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_ref_sink(IntPtr handle);
static extern IntPtr g_variant_ref_sink (IntPtr handle); static d_g_variant_ref_sink g_variant_ref_sink = Marshal.GetDelegateForFunctionPointer<d_g_variant_ref_sink>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_ref_sink"));
public Variant (IntPtr handle) public Variant (IntPtr handle)
{ {
this.handle = g_variant_ref_sink (handle); this.handle = g_variant_ref_sink (handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_get_type(IntPtr val);
static extern IntPtr g_variant_get_type (IntPtr val); static d_g_variant_get_type g_variant_get_type = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_type"));
VariantType type; VariantType type;
public VariantType Type { public VariantType Type {
@ -72,60 +72,60 @@ namespace GLib {
} }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_variant(IntPtr val);
static extern IntPtr g_variant_new_variant (IntPtr val); static d_g_variant_new_variant g_variant_new_variant = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_variant"));
public static Variant NewVariant (Variant val) { public static Variant NewVariant (Variant val) {
return new Variant (g_variant_new_variant (val.Handle)); return new Variant (g_variant_new_variant (val.Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_boolean(bool val);
static extern IntPtr g_variant_new_boolean (bool val); static d_g_variant_new_boolean g_variant_new_boolean = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_boolean"));
public Variant (bool val) : this (g_variant_new_boolean (val)) {} public Variant (bool val) : this (g_variant_new_boolean (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_byte(byte val);
static extern IntPtr g_variant_new_byte (byte val); static d_g_variant_new_byte g_variant_new_byte = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_byte>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_byte"));
public Variant (byte val) : this (g_variant_new_byte (val)) {} public Variant (byte val) : this (g_variant_new_byte (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_int16(short val);
static extern IntPtr g_variant_new_int16 (short val); static d_g_variant_new_int16 g_variant_new_int16 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_int16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int16"));
public Variant (short val) : this (g_variant_new_int16 (val)) {} public Variant (short val) : this (g_variant_new_int16 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_uint16(ushort val);
static extern IntPtr g_variant_new_uint16 (ushort val); static d_g_variant_new_uint16 g_variant_new_uint16 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_uint16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint16"));
public Variant (ushort val) : this (g_variant_new_uint16 (val)) {} public Variant (ushort val) : this (g_variant_new_uint16 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_int32(int val);
static extern IntPtr g_variant_new_int32 (int val); static d_g_variant_new_int32 g_variant_new_int32 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_int32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int32"));
public Variant (int val) : this (g_variant_new_int32 (val)) {} public Variant (int val) : this (g_variant_new_int32 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_uint32(uint val);
static extern IntPtr g_variant_new_uint32 (uint val); static d_g_variant_new_uint32 g_variant_new_uint32 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_uint32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint32"));
public Variant (uint val) : this (g_variant_new_uint32 (val)) {} public Variant (uint val) : this (g_variant_new_uint32 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_int64(long val);
static extern IntPtr g_variant_new_int64 (long val); static d_g_variant_new_int64 g_variant_new_int64 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int64"));
public Variant (long val) : this (g_variant_new_int64 (val)) {} public Variant (long val) : this (g_variant_new_int64 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_uint64(ulong val);
static extern IntPtr g_variant_new_uint64 (ulong val); static d_g_variant_new_uint64 g_variant_new_uint64 = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint64"));
public Variant (ulong val) : this (g_variant_new_uint64 (val)) {} public Variant (ulong val) : this (g_variant_new_uint64 (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_double(double val);
static extern IntPtr g_variant_new_double (double val); static d_g_variant_new_double g_variant_new_double = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_double"));
public Variant (double val) : this (g_variant_new_double (val)) {} public Variant (double val) : this (g_variant_new_double (val)) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_string(IntPtr val);
static extern IntPtr g_variant_new_string (IntPtr val); static d_g_variant_new_string g_variant_new_string = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_string"));
public Variant (string val) public Variant (string val)
{ {
@ -134,8 +134,8 @@ namespace GLib {
Marshaller.Free (native_val); Marshaller.Free (native_val);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_strv(IntPtr[] strv, IntPtr length);
static extern IntPtr g_variant_new_strv (IntPtr[] strv, IntPtr length); static d_g_variant_new_strv g_variant_new_strv = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_strv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_strv"));
public Variant (string[] strv) public Variant (string[] strv)
{ {
@ -144,8 +144,8 @@ namespace GLib {
Marshaller.Free (native); Marshaller.Free (native);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_tuple(IntPtr[] children, UIntPtr n_children);
static extern IntPtr g_variant_new_tuple (IntPtr[] children, UIntPtr n_children); static d_g_variant_new_tuple g_variant_new_tuple = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_tuple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_tuple"));
public static Variant NewTuple (Variant[] children) public static Variant NewTuple (Variant[] children)
{ {
@ -159,8 +159,8 @@ namespace GLib {
return new Variant (g_variant_new_tuple (native, new UIntPtr ((ulong) children.Length))); return new Variant (g_variant_new_tuple (native, new UIntPtr ((ulong) children.Length)));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_array(IntPtr child_type, IntPtr[] children, UIntPtr n_children);
static extern IntPtr g_variant_new_array (IntPtr child_type, IntPtr[] children, UIntPtr n_children); static d_g_variant_new_array g_variant_new_array = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_array>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_array"));
public static Variant NewArray (Variant[] children) public static Variant NewArray (Variant[] children)
{ {
@ -189,8 +189,8 @@ namespace GLib {
native, new UIntPtr ((ulong) children.Length))); native, new UIntPtr ((ulong) children.Length)));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_new_dict_entry(IntPtr k, IntPtr v);
static extern IntPtr g_variant_new_dict_entry (IntPtr k, IntPtr v); static d_g_variant_new_dict_entry g_variant_new_dict_entry = Marshal.GetDelegateForFunctionPointer<d_g_variant_new_dict_entry>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_dict_entry"));
public static Variant NewDictEntry (Variant k, Variant v) public static Variant NewDictEntry (Variant k, Variant v)
{ {
@ -210,80 +210,80 @@ namespace GLib {
handle = g_variant_ref_sink (NewArray (type, pairs.ToArray ()).Handle); handle = g_variant_ref_sink (NewArray (type, pairs.ToArray ()).Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_get_boolean(IntPtr handle);
static extern bool g_variant_get_boolean (IntPtr handle); static d_g_variant_get_boolean g_variant_get_boolean = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_boolean>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_boolean"));
public static explicit operator bool (Variant val) public static explicit operator bool (Variant val)
{ {
return g_variant_get_boolean (val.Handle); return g_variant_get_boolean (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate byte d_g_variant_get_byte(IntPtr handle);
static extern byte g_variant_get_byte (IntPtr handle); static d_g_variant_get_byte g_variant_get_byte = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_byte>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_byte"));
public static explicit operator byte (Variant val) public static explicit operator byte (Variant val)
{ {
return g_variant_get_byte (val.Handle); return g_variant_get_byte (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate short d_g_variant_get_int16(IntPtr handle);
static extern short g_variant_get_int16 (IntPtr handle); static d_g_variant_get_int16 g_variant_get_int16 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_int16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int16"));
public static explicit operator short (Variant val) public static explicit operator short (Variant val)
{ {
return g_variant_get_int16 (val.Handle); return g_variant_get_int16 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate ushort d_g_variant_get_uint16(IntPtr handle);
static extern ushort g_variant_get_uint16 (IntPtr handle); static d_g_variant_get_uint16 g_variant_get_uint16 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_uint16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint16"));
public static explicit operator ushort (Variant val) public static explicit operator ushort (Variant val)
{ {
return g_variant_get_uint16 (val.Handle); return g_variant_get_uint16 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_variant_get_int32(IntPtr handle);
static extern int g_variant_get_int32 (IntPtr handle); static d_g_variant_get_int32 g_variant_get_int32 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_int32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int32"));
public static explicit operator int (Variant val) public static explicit operator int (Variant val)
{ {
return g_variant_get_int32 (val.Handle); return g_variant_get_int32 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_g_variant_get_uint32(IntPtr handle);
static extern uint g_variant_get_uint32 (IntPtr handle); static d_g_variant_get_uint32 g_variant_get_uint32 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_uint32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint32"));
public static explicit operator uint (Variant val) public static explicit operator uint (Variant val)
{ {
return g_variant_get_uint32 (val.Handle); return g_variant_get_uint32 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate long d_g_variant_get_int64(IntPtr handle);
static extern long g_variant_get_int64 (IntPtr handle); static d_g_variant_get_int64 g_variant_get_int64 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int64"));
public static explicit operator long (Variant val) public static explicit operator long (Variant val)
{ {
return g_variant_get_int64 (val.Handle); return g_variant_get_int64 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate ulong d_g_variant_get_uint64(IntPtr handle);
static extern ulong g_variant_get_uint64 (IntPtr handle); static d_g_variant_get_uint64 g_variant_get_uint64 = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint64"));
public static explicit operator ulong (Variant val) public static explicit operator ulong (Variant val)
{ {
return g_variant_get_uint64 (val.Handle); return g_variant_get_uint64 (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate double d_g_variant_get_double(IntPtr handle);
static extern double g_variant_get_double (IntPtr handle); static d_g_variant_get_double g_variant_get_double = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_double>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_double"));
public static explicit operator double (Variant val) public static explicit operator double (Variant val)
{ {
return g_variant_get_double (val.Handle); return g_variant_get_double (val.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_get_string(IntPtr handle, IntPtr length);
static extern IntPtr g_variant_get_string (IntPtr handle, IntPtr length); static d_g_variant_get_string g_variant_get_string = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_string"));
public static explicit operator string (Variant val) public static explicit operator string (Variant val)
{ {
@ -291,8 +291,8 @@ namespace GLib {
return GLib.Marshaller.Utf8PtrToString (str); return GLib.Marshaller.Utf8PtrToString (str);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_print(IntPtr variant, bool type_annotate);
static extern IntPtr g_variant_print (IntPtr variant, bool type_annotate); static d_g_variant_print g_variant_print = Marshal.GetDelegateForFunctionPointer<d_g_variant_print>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_print"));
public string Print (bool type_annotate) public string Print (bool type_annotate)
{ {
@ -300,11 +300,11 @@ namespace GLib {
return Marshaller.PtrToStringGFree (str); return Marshaller.PtrToStringGFree (str);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_n_children(IntPtr handle);
static extern IntPtr g_variant_n_children (IntPtr handle); static d_g_variant_n_children g_variant_n_children = Marshal.GetDelegateForFunctionPointer<d_g_variant_n_children>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_n_children"));
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_get_child_value(IntPtr handle, IntPtr index);
static extern IntPtr g_variant_get_child_value (IntPtr handle, IntPtr index); static d_g_variant_get_child_value g_variant_get_child_value = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_child_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_child_value"));
public Variant[] ToArray () public Variant[] ToArray ()
{ {
@ -320,8 +320,8 @@ namespace GLib {
return ret; return ret;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_get_variant(IntPtr handle);
static extern IntPtr g_variant_get_variant (IntPtr handle); static d_g_variant_get_variant g_variant_get_variant = Marshal.GetDelegateForFunctionPointer<d_g_variant_get_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_variant"));
public Dictionary<string, Variant> ToAsv () public Dictionary<string, Variant> ToAsv ()
{ {

View File

@ -47,8 +47,8 @@ namespace GLib {
public static VariantType ByteString = new VariantType ("ay"); public static VariantType ByteString = new VariantType ("ay");
public static VariantType ByteStringArray = new VariantType ("aay"); public static VariantType ByteStringArray = new VariantType ("aay");
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_string_is_valid(IntPtr type_string);
static extern bool g_variant_type_string_is_valid (IntPtr type_string); static d_g_variant_type_string_is_valid g_variant_type_string_is_valid = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_string_is_valid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_string_is_valid"));
public static bool StringIsValid (string type_string) public static bool StringIsValid (string type_string)
{ {
@ -76,8 +76,8 @@ namespace GLib {
Dispose (true); Dispose (true);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_g_variant_type_free(IntPtr handle);
static extern void g_variant_type_free (IntPtr handle); static d_g_variant_type_free g_variant_type_free = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_free>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_free"));
void Dispose (bool disposing) void Dispose (bool disposing)
{ {
@ -90,16 +90,16 @@ namespace GLib {
GC.SuppressFinalize (this); GC.SuppressFinalize (this);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_copy(IntPtr handle);
static extern IntPtr g_variant_type_copy (IntPtr handle); static d_g_variant_type_copy g_variant_type_copy = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_copy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_copy"));
public VariantType (IntPtr handle) public VariantType (IntPtr handle)
{ {
this.handle = g_variant_type_copy (handle); this.handle = g_variant_type_copy (handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_new(IntPtr type_name);
static extern IntPtr g_variant_type_new (IntPtr type_name); static d_g_variant_type_new g_variant_type_new = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new"));
public VariantType (string type_string) public VariantType (string type_string)
{ {
@ -113,145 +113,145 @@ namespace GLib {
return new VariantType (Handle); return new VariantType (Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_equal(IntPtr a, IntPtr b);
static extern bool g_variant_type_equal (IntPtr a, IntPtr b); static d_g_variant_type_equal g_variant_type_equal = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_equal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_equal"));
public override bool Equals (object o) public override bool Equals (object o)
{ {
return (o is VariantType) && g_variant_type_equal (Handle, (o as VariantType).Handle); return (o is VariantType) && g_variant_type_equal (Handle, (o as VariantType).Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_variant_type_hash(IntPtr a);
static extern int g_variant_type_hash (IntPtr a); static d_g_variant_type_hash g_variant_type_hash = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_hash>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_hash"));
public override int GetHashCode () public override int GetHashCode ()
{ {
return g_variant_type_hash (Handle); return g_variant_type_hash (Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_peek_string(IntPtr a);
static extern IntPtr g_variant_type_peek_string (IntPtr a); static d_g_variant_type_peek_string g_variant_type_peek_string = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_peek_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_peek_string"));
public override string ToString () public override string ToString ()
{ {
return Marshaller.Utf8PtrToString (g_variant_type_peek_string (Handle)); return Marshaller.Utf8PtrToString (g_variant_type_peek_string (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_array(IntPtr type);
static extern bool g_variant_type_is_array (IntPtr type); static d_g_variant_type_is_array g_variant_type_is_array = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_array>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_array"));
public bool IsArray { public bool IsArray {
get { return g_variant_type_is_array (Handle); } get { return g_variant_type_is_array (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_basic(IntPtr type);
static extern bool g_variant_type_is_basic (IntPtr type); static d_g_variant_type_is_basic g_variant_type_is_basic = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_basic>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_basic"));
public bool IsBasic { public bool IsBasic {
get { return g_variant_type_is_basic (Handle); } get { return g_variant_type_is_basic (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_container(IntPtr type);
static extern bool g_variant_type_is_container (IntPtr type); static d_g_variant_type_is_container g_variant_type_is_container = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_container>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_container"));
public bool IsContainer { public bool IsContainer {
get { return g_variant_type_is_container (Handle); } get { return g_variant_type_is_container (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_definite(IntPtr type);
static extern bool g_variant_type_is_definite (IntPtr type); static d_g_variant_type_is_definite g_variant_type_is_definite = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_definite>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_definite"));
public bool IsDefinite { public bool IsDefinite {
get { return g_variant_type_is_definite (Handle); } get { return g_variant_type_is_definite (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_dict_entry(IntPtr type);
static extern bool g_variant_type_is_dict_entry (IntPtr type); static d_g_variant_type_is_dict_entry g_variant_type_is_dict_entry = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_dict_entry>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_dict_entry"));
public bool IsDictionaryEntry { public bool IsDictionaryEntry {
get { return g_variant_type_is_dict_entry (Handle); } get { return g_variant_type_is_dict_entry (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_maybe(IntPtr type);
static extern bool g_variant_type_is_maybe (IntPtr type); static d_g_variant_type_is_maybe g_variant_type_is_maybe = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_maybe>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_maybe"));
public bool IsMaybe { public bool IsMaybe {
get { return g_variant_type_is_maybe (Handle); } get { return g_variant_type_is_maybe (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_tuple(IntPtr type);
static extern bool g_variant_type_is_tuple (IntPtr type); static d_g_variant_type_is_tuple g_variant_type_is_tuple = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_tuple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_tuple"));
public bool IsTuple { public bool IsTuple {
get { return g_variant_type_is_tuple (Handle); } get { return g_variant_type_is_tuple (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_variant(IntPtr type);
static extern bool g_variant_type_is_variant (IntPtr type); static d_g_variant_type_is_variant g_variant_type_is_variant = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_variant"));
public bool IsVariant { public bool IsVariant {
get { return g_variant_type_is_variant (Handle); } get { return g_variant_type_is_variant (Handle); }
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_g_variant_type_is_subtype_of(IntPtr type, IntPtr supertype);
static extern bool g_variant_type_is_subtype_of (IntPtr type, IntPtr supertype); static d_g_variant_type_is_subtype_of g_variant_type_is_subtype_of = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_is_subtype_of>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_subtype_of"));
public bool IsSubtypeOf (VariantType supertype) public bool IsSubtypeOf (VariantType supertype)
{ {
return g_variant_type_is_subtype_of (Handle, supertype == null ? IntPtr.Zero : supertype.Handle); return g_variant_type_is_subtype_of (Handle, supertype == null ? IntPtr.Zero : supertype.Handle);
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_element(IntPtr type);
static extern IntPtr g_variant_type_element (IntPtr type); static d_g_variant_type_element g_variant_type_element = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_element>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_element"));
public VariantType Element () public VariantType Element ()
{ {
return new VariantType (g_variant_type_element (Handle)); return new VariantType (g_variant_type_element (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_first(IntPtr type);
static extern IntPtr g_variant_type_first (IntPtr type); static d_g_variant_type_first g_variant_type_first = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_first>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_first"));
public VariantType First () public VariantType First ()
{ {
return new VariantType (g_variant_type_first (Handle)); return new VariantType (g_variant_type_first (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_next(IntPtr type);
static extern IntPtr g_variant_type_next (IntPtr type); static d_g_variant_type_next g_variant_type_next = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_next>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_next"));
public VariantType Next () public VariantType Next ()
{ {
return new VariantType (g_variant_type_next (Handle)); return new VariantType (g_variant_type_next (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_n_items(IntPtr type);
static extern IntPtr g_variant_type_n_items (IntPtr type); static d_g_variant_type_n_items g_variant_type_n_items = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_n_items>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_n_items"));
public long NItems () public long NItems ()
{ {
return g_variant_type_n_items (Handle).ToInt64 (); return g_variant_type_n_items (Handle).ToInt64 ();
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_key(IntPtr type);
static extern IntPtr g_variant_type_key (IntPtr type); static d_g_variant_type_key g_variant_type_key = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_key>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_key"));
public VariantType Key () public VariantType Key ()
{ {
return new VariantType (g_variant_type_key (Handle)); return new VariantType (g_variant_type_key (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_value(IntPtr type);
static extern IntPtr g_variant_type_value (IntPtr type); static d_g_variant_type_value g_variant_type_value = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_value"));
public VariantType Value () public VariantType Value ()
{ {
return new VariantType (g_variant_type_value (Handle)); return new VariantType (g_variant_type_value (Handle));
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_new_array(IntPtr element);
static extern IntPtr g_variant_type_new_array (IntPtr element); static d_g_variant_type_new_array g_variant_type_new_array = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_new_array>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_array"));
public static VariantType NewArray (VariantType element) public static VariantType NewArray (VariantType element)
{ {
@ -260,8 +260,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_new_dict_entry(IntPtr key, IntPtr value);
static extern IntPtr g_variant_type_new_dict_entry (IntPtr key, IntPtr value); static d_g_variant_type_new_dict_entry g_variant_type_new_dict_entry = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_new_dict_entry>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_dict_entry"));
public static VariantType NewDictionaryEntry (VariantType key, VariantType value) public static VariantType NewDictionaryEntry (VariantType key, VariantType value)
{ {
@ -270,8 +270,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_new_maybe(IntPtr element);
static extern IntPtr g_variant_type_new_maybe (IntPtr element); static d_g_variant_type_new_maybe g_variant_type_new_maybe = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_new_maybe>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_maybe"));
public static VariantType NewMaybe (VariantType element) public static VariantType NewMaybe (VariantType element)
{ {
@ -280,8 +280,8 @@ namespace GLib {
return result; return result;
} }
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_variant_type_new_tuple(IntPtr[] items, int n_items);
static extern IntPtr g_variant_type_new_tuple (IntPtr[] items, int n_items); static d_g_variant_type_new_tuple g_variant_type_new_tuple = Marshal.GetDelegateForFunctionPointer<d_g_variant_type_new_tuple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_tuple"));
public static VariantType NewTuple (VariantType[] items) public static VariantType NewTuple (VariantType[] items)
{ {

View File

@ -35,8 +35,8 @@ namespace Gdk {
Pixel = 0; Pixel = 0;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate uint d_gdk_color_hash(ref Gdk.Color raw);
static extern uint gdk_color_hash(ref Gdk.Color raw); static d_gdk_color_hash gdk_color_hash = Marshal.GetDelegateForFunctionPointer<d_gdk_color_hash>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_color_hash"));
public override int GetHashCode() { public override int GetHashCode() {
return (int) gdk_color_hash(ref this); return (int) gdk_color_hash(ref this);

View File

@ -25,11 +25,11 @@ namespace Gdk {
public partial class Device { public partial class Device {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_device_free_history(IntPtr events, int n_events);
static extern void gdk_device_free_history(IntPtr events, int n_events); static d_gdk_device_free_history gdk_device_free_history = Marshal.GetDelegateForFunctionPointer<d_gdk_device_free_history>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_free_history"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events);
static extern bool gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events); static d_gdk_device_get_history gdk_device_get_history = Marshal.GetDelegateForFunctionPointer<d_gdk_device_get_history>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_get_history"));
public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop) public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop)
{ {

View File

@ -26,8 +26,8 @@ namespace Gdk {
public partial class Display { public partial class Display {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask);
static extern void gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask); static d_gdk_display_get_pointer gdk_display_get_pointer = Marshal.GetDelegateForFunctionPointer<d_gdk_display_get_pointer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer"));
[Obsolete] [Obsolete]
public void GetPointer(Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { public void GetPointer(Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) {
@ -36,13 +36,13 @@ namespace Gdk {
mask = (Gdk.ModifierType) mask_as_int; mask = (Gdk.ModifierType) mask_as_int;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_display_get_pointer2(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask);
static extern void gdk_display_get_pointer(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask); static d_gdk_display_get_pointer2 gdk_display_get_pointer2 = Marshal.GetDelegateForFunctionPointer<d_gdk_display_get_pointer2>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer"));
public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) {
IntPtr screen_handle; IntPtr screen_handle;
int mask_as_int; int mask_as_int;
gdk_display_get_pointer(Handle, out screen_handle, out x, out y, out mask_as_int); gdk_display_get_pointer2(Handle, out screen_handle, out x, out y, out mask_as_int);
screen = (Gdk.Screen) GLib.Object.GetObject(screen_handle); screen = (Gdk.Screen) GLib.Object.GetObject(screen_handle);
mask = (Gdk.ModifierType) mask_as_int; mask = (Gdk.ModifierType) mask_as_int;
} }
@ -66,8 +66,8 @@ namespace Gdk {
GetPointer (out screen, out x, out y, out mod); GetPointer (out screen, out x, out y, out mod);
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_display_list_devices(IntPtr raw);
static extern IntPtr gdk_display_list_devices (IntPtr raw); static d_gdk_display_list_devices gdk_display_list_devices = Marshal.GetDelegateForFunctionPointer<d_gdk_display_list_devices>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_list_devices"));
public Device[] ListDevices () public Device[] ListDevices ()
{ {

View File

@ -25,8 +25,8 @@ namespace Gdk {
public partial class DisplayManager { public partial class DisplayManager {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_display_manager_list_displays(IntPtr raw);
static extern IntPtr gdk_display_manager_list_displays (IntPtr raw); static d_gdk_display_manager_list_displays gdk_display_manager_list_displays = Marshal.GetDelegateForFunctionPointer<d_gdk_display_manager_list_displays>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_manager_list_displays"));
public Display[] ListDisplays () public Display[] ListDisplays ()
{ {

View File

@ -39,8 +39,8 @@ namespace Gdk {
get { return raw; } get { return raw; }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_event_get_type();
static extern IntPtr gdk_event_get_type (); static d_gdk_event_get_type gdk_event_get_type = Marshal.GetDelegateForFunctionPointer<d_gdk_event_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_event_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { return new GLib.GType (gdk_event_get_type ()); } get { return new GLib.GType (gdk_event_get_type ()); }

View File

@ -29,11 +29,6 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="linux-x86\*" PackagePath="runtimes\linux-x86\native" Visible="false" /> <Compile Include="..\Shared\*.cs" />
<Content Include="linux-x64\*" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="linux-arm\*" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="*.dll.config" PackagePath="lib\netstandard2.0">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +0,0 @@
<configuration>
<dllmap dll="libgdk-3-0.dll" target="libgdk-3.so.0"/>
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0"/>
</configuration>

View File

@ -26,10 +26,8 @@ namespace Gdk {
public partial class Global { public partial class Global {
internal const string GdkNativeDll = "libgdk-3-0.dll"; delegate IntPtr d_gdk_list_visuals();
static d_gdk_list_visuals gdk_list_visuals = Marshal.GetDelegateForFunctionPointer<d_gdk_list_visuals>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_list_visuals"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_list_visuals ();
public static Visual[] ListVisuals () public static Visual[] ListVisuals ()
{ {
@ -107,8 +105,8 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_init_check(ref int argc, ref IntPtr argv);
static extern bool gdk_init_check(ref int argc, ref IntPtr argv); static d_gdk_init_check gdk_init_check = Marshal.GetDelegateForFunctionPointer<d_gdk_init_check>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_init_check"));
public static bool InitCheck (ref string[] argv) public static bool InitCheck (ref string[] argv)
{ {
@ -121,8 +119,8 @@ namespace Gdk {
return result; return result;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_parse_args(ref int argc, ref IntPtr argv);
static extern void gdk_parse_args(ref int argc, ref IntPtr argv); static d_gdk_parse_args gdk_parse_args = Marshal.GetDelegateForFunctionPointer<d_gdk_parse_args>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_parse_args"));
public static void ParseArgs (ref string[] argv) public static void ParseArgs (ref string[] argv)
{ {
@ -134,8 +132,8 @@ namespace Gdk {
argv = a.GetArgs (argc); argv = a.GetArgs (argc);
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_query_depths(out IntPtr depths, out int n_depths);
static extern void gdk_query_depths (out IntPtr depths, out int n_depths); static d_gdk_query_depths gdk_query_depths = Marshal.GetDelegateForFunctionPointer<d_gdk_query_depths>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_depths"));
public static int[] QueryDepths () public static int[] QueryDepths ()
{ {
@ -146,8 +144,8 @@ namespace Gdk {
Marshal.Copy (ptr, result, 0, count); Marshal.Copy (ptr, result, 0, count);
return result; return result;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_query_visual_types(out IntPtr types, out int n_types);
static extern void gdk_query_visual_types (out IntPtr types, out int n_types); static d_gdk_query_visual_types gdk_query_visual_types = Marshal.GetDelegateForFunctionPointer<d_gdk_query_visual_types>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_visual_types"));
public static VisualType[] QueryVisualTypes () public static VisualType[] QueryVisualTypes ()
{ {

View File

@ -26,8 +26,8 @@ namespace Gdk {
public partial class Keymap { public partial class Keymap {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries);
static extern bool gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries); static d_gdk_keymap_get_entries_for_keycode gdk_keymap_get_entries_for_keycode = Marshal.GetDelegateForFunctionPointer<d_gdk_keymap_get_entries_for_keycode>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keycode"));
public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals) public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals)
{ {
@ -51,8 +51,8 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys);
static extern bool gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys); static d_gdk_keymap_get_entries_for_keyval gdk_keymap_get_entries_for_keyval = Marshal.GetDelegateForFunctionPointer<d_gdk_keymap_get_entries_for_keyval>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keyval"));
public KeymapKey[] GetEntriesForKeyval (uint keyval) public KeymapKey[] GetEntriesForKeyval (uint keyval)
{ {

View File

@ -86,8 +86,8 @@ namespace Gdk {
return new Pixbuf (System.Reflection.Assembly.GetCallingAssembly (), resource); return new Pixbuf (System.Reflection.Assembly.GetCallingAssembly (), resource);
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type);
static extern IntPtr gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type); static d_gdk_pixbuf_scale_simple gdk_pixbuf_scale_simple = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_scale_simple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_scale_simple"));
public Gdk.Pixbuf ScaleSimple(int dest_width, int dest_height, Gdk.InterpType interp_type) { public Gdk.Pixbuf ScaleSimple(int dest_width, int dest_height, Gdk.InterpType interp_type) {
IntPtr raw_ret = gdk_pixbuf_scale_simple(Handle, dest_width, dest_height, (int) interp_type); IntPtr raw_ret = gdk_pixbuf_scale_simple(Handle, dest_width, dest_height, (int) interp_type);
@ -95,8 +95,8 @@ namespace Gdk {
return ret; return ret;
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2);
static extern IntPtr gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2); static d_gdk_pixbuf_composite_color_simple gdk_pixbuf_composite_color_simple = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_composite_color_simple>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_composite_color_simple"));
public Gdk.Pixbuf CompositeColorSimple(int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2) { public Gdk.Pixbuf CompositeColorSimple(int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2) {
IntPtr raw_ret = gdk_pixbuf_composite_color_simple(Handle, dest_width, dest_height, (int) interp_type, overall_alpha, check_size, color1, color2); IntPtr raw_ret = gdk_pixbuf_composite_color_simple(Handle, dest_width, dest_height, (int) interp_type, overall_alpha, check_size, color1, color2);
@ -104,8 +104,8 @@ namespace Gdk {
return ret; return ret;
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b);
static extern IntPtr gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b); static d_gdk_pixbuf_add_alpha gdk_pixbuf_add_alpha = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_add_alpha>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_add_alpha"));
public Gdk.Pixbuf AddAlpha(bool substitute_color, byte r, byte g, byte b) { public Gdk.Pixbuf AddAlpha(bool substitute_color, byte r, byte g, byte b) {
IntPtr raw_ret = gdk_pixbuf_add_alpha(Handle, substitute_color, r, g, b); IntPtr raw_ret = gdk_pixbuf_add_alpha(Handle, substitute_color, r, g, b);
@ -146,8 +146,8 @@ namespace Gdk {
} }
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data);
static extern IntPtr gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data); static d_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_new_from_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_data"));
public Pixbuf (byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn) : base (IntPtr.Zero) public Pixbuf (byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn) : base (IntPtr.Zero)
{ {
@ -175,8 +175,8 @@ namespace Gdk {
} }
*/ */
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error);
static extern unsafe IntPtr gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error); static d_gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_inline = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_new_from_inline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_inline"));
public unsafe Pixbuf(int data_length, void *data, bool copy_pixels) : base (IntPtr.Zero) public unsafe Pixbuf(int data_length, void *data, bool copy_pixels) : base (IntPtr.Zero)
{ {
@ -198,8 +198,8 @@ namespace Gdk {
// //
// the 'Pixels' property // the 'Pixels' property
// //
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_get_pixels(IntPtr raw);
static extern IntPtr gdk_pixbuf_get_pixels(IntPtr raw); static d_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_get_pixels>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_pixels"));
public IntPtr Pixels { public IntPtr Pixels {
get { get {
@ -208,8 +208,8 @@ namespace Gdk {
} }
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixbuf_get_formats();
static extern IntPtr gdk_pixbuf_get_formats(); static d_gdk_pixbuf_get_formats gdk_pixbuf_get_formats = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_get_formats>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_formats"));
public static PixbufFormat[] Formats { public static PixbufFormat[] Formats {
get { get {
@ -224,8 +224,8 @@ namespace Gdk {
} }
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy);
static extern unsafe bool gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy); static d_gdk_pixbuf_save gdk_pixbuf_save = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_save>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save"));
public unsafe bool Save(string filename, string type) { public unsafe bool Save(string filename, string type) {
IntPtr error = IntPtr.Zero; IntPtr error = IntPtr.Zero;
@ -238,8 +238,8 @@ namespace Gdk {
return ret; return ret;
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_pixbuf_save_to_bufferv(IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error);
static extern unsafe bool gdk_pixbuf_save_to_bufferv (IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); static d_gdk_pixbuf_save_to_bufferv gdk_pixbuf_save_to_bufferv = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_save_to_bufferv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_bufferv"));
IntPtr[] NullTerm (string[] src) IntPtr[] NullTerm (string[] src)
{ {
@ -286,8 +286,8 @@ namespace Gdk {
return result; return result;
} }
[DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_pixbuf_save_to_callbackv(IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error);
static extern unsafe bool gdk_pixbuf_save_to_callbackv (IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); static d_gdk_pixbuf_save_to_callbackv gdk_pixbuf_save_to_callbackv = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_save_to_callbackv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_callbackv"));
public unsafe void SaveToCallback (PixbufSaveFunc save_func, string type) public unsafe void SaveToCallback (PixbufSaveFunc save_func, string type)
{ {
@ -310,8 +310,8 @@ namespace Gdk {
throw new GLib.GException (error); throw new GLib.GException (error);
} }
[DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_pixbuf_savev(IntPtr raw, IntPtr filename, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error);
static extern unsafe bool gdk_pixbuf_savev(IntPtr raw, IntPtr filename, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); static d_gdk_pixbuf_savev gdk_pixbuf_savev = Marshal.GetDelegateForFunctionPointer<d_gdk_pixbuf_savev>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_savev"));
public unsafe bool Savev(string filename, string type, string[] option_keys, string[] option_values) { public unsafe bool Savev(string filename, string type, string[] option_keys, string[] option_values) {
IntPtr error = IntPtr.Zero; IntPtr error = IntPtr.Zero;

View File

@ -28,8 +28,8 @@ namespace Gdk {
public partial class PixbufLoader { public partial class PixbufLoader {
[DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_ref(IntPtr handle);
static extern IntPtr g_object_ref (IntPtr handle); static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref"));
internal IntPtr PixbufHandle { internal IntPtr PixbufHandle {
get { get {

View File

@ -23,8 +23,8 @@ namespace Gdk {
public partial struct Pixdata { public partial struct Pixdata {
[DllImport ("libgdk_pixbuf-2.0-0", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_pixdata_serialize(ref Gdk.Pixdata raw, out uint len);
static extern IntPtr gdk_pixdata_serialize (ref Gdk.Pixdata raw, out uint len); static d_gdk_pixdata_serialize gdk_pixdata_serialize = Marshal.GetDelegateForFunctionPointer<d_gdk_pixdata_serialize>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixdata_serialize"));
public byte [] Serialize () { public byte [] Serialize () {
uint len; uint len;

View File

@ -26,18 +26,18 @@ namespace Gdk {
public partial class Property { public partial class Property {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_property_change2(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements);
static extern void gdk_property_change(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements); static d_gdk_property_change2 gdk_property_change2 = Marshal.GetDelegateForFunctionPointer<d_gdk_property_change2>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_change"));
[Obsolete ("Replaced by corrected overload with data parameter")] [Obsolete ("Replaced by corrected overload with data parameter")]
public static byte Change(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, int format, Gdk.PropMode mode, int nelements) { public static byte Change(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, int format, Gdk.PropMode mode, int nelements) {
byte data; byte data;
gdk_property_change(window == null ? IntPtr.Zero : window.Handle, property == null ? IntPtr.Zero : property.Handle, type == null ? IntPtr.Zero : type.Handle, format, (int) mode, out data, nelements); gdk_property_change2(window == null ? IntPtr.Zero : window.Handle, property == null ? IntPtr.Zero : property.Handle, type == null ? IntPtr.Zero : type.Handle, format, (int) mode, out data, nelements);
return data; return data;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data);
static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data); static d_gdk_property_get gdk_property_get = Marshal.GetDelegateForFunctionPointer<d_gdk_property_get>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_get"));
public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) { public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) {
IntPtr actual_property_type_as_native; IntPtr actual_property_type_as_native;

View File

@ -219,8 +219,8 @@ namespace Gdk {
return Offset (rect, dr.X, dr.Y); return Offset (rect, dr.X, dr.Y);
} }
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_rectangle_get_type();
static extern IntPtr gdk_rectangle_get_type(); static d_gdk_rectangle_get_type gdk_rectangle_get_type = Marshal.GetDelegateForFunctionPointer<d_gdk_rectangle_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_get_type"));
public static GLib.GType GType { public static GLib.GType GType {
get { get {
@ -230,8 +230,8 @@ namespace Gdk {
} }
} }
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_rectangle_union(ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
static extern void gdk_rectangle_union (ref Rectangle src1, ref Rectangle src2, out Rectangle dest); static d_gdk_rectangle_union gdk_rectangle_union = Marshal.GetDelegateForFunctionPointer<d_gdk_rectangle_union>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_union"));
public Gdk.Rectangle Union (Gdk.Rectangle src) public Gdk.Rectangle Union (Gdk.Rectangle src)
{ {
@ -240,8 +240,8 @@ namespace Gdk {
return dest; return dest;
} }
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate bool d_gdk_rectangle_intersect(ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
static extern bool gdk_rectangle_intersect (ref Rectangle src1, ref Rectangle src2, out Rectangle dest); static d_gdk_rectangle_intersect gdk_rectangle_intersect = Marshal.GetDelegateForFunctionPointer<d_gdk_rectangle_intersect>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_intersect"));
public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest) public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest)
{ {

View File

@ -25,8 +25,8 @@ namespace Gdk {
public partial class Screen { public partial class Screen {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_screen_get_toplevel_windows(IntPtr raw);
static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw); static d_gdk_screen_get_toplevel_windows gdk_screen_get_toplevel_windows = Marshal.GetDelegateForFunctionPointer<d_gdk_screen_get_toplevel_windows>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_toplevel_windows"));
public Window[] ToplevelWindows public Window[] ToplevelWindows
{ {
@ -42,8 +42,8 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_screen_list_visuals(IntPtr raw);
static extern IntPtr gdk_screen_list_visuals (IntPtr raw); static d_gdk_screen_list_visuals gdk_screen_list_visuals = Marshal.GetDelegateForFunctionPointer<d_gdk_screen_list_visuals>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_list_visuals"));
public Visual[] ListVisuals () public Visual[] ListVisuals ()
{ {
@ -57,11 +57,11 @@ namespace Gdk {
return result; return result;
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_screen_get_font_options(IntPtr raw);
static extern IntPtr gdk_screen_get_font_options(IntPtr raw); static d_gdk_screen_get_font_options gdk_screen_get_font_options = Marshal.GetDelegateForFunctionPointer<d_gdk_screen_get_font_options>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_font_options"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_screen_set_font_options(IntPtr raw, IntPtr options);
static extern void gdk_screen_set_font_options(IntPtr raw, IntPtr options); static d_gdk_screen_set_font_options gdk_screen_set_font_options = Marshal.GetDelegateForFunctionPointer<d_gdk_screen_set_font_options>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_set_font_options"));
[GLib.Property ("font-options")] [GLib.Property ("font-options")]
public Cairo.FontOptions FontOptions { public Cairo.FontOptions FontOptions {

View File

@ -26,8 +26,8 @@ namespace Gdk {
public class TextProperty { public class TextProperty {
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list);
static extern int gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list); static d_gdk_text_property_to_utf8_list_for_display gdk_text_property_to_utf8_list_for_display = Marshal.GetDelegateForFunctionPointer<d_gdk_text_property_to_utf8_list_for_display>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_text_property_to_utf8_list_for_display"));
public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length) public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length)
{ {

View File

@ -32,11 +32,11 @@ namespace Gdk {
public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {} public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {}
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_window_get_background_pattern(IntPtr raw);
static extern IntPtr gdk_window_get_background_pattern(IntPtr raw); static d_gdk_window_get_background_pattern gdk_window_get_background_pattern = Marshal.GetDelegateForFunctionPointer<d_gdk_window_get_background_pattern>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_background_pattern"));
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern);
static extern void gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern); static d_gdk_window_set_background_pattern gdk_window_set_background_pattern = Marshal.GetDelegateForFunctionPointer<d_gdk_window_set_background_pattern>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_background_pattern"));
public Cairo.Pattern BackgroundPattern { public Cairo.Pattern BackgroundPattern {
get { get {
@ -49,8 +49,8 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_gdk_window_get_children(IntPtr raw);
static extern IntPtr gdk_window_get_children(IntPtr raw); static d_gdk_window_get_children gdk_window_get_children = Marshal.GetDelegateForFunctionPointer<d_gdk_window_get_children>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_children"));
public Window[] Children { public Window[] Children {
get { get {
@ -65,8 +65,8 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs);
static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs); static d_gdk_window_set_icon_list gdk_window_set_icon_list = Marshal.GetDelegateForFunctionPointer<d_gdk_window_set_icon_list>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_icon_list"));
public Pixbuf[] IconList { public Pixbuf[] IconList {
set { set {
@ -77,11 +77,11 @@ namespace Gdk {
} }
} }
[DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_object_ref(IntPtr raw);
static extern IntPtr g_object_ref (IntPtr raw); static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer<d_g_object_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_destroy(IntPtr raw);
static extern void gdk_window_destroy(IntPtr raw); static d_gdk_window_destroy gdk_window_destroy = Marshal.GetDelegateForFunctionPointer<d_gdk_window_destroy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_destroy"));
public void Destroy () public void Destroy ()
{ {
@ -97,11 +97,11 @@ namespace Gdk {
gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height); gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height);
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_get_user_data(IntPtr raw, out IntPtr data);
static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data); static d_gdk_window_get_user_data gdk_window_get_user_data = Marshal.GetDelegateForFunctionPointer<d_gdk_window_get_user_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_user_data"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_set_user_data(IntPtr raw, IntPtr user_data);
static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data); static d_gdk_window_set_user_data gdk_window_set_user_data = Marshal.GetDelegateForFunctionPointer<d_gdk_window_set_user_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_user_data"));
public IntPtr UserData { public IntPtr UserData {
get { get {
IntPtr data; IntPtr data;
@ -113,11 +113,11 @@ namespace Gdk {
} }
} }
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_add_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
static extern void gdk_window_add_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); static d_gdk_window_add_filter gdk_window_add_filter = Marshal.GetDelegateForFunctionPointer<d_gdk_window_add_filter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_add_filter"));
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate void d_gdk_window_remove_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
static extern void gdk_window_remove_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); static d_gdk_window_remove_filter gdk_window_remove_filter = Marshal.GetDelegateForFunctionPointer<d_gdk_window_remove_filter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_remove_filter"));
static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> filter_all_hash; static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> filter_all_hash;
static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> FilterAllHash { static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> FilterAllHash {

View File

@ -23,8 +23,8 @@ namespace GLib {
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
public partial class AppInfoAdapter { public partial class AppInfoAdapter {
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_app_info_get_all();
static extern IntPtr g_app_info_get_all(); static d_g_app_info_get_all g_app_info_get_all = Marshal.GetDelegateForFunctionPointer<d_g_app_info_get_all>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_all"));
public static GLib.IAppInfo[] GetAll () { public static GLib.IAppInfo[] GetAll () {
IntPtr raw_ret = g_app_info_get_all(); IntPtr raw_ret = g_app_info_get_all();

View File

@ -31,8 +31,8 @@ namespace GLib
{ {
} }
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate int d_g_application_run(IntPtr raw, int argc, IntPtr argv);
static extern int g_application_run (IntPtr raw, int argc, IntPtr argv); static d_g_application_run g_application_run = Marshal.GetDelegateForFunctionPointer<d_g_application_run>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_run"));
public int Run () public int Run ()
{ {

View File

@ -37,8 +37,8 @@ namespace GLib {
return Delete (null); return Delete (null);
} }
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_file_get_uri(IntPtr raw);
static extern IntPtr g_file_get_uri(IntPtr raw); static d_g_file_get_uri g_file_get_uri = Marshal.GetDelegateForFunctionPointer<d_g_file_get_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_get_uri"));
public System.Uri Uri { public System.Uri Uri {
get { get {

View File

@ -27,8 +27,8 @@ namespace GLib
{ {
public class FileFactory public class FileFactory
{ {
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_file_new_for_uri(string uri);
private static extern IntPtr g_file_new_for_uri (string uri); static d_g_file_new_for_uri g_file_new_for_uri = Marshal.GetDelegateForFunctionPointer<d_g_file_new_for_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_uri"));
public static IFile NewForUri (string uri) public static IFile NewForUri (string uri)
{ {
@ -40,16 +40,16 @@ namespace GLib
return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFile; return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFile;
} }
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_file_new_for_path(string path);
private static extern IntPtr g_file_new_for_path (string path); static d_g_file_new_for_path g_file_new_for_path = Marshal.GetDelegateForFunctionPointer<d_g_file_new_for_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_path"));
public static IFile NewForPath (string path) public static IFile NewForPath (string path)
{ {
return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as IFile; return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as IFile;
} }
[DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] delegate IntPtr d_g_file_new_for_commandline_arg(string arg);
private static extern IntPtr g_file_new_for_commandline_arg (string arg); static d_g_file_new_for_commandline_arg g_file_new_for_commandline_arg = Marshal.GetDelegateForFunctionPointer<d_g_file_new_for_commandline_arg>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_commandline_arg"));
public static IFile NewFromCommandlineArg (string arg) public static IFile NewFromCommandlineArg (string arg)
{ {

View File

@ -1,29 +0,0 @@
//
// Global.cs
//
// Author(s):
// Antonius Riha <antoniusriha@gmail.com>
//
// Copyright (c) 2014 Antonius Riha
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace GLib
{
public partial class GioGlobal
{
internal const string GioNativeDll = "libgio-2.0-0.dll";
}
}

View File

@ -20,11 +20,6 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="linux-x86\*" PackagePath="runtimes\linux-x86\native" Visible="false" /> <Compile Include="..\Shared\*.cs" />
<Content Include="linux-x64\*" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="linux-arm\*" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="*.dll.config" PackagePath="lib\netstandard2.0">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,3 +0,0 @@
<configuration>
<dllmap dll="libgio-2.0-0.dll" target="libgio-2.0.so.0"/>
</configuration>

Some files were not shown because too many files have changed in this diff Show More