1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
4 * This file is part of The Croco Library
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2.1 of the GNU Lesser General Public
8 * License as published by the Free Software Foundation.
10 * This program 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.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * see COPYRIGHTS file for copyright information.
24 #ifndef __CR_STYLESHEET_H__
25 #define __CR_STYLESHEET_H__
28 #include "cr-statement.h"
34 *The declaration of the #CRStyleSheet class.
40 /*Please don't change the order of
41 *the values enumerated here ...
42 *New values should be added at the end,
43 *just before ORIGIN_END.
49 /*must always be the last one*/
54 *An abstraction of a css stylesheet as defined
55 *by the css2 spec in chapter 4.
59 /**The css statements list*/
60 CRStatement *statements ;
62 enum CRStyleOrigin origin ;
64 /*the parent import rule, if any.*/
65 CRStatement *parent_import_rule ;
67 /**custom data used by libcroco*/
71 *custom application data pointer
72 *Can be used by applications.
77 *the reference count of this insance
78 *Please, don't never ever modify it
79 *directly. Use cr_stylesheet_ref()
80 *and cr_stylesheet_unref() instead.
85 CRStyleSheet * cr_stylesheet_new (CRStatement *a_stmts) ;
87 gchar * cr_stylesheet_to_string (CRStyleSheet *a_this) ;
88 void cr_stylesheet_dump (CRStyleSheet *a_this, FILE *a_fp) ;
90 gint cr_stylesheet_nr_rules (CRStyleSheet *a_this) ;
92 CRStatement * cr_stylesheet_statement_get_from_list (CRStyleSheet *a_this, int itemnr) ;
94 void cr_stylesheet_ref (CRStyleSheet *a_this) ;
96 gboolean cr_stylesheet_unref (CRStyleSheet *a_this) ;
98 void cr_stylesheet_destroy (CRStyleSheet *a_this) ;
102 #endif /*__CR_STYLESHEET_H__*/