mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-05 15:35:35 +00:00
glib: Handle GValue containing GType
This commit is contained in:
parent
57ea279ceb
commit
dd8f3f994e
|
@ -254,6 +254,12 @@ namespace GLib {
|
||||||
return g_value_get_double (ref val);
|
return g_value_get_double (ref val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static explicit operator GLib.GType (Value val)
|
||||||
|
{
|
||||||
|
return g_value_get_gtype (ref val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static explicit operator string (Value val)
|
public static explicit operator string (Value val)
|
||||||
{
|
{
|
||||||
IntPtr str = g_value_get_string (ref val);
|
IntPtr str = g_value_get_string (ref val);
|
||||||
|
@ -705,6 +711,9 @@ namespace GLib {
|
||||||
delegate float d_g_value_get_float(ref Value val);
|
delegate float d_g_value_get_float(ref Value val);
|
||||||
static d_g_value_get_float g_value_get_float = FuncLoader.LoadFunction<d_g_value_get_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float"));
|
static d_g_value_get_float g_value_get_float = FuncLoader.LoadFunction<d_g_value_get_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float"));
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
delegate IntPtr d_g_value_get_gtype(ref Value val);
|
||||||
|
static d_g_value_get_type g_value_get_gtype = FuncLoader.LoadFunction<d_g_value_get_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_gtype"));
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
delegate int d_g_value_get_int(ref Value val);
|
delegate int d_g_value_get_int(ref Value val);
|
||||||
static d_g_value_get_int g_value_get_int = FuncLoader.LoadFunction<d_g_value_get_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int"));
|
static d_g_value_get_int g_value_get_int = FuncLoader.LoadFunction<d_g_value_get_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int"));
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
|
Loading…
Reference in a new issue