diff options
Diffstat (limited to 'gtk/resources.c')
-rw-r--r-- | gtk/resources.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/gtk/resources.c b/gtk/resources.c index f5b13f1df..0c8c192f3 100644 --- a/gtk/resources.c +++ b/gtk/resources.c @@ -45,12 +45,12 @@ #ifdef WITH_BUILTIN_PIXBUF #ifdef __GNUC__ extern const guint8 menu_cursor_pixdata[] __attribute__ ((__aligned__ (4))); -const guint8 favicon_pixdata[] __attribute__ ((__aligned__ (4))); -const guint8 netsurf_pixdata[] __attribute__ ((__aligned__ (4))); +extern const guint8 favicon_pixdata[] __attribute__ ((__aligned__ (4))); +extern const guint8 netsurf_pixdata[] __attribute__ ((__aligned__ (4))); #else extern const guint8 menu_cursor_pixdata[]; -const guint8 favicon_pixdata[]; -const guint8 netsurf_pixdata[]; +extern const guint8 favicon_pixdata[]; +extern const guint8 netsurf_pixdata[]; #endif #endif @@ -126,6 +126,7 @@ static struct nsgtk_resource_s direct_resource[] = { RES_ENTRY("icons/hotlist-add.png"), RES_ENTRY("icons/hotlist-rmv.png"), RES_ENTRY("icons/search.png"), + RES_ENTRY("languages"), RES_ENTRY("Messages"), { NULL, 0, NSGTK_RESOURCE_FILE, NULL }, }; @@ -560,3 +561,20 @@ nsgtk_data_from_resname(const char *resname, return NSERROR_OK; } + +/* exported interface documented in gtk/resources.h */ +nserror +nsgtk_path_from_resname(const char *resname, const char **path_out) +{ + struct nsgtk_resource_s *resource; + + resource = find_resource_from_name(resname, &direct_resource[0]); + if ((resource->name == NULL) || + (resource->type != NSGTK_RESOURCE_FILE)) { + return NSERROR_NOT_FOUND; + } + + *path_out = (const char *)resource->path; + + return NSERROR_OK; +} |