summaryrefslogtreecommitdiff
path: root/framebuffer/tree.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:14:46 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:14:46 +0000
commit6173bb0e6c3bf51cd463f7bc4f725429d9087b2b (patch)
treede3e013699742960b97ee4a5eda240908d0ea8e6 /framebuffer/tree.c
parent195c1ea3193f169c6825eca1fc6207e138126e98 (diff)
downloadnetsurf-6173bb0e6c3bf51cd463f7bc4f725429d9087b2b.tar.gz
netsurf-6173bb0e6c3bf51cd463f7bc4f725429d9087b2b.tar.bz2
Merge treeview-redux to trunk
svn path=/trunk/netsurf/; revision=10865
Diffstat (limited to 'framebuffer/tree.c')
-rw-r--r--framebuffer/tree.c83
1 files changed, 47 insertions, 36 deletions
diff --git a/framebuffer/tree.c b/framebuffer/tree.c
index e5cb390b5..61e32e0a5 100644
--- a/framebuffer/tree.c
+++ b/framebuffer/tree.c
@@ -18,45 +18,56 @@
#include "desktop/tree.h"
-void tree_initialise_redraw(struct tree *tree)
-{
-}
-
-void tree_redraw_area(struct tree *tree, int x, int y, int width, int height)
-{
-}
-
-void tree_draw_line(int x, int y, int width, int height)
-{
-}
-
-void tree_draw_node_element(struct tree *tree, struct node_element *element)
-{
-}
-
-void tree_draw_node_expansion(struct tree *tree, struct node *node)
-{
-}
+const char tree_directory_icon_name[] = "directory.png";
+const char tree_content_icon_name[] = "content.png";
-void tree_recalculate_node_element(struct node_element *element)
-{
-}
-void tree_update_URL_node(struct node *node, const char *url,
- const struct url_data *data)
-{
-}
-void tree_resized(struct tree *tree)
-{
-}
-void tree_set_node_sprite_folder(struct node *node)
-{
-}
-
-void tree_set_node_sprite(struct node *node, const char *sprite,
- const char *expanded)
+/**
+ * Translates a content_type to the name of a respective icon
+ *
+ * \param content_type content type
+ * \param buffer buffer for the icon name
+ */
+void tree_icon_name_from_content_type(char *buffer, content_type type)
{
+ // TODO: design/acquire icons
+ switch (type) {
+ case CONTENT_HTML:
+ case CONTENT_TEXTPLAIN:
+ case CONTENT_CSS:
+#if defined(WITH_MNG) || defined(WITH_PNG)
+ case CONTENT_PNG:
+#endif
+#ifdef WITH_MNG
+ case CONTENT_JNG:
+ case CONTENT_MNG:
+#endif
+#ifdef WITH_JPEG
+ case CONTENT_JPEG:
+#endif
+#ifdef WITH_GIF
+ case CONTENT_GIF:
+#endif
+#ifdef WITH_BMP
+ case CONTENT_BMP:
+ case CONTENT_ICO:
+#endif
+#ifdef WITH_SPRITE
+ case CONTENT_SPRITE:
+#endif
+#ifdef WITH_DRAW
+ case CONTENT_DRAW:
+#endif
+#ifdef WITH_ARTWORKS
+ case CONTENT_ARTWORKS:
+#endif
+#ifdef WITH_NS_SVG
+ case CONTENT_SVG:
+#endif
+ default:
+ sprintf(buffer, tree_content_icon_name);
+ break;
+ }
}
-