NetSurf
hotlist.h
Go to the documentation of this file.
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
37struct nsurl;
38
39/**
40 * initialise the hotlist window template ready for subsequent use.
41 */
43
44/**
45 * make the cookie window visible.
46 *
47 * \return NSERROR_OK on success else appropriate error code on faliure.
48 */
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 */
57
58bool ro_gui_hotlist_check_window(wimp_w window);
59bool 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 */
70void ro_gui_hotlist_add_page(struct nsurl *url);
71
72/**
73 * Clean up RMA storage used by the Message_HotlistAddURL protocol.
74 */
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 */
85void 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 */
96bool ro_gui_hotlist_has_page(struct nsurl *url);
97
98#endif
nserror
Enumeration of error codes.
Definition: errors.h:29
void ro_gui_hotlist_remove_page(struct nsurl *url)
Remove a URL from the hotlist.
Definition: hotlist.c:789
nserror ro_gui_hotlist_present(void)
make the cookie window visible.
Definition: hotlist.c:539
void ro_gui_hotlist_add_page(struct nsurl *url)
Add a URL to the hotlist.
Definition: hotlist.c:667
bool ro_gui_hotlist_has_page(struct nsurl *url)
Report whether the hotlist contains a given URL.
Definition: hotlist.c:826
bool ro_gui_hotlist_check_menu(wimp_menu *menu)
Definition: hotlist.c:618
void ro_gui_hotlist_add_cleanup(void)
Clean up RMA storage used by the Message_HotlistAddURL protocol.
Definition: hotlist.c:730
void ro_gui_hotlist_initialise(void)
initialise the hotlist window template ready for subsequent use.
Definition: hotlist.c:579
nserror ro_gui_hotlist_finalise(void)
Free any resources allocated for the cookie window.
Definition: hotlist.c:586
bool ro_gui_hotlist_check_window(wimp_w window)
Definition: hotlist.c:607
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31