Libcroco
Data Fields
_CRDocHandler Struct Reference

The SAC document handler. More...

#include <cr-doc-handler.h>

Data Fields

CRDocHandlerPrivpriv
 
gpointer app_data
 This pointer is to be used by the application for it custom needs. More...
 
void(* start_document )(CRDocHandler *a_this)
 Is called at the beginning of the parsing of the document. More...
 
void(* end_document )(CRDocHandler *a_this)
 Is called to notify the end of the parsing of the document. More...
 
void(* charset )(CRDocHandler *a_this, CRString *a_charset, CRParsingLocation *a_charset_sym_location)
 Is called to notify an at charset rule. More...
 
void(* import_style )(CRDocHandler *a_this, GList *a_media_list, CRString *a_uri, CRString *a_uri_default_ns, CRParsingLocation *a_location)
 Is called to notify an import statement in the stylesheet. More...
 
void(* import_style_result )(CRDocHandler *a_this, GList *a_media_list, CRString *a_uri, CRString *a_uri_default_ns, CRStyleSheet *a_sheet)
 
void(* namespace_declaration )(CRDocHandler *a_this, CRString *a_prefix, CRString *a_uri, CRParsingLocation *a_location)
 Is called to notify a namespace declaration. More...
 
void(* comment )(CRDocHandler *a_this, CRString *a_comment)
 Is called to notify a comment. More...
 
void(* start_selector )(CRDocHandler *a_this, CRSelector *a_selector_list)
 Is called to notify the beginning of a rule statement. More...
 
void(* end_selector )(CRDocHandler *a_this, CRSelector *a_selector_list)
 Is called to notify the end of a rule statement. More...
 
void(* property )(CRDocHandler *a_this, CRString *a_name, CRTerm *a_expression, gboolean a_is_important)
 Is called to notify a declaration. More...
 
void(* start_font_face )(CRDocHandler *a_this, CRParsingLocation *a_location)
 Is called to notify the start of a font face statement. More...
 
void(* end_font_face )(CRDocHandler *a_this)
 Is called to notify the end of a font face statement. More...
 
void(* start_media )(CRDocHandler *a_this, GList *a_media_list, CRParsingLocation *a_location)
 Is called to notify the beginning of a media statement. More...
 
void(* end_media )(CRDocHandler *a_this, GList *a_media_list)
 Is called to notify the end of a media statement. More...
 
void(* start_page )(CRDocHandler *a_this, CRString *a_name, CRString *a_pseudo_page, CRParsingLocation *a_location)
 Is called to notify the beginning of a page statement. More...
 
void(* end_page )(CRDocHandler *a_this, CRString *a_name, CRString *pseudo_page)
 Is called to notify the end of a page statement. More...
 
void(* ignorable_at_rule )(CRDocHandler *a_this, CRString *a_name)
 Is Called to notify an unknown at-rule not supported by this parser. More...
 
void(* error )(CRDocHandler *a_this)
 Is called to notify a parsing error. More...
 
void(* unrecoverable_error )(CRDocHandler *a_this)
 Is called to notify an unrecoverable parsing error. More...
 
gboolean resolve_import
 
gulong ref_count
 

Detailed Description

The SAC document handler.

An instance of this class is to be passed to a parser. Then, during the parsing the parser calls the convenient function pointer whenever a particular event (a css construction) occurs.

Definition at line 53 of file cr-doc-handler.h.

Field Documentation

◆ app_data

gpointer _CRDocHandler::app_data

This pointer is to be used by the application for it custom needs.

It is there to extend the doc handler.

Definition at line 61 of file cr-doc-handler.h.

◆ charset

void(* _CRDocHandler::charset) (CRDocHandler *a_this, CRString *a_charset, CRParsingLocation *a_charset_sym_location)

Is called to notify an at charset rule.

Parameters
a_thisthe document handler.
a_charsetthe declared charset.

Definition at line 82 of file cr-doc-handler.h.

◆ comment

void(* _CRDocHandler::comment) (CRDocHandler *a_this, CRString *a_comment)

Is called to notify a comment.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_commentthe comment.

Definition at line 130 of file cr-doc-handler.h.

◆ end_document

void(* _CRDocHandler::end_document) (CRDocHandler *a_this)

Is called to notify the end of the parsing of the document.

Parameters
a_thisa pointer to the current instance of CRDocHandler.

Definition at line 75 of file cr-doc-handler.h.

◆ end_font_face

void(* _CRDocHandler::end_font_face) (CRDocHandler *a_this)

Is called to notify the end of a font face statement.

Parameters
a_thisa pointer to the current instance of CRDocHandler.

Definition at line 189 of file cr-doc-handler.h.

◆ end_media

void(* _CRDocHandler::end_media) (CRDocHandler *a_this, GList *a_media_list)

Is called to notify the end of a media statement.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_media_lista double linked list of GString * objects. Each GString objects is actually a destination media for the style information.

Definition at line 217 of file cr-doc-handler.h.

◆ end_page

void(* _CRDocHandler::end_page) (CRDocHandler *a_this, CRString *a_name, CRString *pseudo_page)

Is called to notify the end of a page statement.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_namethe name of the page (if any, null otherwise).
a_pseudo_pagethe pseudo page (if any, null otherwise).

Definition at line 244 of file cr-doc-handler.h.

◆ end_selector

void(* _CRDocHandler::end_selector) (CRDocHandler *a_this, CRSelector *a_selector_list)

