summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-11-24 02:51:24 +0100
committerOle Loots <ole@monochrom.net>2013-11-24 02:51:24 +0100
commitff9163f8bf3563a4f90611061923e35eb55e53ba (patch)
tree7ba177bc73ffaa87d63b3e075fc08f02073115d8
parent1a864342fd4787de45625cdbc5853590ece697ac (diff)
downloadnetsurf-ff9163f8bf3563a4f90611061923e35eb55e53ba.tar.gz
netsurf-ff9163f8bf3563a4f90611061923e35eb55e53ba.tar.bz2
Added documentation for gemtk_obj_create_popup_tree
-rw-r--r--atari/gemtk/objc.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/atari/gemtk/objc.c b/atari/gemtk/objc.c
index 20838478f..50d70dd9d 100644
--- a/atari/gemtk/objc.c
+++ b/atari/gemtk/objc.c
@@ -369,7 +369,19 @@ OBJECT *gemtk_obj_tree_copy(OBJECT *tree)
return(new_tree);
}
-
+/***
+ * Create a simple OBJECT tree from a list of strings, to be used with menu_popup
+ * OBJECT ownership is passed to caller.
+ * Call gemtk_obj_destroy_popup_tree once the popup isn't needed anymore.
+ *
+ * \param items A list of string to be used as items
+ * \param nitems The number of items in the list
+ * \param selected The text of the selected item
+ * \param horizontal Set to true to render the tree horizontally
+ * \param max_width -1: autodetect width
+ * \param max_heigth -1: autodetect height (set to postive value when using a vertical scrolling popup)
+ * \return a pointer to the new OBJECT tree
+ */
OBJECT * gemtk_obj_create_popup_tree(const char **items, int nitems,
char * selected, bool horizontal,
int max_width, int max_height)
@@ -490,6 +502,11 @@ OBJECT * gemtk_obj_create_popup_tree(const char **items, int nitems,
return(popup);
}
+/***
+ * Free memory of an OBJECT tree created with gemtk_obj_create_popup_tree.
+ *
+ * \param popup The tree to destroy
+ */
void gemtk_obj_destroy_popup_tree(OBJECT * popup)
{
int i=0;