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,339 @@
|
|
1
|
+
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
|
2
|
+
|
3
|
+
/*
|
4
|
+
* This file is part of The Croco Library
|
5
|
+
*
|
6
|
+
*
|
7
|
+
* This program is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of version 2.1 of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
* GNU General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
19
|
+
* USA
|
20
|
+
*
|
21
|
+
* Author: Dodji Seketeli.
|
22
|
+
* See COPYRIGHTS file for copyright information.
|
23
|
+
*/
|
24
|
+
|
25
|
+
#ifndef __CR_STYLE_H__
|
26
|
+
#define __CR_STYLE_H__
|
27
|
+
|
28
|
+
#include "cr-utils.h"
|
29
|
+
#include "cr-statement.h"
|
30
|
+
#include "cr-fonts.h"
|
31
|
+
|
32
|
+
/**
|
33
|
+
*@file
|
34
|
+
*The declaration of the #CRStyle class.
|
35
|
+
*/
|
36
|
+
G_BEGIN_DECLS
|
37
|
+
|
38
|
+
typedef struct _CRStyle CRStyle ;
|
39
|
+
|
40
|
+
enum CRBorderStyle
|
41
|
+
{
|
42
|
+
BORDER_STYLE_NONE = 0,
|
43
|
+
BORDER_STYLE_HIDDEN,
|
44
|
+
BORDER_STYLE_DOTTED,
|
45
|
+
BORDER_STYLE_DASHED,
|
46
|
+
BORDER_STYLE_SOLID,
|
47
|
+
BORDER_STYLE_DOUBLE,
|
48
|
+
BORDER_STYLE_GROOVE,
|
49
|
+
BORDER_STYLE_RIDGE,
|
50
|
+
BORDER_STYLE_INSET,
|
51
|
+
BORDER_STYLE_OUTSET,
|
52
|
+
BORDER_STYLE_INHERIT
|
53
|
+
} ;
|
54
|
+
|
55
|
+
enum CRDisplayType
|
56
|
+
{
|
57
|
+
DISPLAY_NONE,
|
58
|
+
DISPLAY_INLINE,
|
59
|
+
DISPLAY_BLOCK,
|
60
|
+
DISPLAY_LIST_ITEM,
|
61
|
+
DISPLAY_RUN_IN,
|
62
|
+
DISPLAY_COMPACT,
|
63
|
+
DISPLAY_MARKER,
|
64
|
+
DISPLAY_TABLE,
|
65
|
+
DISPLAY_INLINE_TABLE,
|
66
|
+
DISPLAY_TABLE_ROW_GROUP,
|
67
|
+
DISPLAY_TABLE_HEADER_GROUP,
|
68
|
+
DISPLAY_TABLE_FOOTER_GROUP,
|
69
|
+
DISPLAY_TABLE_ROW,
|
70
|
+
DISPLAY_TABLE_COLUMN_GROUP,
|
71
|
+
DISPLAY_TABLE_COLUMN,
|
72
|
+
DISPLAY_TABLE_CELL,
|
73
|
+
DISPLAY_TABLE_CAPTION,
|
74
|
+
DISPLAY_INHERIT
|
75
|
+
} ;
|
76
|
+
|
77
|
+
enum CRPositionType
|
78
|
+
{
|
79
|
+
POSITION_STATIC,
|
80
|
+
POSITION_RELATIVE,
|
81
|
+
POSITION_ABSOLUTE,
|
82
|
+
POSITION_FIXED,
|
83
|
+
POSITION_INHERIT
|
84
|
+
} ;
|
85
|
+
|
86
|
+
enum CRFloatType
|
87
|
+
{
|
88
|
+
FLOAT_NONE,
|
89
|
+
FLOAT_LEFT,
|
90
|
+
FLOAT_RIGHT,
|
91
|
+
FLOAT_INHERIT
|
92
|
+
} ;
|
93
|
+
|
94
|
+
enum CRWhiteSpaceType
|
95
|
+
{
|
96
|
+
WHITE_SPACE_NORMAL,
|
97
|
+
WHITE_SPACE_PRE,
|
98
|
+
WHITE_SPACE_NOWRAP,
|
99
|
+
WHITE_SPACE_INHERIT
|
100
|
+
} ;
|
101
|
+
|
102
|
+
|
103
|
+
#define BORDER_THIN 2
|
104
|
+
#define BORDER_MEDIUM 4
|
105
|
+
#define BORDER_THICK 6
|
106
|
+
|
107
|
+
|
108
|
+
/**
|
109
|
+
*A numerical css property value.
|
110
|
+
*This data type is actually split in 3 parts:
|
111
|
+
*1/the specified value
|
112
|
+
*2/the computed value
|
113
|
+
*3/the actual value.
|
114
|
+
*To understand the semantic of these three parts,
|
115
|
+
*see css2 spec chap 6.1 ("Specified, computed and actual values.").
|
116
|
+
*/
|
117
|
+
typedef struct _CRNumPropVal CRNumPropVal ;
|
118
|
+
struct _CRNumPropVal
|
119
|
+
{
|
120
|
+
/**specified value*/
|
121
|
+
CRNum sv ;
|
122
|
+
/**computed value*/
|
123
|
+
CRNum cv ;
|
124
|
+
/**actual value*/
|
125
|
+
CRNum av ;
|
126
|
+
} ;
|
127
|
+
|
128
|
+
/**
|
129
|
+
*An rgb css property value.
|
130
|
+
*This data type is actually split in 3 parts:
|
131
|
+
*1/the specified value
|
132
|
+
*2/the computed value
|
133
|
+
*3/the actual value.
|
134
|
+
*To understand the semantic of these three parts,
|
135
|
+
*see css2 spec chap 6.1 ("Specified, computed and actual values.").
|
136
|
+
*/
|
137
|
+
typedef struct _CRRgbPropVal CRRgbPropVal ;
|
138
|
+
struct _CRRgbPropVal
|
139
|
+
{
|
140
|
+
/**specified value*/
|
141
|
+
CRRgb sv ;
|
142
|
+
/**computed value*/
|
143
|
+
CRRgb cv ;
|
144
|
+
/**actual value*/
|
145
|
+
CRRgb av ;
|
146
|
+
} ;
|
147
|
+
|
148
|
+
|
149
|
+
enum CRNumProp
|
150
|
+
{
|
151
|
+
NUM_PROP_TOP=0,
|
152
|
+
NUM_PROP_RIGHT,
|
153
|
+
NUM_PROP_BOTTOM,
|
154
|
+
NUM_PROP_LEFT,/*3*/
|
155
|
+
|
156
|
+
NUM_PROP_PADDING_TOP,
|
157
|
+
NUM_PROP_PADDING_RIGHT,
|
158
|
+
NUM_PROP_PADDING_BOTTOM,
|
159
|
+
NUM_PROP_PADDING_LEFT,/*7*/
|
160
|
+
|
161
|
+
NUM_PROP_BORDER_TOP,
|
162
|
+
NUM_PROP_BORDER_RIGHT,
|
163
|
+
NUM_PROP_BORDER_BOTTOM,
|
164
|
+
NUM_PROP_BORDER_LEFT,/*11*/
|
165
|
+
|
166
|
+
NUM_PROP_MARGIN_TOP,
|
167
|
+
NUM_PROP_MARGIN_RIGHT,
|
168
|
+
NUM_PROP_MARGIN_BOTTOM,
|
169
|
+
NUM_PROP_MARGIN_LEFT,/*15*/
|
170
|
+
|
171
|
+
NUM_PROP_WIDTH,
|
172
|
+
|
173
|
+
/*must be last*/
|
174
|
+
NB_NUM_PROPS
|
175
|
+
} ;
|
176
|
+
|
177
|
+
enum CRRgbProp
|
178
|
+
{
|
179
|
+
RGB_PROP_BORDER_TOP_COLOR = 0,
|
180
|
+
RGB_PROP_BORDER_RIGHT_COLOR,
|
181
|
+
RGB_PROP_BORDER_BOTTOM_COLOR,
|
182
|
+
RGB_PROP_BORDER_LEFT_COLOR,
|
183
|
+
RGB_PROP_COLOR,
|
184
|
+
RGB_PROP_BACKGROUND_COLOR,
|
185
|
+
|
186
|
+
/*must be last*/
|
187
|
+
NB_RGB_PROPS
|
188
|
+
} ;
|
189
|
+
|
190
|
+
|
191
|
+
enum CRBorderStyleProp
|
192
|
+
{
|
193
|
+
BORDER_STYLE_PROP_TOP = 0,
|
194
|
+
BORDER_STYLE_PROP_RIGHT,
|
195
|
+
BORDER_STYLE_PROP_BOTTOM,
|
196
|
+
BORDER_STYLE_PROP_LEFT,
|
197
|
+
|
198
|
+
/*must be last*/
|
199
|
+
NB_BORDER_STYLE_PROPS
|
200
|
+
} ;
|
201
|
+
|
202
|
+
enum CRBoxOffsetProp
|
203
|
+
{
|
204
|
+
BOX_OFFSET_PROP_TOP = 0,
|
205
|
+
BOX_OFFSET_PROP_RIGHT,
|
206
|
+
BOX_OFFSET_PROP_BOTTOM,
|
207
|
+
BOX_OFFSET_PROP_LEFT,
|
208
|
+
|
209
|
+
/*must be last*/
|
210
|
+
NB_BOX_OFFSET_PROPS
|
211
|
+
} ;
|
212
|
+
|
213
|
+
typedef struct _CRFontSizeVal CRFontSizeVal ;
|
214
|
+
struct _CRFontSizeVal {
|
215
|
+
/*specified value*/
|
216
|
+
CRFontSize sv ;
|
217
|
+
/*computed value*/
|
218
|
+
CRFontSize cv ;
|
219
|
+
/*actual value*/
|
220
|
+
CRFontSize av ;
|
221
|
+
} ;
|
222
|
+
|
223
|
+
/**
|
224
|
+
*The css2 style class.
|
225
|
+
*Contains computed and actual values
|
226
|
+
*inferred from the declarations found
|
227
|
+
*in the stylesheets.
|
228
|
+
*See css2 spec chapter 6.
|
229
|
+
*/
|
230
|
+
struct _CRStyle
|
231
|
+
{
|
232
|
+
/**
|
233
|
+
*numerical properties.
|
234
|
+
*the properties are indexed by
|
235
|
+
*enum #CRNumProp.
|
236
|
+
*/
|
237
|
+
CRNumPropVal num_props[NB_NUM_PROPS] ;
|
238
|
+
|
239
|
+
/**
|
240
|
+
*color properties.
|
241
|
+
*They are indexed by enum #CRRgbProp .
|
242
|
+
*/
|
243
|
+
CRRgbPropVal rgb_props[NB_RGB_PROPS] ;
|
244
|
+
|
245
|
+
/**
|
246
|
+
*border style properties.
|
247
|
+
*They are indexed by enum #CRBorderStyleProp .
|
248
|
+
*/
|
249
|
+
enum CRBorderStyle border_style_props[NB_BORDER_STYLE_PROPS] ;
|
250
|
+
|
251
|
+
/**box display type*/
|
252
|
+
enum CRDisplayType display ;
|
253
|
+
|
254
|
+
/**the positioning scheme*/
|
255
|
+
enum CRPositionType position ;
|
256
|
+
|
257
|
+
/**the float property*/
|
258
|
+
enum CRFloatType float_type ;
|
259
|
+
|
260
|
+
/*
|
261
|
+
*the 'font-family' property.
|
262
|
+
*/
|
263
|
+
CRFontFamily *font_family ;
|
264
|
+
|
265
|
+
/**
|
266
|
+
*the 'font-size' property.
|
267
|
+
*/
|
268
|
+
CRFontSizeVal font_size ;
|
269
|
+
CRFontSizeAdjust *font_size_adjust ;
|
270
|
+
enum CRFontStyle font_style ;
|
271
|
+
enum CRFontVariant font_variant ;
|
272
|
+
enum CRFontWeight font_weight ;
|
273
|
+
enum CRFontStretch font_stretch ;
|
274
|
+
|
275
|
+
/**
|
276
|
+
* the 'tex' properties
|
277
|
+
*/
|
278
|
+
enum CRWhiteSpaceType white_space;
|
279
|
+
|
280
|
+
gboolean inherited_props_resolved ;
|
281
|
+
CRStyle *parent_style ;
|
282
|
+
gulong ref_count ;
|
283
|
+
} ;
|
284
|
+
|
285
|
+
enum CRStatus cr_style_white_space_type_to_string (enum CRWhiteSpaceType a_code,
|
286
|
+
GString * a_str, guint a_nb_indent) ;
|
287
|
+
|
288
|
+
enum CRStatus cr_style_num_prop_val_to_string (CRNumPropVal *a_prop_val,
|
289
|
+
GString *a_str,
|
290
|
+
guint a_nb_indent) ;
|
291
|
+
|
292
|
+
enum CRStatus cr_style_rgb_prop_val_to_string (CRRgbPropVal *a_prop_val,
|
293
|
+
GString *a_str,
|
294
|
+
guint a_nb_indent) ;
|
295
|
+
|
296
|
+
enum CRStatus cr_style_border_style_to_string (enum CRBorderStyle a_prop,
|
297
|
+
GString *a_str,
|
298
|
+
guint a_nb_indent) ;
|
299
|
+
|
300
|
+
enum CRStatus cr_style_display_type_to_string (enum CRDisplayType a_code,
|
301
|
+
GString *a_str,
|
302
|
+
guint a_nb_indent) ;
|
303
|
+
|
304
|
+
enum CRStatus cr_style_position_type_to_string (enum CRPositionType a_code,
|
305
|
+
GString *a_str,
|
306
|
+
guint a_nb_indent) ;
|
307
|
+
|
308
|
+
enum CRStatus cr_style_float_type_to_string (enum CRFloatType a_code,
|
309
|
+
GString *a_str,
|
310
|
+
guint a_nb_indent) ;
|
311
|
+
|
312
|
+
CRStyle * cr_style_new (gboolean a_set_props_to_initial_values) ;
|
313
|
+
|
314
|
+
enum CRStatus cr_style_set_props_to_default_values (CRStyle *a_this) ;
|
315
|
+
enum CRStatus cr_style_set_props_to_initial_values (CRStyle *a_this) ;
|
316
|
+
enum CRStatus cr_style_resolve_inherited_properties (CRStyle *a_this) ;
|
317
|
+
enum CRStatus cr_style_propagate_from_parent (CRStyle *a_this);
|
318
|
+
|
319
|
+
enum CRStatus cr_style_set_style_from_decl (CRStyle *a_this,
|
320
|
+
CRDeclaration *a_decl) ;
|
321
|
+
|
322
|
+
|
323
|
+
enum CRStatus cr_style_copy (CRStyle *a_dest, CRStyle *a_src) ;
|
324
|
+
|
325
|
+
enum CRStatus cr_style_ref (CRStyle *a_this) ;
|
326
|
+
|
327
|
+
gboolean cr_style_unref (CRStyle *a_this) ;
|
328
|
+
|
329
|
+
void cr_style_destroy (CRStyle *a_this) ;
|
330
|
+
|
331
|
+
CRStyle * cr_style_dup (CRStyle *a_this) ;
|
332
|
+
|
333
|
+
enum CRStatus cr_style_to_string (CRStyle *a_this,
|
334
|
+
GString **a_str,
|
335
|
+
guint a_nb_indent) ;
|
336
|
+
|
337
|
+
G_END_DECLS
|
338
|
+
|
339
|
+
#endif /*__CR_STYLE_H__*/
|
@@ -0,0 +1,102 @@
|
|
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
|
+
#ifndef __CR_STYLESHEET_H__
|
25
|
+
#define __CR_STYLESHEET_H__
|
26
|
+
|
27
|
+
#include "cr-utils.h"
|
28
|
+
#include "cr-statement.h"
|
29
|
+
|
30
|
+
G_BEGIN_DECLS
|
31
|
+
|
32
|
+
/**
|
33
|
+
*@file
|
34
|
+
*The declaration of the #CRStyleSheet class.
|
35
|
+
*/
|
36
|
+
|
37
|
+
|
38
|
+
enum CRStyleOrigin
|
39
|
+
{
|
40
|
+
/*Please don't change the order of
|
41
|
+
*the values enumerated here ...
|
42
|
+
*New values should be added at the end,
|
43
|
+
*just before ORIGIN_END.
|
44
|
+
*/
|
45
|
+
ORIGIN_UA = 0,
|
46
|
+
ORIGIN_USER,
|
47
|
+
ORIGIN_AUTHOR,
|
48
|
+
|
49
|
+
/*must always be the last one*/
|
50
|
+
NB_ORIGINS
|
51
|
+
} ;
|
52
|
+
|
53
|
+
/**
|
54
|
+
*An abstraction of a css stylesheet as defined
|
55
|
+
*by the css2 spec in chapter 4.
|
56
|
+
*/
|
57
|
+
struct _CRStyleSheet
|
58
|
+
{
|
59
|
+
/**The css statements list*/
|
60
|
+
CRStatement *statements ;
|
61
|
+
|
62
|
+
enum CRStyleOrigin origin ;
|
63
|
+
|
64
|
+
/*the parent import rule, if any.*/
|
65
|
+
CRStatement *parent_import_rule ;
|
66
|
+
|
67
|
+
/**custom data used by libcroco*/
|
68
|
+
gpointer croco_data ;
|
69
|
+
|
70
|
+
/**
|
71
|
+
*custom application data pointer
|
72
|
+
*Can be used by applications.
|
73
|
+
*/
|
74
|
+
gpointer app_data ;
|
75
|
+
|
76
|
+
/**
|
77
|
+
*the reference count of this insance
|
78
|
+
*Please, don't never ever modify it
|
79
|
+
*directly. Use cr_stylesheet_ref()
|
80
|
+
*and cr_stylesheet_unref() instead.
|
81
|
+
*/
|
82
|
+
gulong ref_count ;
|
83
|
+
} ;
|
84
|
+
|
85
|
+
CRStyleSheet * cr_stylesheet_new (CRStatement *a_stmts) ;
|
86
|
+
|
87
|
+
gchar * cr_stylesheet_to_string (CRStyleSheet const *a_this) ;
|
88
|
+
void cr_stylesheet_dump (CRStyleSheet const *a_this, FILE *a_fp) ;
|
89
|
+
|
90
|
+
gint cr_stylesheet_nr_rules (CRStyleSheet const *a_this) ;
|
91
|
+
|
92
|
+
CRStatement * cr_stylesheet_statement_get_from_list (CRStyleSheet *a_this, int itemnr) ;
|
93
|
+
|
94
|
+
void cr_stylesheet_ref (CRStyleSheet *a_this) ;
|
95
|
+
|
96
|
+
gboolean cr_stylesheet_unref (CRStyleSheet *a_this) ;
|
97
|
+
|
98
|
+
void cr_stylesheet_destroy (CRStyleSheet *a_this) ;
|
99
|
+
|
100
|
+
G_END_DECLS
|
101
|
+
|
102
|
+
#endif /*__CR_STYLESHEET_H__*/
|
@@ -0,0 +1,190 @@
|
|
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 <glib.h>
|
26
|
+
#include "cr-utils.h"
|
27
|
+
#include "cr-rgb.h"
|
28
|
+
#include "cr-num.h"
|
29
|
+
#include "cr-string.h"
|
30
|
+
|
31
|
+
#ifndef __CR_TERM_H__
|
32
|
+
#define __CR_TERM_H__
|
33
|
+
|
34
|
+
G_BEGIN_DECLS
|
35
|
+
|
36
|
+
/**
|
37
|
+
*@file
|
38
|
+
*Declaration of the #CRTem class.
|
39
|
+
*/
|
40
|
+
|
41
|
+
enum CRTermType
|
42
|
+
{
|
43
|
+
TERM_NO_TYPE = 0,
|
44
|
+
TERM_NUMBER,
|
45
|
+
TERM_FUNCTION,
|
46
|
+
TERM_STRING,
|
47
|
+
TERM_IDENT,
|
48
|
+
TERM_URI,
|
49
|
+
TERM_RGB,
|
50
|
+
TERM_UNICODERANGE,
|
51
|
+
TERM_HASH
|
52
|
+
} ;
|
53
|
+
|
54
|
+
|
55
|
+
enum UnaryOperator
|
56
|
+
{
|
57
|
+
NO_UNARY_UOP = 0,
|
58
|
+
PLUS_UOP,
|
59
|
+
MINUS_UOP,
|
60
|
+
EMPTY_UNARY_UOP
|
61
|
+
} ;
|
62
|
+
|
63
|
+
enum Operator
|
64
|
+
{
|
65
|
+
NO_OP = 0,
|
66
|
+
DIVIDE,
|
67
|
+
COMMA
|
68
|
+
} ;
|
69
|
+
|
70
|
+
struct _CRTerm ;
|
71
|
+
typedef struct _CRTerm CRTerm ;
|
72
|
+
|
73
|
+
/**
|
74
|
+
*An abstraction of a css2 term as
|
75
|
+
*defined in the CSS2 spec in appendix D.1:
|
76
|
+
*term ::=
|
77
|
+
*[ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S*
|
78
|
+
*| ANGLE S* | TIME S* | FREQ S* | function ]
|
79
|
+
* | STRING S* | IDENT S* | URI S* | RGB S*
|
80
|
+
*| UNICODERANGE S* | hexcolor
|
81
|
+
*/
|
82
|
+
struct _CRTerm
|
83
|
+
{
|
84
|
+
/**
|
85
|
+
*The type of the term.
|
86
|
+
*/
|
87
|
+
enum CRTermType type ;
|
88
|
+
|
89
|
+
/**
|
90
|
+
*The unary operator associated to
|
91
|
+
*the current term.
|
92
|
+
*/
|
93
|
+
enum UnaryOperator unary_op ;
|
94
|
+
|
95
|
+
/**
|
96
|
+
*The operator associated to the current term.
|
97
|
+
*/
|
98
|
+
enum Operator the_operator ;
|
99
|
+
|
100
|
+
|
101
|
+
/**
|
102
|
+
*The content of the term.
|
103
|
+
*Depending of the type of the term,
|
104
|
+
*this holds either a number, a percentage ...
|
105
|
+
*/
|
106
|
+
union
|
107
|
+
{
|
108
|
+
CRNum *num ;
|
109
|
+
CRString * str ;
|
110
|
+
CRRgb * rgb ;
|
111
|
+
} content ;
|
112
|
+
|
113
|
+
/**
|
114
|
+
*If the term is of type UNICODERANGE,
|
115
|
+
*this field holds the upper bound of the range.
|
116
|
+
*if the term is of type FUNCTION, this holds
|
117
|
+
*an instance of CRTerm that represents
|
118
|
+
* the expression which is the argument of the function.
|
119
|
+
*/
|
120
|
+
union
|
121
|
+
{
|
122
|
+
CRTerm *func_param ;
|
123
|
+
} ext_content ;
|
124
|
+
|
125
|
+
/**
|
126
|
+
*A spare pointer, just in case.
|
127
|
+
*Can be used by the application.
|
128
|
+
*/
|
129
|
+
gpointer app_data ;
|
130
|
+
|
131
|
+
glong ref_count ;
|
132
|
+
|
133
|
+
/**
|
134
|
+
*A pointer to the next term,
|
135
|
+
*just in case this term is part of
|
136
|
+
*an expression.
|
137
|
+
*/
|
138
|
+
CRTerm *next ;
|
139
|
+
|
140
|
+
/**
|
141
|
+
*A pointer to the previous
|
142
|
+
*term.
|
143
|
+
*/
|
144
|
+
CRTerm *prev ;
|
145
|
+
CRParsingLocation location ;
|
146
|
+
} ;
|
147
|
+
|
148
|
+
CRTerm * cr_term_parse_expression_from_buf (const guchar *a_buf,
|
149
|
+
enum CREncoding a_encoding) ;
|
150
|
+
CRTerm * cr_term_new (void) ;
|
151
|
+
|
152
|
+
enum CRStatus cr_term_set_number (CRTerm *a_this, CRNum *a_num) ;
|
153
|
+
|
154
|
+
enum CRStatus cr_term_set_function (CRTerm *a_this,
|
155
|
+
CRString *a_func_name,
|
156
|
+
CRTerm *a_func_param) ;
|
157
|
+
|
158
|
+
enum CRStatus cr_term_set_string (CRTerm *a_this, CRString *a_str) ;
|
159
|
+
|
160
|
+
enum CRStatus cr_term_set_ident (CRTerm *a_this, CRString *a_str) ;
|
161
|
+
|
162
|
+
enum CRStatus cr_term_set_uri (CRTerm *a_this, CRString *a_str) ;
|
163
|
+
|
164
|
+
enum CRStatus cr_term_set_rgb (CRTerm *a_this, CRRgb *a_rgb) ;
|
165
|
+
|
166
|
+
enum CRStatus cr_term_set_hash (CRTerm *a_this, CRString *a_str) ;
|
167
|
+
|
168
|
+
CRTerm * cr_term_append_term (CRTerm *a_this, CRTerm *a_new_term) ;
|
169
|
+
|
170
|
+
CRTerm * cr_term_prepend_term (CRTerm *a_this, CRTerm *a_new_term) ;
|
171
|
+
|
172
|
+
guchar * cr_term_to_string (CRTerm const *a_this) ;
|
173
|
+
|
174
|
+
guchar * cr_term_one_to_string (CRTerm const * a_this) ;
|
175
|
+
|
176
|
+
void cr_term_dump (CRTerm const *a_this, FILE *a_fp) ;
|
177
|
+
|
178
|
+
int cr_term_nr_values (CRTerm const *a_this) ;
|
179
|
+
|
180
|
+
CRTerm * cr_term_get_from_list (CRTerm *a_this, int itemnr) ;
|
181
|
+
|
182
|
+
void cr_term_ref (CRTerm *a_this) ;
|
183
|
+
|
184
|
+
gboolean cr_term_unref (CRTerm *a_this) ;
|
185
|
+
|
186
|
+
void cr_term_destroy (CRTerm * a_term) ;
|
187
|
+
|
188
|
+
G_END_DECLS
|
189
|
+
|
190
|
+
#endif /*__CR_TERM_H__*/
|