NetSurf
css.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_css_h_
20#define netsurf_css_css_h_
21
22#include <stdint.h>
23
24#include <libcss/libcss.h>
25
26#include "utils/errors.h"
27
28struct hlcache_handle;
29
30/**
31 * Imported stylesheet record
32 */
34 struct hlcache_handle *c; /**< Content containing sheet */
35};
36
37/**
38 * Initialise the CSS content handler
39 *
40 * \return NSERROR_OK on success or error code on faliure
41 */
43
44/**
45 * Retrieve the stylesheet object associated with a CSS content
46 *
47 * \param h Stylesheet content
48 * \return Pointer to stylesheet object
49 */
50css_stylesheet *nscss_get_stylesheet(struct hlcache_handle *h);
51
52/**
53 * Retrieve imported stylesheets
54 *
55 * \param h Stylesheet containing imports
56 * \param n Pointer to location to receive number of imports
57 * \return Pointer to array of imported stylesheets
58 */
59struct nscss_import *nscss_get_imports(struct hlcache_handle *h, uint32_t *n);
60
61#endif
nserror nscss_init(void)
Initialise the CSS content handler.
Definition: css.c:816
struct nscss_import * nscss_get_imports(struct hlcache_handle *h, uint32_t *n)
Retrieve imported stylesheets.
Definition: css.c:447
css_stylesheet * nscss_get_stylesheet(struct hlcache_handle *h)
Retrieve the stylesheet object associated with a CSS content.
Definition: css.c:437
Error codes.
nserror
Enumeration of error codes.
Definition: errors.h:29
High-level cache handle.
Definition: hlcache.c:66
Imported stylesheet record.
Definition: css.h:33
struct hlcache_handle * c
Content containing sheet.
Definition: css.h:34