2003-06-30 16:44:03 +04:00
|
|
|
/*
|
2009-07-24 03:05:34 +04:00
|
|
|
* Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* 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/>.
|
2003-04-04 19:19:32 +04:00
|
|
|
*/
|
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
#ifndef netsurf_css_css_h_
|
|
|
|
#define netsurf_css_css_h_
|
2004-02-02 03:22:59 +03:00
|
|
|
|
2009-07-27 17:49:10 +04:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
#include <libcss/libcss.h>
|
2004-08-01 18:13:47 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
#include "utils/errors.h"
|
|
|
|
|
|
|
|
struct hlcache_handle;
|
2009-07-27 17:49:10 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Imported stylesheet record
|
|
|
|
*/
|
|
|
|
struct nscss_import {
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle *c; /**< Content containing sheet */
|
2003-04-05 20:24:43 +04:00
|
|
|
};
|
|
|
|
|
2016-05-26 13:18:41 +03:00
|
|
|
/**
|
|
|
|
* Initialise the CSS content handler
|
|
|
|
*
|
|
|
|
* \return NSERROR_OK on success or error code on faliure
|
|
|
|
*/
|
2011-09-16 02:47:50 +04:00
|
|
|
nserror nscss_init(void);
|
2010-04-04 16:41:19 +04:00
|
|
|
|
2016-05-26 13:18:41 +03:00
|
|
|
/**
|
|
|
|
* Retrieve the stylesheet object associated with a CSS content
|
|
|
|
*
|
|
|
|
* \param h Stylesheet content
|
|
|
|
* \return Pointer to stylesheet object
|
|
|
|
*/
|
2011-05-07 00:40:09 +04:00
|
|
|
css_stylesheet *nscss_get_stylesheet(struct hlcache_handle *h);
|
2016-05-26 13:18:41 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve imported stylesheets
|
|
|
|
*
|
|
|
|
* \param h Stylesheet containing imports
|
|
|
|
* \param n Pointer to location to receive number of imports
|
|
|
|
* \return Pointer to array of imported stylesheets
|
|
|
|
*/
|
2010-03-28 16:56:39 +04:00
|
|
|
struct nscss_import *nscss_get_imports(struct hlcache_handle *h, uint32_t *n);
|
|
|
|
|
2003-04-04 19:19:32 +04:00
|
|
|
#endif
|