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
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
struct content;
|
2009-07-27 17:49:10 +04:00
|
|
|
struct nscss_import;
|
2003-04-05 19:35:55 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
/**
|
|
|
|
* CSS content data
|
|
|
|
*/
|
|
|
|
struct content_css_data
|
|
|
|
{
|
|
|
|
lwc_context *dict; /**< Dictionary to intern strings in */
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
css_stylesheet *sheet; /**< Stylesheet object */
|
2004-05-01 21:48:38 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
uint32_t import_count; /**< Number of sheets imported */
|
2009-07-27 17:49:10 +04:00
|
|
|
struct nscss_import *imports; /**< Array of imported sheets */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Imported stylesheet record
|
|
|
|
*/
|
|
|
|
struct nscss_import {
|
|
|
|
struct content *c; /**< Content containing sheet */
|
|
|
|
uint64_t media; /**< Media types that sheet applies to */
|
2003-04-05 20:24:43 +04:00
|
|
|
};
|
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
bool nscss_create(struct content *c, struct content *parent,
|
|
|
|
const char *params[]);
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
bool nscss_process_data(struct content *c, char *data, unsigned int size);
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
bool nscss_convert(struct content *c, int w, int h);
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
void nscss_destroy(struct content *c);
|
2003-04-04 19:19:32 +04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|