1 /* 2 * Copyright 2006 Richard Wilson <info@tinct.net> 3 * Copyright 2010, 2013 Stephen Fryatt <stevef@netsurf-browser.org> 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 * Hotlist (interface). 22 */ 23 24 #ifndef _NETSURF_RISCOS_HOTLIST_H_ 25 #define _NETSURF_RISCOS_HOTLIST_H_ 26 27 /* Hotlist Protocol Messages, which are currently not in OSLib. */ 28 29 #ifndef message_HOTLIST_ADD_URL 30 #define message_HOTLIST_ADD_URL 0x4af81 31 #endif 32 33 #ifndef message_HOTLIST_CHANGED 34 #define message_HOTLIST_CHANGED 0x4af82 35 #endif 36 37 struct nsurl; 38 39 /** 40 * initialise the hotlist window template ready for subsequent use. 41 */ 42 void ro_gui_hotlist_initialise(void); 43 44 /** 45 * make the cookie window visible. 46 * 47 * \return NSERROR_OK on success else appropriate error code on faliure. 48 */ 49 nserror ro_gui_hotlist_present(void); 50 51 /** 52 * Free any resources allocated for the cookie window. 53 * 54 * \return NSERROR_OK on success else appropriate error code on faliure. 55 */ 56 nserror ro_gui_hotlist_finalise(void); 57 58 bool ro_gui_hotlist_check_window(wimp_w window); 59 bool ro_gui_hotlist_check_menu(wimp_menu *menu); 60 61 /** 62 * Add a URL to the hotlist. 63 * 64 * This will be passed on to the core hotlist, then 65 * Message_HotlistAddURL will broadcast to any bookmark applications 66 * via the Hotlist Protocol. 67 * 68 * \param *url The URL to be added. 69 */ 70 void ro_gui_hotlist_add_page(struct nsurl *url); 71 72 /** 73 * Clean up RMA storage used by the Message_HotlistAddURL protocol. 74 */ 75 void ro_gui_hotlist_add_cleanup(void); 76 77 /** 78 * Remove a URL from the hotlist. 79 * 80 * This will be passed on to the core hotlist, unless we're configured 81 * to use external hotlists in which case we ignore it. 82 * 83 * \param *url The URL to be removed. 84 */ 85 void ro_gui_hotlist_remove_page(struct nsurl *url); 86 87 /** 88 * Report whether the hotlist contains a given URL. 89 * 90 * This will be passed on to the core hotlist, unless we're configured 91 * to use an external hotlist in which case we always report false. 92 * 93 * \param url The URL to be tested. 94 * \return true if the hotlist contains the URL; else false. 95 */ 96 bool ro_gui_hotlist_has_page(struct nsurl *url); 97 98 #endif 99