rsvg2 2.2.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +35 -0
- data/Rakefile +69 -0
- data/ext/rsvg2/depend +6 -0
- data/ext/rsvg2/extconf.rb +89 -0
- data/ext/rsvg2/rbrsvg.c +206 -0
- data/ext/rsvg2/rbrsvgdimensiondata.c +194 -0
- data/ext/rsvg2/rbrsvghandle.c +496 -0
- data/ext/rsvg2/rsvg2.def +2 -0
- data/ext/rsvg2/rsvg2.h +70 -0
- data/extconf.rb +49 -0
- data/lib/2.0/rsvg2.so +0 -0
- data/lib/2.1/rsvg2.so +0 -0
- data/lib/2.2/rsvg2.so +0 -0
- data/lib/rsvg2.rb +33 -0
- data/sample/svg-viewer.rb +44 -0
- data/sample/svg2.rb +60 -0
- data/test/rsvg2-test-utils.rb +23 -0
- data/test/run-test.rb +49 -0
- data/test/test-handle.rb +91 -0
- data/vendor/local/bin/croco-0.6-config +87 -0
- data/vendor/local/bin/csslint-0.6.exe +0 -0
- data/vendor/local/bin/libcroco-0.6-3.dll +0 -0
- data/vendor/local/bin/librsvg-2-2.dll +0 -0
- data/vendor/local/bin/rsvg-convert.exe +0 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-additional-sel.h +98 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-attr-sel.h +74 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-cascade.h +74 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-declaration.h +136 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-doc-handler.h +298 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-enc-handler.h +94 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-fonts.h +315 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-input.h +174 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-num.h +127 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-om-parser.h +98 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-parser.h +128 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-parsing-location.h +70 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-prop-list.h +80 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-pseudo.h +64 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-rgb.h +94 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-sel-eng.h +110 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-selector.h +95 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-simple-sel.h +130 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-statement.h +440 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-string.h +76 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-style.h +339 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-stylesheet.h +102 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-term.h +190 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-tknzr.h +115 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-token.h +212 -0
- data/vendor/local/include/libcroco-0.6/libcroco/cr-utils.h +246 -0
- data/vendor/local/include/libcroco-0.6/libcroco/libcroco-config.h +17 -0
- data/vendor/local/include/libcroco-0.6/libcroco/libcroco.h +44 -0
- data/vendor/local/include/librsvg-2.0/librsvg/librsvg-enum-types.h +24 -0
- data/vendor/local/include/librsvg-2.0/librsvg/librsvg-features.h +28 -0
- data/vendor/local/include/librsvg-2.0/librsvg/rsvg-cairo.h +42 -0
- data/vendor/local/include/librsvg-2.0/librsvg/rsvg.h +264 -0
- data/vendor/local/lib/girepository-1.0/Rsvg-2.0.typelib +0 -0
- data/vendor/local/lib/libcroco-0.6.a +0 -0
- data/vendor/local/lib/libcroco-0.6.dll.a +0 -0
- data/vendor/local/lib/libcroco-0.6.la +41 -0
- data/vendor/local/lib/librsvg-2.a +0 -0
- data/vendor/local/lib/librsvg-2.dll.a +0 -0
- data/vendor/local/lib/librsvg-2.la +41 -0
- data/vendor/local/lib/pkgconfig/libcroco-0.6.pc +11 -0
- data/vendor/local/lib/pkgconfig/librsvg-2.0.pc +15 -0
- data/vendor/local/share/gir-1.0/Rsvg-2.0.gir +754 -0
- data/vendor/local/share/gtk-doc/html/libcroco/ch01.html +113 -0
- data/vendor/local/share/gtk-doc/html/libcroco/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/libcroco/index.html +109 -0
- data/vendor/local/share/gtk-doc/html/libcroco/index.sgml +582 -0
- data/vendor/local/share/gtk-doc/html/libcroco/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-additional-sel.html +337 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-attr-sel.html +203 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-cascade.html +240 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-declaration.html +642 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-doc-handler.html +517 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-enc-handler.html +164 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-fonts.html +670 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-input.html +1102 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-num.html +265 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-om-parser.html +380 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-parser.html +913 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-parsing-location.html +205 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-prop-list.html +421 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-pseudo.html +141 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-rgb.html +503 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-sel-eng.html +346 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-selector.html +246 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-simple-sel.html +240 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-statement.html +1408 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-string.html +137 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-style.html +384 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-stylesheet.html +158 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-term.html +304 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-tknzr.html +312 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-token.html +428 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-utils.html +334 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco-libcroco-config.html +80 -0
- data/vendor/local/share/gtk-doc/html/libcroco/libcroco.devhelp2 +511 -0
- data/vendor/local/share/gtk-doc/html/libcroco/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/libcroco/style.css +266 -0
- data/vendor/local/share/gtk-doc/html/libcroco/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/RsvgHandle.html +1420 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/annotation-glossary.html +55 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-14.html +55 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-22.html +43 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-32.html +47 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-36.html +46 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-4.html +39 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-8.html +54 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-9.html +53 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-deprecated.html +100 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-full.html +323 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.html +88 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.sgml +106 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/licence.html +57 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/object-tree.html +38 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-2.0.devhelp2 +94 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html +360 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html +484 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html +154 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Version-check-and-feature-tests.html +142 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg.html +57 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/style.css +476 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/up.png +0 -0
- data/vendor/local/share/license/libcroco/AUTHORS +13 -0
- data/vendor/local/share/license/libcroco/COPYING +481 -0
- data/vendor/local/share/license/libcroco/COPYING.LIB +481 -0
- data/vendor/local/share/license/librsvg/AUTHORS +1 -0
- data/vendor/local/share/license/librsvg/COPYING +340 -0
- data/vendor/local/share/license/librsvg/COPYING.LIB +482 -0
- data/vendor/local/share/man/man1/rsvg-convert.1 +55 -0
- metadata +209 -0
@@ -0,0 +1,127 @@
|
|
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
|
+
* Author: Dodji Seketeli
|
21
|
+
* See COPYRIGHTS file for copyright information
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
/**
|
26
|
+
*@file
|
27
|
+
*The declaration
|
28
|
+
*of the #CRNum class.
|
29
|
+
*/
|
30
|
+
|
31
|
+
#ifndef __CR_NUM_H__
|
32
|
+
#define __CR_NUM_H__
|
33
|
+
|
34
|
+
#include <glib.h>
|
35
|
+
#include "cr-utils.h"
|
36
|
+
#include "cr-parsing-location.h"
|
37
|
+
|
38
|
+
G_BEGIN_DECLS
|
39
|
+
|
40
|
+
/**
|
41
|
+
*@file
|
42
|
+
*The declaration of the #CRNum class.
|
43
|
+
*
|
44
|
+
*/
|
45
|
+
|
46
|
+
/**
|
47
|
+
*The different types
|
48
|
+
*of numbers.
|
49
|
+
*Please, do not modify
|
50
|
+
*the declaration order of the enum
|
51
|
+
*members, unless you know
|
52
|
+
*what you are doing.
|
53
|
+
*/
|
54
|
+
enum CRNumType
|
55
|
+
{
|
56
|
+
NUM_AUTO = 0,
|
57
|
+
NUM_GENERIC,
|
58
|
+
NUM_LENGTH_EM,
|
59
|
+
NUM_LENGTH_EX,
|
60
|
+
NUM_LENGTH_PX,
|
61
|
+
NUM_LENGTH_IN,
|
62
|
+
NUM_LENGTH_CM,
|
63
|
+
NUM_LENGTH_MM,
|
64
|
+
NUM_LENGTH_PT,
|
65
|
+
NUM_LENGTH_PC,
|
66
|
+
NUM_ANGLE_DEG,
|
67
|
+
NUM_ANGLE_RAD,
|
68
|
+
NUM_ANGLE_GRAD,
|
69
|
+
NUM_TIME_MS,
|
70
|
+
NUM_TIME_S,
|
71
|
+
NUM_FREQ_HZ,
|
72
|
+
NUM_FREQ_KHZ,
|
73
|
+
NUM_PERCENTAGE,
|
74
|
+
NUM_INHERIT,
|
75
|
+
NUM_UNKNOWN_TYPE,
|
76
|
+
NB_NUM_TYPE
|
77
|
+
} ;
|
78
|
+
|
79
|
+
|
80
|
+
/**
|
81
|
+
*An abstraction of a number (num)
|
82
|
+
*as defined in the css2 spec.
|
83
|
+
*/
|
84
|
+
typedef struct _CRNum CRNum ;
|
85
|
+
|
86
|
+
/**
|
87
|
+
*An abstraction of a number (num)
|
88
|
+
*as defined in the css2 spec.
|
89
|
+
*/
|
90
|
+
struct _CRNum
|
91
|
+
{
|
92
|
+
enum CRNumType type ;
|
93
|
+
gdouble val ;
|
94
|
+
CRParsingLocation location ;
|
95
|
+
} ;
|
96
|
+
|
97
|
+
CRNum *
|
98
|
+
cr_num_new (void) ;
|
99
|
+
|
100
|
+
CRNum *
|
101
|
+
cr_num_new_with_val (gdouble a_val,
|
102
|
+
enum CRNumType a_type) ;
|
103
|
+
|
104
|
+
CRNum *
|
105
|
+
cr_num_dup (CRNum const *a_this) ;
|
106
|
+
|
107
|
+
guchar *
|
108
|
+
cr_num_to_string (CRNum const *a_this) ;
|
109
|
+
|
110
|
+
enum CRStatus
|
111
|
+
cr_num_copy (CRNum *a_dest, CRNum const *a_src) ;
|
112
|
+
|
113
|
+
enum CRStatus
|
114
|
+
cr_num_set (CRNum *a_this, gdouble a_val,
|
115
|
+
enum CRNumType a_type) ;
|
116
|
+
|
117
|
+
gboolean
|
118
|
+
cr_num_is_fixed_length (CRNum const *a_this) ;
|
119
|
+
|
120
|
+
void
|
121
|
+
cr_num_destroy (CRNum *a_this) ;
|
122
|
+
|
123
|
+
|
124
|
+
G_END_DECLS
|
125
|
+
|
126
|
+
|
127
|
+
#endif /*__CR_NUM_H__*/
|
@@ -0,0 +1,98 @@
|
|
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 ;
|
45
|
+
typedef struct _CROMParserPriv CROMParserPriv ;
|
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
|
+
*/
|
53
|
+
struct _CROMParser
|
54
|
+
{
|
55
|
+
CROMParserPriv *priv ;
|
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
|
+
|
65
|
+
enum CRStatus cr_om_parser_parse_file (CROMParser *a_this,
|
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
|
+
|
75
|
+
enum CRStatus cr_om_parser_parse_buf (CROMParser *a_this,
|
76
|
+
const guchar *a_buf,
|
77
|
+
gulong a_len,
|
78
|
+
enum CREncoding a_enc,
|
79
|
+
CRStyleSheet **a_result) ;
|
80
|
+
|
81
|
+
enum CRStatus cr_om_parser_parse_paths_to_cascade (CROMParser *a_this,
|
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__*/
|
@@ -0,0 +1,128 @@
|
|
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
|
+
* Author: Dodji Seketeli
|
21
|
+
* See COPYRIGHTS file for copyrights information.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __CR_PARSER_H__
|
25
|
+
#define __CR_PARSER_H__
|
26
|
+
|
27
|
+
#include <glib.h>
|
28
|
+
#include "cr-input.h"
|
29
|
+
#include "cr-tknzr.h"
|
30
|
+
#include "cr-utils.h"
|
31
|
+
#include "cr-doc-handler.h"
|
32
|
+
|
33
|
+
G_BEGIN_DECLS
|
34
|
+
|
35
|
+
/**
|
36
|
+
*@file
|
37
|
+
*The declaration file
|
38
|
+
*of the #CRParser class.
|
39
|
+
*/
|
40
|
+
typedef struct _CRParser CRParser ;
|
41
|
+
typedef struct _CRParserPriv CRParserPriv ;
|
42
|
+
|
43
|
+
|
44
|
+
/**
|
45
|
+
*The implementation of
|
46
|
+
*the SAC parser.
|
47
|
+
*The Class is opaque
|
48
|
+
*and must be manipulated through
|
49
|
+
*the provided methods.
|
50
|
+
*/
|
51
|
+
struct _CRParser {
|
52
|
+
CRParserPriv *priv ;
|
53
|
+
} ;
|
54
|
+
|
55
|
+
|
56
|
+
CRParser * cr_parser_new (CRTknzr *a_tknzr) ;
|
57
|
+
|
58
|
+
CRParser * cr_parser_new_from_buf (guchar *a_buf, gulong a_len,
|
59
|
+
enum CREncoding a_enc,
|
60
|
+
gboolean a_free_buf) ;
|
61
|
+
|
62
|
+
CRParser * cr_parser_new_from_file (const guchar *a_file_uri,
|
63
|
+
enum CREncoding a_enc) ;
|
64
|
+
|
65
|
+
CRParser * cr_parser_new_from_input (CRInput *a_input) ;
|
66
|
+
|
67
|
+
enum CRStatus cr_parser_set_tknzr (CRParser *a_this, CRTknzr *a_tknzr) ;
|
68
|
+
|
69
|
+
enum CRStatus cr_parser_get_tknzr (CRParser *a_this, CRTknzr **a_tknzr) ;
|
70
|
+
|
71
|
+
enum CRStatus cr_parser_get_parsing_location (CRParser const *a_this, CRParsingLocation *a_loc) ;
|
72
|
+
|
73
|
+
enum CRStatus cr_parser_try_to_skip_spaces_and_comments (CRParser *a_this) ;
|
74
|
+
|
75
|
+
|
76
|
+
enum CRStatus cr_parser_set_sac_handler (CRParser *a_this,
|
77
|
+
CRDocHandler *a_handler) ;
|
78
|
+
|
79
|
+
enum CRStatus cr_parser_get_sac_handler (CRParser *a_this,
|
80
|
+
CRDocHandler **a_handler) ;
|
81
|
+
|
82
|
+
enum CRStatus cr_parser_set_use_core_grammar (CRParser *a_this,
|
83
|
+
gboolean a_use_core_grammar) ;
|
84
|
+
enum CRStatus cr_parser_get_use_core_grammar (CRParser const *a_this,
|
85
|
+
gboolean *a_use_core_grammar) ;
|
86
|
+
|
87
|
+
enum CRStatus cr_parser_parse (CRParser *a_this) ;
|
88
|
+
|
89
|
+
enum CRStatus cr_parser_parse_file (CRParser *a_this,
|
90
|
+
const guchar *a_file_uri,
|
91
|
+
enum CREncoding a_enc) ;
|
92
|
+
|
93
|
+
enum CRStatus cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf,
|
94
|
+
gulong a_len, enum CREncoding a_enc) ;
|
95
|
+
|
96
|
+
enum CRStatus cr_parser_set_default_sac_handler (CRParser *a_this) ;
|
97
|
+
|
98
|
+
enum CRStatus cr_parser_parse_term (CRParser *a_this, CRTerm **a_term) ;
|
99
|
+
|
100
|
+
enum CRStatus cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr) ;
|
101
|
+
|
102
|
+
enum CRStatus cr_parser_parse_prio (CRParser *a_this, CRString **a_prio) ;
|
103
|
+
|
104
|
+
enum CRStatus cr_parser_parse_declaration (CRParser *a_this, CRString **a_property,
|
105
|
+
CRTerm **a_expr, gboolean *a_important) ;
|
106
|
+
|
107
|
+
enum CRStatus cr_parser_parse_statement_core (CRParser *a_this) ;
|
108
|
+
|
109
|
+
enum CRStatus cr_parser_parse_ruleset (CRParser *a_this) ;
|
110
|
+
|
111
|
+
enum CRStatus cr_parser_parse_import (CRParser *a_this, GList ** a_media_list,
|
112
|
+
CRString **a_import_string,
|
113
|
+
CRParsingLocation *a_location) ;
|
114
|
+
|
115
|
+
enum CRStatus cr_parser_parse_media (CRParser *a_this) ;
|
116
|
+
|
117
|
+
enum CRStatus cr_parser_parse_page (CRParser *a_this) ;
|
118
|
+
|
119
|
+
enum CRStatus cr_parser_parse_charset (CRParser *a_this, CRString **a_value,
|
120
|
+
CRParsingLocation *a_charset_sym_location) ;
|
121
|
+
|
122
|
+
enum CRStatus cr_parser_parse_font_face (CRParser *a_this) ;
|
123
|
+
|
124
|
+
void cr_parser_destroy (CRParser *a_this) ;
|
125
|
+
|
126
|
+
G_END_DECLS
|
127
|
+
|
128
|
+
#endif /*__CR_PARSER_H__*/
|
@@ -0,0 +1,70 @@
|
|
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
|
+
* Author: Dodji Seketeli.
|
21
|
+
* See the COPYRIGHTS file for copyright information.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __CR_PARSING_LOCATION_H__
|
25
|
+
#define __CR_PARSING_LOCATION_H__
|
26
|
+
|
27
|
+
#include "cr-utils.h"
|
28
|
+
|
29
|
+
G_BEGIN_DECLS
|
30
|
+
|
31
|
+
/**
|
32
|
+
*@file
|
33
|
+
*The declaration of the CRParsingLocation
|
34
|
+
*object. This object keeps track of line/column/byte offset/
|
35
|
+
*at which the parsing of a given CSS construction appears.
|
36
|
+
*/
|
37
|
+
|
38
|
+
typedef struct _CRParsingLocation CRParsingLocation;
|
39
|
+
struct _CRParsingLocation {
|
40
|
+
guint line ;
|
41
|
+
guint column ;
|
42
|
+
guint byte_offset ;
|
43
|
+
} ;
|
44
|
+
|
45
|
+
|
46
|
+
enum CRParsingLocationSerialisationMask {
|
47
|
+
DUMP_LINE = 1,
|
48
|
+
DUMP_COLUMN = 1 << 1,
|
49
|
+
DUMP_BYTE_OFFSET = 1 << 2
|
50
|
+
} ;
|
51
|
+
|
52
|
+
CRParsingLocation * cr_parsing_location_new (void) ;
|
53
|
+
|
54
|
+
enum CRStatus cr_parsing_location_init (CRParsingLocation *a_this) ;
|
55
|
+
|
56
|
+
enum CRStatus cr_parsing_location_copy (CRParsingLocation *a_to,
|
57
|
+
CRParsingLocation const *a_from) ;
|
58
|
+
|
59
|
+
gchar * cr_parsing_location_to_string (CRParsingLocation const *a_this,
|
60
|
+
enum CRParsingLocationSerialisationMask a_mask) ;
|
61
|
+
void cr_parsing_location_dump (CRParsingLocation const *a_this,
|
62
|
+
enum CRParsingLocationSerialisationMask a_mask,
|
63
|
+
FILE *a_fp) ;
|
64
|
+
|
65
|
+
void cr_parsing_location_destroy (CRParsingLocation *a_this) ;
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
G_END_DECLS
|
70
|
+
#endif
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of The Croco Library
|
3
|
+
*
|
4
|
+
* This program is free software; you can redistribute it and/or
|
5
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
6
|
+
* License as published by the Free Software Foundation.
|
7
|
+
*
|
8
|
+
* This program is distributed in the hope that it will be useful,
|
9
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
* GNU General Public License for more details.
|
12
|
+
*
|
13
|
+
* You should have received a copy of the GNU Lesser General Public License
|
14
|
+
* along with this program; if not, write to the Free Software
|
15
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
16
|
+
* USA
|
17
|
+
*
|
18
|
+
* Author: Dodji Seketeli
|
19
|
+
* See COPYRIGHTS file for copyrights information.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef __CR_PROP_LIST_H__
|
23
|
+
#define __CR_PROP_LIST_H__
|
24
|
+
|
25
|
+
#include "cr-utils.h"
|
26
|
+
#include "cr-declaration.h"
|
27
|
+
#include "cr-string.h"
|
28
|
+
|
29
|
+
G_BEGIN_DECLS
|
30
|
+
|
31
|
+
typedef struct _CRPropList CRPropList ;
|
32
|
+
typedef struct _CRPropListPriv CRPropListPriv ;
|
33
|
+
|
34
|
+
struct _CRPropList
|
35
|
+
{
|
36
|
+
CRPropListPriv * priv;
|
37
|
+
} ;
|
38
|
+
|
39
|
+
CRPropList * cr_prop_list_append (CRPropList *a_this,
|
40
|
+
CRPropList *a_to_append) ;
|
41
|
+
|
42
|
+
CRPropList * cr_prop_list_append2 (CRPropList *a_this,
|
43
|
+
CRString *a_prop,
|
44
|
+
CRDeclaration *a_decl) ;
|
45
|
+
|
46
|
+
CRPropList * cr_prop_list_prepend (CRPropList *a_this,
|
47
|
+
CRPropList *a_to_append) ;
|
48
|
+
|
49
|
+
CRPropList * cr_prop_list_prepend2 (CRPropList *a_this,
|
50
|
+
CRString *a_prop,
|
51
|
+
CRDeclaration *a_decl) ;
|
52
|
+
|
53
|
+
enum CRStatus cr_prop_list_set_prop (CRPropList *a_this,
|
54
|
+
CRString *a_prop) ;
|
55
|
+
|
56
|
+
enum CRStatus cr_prop_list_get_prop (CRPropList const *a_this,
|
57
|
+
CRString **a_prop) ;
|
58
|
+
|
59
|
+
enum CRStatus cr_prop_list_lookup_prop (CRPropList *a_this,
|
60
|
+
CRString *a_prop,
|
61
|
+
CRPropList**a_pair) ;
|
62
|
+
|
63
|
+
CRPropList * cr_prop_list_get_next (CRPropList *a_this) ;
|
64
|
+
|
65
|
+
CRPropList * cr_prop_list_get_prev (CRPropList *a_this) ;
|
66
|
+
|
67
|
+
enum CRStatus cr_prop_list_set_decl (CRPropList *a_this,
|
68
|
+
CRDeclaration *a_decl);
|
69
|
+
|
70
|
+
enum CRStatus cr_prop_list_get_decl (CRPropList const *a_this,
|
71
|
+
CRDeclaration **a_decl) ;
|
72
|
+
|
73
|
+
CRPropList * cr_prop_list_unlink (CRPropList *a_this,
|
74
|
+
CRPropList *a_pair) ;
|
75
|
+
|
76
|
+
void cr_prop_list_destroy (CRPropList *a_this) ;
|
77
|
+
|
78
|
+
G_END_DECLS
|
79
|
+
|
80
|
+
#endif /*__CR_PROP_LIST_H__*/
|