mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 19:25:31 +00:00
Variant: Add wrapper for g_variant_new_strv()
This commit is contained in:
parent
c1fbe27b32
commit
b357aaef84
|
@ -114,6 +114,16 @@ namespace GLib {
|
||||||
Marshaller.Free (native_val);
|
Marshaller.Free (native_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
static extern IntPtr g_variant_new_strv (IntPtr[] strv, IntPtr length);
|
||||||
|
|
||||||
|
public Variant (string[] strv)
|
||||||
|
{
|
||||||
|
IntPtr[] native = Marshaller.StringArrayToNullTermPointer (strv);
|
||||||
|
handle = g_variant_ref_sink (g_variant_new_strv (native, new IntPtr ((long) strv.Length)));
|
||||||
|
Marshaller.Free (native);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool g_variant_get_boolean (IntPtr handle);
|
static extern bool g_variant_get_boolean (IntPtr handle);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue