NetSurf
hints.h
Go to the documentation of this file.
1/*
2 * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef NETSURF_CSS_HINTS_H_
20#define NETSURF_CSS_HINTS_H_
21
22#include <stdint.h>
23
24#include <libcss/libcss.h>
25
27void css_hint_fini(void);
28
29/**
30 * Callback to retrieve presentational hints for a node
31 *
32 * \param[in] pw HTML document
33 * \param[in] node DOM node
34 * \param[out] nhints number of hints retrieved
35 * \param[out] hints retrieved hints
36 * \return CSS_OK on success,
37 * CSS_PROPERTY_NOT_SET if there is no hint for the requested property,
38 * CSS_NOMEM on memory exhaustion.
39 */
41 void *pw,
42 void *node,
43 uint32_t *nhints,
44 css_hint **hints);
45
46/**
47 * Parser for colours specified in attribute values.
48 *
49 * \param data Data to parse (NUL-terminated)
50 * \param result Pointer to location to receive resulting css_color
51 * \return true on success, false on invalid input
52 */
53bool nscss_parse_colour(const char *data, css_color *result);
54
55#endif
STATIC char result[100]
Definition: arexx.c:77
nserror
Enumeration of error codes.
Definition: errors.h:29
css_error node_presentational_hint(void *pw, void *node, uint32_t *nhints, css_hint **hints)
Callback to retrieve presentational hints for a node.
Definition: hints.c:1628
void css_hint_fini(void)
Definition: hints.c:599
bool nscss_parse_colour(const char *data, css_color *result)
Parser for colours specified in attribute values.
Definition: hints.c:449
nserror css_hint_init(void)
Definition: hints.c:588