summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-02 22:58:18 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-02 22:58:18 +0100
commit472108576e2366a5db606c450928b4bc1d1af63b (patch)
tree4155460ca6fcc2aaeef0e82d1a705ec5c248cbf2 /desktop
parentcf8ffa412a55a8884fdd8f348b3fb28108d59b6c (diff)
downloadnetsurf-472108576e2366a5db606c450928b4bc1d1af63b.tar.gz
netsurf-472108576e2366a5db606c450928b4bc1d1af63b.tar.bz2
Make it more clear that tree.c is deprecated.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/tree.c67
-rw-r--r--desktop/tree.h3
2 files changed, 10 insertions, 60 deletions
diff --git a/desktop/tree.c b/desktop/tree.c
index 9e86668ce..cb981b349 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -18,7 +18,7 @@
*/
/** \file
- * Generic tree handling (implementation).
+ * deprecated compatibility layer for new treeview modules. Do not use.
*/
#include <assert.h>
@@ -292,16 +292,7 @@ static bool treeview_test_keypress(struct tree *tree, uint32_t key)
/* -------------------------------------------------------------------------- */
-
-
-/**
- * Creates and initialises a new tree.
- *
- * \param flags Flag word for flags to create the new tree with
- * \param callbacks Callback functions to support the tree in the frontend.
- * \param client_data Data to be passed to start_redraw and end_redraw
- * \return The newly created tree, or NULL on memory exhaustion
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
struct tree *tree_create(unsigned int flags,
const struct treeview_table *callbacks, void *client_data)
{
@@ -324,31 +315,14 @@ struct tree *tree_create(unsigned int flags,
return tree;
}
-
-/**
- * Deletes all nodes of a tree and the tree itself.
- *
- * \param tree the tree to be deleted
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
void tree_delete(struct tree *tree)
{
treeview_test_fini(tree);
free(tree);
}
-
-/**
- * Redraws a tree.
- *
- * \param tree the tree to draw
- * \param x X coordinate to draw the tree at (wrt plot origin)
- * \param y Y coordinate to draw the tree at (wrt plot origin)
- * \param clip_x minimum x of the clipping rectangle (wrt tree origin)
- * \param clip_y minimum y of the clipping rectangle (wrt tree origin)
- * \param clip_width width of the clipping rectangle
- * \param clip_height height of the clipping rectangle
- * \param ctx current redraw context
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
void tree_draw(struct tree *tree, int x, int y,
int clip_x, int clip_y, int clip_width, int clip_height,
const struct redraw_context *ctx)
@@ -359,16 +333,7 @@ void tree_draw(struct tree *tree, int x, int y,
clip_width, clip_height, ctx);
}
-
-/**
- * Handles a mouse action for a tree
- *
- * \param tree the tree to handle a click for
- * \param mouse the mouse state
- * \param x X coordinate of mouse action
- * \param y Y coordinate of mouse action
- * \return whether the click was handled
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
int y)
{
@@ -381,17 +346,7 @@ bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
return false;
}
-
-/**
- * Handle the end of a drag operation
- *
- * \param tree the tree on which the drag was performed
- * \param mouse mouse state during drag end
- * \param x0 x coordinate of drag start
- * \param y0 y coordinate of drag start
- * \param x1 x coordinate of drag end
- * \param y1 y coordinate of drag end
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
void tree_drag_end(struct tree *tree, browser_mouse_state mouse, int x0, int y0,
int x1, int y1)
{
@@ -400,14 +355,7 @@ void tree_drag_end(struct tree *tree, browser_mouse_state mouse, int x0, int y0,
treeview_test_mouse_action(tree, BROWSER_MOUSE_HOVER, x1, y1);
}
-
-/**
- * Key press handling for a tree.
- *
- * \param tree The tree which got the keypress
- * \param key The ucs4 character codepoint
- * \return true if the keypress is dealt with, false otherwise.
- */
+/** deprecated compatibility layer for new treeview modules. Do not use. */
bool tree_keypress(struct tree *tree, uint32_t key)
{
if (treeview_test_keypress(tree, key)) {
@@ -417,6 +365,7 @@ bool tree_keypress(struct tree *tree, uint32_t key)
return false;
}
+/** deprecated compatibility layer for new treeview modules. Do not use. */
tree_drag_type tree_drag_status(struct tree *tree)
{
assert(tree != NULL);
diff --git a/desktop/tree.h b/desktop/tree.h
index 52bea7d13..db164c013 100644
--- a/desktop/tree.h
+++ b/desktop/tree.h
@@ -18,7 +18,7 @@
*/
/** \file
- * Generic tree handling (interface).
+ * deprecated compatibility layer for new treeview modules. Do not use.
*/
#ifndef _NETSURF_DESKTOP_TREE_H_
@@ -67,6 +67,7 @@ struct tree *tree_create(unsigned int flags,
const struct treeview_table *callbacks,
void *client_data);
+/** deprecated compatibility layer for new treeview modules. Do not use. */
void tree_delete(struct tree *tree);
tree_drag_type tree_drag_status(struct tree *tree);
void tree_draw(struct tree *tree, int x, int y,