summaryrefslogtreecommitdiff
path: root/gtk/resources.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-06-23 11:53:41 +0100
committerVincent Sanders <vince@kyllikki.org>2015-06-23 11:53:41 +0100
commitee74f9ac8cacc89a1f8a94f63feac662bb13cbad (patch)
treeeddc0008404293cc2f4e7b0f70c530a4f1bdd049 /gtk/resources.h
parent11dc7304d96a2ac3e2ac346e3cb6236f8e14225b (diff)
downloadnetsurf-ee74f9ac8cacc89a1f8a94f63feac662bb13cbad.tar.gz
netsurf-ee74f9ac8cacc89a1f8a94f63feac662bb13cbad.tar.bz2
Change gtk message and language handling to use resource names
The GTK resource handling can now provide the path to resources rather than having to compute them separately. This reduces run time allocation and allows for the resources to be built in if required. Additionally this tweaks the resource scheme handling to redirect favicon.ico to resource:favicon.png instead of rewriting directly to file scheme path allowing the favicon to be a compiled in resource.
Diffstat (limited to 'gtk/resources.h')
-rw-r--r--gtk/resources.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/resources.h b/gtk/resources.h
index dd52f54f1..923031af4 100644
--- a/gtk/resources.h
+++ b/gtk/resources.h
@@ -94,4 +94,16 @@ nserror nsgdk_pixbuf_new_from_resname(const char *resname, GdkPixbuf **pixbuf_ou
*/
nserror nsgtk_data_from_resname(const char *resname, const uint8_t **data_out, size_t *data_size_out);
+/**
+ * Get path to resource data.
+ *
+ * For a named resource this obtains the on-disc path to that resource.
+ *
+ * The path is read only and remains valid untill program exit.
+ * \param resname The resource name to obtain path for.
+ * \param path_out The resulting data.
+ * \return NSERROR_OK and path_out updated or appropriate error code.
+ */
+nserror nsgtk_path_from_resname(const char *resname, const char **path_out);
+
#endif