Subversion Repositories Kolibri OS

Rev

Rev 3584 | Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright 2005 Richard Wilson <info@tinct.net>
  3.  * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
  4.  *
  5.  * This file is part of NetSurf, http://www.netsurf-browser.org/
  6.  *
  7.  * NetSurf is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; version 2 of the License.
  10.  *
  11.  * NetSurf is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  */
  19.  
  20. /** \file
  21.  * Creation of URL nodes with use of trees public API
  22.  */
  23.  
  24. #ifndef _NETSURF_DESKTOP_TREE_URL_NODE_H_
  25. #define _NETSURF_DESKTOP_TREE_URL_NODE_H_
  26.  
  27.  
  28. #include "desktop/tree.h"
  29. #include "utils/nsurl.h"
  30.  
  31. struct url_data;
  32.  
  33. void tree_url_node_init(const char *folder_icon_name);
  34. void tree_url_node_cleanup(void);
  35. struct node *tree_create_URL_node(struct tree *tree,
  36.                 struct node *parent, nsurl *url, const char *title,
  37.                 tree_node_user_callback, void *callback_data);
  38. struct node *tree_create_URL_node_readonly(struct tree *tree,
  39.                 struct node *parent, nsurl *url,
  40.                 const struct url_data *data,
  41.                 tree_node_user_callback, void *callback_data);
  42. void tree_update_URL_node(struct tree *tree, struct node *node,
  43.                 nsurl *url, const struct url_data *data);
  44. const char *tree_url_node_get_title(struct node *node);
  45. const char *tree_url_node_get_url(struct node *node);
  46. void tree_url_node_edit_title(struct tree *tree, struct node *node);
  47. void tree_url_node_edit_url(struct tree *tree, struct node *node);
  48.  
  49. node_callback_resp tree_url_node_callback(void *user_data,
  50.                 struct node_msg_data *msg_data);
  51.  
  52. bool tree_urlfile_load(const char *filename, struct tree *tree,
  53.                 tree_node_user_callback, void *callback_data);
  54. bool tree_urlfile_save(struct tree *tree, const char *filename,
  55.                 const char *page_title);
  56.  
  57. /* front end specific */
  58. void tree_icon_name_from_content_type(char *buffer, content_type type);
  59.  
  60. #endif
  61.