summaryrefslogtreecommitdiff
path: root/riscos/treeview.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscos/treeview.h')
-rw-r--r--riscos/treeview.h49
1 files changed, 21 insertions, 28 deletions
diff --git a/riscos/treeview.h b/riscos/treeview.h
index df718fc7a..7aa129e1b 100644
--- a/riscos/treeview.h
+++ b/riscos/treeview.h
@@ -1,5 +1,6 @@
/*
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
+ * Copyright 2010 Stephen Fryatt <stevef@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -24,38 +25,30 @@
#define _NETSURF_RISCOS_TREEVIEW_H_
#include <stdbool.h>
-#include "oslib/osspriteop.h"
-#include "oslib/wimp.h"
+#include <oslib/help.h>
+#include <oslib/wimp.h>
+
#include "desktop/tree.h"
-#include "image/bitmap.h"
-#define TREE_TEXT_HEIGHT 40
-#define TREE_SPRITE_WIDTH 40 /* text plus sprite entries only */
+typedef struct ro_treeview ro_treeview;
-struct node_sprite {
- osspriteop_area *area;
- char name[12];
- char expanded_name[12];
+struct ro_treeview_table {
+ void (*open_menu)(wimp_pointer *pointer);
};
-bool ro_gui_tree_initialise(void);
-void ro_gui_tree_redraw(wimp_draw *redraw);
-bool ro_gui_tree_click(wimp_pointer *pointer, struct tree *tree);
-void ro_gui_tree_menu_closed(struct tree *tree);
-bool ro_gui_tree_toolbar_click(wimp_pointer* pointer);
-void ro_gui_tree_stop_edit(struct tree *tree);
-void ro_gui_tree_open(wimp_open *open);
-void ro_gui_tree_show(struct tree *tree);
-bool ro_gui_tree_keypress(wimp_key *key);
-void ro_gui_tree_selection_drag_end(wimp_dragged *drag);
-void ro_gui_tree_move_drag_end(wimp_dragged *drag);
-void ro_gui_tree_launch_selected(struct tree *tree);
-void ro_gui_tree_start_edit(struct tree *tree, struct node_element *element,
- wimp_pointer *pointer);
-void ro_gui_tree_scroll_visible(struct tree *tree, struct node_element *element);
-void ro_gui_tree_get_tree_coordinates(struct tree *tree, int x, int y,
- int *tree_x, int *tree_y);
-int ro_gui_tree_help(int x, int y);
-void ro_gui_tree_update_theme(struct tree *tree);
+ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar,
+ unsigned int flags);
+void ro_treeview_destroy(ro_treeview *tv);
+
+struct tree *ro_treeview_get_tree(ro_treeview *tv);
+wimp_w ro_treeview_get_window(ro_treeview *tv);
+bool ro_treeview_has_selection(ro_treeview *tv);
+
+void ro_treeview_set_origin(ro_treeview *tv, int x, int y);
+void ro_treeview_mouse_at(wimp_w w, wimp_pointer *pointer);
+bool ro_gui_treeview_toolbar_click(wimp_pointer *pointer);
+void ro_treeview_update_theme(ro_treeview *tv);
+int ro_treeview_get_help(help_full_message_request *message_data);
#endif
+