rsvg2 2.2.4-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,440 @@
|
|
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
|
+
#include <stdio.h>
|
25
|
+
#include "cr-utils.h"
|
26
|
+
#include "cr-term.h"
|
27
|
+
#include "cr-selector.h"
|
28
|
+
#include "cr-declaration.h"
|
29
|
+
|
30
|
+
#ifndef __CR_STATEMENT_H__
|
31
|
+
#define __CR_STATEMENT_H__
|
32
|
+
|
33
|
+
G_BEGIN_DECLS
|
34
|
+
|
35
|
+
/**
|
36
|
+
*@file
|
37
|
+
*Declaration of the #CRStatement class.
|
38
|
+
*/
|
39
|
+
|
40
|
+
/*
|
41
|
+
*forward declaration of CRStyleSheet which is defined in
|
42
|
+
*cr-stylesheet.h
|
43
|
+
*/
|
44
|
+
|
45
|
+
struct _CRStatement ;
|
46
|
+
|
47
|
+
/*
|
48
|
+
*typedef struct _CRStatement CRStatement ;
|
49
|
+
*this is forward declared in
|
50
|
+
*cr-declaration.h already.
|
51
|
+
*/
|
52
|
+
|
53
|
+
struct _CRAtMediaRule ;
|
54
|
+
typedef struct _CRAtMediaRule CRAtMediaRule ;
|
55
|
+
|
56
|
+
typedef struct _CRRuleSet CRRuleSet ;
|
57
|
+
|
58
|
+
/**
|
59
|
+
*The abstraction of a css ruleset.
|
60
|
+
*A ruleset is made of a list of selectors,
|
61
|
+
*followed by a list of declarations.
|
62
|
+
*/
|
63
|
+
struct _CRRuleSet
|
64
|
+
{
|
65
|
+
/**A list of instances of #CRSimpeSel*/
|
66
|
+
CRSelector *sel_list ;
|
67
|
+
|
68
|
+
/**A list of instances of #CRDeclaration*/
|
69
|
+
CRDeclaration *decl_list ;
|
70
|
+
|
71
|
+
/**
|
72
|
+
*The parent media rule, or NULL if
|
73
|
+
*no parent media rule exists.
|
74
|
+
*/
|
75
|
+
CRStatement *parent_media_rule ;
|
76
|
+
} ;
|
77
|
+
|
78
|
+
/*
|
79
|
+
*a forward declaration of CRStylesheet.
|
80
|
+
*CRStylesheet is actually declared in
|
81
|
+
*cr-stylesheet.h
|
82
|
+
*/
|
83
|
+
struct _CRStyleSheet ;
|
84
|
+
typedef struct _CRStyleSheet CRStyleSheet;
|
85
|
+
|
86
|
+
|
87
|
+
/**The \@import rule abstraction.*/
|
88
|
+
typedef struct _CRAtImportRule CRAtImportRule ;
|
89
|
+
struct _CRAtImportRule
|
90
|
+
{
|
91
|
+
/**the url of the import rule*/
|
92
|
+
CRString *url ;
|
93
|
+
|
94
|
+
GList *media_list ;
|
95
|
+
|
96
|
+
/**
|
97
|
+
*the stylesheet fetched from the url, if any.
|
98
|
+
*this is not "owned" by #CRAtImportRule which means
|
99
|
+
*it is not destroyed by the destructor of #CRAtImportRule.
|
100
|
+
*/
|
101
|
+
CRStyleSheet * sheet;
|
102
|
+
};
|
103
|
+
|
104
|
+
|
105
|
+
/**abstraction of an \@media rule*/
|
106
|
+
struct _CRAtMediaRule
|
107
|
+
{
|
108
|
+
GList *media_list ;
|
109
|
+
CRStatement *rulesets ;
|
110
|
+
} ;
|
111
|
+
|
112
|
+
|
113
|
+
typedef struct _CRAtPageRule CRAtPageRule ;
|
114
|
+
/**The \@page rule abstraction*/
|
115
|
+
struct _CRAtPageRule
|
116
|
+
{
|
117
|
+
/**a list of instances of #CRDeclaration*/
|
118
|
+
CRDeclaration *decl_list ;
|
119
|
+
|
120
|
+
/**page selector. Is a pseudo selector*/
|
121
|
+
CRString *name ;
|
122
|
+
CRString *pseudo ;
|
123
|
+
} ;
|
124
|
+
|
125
|
+
/**The \@charset rule abstraction*/
|
126
|
+
typedef struct _CRAtCharsetRule CRAtCharsetRule ;
|
127
|
+
struct _CRAtCharsetRule
|
128
|
+
{
|
129
|
+
CRString * charset ;
|
130
|
+
};
|
131
|
+
|
132
|
+
/**The abstaction of the \@font-face rule.*/
|
133
|
+
typedef struct _CRAtFontFaceRule CRAtFontFaceRule ;
|
134
|
+
struct _CRAtFontFaceRule
|
135
|
+
{
|
136
|
+
/*a list of instanaces of #CRDeclaration*/
|
137
|
+
CRDeclaration *decl_list ;
|
138
|
+
} ;
|
139
|
+
|
140
|
+
|
141
|
+
/**
|
142
|
+
*The possible types of css2 statements.
|
143
|
+
*/
|
144
|
+
enum CRStatementType
|
145
|
+
{
|
146
|
+
/**
|
147
|
+
*A generic css at-rule
|
148
|
+
*each unknown at-rule will
|
149
|
+
*be of this type.
|
150
|
+
*/
|
151
|
+
|
152
|
+
/**A css at-rule*/
|
153
|
+
AT_RULE_STMT = 0,
|
154
|
+
|
155
|
+
/*A css ruleset*/
|
156
|
+
RULESET_STMT,
|
157
|
+
|
158
|
+
/**A css2 import rule*/
|
159
|
+
AT_IMPORT_RULE_STMT,
|
160
|
+
|
161
|
+
/**A css2 media rule*/
|
162
|
+
AT_MEDIA_RULE_STMT,
|
163
|
+
|
164
|
+
/**A css2 page rule*/
|
165
|
+
AT_PAGE_RULE_STMT,
|
166
|
+
|
167
|
+
/**A css2 charset rule*/
|
168
|
+
AT_CHARSET_RULE_STMT,
|
169
|
+
|
170
|
+
/**A css2 font face rule*/
|
171
|
+
AT_FONT_FACE_RULE_STMT
|
172
|
+
} ;
|
173
|
+
|
174
|
+
|
175
|
+
/**
|
176
|
+
*The abstraction of css statement as defined
|
177
|
+
*in the chapter 4 and appendix D.1 of the css2 spec.
|
178
|
+
*A statement is actually a double chained list of
|
179
|
+
*statements.A statement can be a ruleset, an \@import
|
180
|
+
*rule, an \@page rule etc ...
|
181
|
+
*/
|
182
|
+
struct _CRStatement
|
183
|
+
{
|
184
|
+
/**
|
185
|
+
*The type of the statement.
|
186
|
+
*/
|
187
|
+
enum CRStatementType type ;
|
188
|
+
|
189
|
+
union
|
190
|
+
{
|
191
|
+
CRRuleSet *ruleset ;
|
192
|
+
CRAtImportRule *import_rule ;
|
193
|
+
CRAtMediaRule *media_rule ;
|
194
|
+
CRAtPageRule *page_rule ;
|
195
|
+
CRAtCharsetRule *charset_rule ;
|
196
|
+
CRAtFontFaceRule *font_face_rule ;
|
197
|
+
} kind ;
|
198
|
+
|
199
|
+
/*
|
200
|
+
*the specificity of the selector
|
201
|
+
*that matched this statement.
|
202
|
+
*This is only used by the cascading
|
203
|
+
*order determination algorithm.
|
204
|
+
*/
|
205
|
+
gulong specificity ;
|
206
|
+
|
207
|
+
/*
|
208
|
+
*the style sheet that contains
|
209
|
+
*this css statement.
|
210
|
+
*/
|
211
|
+
CRStyleSheet *parent_sheet ;
|
212
|
+
CRStatement *next ;
|
213
|
+
CRStatement *prev ;
|
214
|
+
|
215
|
+
CRParsingLocation location ;
|
216
|
+
|
217
|
+
/**
|
218
|
+
*a custom pointer useable by
|
219
|
+
*applications that use libcroco.
|
220
|
+
*libcroco itself will never modify
|
221
|
+
*this pointer.
|
222
|
+
*/
|
223
|
+
gpointer app_data ;
|
224
|
+
|
225
|
+
/**
|
226
|
+
*a custom pointer used
|
227
|
+
*by the upper layers of libcroco.
|
228
|
+
*application should never use this
|
229
|
+
*pointer.
|
230
|
+
*/
|
231
|
+
gpointer croco_data ;
|
232
|
+
|
233
|
+
} ;
|
234
|
+
|
235
|
+
|
236
|
+
gboolean
|
237
|
+
cr_statement_does_buf_parses_against_core (const guchar *a_buf,
|
238
|
+
enum CREncoding a_encoding) ;
|
239
|
+
CRStatement *
|
240
|
+
cr_statement_parse_from_buf (const guchar *a_buf,
|
241
|
+
enum CREncoding a_encoding) ;
|
242
|
+
CRStatement*
|
243
|
+
cr_statement_new_ruleset (CRStyleSheet *a_sheet,
|
244
|
+
CRSelector *a_sel_list,
|
245
|
+
CRDeclaration *a_decl_list,
|
246
|
+
CRStatement *a_media_rule) ;
|
247
|
+
CRStatement *
|
248
|
+
cr_statement_ruleset_parse_from_buf (const guchar * a_buf,
|
249
|
+
enum CREncoding a_enc) ;
|
250
|
+
|
251
|
+
CRStatement*
|
252
|
+
cr_statement_new_at_import_rule (CRStyleSheet *a_container_sheet,
|
253
|
+
CRString *a_url,
|
254
|
+
GList *a_media_list,
|
255
|
+
CRStyleSheet *a_imported_sheet) ;
|
256
|
+
|
257
|
+
CRStatement *
|
258
|
+
cr_statement_at_import_rule_parse_from_buf (const guchar * a_buf,
|
259
|
+
enum CREncoding a_encoding) ;
|
260
|
+
|
261
|
+
CRStatement *
|
262
|
+
cr_statement_new_at_media_rule (CRStyleSheet *a_sheet,
|
263
|
+
CRStatement *a_ruleset,
|
264
|
+
GList *a_media) ;
|
265
|
+
CRStatement *
|
266
|
+
cr_statement_at_media_rule_parse_from_buf (const guchar *a_buf,
|
267
|
+
enum CREncoding a_enc) ;
|
268
|
+
|
269
|
+
CRStatement *
|
270
|
+
cr_statement_new_at_charset_rule (CRStyleSheet *a_sheet,
|
271
|
+
CRString *a_charset) ;
|
272
|
+
CRStatement *
|
273
|
+
cr_statement_at_charset_rule_parse_from_buf (const guchar *a_buf,
|
274
|
+
enum CREncoding a_encoding);
|
275
|
+
|
276
|
+
|
277
|
+
CRStatement *
|
278
|
+
cr_statement_new_at_font_face_rule (CRStyleSheet *a_sheet,
|
279
|
+
CRDeclaration *a_font_decls) ;
|
280
|
+
CRStatement *
|
281
|
+
cr_statement_font_face_rule_parse_from_buf (const guchar *a_buf,
|
282
|
+
enum CREncoding a_encoding) ;
|
283
|
+
|
284
|
+
CRStatement *
|
285
|
+
cr_statement_new_at_page_rule (CRStyleSheet *a_sheet,
|
286
|
+
CRDeclaration *a_decl_list,
|
287
|
+
CRString *a_name,
|
288
|
+
CRString *a_pseudo) ;
|
289
|
+
CRStatement *
|
290
|
+
cr_statement_at_page_rule_parse_from_buf (const guchar *a_buf,
|
291
|
+
enum CREncoding a_encoding) ;
|
292
|
+
|
293
|
+
enum CRStatus
|
294
|
+
cr_statement_set_parent_sheet (CRStatement *a_this,
|
295
|
+
CRStyleSheet *a_sheet) ;
|
296
|
+
|
297
|
+
enum CRStatus
|
298
|
+
cr_statement_get_parent_sheet (CRStatement *a_this,
|
299
|
+
CRStyleSheet **a_sheet) ;
|
300
|
+
|
301
|
+
CRStatement *
|
302
|
+
cr_statement_append (CRStatement *a_this,
|
303
|
+
CRStatement *a_new) ;
|
304
|
+
|
305
|
+
CRStatement*
|
306
|
+
cr_statement_prepend (CRStatement *a_this,
|
307
|
+
CRStatement *a_new) ;
|
308
|
+
|
309
|
+
CRStatement *
|
310
|
+
cr_statement_unlink (CRStatement *a_stmt) ;
|
311
|
+
|
312
|
+
enum CRStatus
|
313
|
+
cr_statement_ruleset_set_sel_list (CRStatement *a_this,
|
314
|
+
CRSelector *a_sel_list) ;
|
315
|
+
|
316
|
+
enum CRStatus
|
317
|
+
cr_statement_ruleset_get_sel_list (CRStatement const *a_this,
|
318
|
+
CRSelector **a_list) ;
|
319
|
+
|
320
|
+
enum CRStatus
|
321
|
+
cr_statement_ruleset_set_decl_list (CRStatement *a_this,
|
322
|
+
CRDeclaration *a_list) ;
|
323
|
+
|
324
|
+
enum CRStatus
|
325
|
+
cr_statement_ruleset_get_declarations (CRStatement *a_this,
|
326
|
+
CRDeclaration **a_decl_list) ;
|
327
|
+
|
328
|
+
enum CRStatus
|
329
|
+
cr_statement_ruleset_append_decl2 (CRStatement *a_this,
|
330
|
+
CRString *a_prop, CRTerm *a_value) ;
|
331
|
+
|
332
|
+
enum CRStatus
|
333
|
+
cr_statement_ruleset_append_decl (CRStatement *a_this,
|
334
|
+
CRDeclaration *a_decl) ;
|
335
|
+
|
336
|
+
enum CRStatus
|
337
|
+
cr_statement_at_import_rule_set_imported_sheet (CRStatement *a_this,
|
338
|
+
CRStyleSheet *a_sheet) ;
|
339
|
+
|
340
|
+
enum CRStatus
|
341
|
+
cr_statement_at_import_rule_get_imported_sheet (CRStatement *a_this,
|
342
|
+
CRStyleSheet **a_sheet) ;
|
343
|
+
|
344
|
+
enum CRStatus
|
345
|
+
cr_statement_at_import_rule_set_url (CRStatement *a_this,
|
346
|
+
CRString *a_url) ;
|
347
|
+
|
348
|
+
enum CRStatus
|
349
|
+
cr_statement_at_import_rule_get_url (CRStatement const *a_this,
|
350
|
+
CRString **a_url) ;
|
351
|
+
|
352
|
+
gint
|
353
|
+
cr_statement_at_media_nr_rules (CRStatement const *a_this) ;
|
354
|
+
|
355
|
+
CRStatement *
|
356
|
+
cr_statement_at_media_get_from_list (CRStatement *a_this, int itemnr) ;
|
357
|
+
|
358
|
+
enum CRStatus
|
359
|
+
cr_statement_at_page_rule_set_sel (CRStatement *a_this,
|
360
|
+
CRSelector *a_sel) ;
|
361
|
+
|
362
|
+
enum CRStatus
|
363
|
+
cr_statement_at_page_rule_get_sel (CRStatement const *a_this,
|
364
|
+
CRSelector **a_sel) ;
|
365
|
+
|
366
|
+
enum CRStatus
|
367
|
+
cr_statement_at_page_rule_set_declarations (CRStatement *a_this,
|
368
|
+
CRDeclaration *a_decl_list) ;
|
369
|
+
|
370
|
+
enum CRStatus
|
371
|
+
cr_statement_at_page_rule_get_declarations (CRStatement *a_this,
|
372
|
+
CRDeclaration **a_decl_list) ;
|
373
|
+
|
374
|
+
enum CRStatus
|
375
|
+
cr_statement_at_charset_rule_set_charset (CRStatement *a_this,
|
376
|
+
CRString *a_charset) ;
|
377
|
+
|
378
|
+
enum CRStatus
|
379
|
+
cr_statement_at_charset_rule_get_charset (CRStatement const *a_this,
|
380
|
+
CRString **a_charset) ;
|
381
|
+
|
382
|
+
enum CRStatus
|
383
|
+
cr_statement_at_font_face_rule_set_decls (CRStatement *a_this,
|
384
|
+
CRDeclaration *a_decls) ;
|
385
|
+
|
386
|
+
enum CRStatus
|
387
|
+
cr_statement_at_font_face_rule_get_decls (CRStatement *a_this,
|
388
|
+
CRDeclaration **a_decls) ;
|
389
|
+
|
390
|
+
enum CRStatus
|
391
|
+
cr_statement_at_font_face_rule_add_decl (CRStatement *a_this,
|
392
|
+
CRString *a_prop,
|
393
|
+
CRTerm *a_value) ;
|
394
|
+
|
395
|
+
gchar *
|
396
|
+
cr_statement_to_string (CRStatement const * a_this, gulong a_indent) ;
|
397
|
+
|
398
|
+
gchar*
|
399
|
+
cr_statement_list_to_string (CRStatement const *a_this, gulong a_indent) ;
|
400
|
+
|
401
|
+
void
|
402
|
+
cr_statement_dump (CRStatement const *a_this, FILE *a_fp, gulong a_indent) ;
|
403
|
+
|
404
|
+
void
|
405
|
+
cr_statement_dump_ruleset (CRStatement const * a_this, FILE * a_fp,
|
406
|
+
glong a_indent) ;
|
407
|
+
|
408
|
+
void
|
409
|
+
cr_statement_dump_font_face_rule (CRStatement const * a_this,
|
410
|
+
FILE * a_fp,
|
411
|
+
glong a_indent) ;
|
412
|
+
|
413
|
+
void
|
414
|
+
cr_statement_dump_page (CRStatement const * a_this, FILE * a_fp,
|
415
|
+
gulong a_indent) ;
|
416
|
+
|
417
|
+
|
418
|
+
void
|
419
|
+
cr_statement_dump_media_rule (CRStatement const * a_this,
|
420
|
+
FILE * a_fp,
|
421
|
+
gulong a_indent) ;
|
422
|
+
|
423
|
+
void
|
424
|
+
cr_statement_dump_import_rule (CRStatement const * a_this, FILE * a_fp,
|
425
|
+
gulong a_indent) ;
|
426
|
+
void
|
427
|
+
cr_statement_dump_charset (CRStatement const * a_this, FILE * a_fp,
|
428
|
+
gulong a_indent) ;
|
429
|
+
gint
|
430
|
+
cr_statement_nr_rules (CRStatement const *a_this) ;
|
431
|
+
|
432
|
+
CRStatement *
|
433
|
+
cr_statement_get_from_list (CRStatement *a_this, int itemnr) ;
|
434
|
+
|
435
|
+
void
|
436
|
+
cr_statement_destroy (CRStatement *a_this) ;
|
437
|
+
|
438
|
+
G_END_DECLS
|
439
|
+
|
440
|
+
#endif /*__CR_STATEMENT_H__*/
|
@@ -0,0 +1,76 @@
|
|
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 COPYRIGHTS file for copyright information.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
*@file
|
25
|
+
*Declaration file of the #CRString class.
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef __CR_STRING_H__
|
29
|
+
#define __CR_STRING_H__
|
30
|
+
|
31
|
+
#include <glib.h>
|
32
|
+
#include "cr-utils.h"
|
33
|
+
#include "cr-parsing-location.h"
|
34
|
+
|
35
|
+
G_BEGIN_DECLS
|
36
|
+
|
37
|
+
typedef struct _CRString CRString ;
|
38
|
+
|
39
|
+
/**
|
40
|
+
*This is a ship implementation of string based on GString.
|
41
|
+
*Actually, the aim of CRString is to store the parsing location
|
42
|
+
*(line,column,byte offset) at which a given string has been parsed
|
43
|
+
*in the input CSS.
|
44
|
+
*So this class has a gstring field of type GString that users can
|
45
|
+
*freely manipulate, and also a CRParginLocation type where the
|
46
|
+
*parsing location is store. If you don't want to deal with parsing
|
47
|
+
*location stuffs, then use GString instead. If we were in C++ for example,
|
48
|
+
*CRString would just inherit GString and just add accessors to
|
49
|
+
*the CRParsingLocation data ... but we are not and we still have
|
50
|
+
*to provide the parsing location information.
|
51
|
+
*/
|
52
|
+
struct _CRString {
|
53
|
+
/**
|
54
|
+
*The GString where all the string
|
55
|
+
*operation happen.
|
56
|
+
*/
|
57
|
+
GString *stryng ;
|
58
|
+
/**
|
59
|
+
*The parsing location storage area.
|
60
|
+
*/
|
61
|
+
CRParsingLocation location ;
|
62
|
+
} ;
|
63
|
+
|
64
|
+
CRString * cr_string_new (void) ;
|
65
|
+
|
66
|
+
CRString *cr_string_new_from_string (const gchar * a_string) ;
|
67
|
+
CRString * cr_string_new_from_gstring (GString const *a_string) ;
|
68
|
+
CRString *cr_string_dup (CRString const *a_this) ;
|
69
|
+
gchar *cr_string_dup2 (CRString const *a_this) ;
|
70
|
+
const gchar *cr_string_peek_raw_str (CRString const *a_this) ;
|
71
|
+
gint cr_string_peek_raw_str_len (CRString const *a_this) ;
|
72
|
+
void cr_string_destroy (CRString *a_this) ;
|
73
|
+
|
74
|
+
G_END_DECLS
|
75
|
+
|
76
|
+
#endif
|