public unsafe GLib.InputStream OpenStream(string path, GLib.ResourceLookupFlags lookup_flags) { IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup(path); IntPtr error = IntPtr.Zero; IntPtr raw_ret = g_resource_open_stream(Handle, native_path, (int)lookup_flags, out error); GLib.InputStream ret = GLib.Object.GetObject(raw_ret) as GLib.InputStream; GLib.Marshaller.Free(native_path); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe string EnumerateChildren(string path, GLib.ResourceLookupFlags lookup_flags) { IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup(path); IntPtr error = IntPtr.Zero; IntPtr raw_ret = g_resource_enumerate_children(Handle, native_path, (int)lookup_flags, out error); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); GLib.Marshaller.Free(native_path); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe GLib.Bytes LookupData(string path, GLib.ResourceLookupFlags lookup_flags) { IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup(path); IntPtr error = IntPtr.Zero; IntPtr raw_ret = g_resource_lookup_data(Handle, native_path, (int)lookup_flags, out error); GLib.Bytes ret = new GLib.Bytes(raw_ret); GLib.Marshaller.Free(native_path); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe bool GetInfo(string path, GLib.ResourceLookupFlags lookup_flags, out ulong size, out uint flags) { IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup(path); UIntPtr native_size; IntPtr error = IntPtr.Zero; bool raw_ret = g_resource_get_info(Handle, native_path, (int)lookup_flags, out native_size, out flags, out error); bool ret = raw_ret; GLib.Marshaller.Free(native_path); size = (ulong)native_size; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }