Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cr-stylesheet.h File Reference

The declaration of the CRStyleSheet class. More...

#include "cr-utils.h"
#include "cr-statement.h"

Go to the source code of this file.

Data Structures

struct  _CRStyleSheet
 An abstraction of a css stylesheet as defined by the css2 spec in chapter 4. More...

Enumerations

enum  CRStyleOrigin { ORIGIN_UA = 0, ORIGIN_USER, ORIGIN_AUTHOR, NB_ORIGINS }

Functions

CRStyleSheetcr_stylesheet_new (CRStatement *a_stmts)
 Constructor of the CRStyleSheet class.
gchar * cr_stylesheet_to_string (CRStyleSheet *a_this)
void cr_stylesheet_dump (CRStyleSheet *a_this, FILE *a_fp)
 Dumps the current css2 stylesheet to a file.
gint cr_stylesheet_nr_rules (CRStyleSheet *a_this)
 Return the number of rules in the stylesheet.
CRStatementcr_stylesheet_statement_get_from_list (CRStyleSheet *a_this, int itemnr)
 Use an index to get a CRStatement from the rules in a given stylesheet.
void cr_stylesheet_ref (CRStyleSheet *a_this)
gboolean cr_stylesheet_unref (CRStyleSheet *a_this)
void cr_stylesheet_destroy (CRStyleSheet *a_this)
 Destructor of the CRStyleSheet class.


Detailed Description

The declaration of the CRStyleSheet class.

Definition in file cr-stylesheet.h.


Enumeration Type Documentation

enum CRStyleOrigin
 

Enumeration values:
ORIGIN_UA 
ORIGIN_USER 
ORIGIN_AUTHOR 
NB_ORIGINS 

Definition at line 38 of file cr-stylesheet.h.

Referenced by cr_sel_eng_get_matched_properties_from_cascade().


Function Documentation

void cr_stylesheet_destroy CRStyleSheet a_this  ) 
 

Destructor of the CRStyleSheet class.

Parameters:
a_this the current instance of the CRStyleSheet class.

Definition at line 169 of file cr-stylesheet.c.

References cr_statement_destroy(), CRStyleSheet, and _CRStyleSheet::statements.

Referenced by cr_stylesheet_unref().

void cr_stylesheet_dump CRStyleSheet a_this,
FILE *  a_fp
 

Dumps the current css2 stylesheet to a file.

Parameters:
a_this the current instance of CRStyleSheet.
a_fp the destination file

Definition at line 98 of file cr-stylesheet.c.

References cr_stylesheet_to_string(), and CRStyleSheet.

CRStyleSheet* cr_stylesheet_new CRStatement a_stmts  ) 
 

Constructor of the CRStyleSheet class.

Parameters:
the initial list of css statements.
Returns:
the newly built css2 stylesheet, or NULL in case of error.

Definition at line 37 of file cr-stylesheet.c.

References cr_utils_trace_info, CRStatement, CRStyleSheet, and _CRStyleSheet::statements.

gint cr_stylesheet_nr_rules CRStyleSheet a_this  ) 
 

Return the number of rules in the stylesheet.

Parameters:
a_this the current instance of CRStyleSheet.
Returns:
number of rules in the stylesheet.

Definition at line 118 of file cr-stylesheet.c.

References cr_statement_nr_rules(), CRStyleSheet, and _CRStyleSheet::statements.

void cr_stylesheet_ref CRStyleSheet a_this  ) 
 

Definition at line 141 of file cr-stylesheet.c.

References CRStyleSheet, and _CRStyleSheet::ref_count.

Referenced by cr_cascade_set_sheet().

CRStatement* cr_stylesheet_statement_get_from_list CRStyleSheet a_this,
int  itemnr
 

Use an index to get a CRStatement from the rules in a given stylesheet.

Parameters:
a_this the current instance of CRStatement.
itemnr the index into the rules.
Returns:
CRStatement at position itemnr, if itemnr > number of rules - 1, it will return NULL.

Definition at line 133 of file cr-stylesheet.c.

References cr_statement_get_from_list(), CRStyleSheet, and _CRStyleSheet::statements.

gchar* cr_stylesheet_to_string CRStyleSheet a_this  ) 
 

Parameters:
a_this the current instance of CRStyleSheet
Returns:
the serialized stylesheet.

Definition at line 60 of file cr-stylesheet.c.

References cr_statement_to_string(), CRStatement, CRStyleSheet, _CRStatement::next, _CRStatement::prev, and _CRStyleSheet::statements.

Referenced by cr_stylesheet_dump().

gboolean cr_stylesheet_unref CRStyleSheet a_this  ) 
 

Definition at line 149 of file cr-stylesheet.c.

References cr_stylesheet_destroy(), CRStyleSheet, and _CRStyleSheet::ref_count.

Referenced by cr_cascade_destroy(), cr_cascade_set_sheet(), and cr_om_parser_parse_paths_to_cascade().


Generated on Fri Oct 29 08:29:13 2004 for Libcroco by  doxygen 1.3.9.1