Libcroco
Data Structures | Typedefs | Functions
cr-doc-handler.h File Reference

The declaration of the #CRDocumentHandler class. More...

#include <glib.h>
#include "cr-utils.h"
#include "cr-input.h"
#include "cr-stylesheet.h"

Go to the source code of this file.

Data Structures

struct  _CRDocHandler
 The SAC document handler. More...

Typedefs

typedef typedefG_BEGIN_DECLS
struct _CRDocHandler 
CRDocHandler
typedef struct _CRDocHandlerPriv CRDocHandlerPriv

Functions

CRDocHandlercr_doc_handler_new (void)
 cr_doc_handler_new: Constructor of CRDocHandler.
enum CRStatus cr_doc_handler_set_result (CRDocHandler *a_this, gpointer a_result)
 cr_doc_handler_set_result: : the current instance of CRDocHandler : the new result.
enum CRStatus cr_doc_handler_get_result (CRDocHandler const *a_this, gpointer *a_result)
 cr_doc_handler_get_result: : the current instance of CRDocHandler : out parameter.
enum CRStatus cr_doc_handler_set_ctxt (CRDocHandler *a_this, gpointer a_ctxt)
 cr_doc_handler_set_ctxt: : the current instance of CRDocHandler : a pointer to the parsing context.
enum CRStatus cr_doc_handler_get_ctxt (CRDocHandler const *a_this, gpointer *a_ctxt)
 cr_doc_handler_get_ctxt: : the current instance of CRDocHandler.
enum CRStatus cr_doc_handler_set_default_sac_handler (CRDocHandler *a_this)
 cr_doc_handler_set_default_sac_handler: : a pointer to the current instance of CRDocHandler.
void cr_doc_handler_associate_a_parser (CRDocHandler *a_this, gpointer a_parser)
 cr_doc_handler_associate_a_parser: Associates a parser to the current document handler
void cr_doc_handler_ref (CRDocHandler *a_this)
 cr_doc_handler_ref: : the current instance of CRDocHandler.
gboolean cr_doc_handler_unref (CRDocHandler *a_this)
 cr_doc_handler_unref: : the currrent instance of CRDocHandler.
void cr_doc_handler_destroy (CRDocHandler *a_this)
 cr_doc_handler_destroy: : the instance of CRDocHandler to destroy.

Detailed Description

The declaration of the #CRDocumentHandler class.

This class is actually the parsing events handler.

Definition in file cr-doc-handler.h.


Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _CRDocHandler CRDocHandler

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

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


Function Documentation

void cr_doc_handler_associate_a_parser ( CRDocHandler a_this,
gpointer  a_parser 
)

cr_doc_handler_associate_a_parser: Associates a parser to the current document handler

: the current instance of document handler. : the parser to associate.

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

References PRIVATE.

cr_doc_handler_destroy: : the instance of CRDocHandler to destroy.

The destructor of the CRDocHandler class.

Definition at line 250 of file cr-doc-handler.c.

Referenced by cr_doc_handler_unref(), and cr_parser_set_default_sac_handler().

enum CRStatus cr_doc_handler_get_ctxt ( CRDocHandler const *  a_this,
gpointer *  a_ctxt 
)

cr_doc_handler_get_ctxt: : the current instance of CRDocHandler.

: out parameter. The new parsing context.

Gets the private parsing context associated to the document handler The private parsing context is used by libcroco only.

Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 104 of file cr-doc-handler.c.

References CR_BAD_PARAM_ERROR, and CR_OK.

enum CRStatus cr_doc_handler_get_result ( CRDocHandler const *  a_this,
gpointer *  a_result 
)

cr_doc_handler_get_result: : the current instance of CRDocHandler : out parameter.

The returned result.

Gets the private parsing result. The private parsing result is used by libcroco only.

Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 141 of file cr-doc-handler.c.

References CR_BAD_PARAM_ERROR, and CR_OK.

Referenced by cr_om_parser_parse_buf(), cr_om_parser_parse_file(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_font_face_rule_parse_from_buf(), and cr_statement_ruleset_parse_from_buf().

void cr_doc_handler_ref ( CRDocHandler a_this)

cr_doc_handler_ref: : the current instance of CRDocHandler.

Definition at line 210 of file cr-doc-handler.c.

Referenced by cr_parser_set_sac_handler().

enum CRStatus cr_doc_handler_set_ctxt ( CRDocHandler a_this,
gpointer  a_ctxt 
)

cr_doc_handler_set_ctxt: : the current instance of CRDocHandler : a pointer to the parsing context.

Sets the private parsing context. This is used by libcroco only. Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 123 of file cr-doc-handler.c.

References CR_BAD_PARAM_ERROR, and CR_OK.

cr_doc_handler_set_default_sac_handler: : a pointer to the current instance of CRDocHandler.

Sets the sac handlers contained in the current instance of DocHandler to the default handlers. For the time being the default handlers are test handlers. This is expected to change in a near future, when the libcroco gets a bit debugged.

Returns CR_OK upon successfull completion, an error code otherwise.

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

References CR_BAD_PARAM_ERROR, and CR_OK.

Referenced by cr_doc_handler_new(), and cr_parser_set_default_sac_handler().

enum CRStatus cr_doc_handler_set_result ( CRDocHandler a_this,
gpointer  a_result 
)

cr_doc_handler_set_result: : the current instance of CRDocHandler : the new result.

Sets the private parsing context. This is used by libcroco only.

Returns CR_OK upon successfull completion, an error code otherwise.

Definition at line 161 of file cr-doc-handler.c.

References CR_BAD_PARAM_ERROR, and CR_OK.

gboolean cr_doc_handler_unref ( CRDocHandler a_this)

cr_doc_handler_unref: : the currrent instance of CRDocHandler.

Decreases the ref count of the current instance of CRDocHandler. If the ref count reaches '0' then, destroys the instance.

Returns TRUE if the instance as been destroyed, FALSE otherwise.

Definition at line 227 of file cr-doc-handler.c.

References cr_doc_handler_destroy().

Referenced by cr_parser_destroy(), cr_parser_set_sac_handler(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_font_face_rule_parse_from_buf(), and cr_statement_ruleset_parse_from_buf().