Is called to notify the end of a rule statement.

Parameters
a_thisthe current instance of CRDocHandler.
a_selector_listthe list of selectors that precedes the rule declarations. This pointer is the same as the one passed to start_selector() ;

Definition at line 150 of file cr-doc-handler.h.

◆ error

void(* _CRDocHandler::error) (CRDocHandler *a_this)

Is called to notify a parsing error.

After this error the application must ignore the rule being parsed, if any. After completion of this callback, the parser will then try to resume the parsing, ignoring the current error.

Definition at line 262 of file cr-doc-handler.h.

◆ ignorable_at_rule

void(* _CRDocHandler::ignorable_at_rule) (CRDocHandler *a_this, CRString *a_name)

Is Called to notify an unknown at-rule not supported by this parser.

Definition at line 252 of file cr-doc-handler.h.

◆ import_style

void(* _CRDocHandler::import_style) (CRDocHandler *a_this, GList *a_media_list, CRString *a_uri, CRString *a_uri_default_ns, CRParsingLocation *a_location)

Is called to notify an import statement in the stylesheet.

Parameters
a_thisthe current instance of CRDocHandler.
a_media_lista doubly linked list of GString objects. Each GString object contains a string which is the destination media for style information.
a_urithe uri of the imported style sheet.
a_uri_default_nsthe default namespace of URI
a_locationthe parsing location of the '@import' keyword. of the imported style sheet.

Definition at line 99 of file cr-doc-handler.h.

◆ import_style_result

void(* _CRDocHandler::import_style_result) (CRDocHandler *a_this, GList *a_media_list, CRString *a_uri, CRString *a_uri_default_ns, CRStyleSheet *a_sheet)

Definition at line 105 of file cr-doc-handler.h.

◆ namespace_declaration

void(* _CRDocHandler::namespace_declaration) (CRDocHandler *a_this, CRString *a_prefix, CRString *a_uri, CRParsingLocation *a_location)

Is called to notify a namespace declaration.

Not used yet.

Parameters
a_thisthe current instance of CRDocHandler.
a_prefixthe prefix of the namespace.
a_urithe uri of the namespace.
a_locationthe location of the "@namespace" keyword.

Definition at line 119 of file cr-doc-handler.h.

◆ priv

CRDocHandlerPriv* _CRDocHandler::priv

Definition at line 55 of file cr-doc-handler.h.

◆ property

void(* _CRDocHandler::property) (CRDocHandler *a_this, CRString *a_name, CRTerm *a_expression, gboolean a_is_important)

Is called to notify a declaration.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_namethe name of the parsed property.
a_expressiona css expression that represents the value of the property. A css expression is actually a linked list of 'terms'. Each term can be linked to other using operators.

Definition at line 165 of file cr-doc-handler.h.

◆ ref_count

gulong _CRDocHandler::ref_count

Definition at line 272 of file cr-doc-handler.h.

◆ resolve_import

gboolean _CRDocHandler::resolve_import

Definition at line 271 of file cr-doc-handler.h.

◆ start_document

void(* _CRDocHandler::start_document) (CRDocHandler *a_this)

Is called at the beginning of the parsing of the document.

Parameters
a_thisa pointer to the current instance of CRDocHandler.

Definition at line 68 of file cr-doc-handler.h.

◆ start_font_face

void(* _CRDocHandler::start_font_face) (CRDocHandler *a_this, CRParsingLocation *a_location)

Is called to notify the start of a font face statement.

The parser invokes this method at the beginning of every font face statement in the style sheet. There will be a corresponding end_font_face () event for every start_font_face () event.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_locationthe parsing location of the "\@font-face" keyword.

Definition at line 181 of file cr-doc-handler.h.

◆ start_media

void(* _CRDocHandler::start_media) (CRDocHandler *a_this, GList *a_media_list, CRParsingLocation *a_location)

Is called to notify the beginning of a media statement.

The parser will invoke this method at the beginning of every media statement in the style sheet. There will be a corresponding end_media() event for every start_media() event.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_media_lista double linked list of CRString * objects. Each CRString objects is actually a destination media for the style information.

Definition at line 205 of file cr-doc-handler.h.

◆ start_page

void(* _CRDocHandler::start_page) (CRDocHandler *a_this, CRString *a_name, CRString *a_pseudo_page, CRParsingLocation *a_location)

Is called to notify the beginning of a page statement.

The parser invokes this function at the beginning of every page statement in the style sheet. There will be a corresponding end_page() event for every single start_page() event.

Parameters
a_thisa pointer to the current instance of CRDocHandler.
a_namethe name of the page (if any, null otherwise).
a_pseudo_pagethe pseudo page (if any, null otherwise).
a_locationthe parsing location of the "\@page" keyword.

Definition at line 232 of file cr-doc-handler.h.

◆ start_selector

void(* _CRDocHandler::start_selector) (CRDocHandler *a_this, CRSelector *a_selector_list)

Is called to notify the beginning of a rule statement.

Parameters
a_thisthe current instance of CRDocHandler.
a_selector_listthe list of selectors that precedes the rule declarations.

Definition at line 140 of file cr-doc-handler.h.

◆ unrecoverable_error

void(* _CRDocHandler::unrecoverable_error) (CRDocHandler *a_this)

Is called to notify an unrecoverable parsing error.

This is the place to put emergency routines that free allocated resources.

Definition at line 269 of file cr-doc-handler.h.


The documentation for this struct was generated from the following file: