Libcroco
cr-om-parser.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  * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of version 2.1 of the GNU Lesser General Public
10  * License as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the
18  * GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  * USA
22  */
23 
24 /*
25  *$Id$
26  */
27 
28 #ifndef __CR_OM_PARSER_H__
29 #define __CR_OM_PARSER_H__
30 
31 #include "cr-parser.h"
32 #include "cr-cascade.h"
33 
34 
35 /**
36  *@file
37  *The definition of the CSS Object Model Parser.
38  *This parser uses (and sits) the SAC api of libcroco defined
39  *in cr-parser.h and cr-doc-handler.h
40  */
41 
42 G_BEGIN_DECLS
43 
44 typedef struct _CROMParser CROMParser ;
46 
47 /**
48  *The Object model parser.
49  *Can parse a css file and build a css object model.
50  *This parser uses an instance of #CRParser and defines
51  *a set of SAC callbacks to build the Object Model.
52  */
54 {
56 } ;
57 
58 CROMParser * cr_om_parser_new (CRInput *a_input) ;
59 
60 
61 enum CRStatus cr_om_parser_simply_parse_file (const guchar *a_file_path,
62  enum CREncoding a_enc,
63  CRStyleSheet **a_result) ;
64 
66  const guchar *a_file_uri,
67  enum CREncoding a_enc,
68  CRStyleSheet **a_result) ;
69 
70 enum CRStatus cr_om_parser_simply_parse_buf (const guchar *a_buf,
71  gulong a_len,
72  enum CREncoding a_enc,
73  CRStyleSheet **a_result) ;
74 
76  const guchar *a_buf,
77  gulong a_len,
78  enum CREncoding a_enc,
79  CRStyleSheet **a_result) ;
80 
82  const guchar *a_author_path,
83  const guchar *a_user_path,
84  const guchar *a_ua_path,
85  enum CREncoding a_encoding,
86  CRCascade ** a_result) ;
87 
88 enum CRStatus cr_om_parser_simply_parse_paths_to_cascade (const guchar *a_author_path,
89  const guchar *a_user_path,
90  const guchar *a_ua_path,
91  enum CREncoding a_encoding,
92  CRCascade ** a_result) ;
93 
94 void cr_om_parser_destroy (CROMParser *a_this) ;
95 
96 G_END_DECLS
97 
98 #endif /*__CR_OM_PARSER_H__*/
the declaration of the CRCascade class.
CROMParserPriv * priv
Definition: cr-om-parser.h:55
An abstraction of a css stylesheet as defined by the css2 spec in chapter 4.
Definition: cr-stylesheet.h:57
enum CRStatus cr_om_parser_simply_parse_buf(const guchar *a_buf, gulong a_len, enum CREncoding a_enc, CRStyleSheet **a_result)
cr_om_parser_simply_parse_buf: @a_buf: the css2 in memory buffer.
Definition: cr-om-parser.c:901
CREncoding
Encoding values.
Definition: cr-utils.h:84
CRStatus
The status type returned by the methods of the croco library.
Definition: cr-utils.h:43
enum CRStatus cr_om_parser_parse_buf(CROMParser *a_this, const guchar *a_buf, gulong a_len, enum CREncoding a_enc, CRStyleSheet **a_result)
cr_om_parser_parse_buf: @a_this: the current instance of CROMParser.
Definition: cr-om-parser.c:852
The CRInput class provides the abstraction of an utf8-encoded character stream.
Definition: cr-input.h:47
@CROMParser:
Definition: cr-om-parser.c:36
CROMParser * cr_om_parser_new(CRInput *a_input)
cr_om_parser_new: @a_input: the input stream.
Definition: cr-om-parser.c:793
enum CRStatus cr_om_parser_simply_parse_file(const guchar *a_file_path, enum CREncoding a_enc, CRStyleSheet **a_result)
cr_om_parser_simply_parse_file: @a_file_path: the css2 local file path.
Definition: cr-om-parser.c:992
enum CRStatus cr_om_parser_parse_file(CROMParser *a_this, const guchar *a_file_uri, enum CREncoding a_enc, CRStyleSheet **a_result)
cr_om_parser_parse_file: @a_this: the current instance of the cssom parser.
Definition: cr-om-parser.c:942
enum CRStatus cr_om_parser_simply_parse_paths_to_cascade(const guchar *a_author_path, const guchar *a_user_path, const guchar *a_ua_path, enum CREncoding a_encoding, CRCascade **a_result)
cr_om_parser_simply_parse_paths_to_cascade: @a_author_path: the path to the author stylesheet @a_user...
The Object model parser.
Definition: cr-om-parser.h:53
The declaration file of the CRParser class.
typedefG_BEGIN_DECLS struct _CROMParser CROMParser
Definition: cr-om-parser.h:44
void cr_om_parser_destroy(CROMParser *a_this)
cr_om_parser_destroy: @a_this: the current instance of CROMParser.
enum CRStatus cr_om_parser_parse_paths_to_cascade(CROMParser *a_this, const guchar *a_author_path, const guchar *a_user_path, const guchar *a_ua_path, enum CREncoding a_encoding, CRCascade **a_result)
cr_om_parser_parse_paths_to_cascade: @a_this: the current instance of CROMParser @a_author_path: the ...