Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
cr-doc-handler.h
Go to the documentation of this file.
1/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2
3/*
4 * This file is part of The Croco Library
5 *
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.
9 *
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.
14 *
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
18 * USA
19 *
20 * See the COPYRIGHTS file for copyright information.
21 */
22
23#ifndef __CR_DOC_HANDLER_H__
24#define __CR_DOC_HANDLER_H__
25
32#include <glib.h>
33#include "cr-utils.h"
34#include "cr-input.h"
35#include "cr-stylesheet.h"
36
37G_BEGIN_DECLS
38
39
41
42struct _CRDocHandlerPriv ;
43typedef struct _CRDocHandlerPriv CRDocHandlerPriv ;
44
45
54{
56
61 gpointer app_data ;
62
68 void (*start_document) (CRDocHandler *a_this) ;
69
75 void (*end_document) (CRDocHandler *a_this) ;
76
82 void (*charset) (CRDocHandler *a_this,
83 CRString *a_charset,
84 CRParsingLocation *a_charset_sym_location) ;
85
99 void (*import_style) (CRDocHandler *a_this,
100 GList *a_media_list,
101 CRString *a_uri,
102 CRString *a_uri_default_ns,
103 CRParsingLocation *a_location) ;
104
106 GList *a_media_list,
107 CRString *a_uri,
108 CRString *a_uri_default_ns,
109 CRStyleSheet *a_sheet) ;
110
120 CRString *a_prefix,
121 CRString *a_uri,
122 CRParsingLocation *a_location) ;
123
130 void (*comment) (CRDocHandler *a_this,
131 CRString *a_comment) ;
132
140 void (*start_selector) (CRDocHandler * a_this,
141 CRSelector *a_selector_list) ;
142
150 void (*end_selector) (CRDocHandler *a_this,
151 CRSelector *a_selector_list) ;
152
153
165 void (*property) (CRDocHandler *a_this,
166 CRString *a_name,
167 CRTerm *a_expression,
168 gboolean a_is_important) ;
182 CRParsingLocation *a_location) ;
183
189 void (*end_font_face) (CRDocHandler *a_this) ;
190
191
205 void (*start_media) (CRDocHandler *a_this,
206 GList *a_media_list,
207 CRParsingLocation *a_location) ;
208
217 void (*end_media) (CRDocHandler *a_this,
218 GList *a_media_list) ;
219
232 void (*start_page) (CRDocHandler *a_this,
233 CRString *a_name,
234 CRString *a_pseudo_page,
235 CRParsingLocation *a_location) ;
236
244 void (*end_page) (CRDocHandler *a_this,
245 CRString *a_name,
246 CRString *pseudo_page) ;
247
253 CRString *a_name) ;
254
262 void (*error) (CRDocHandler *a_this) ;
263
270
271 gboolean resolve_import ;
272 gulong ref_count ;
273} ;
274
276
277enum CRStatus cr_doc_handler_set_result (CRDocHandler *a_this, gpointer a_result) ;
278
279enum CRStatus cr_doc_handler_get_result (CRDocHandler const *a_this, gpointer * a_result) ;
280
281enum CRStatus cr_doc_handler_set_ctxt (CRDocHandler *a_this, gpointer a_ctxt) ;
282
283enum CRStatus cr_doc_handler_get_ctxt (CRDocHandler const *a_this, gpointer * a_ctxt) ;
284
286
288 gpointer a_parser) ;
289
291
293
295
296G_END_DECLS
297
298#endif /*__CR_DOC_HANDLER_H__*/
CRDocHandler * cr_doc_handler_new(void)
void cr_doc_handler_ref(CRDocHandler *a_this)
typedefG_BEGIN_DECLS struct _CRDocHandler CRDocHandler
enum CRStatus cr_doc_handler_set_ctxt(CRDocHandler *a_this, gpointer a_ctxt)
struct _CRDocHandlerPriv CRDocHandlerPriv
gboolean cr_doc_handler_unref(CRDocHandler *a_this)
enum CRStatus cr_doc_handler_get_result(CRDocHandler const *a_this, gpointer *a_result)
enum CRStatus cr_doc_handler_get_ctxt(CRDocHandler const *a_this, gpointer *a_ctxt)
enum CRStatus cr_doc_handler_set_result(CRDocHandler *a_this, gpointer a_result)
void cr_doc_handler_associate_a_parser(CRDocHandler *a_this, gpointer a_parser)
enum CRStatus cr_doc_handler_set_default_sac_handler(CRDocHandler *a_this)
void cr_doc_handler_destroy(CRDocHandler *a_this)
The libcroco basic input stream class declaration file.
typedefG_BEGIN_DECLS struct _CRSelector CRSelector
Definition cr-selector.h:40
typedefG_BEGIN_DECLS struct _CRString CRString
Definition cr-string.h:37
The declaration of the CRStyleSheet class.
The Croco library basic types definitions And global definitions.
CRStatus
The status type returned by the methods of the croco library.
Definition cr-utils.h:42
The SAC document handler.
void(* start_document)(CRDocHandler *a_this)
Is called at the beginning of the parsing of the document.
gpointer app_data
This pointer is to be used by the application for it custom needs.
void(* import_style_result)(CRDocHandler *a_this, GList *a_media_list, CRString *a_uri, CRString *a_uri_default_ns, CRStyleSheet *a_sheet)
void(* start_font_face)(CRDocHandler *a_this, CRParsingLocation *a_location)
Is called to notify the start of a font face statement.
void(* end_document)(CRDocHandler *a_this)
Is called to notify the end of the parsing of the document.
void(* error)(CRDocHandler *a_this)
Is called to notify a parsing error.
void(* start_selector)(CRDocHandler *a_this, CRSelector *a_selector_list)
Is called to notify the beginning of a rule statement.
void(* end_selector)(CRDocHandler *a_this, CRSelector *a_selector_list)
Is called to notify the end of a rule statement.
void(* charset)(CRDocHandler *a_this, CRString *a_charset, CRParsingLocation *a_charset_sym_location)
Is called to notify an at charset rule.
void(* end_media)(CRDocHandler *a_this, GList *a_media_list)
Is called to notify the end of a media statement.
void(* namespace_declaration)(CRDocHandler *a_this, CRString *a_prefix, CRString *a_uri, CRParsingLocation *a_location)
Is called to notify a namespace declaration.
void(* end_font_face)(CRDocHandler *a_this)
Is called to notify the end of a font face statement.
void(* unrecoverable_error)(CRDocHandler *a_this)
Is called to notify an unrecoverable parsing error.
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.
gboolean resolve_import
void(* property)(CRDocHandler *a_this, CRString *a_name, CRTerm *a_expression, gboolean a_is_important)
Is called to notify a declaration.
void(* comment)(CRDocHandler *a_this, CRString *a_comment)
Is called to notify a comment.
void(* ignorable_at_rule)(CRDocHandler *a_this, CRString *a_name)
Is Called to notify an unknown at-rule not supported by this parser.
void(* end_page)(CRDocHandler *a_this, CRString *a_name, CRString *pseudo_page)
Is called to notify the end of a page statement.
void(* start_media)(CRDocHandler *a_this, GList *a_media_list, CRParsingLocation *a_location)
Is called to notify the beginning of a media statement.
CRDocHandlerPriv * priv
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.
An abstraction of a css stylesheet as defined by the css2 spec in chapter 4.
An abstraction of a css2 term as defined in the CSS2 spec in appendix D.1: term ::= [ NUMBER S* | PER...
Definition cr-term.h:83