public static unsafe GLib.Resource Load(string filename) { IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup(filename); IntPtr error = IntPtr.Zero; IntPtr raw_ret = g_resource_load(native_filename, out error); GLib.Resource ret = raw_ret == IntPtr.Zero ? null : (GLib.Resource)GLib.Opaque.GetOpaque(raw_ret, typeof(GLib.Resource), false); GLib.Marshaller.Free(native_filename); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public static void Unregister(GLib.Resource resource) { g_resources_unregister(resource == null ? IntPtr.Zero : resource.Handle); }