diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-05 10:51:19 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-05 10:51:19 +0000 |
commit | eb67607e3b109c8e2b7c7d51ee7b38db8e67ff27 (patch) | |
tree | 7697853ed2b4f05eea786e47ecc90e13ab7bdd04 /css/hints.h | |
parent | f06ec6390a3286db180ad3fda97baab9e8b54663 (diff) | |
parent | 278451463f53ddc4fed2c9a104089f17a8c9158f (diff) | |
download | netsurf-eb67607e3b109c8e2b7c7d51ee7b38db8e67ff27.tar.gz netsurf-eb67607e3b109c8e2b7c7d51ee7b38db8e67ff27.tar.bz2 |
Merge branch 'tlsa/upfront-hints'
Diffstat (limited to 'css/hints.h')
-rw-r--r-- | css/hints.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/css/hints.h b/css/hints.h new file mode 100644 index 000000000..d2b07b578 --- /dev/null +++ b/css/hints.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org> + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef NETSURF_CSS_HINTS_H_ +#define NETSURF_CSS_HINTS_H_ + +#include <stdint.h> + +#include "css/css.h" + +nserror css_hint_init(void); +void css_hint_fini(void); + + +/** + * Callback to retrieve presentational hints for a node + * + * \param pw HTML document + * \param node DOM node + * \param property CSS property to retrieve + * \param hint Pointer to hint object to populate + * \return CSS_OK on success, + * CSS_PROPERTY_NOT_SET if there is no hint for the requested property, + * CSS_NOMEM on memory exhaustion. + */ +css_error node_presentational_hint( + void *pw, + void *node, + uint32_t *nhints, + css_hint **hints); + +bool nscss_parse_colour(const char *data, css_color *result); + +#endif |