rsvg2 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +7 -0
  2. data/README +35 -0
  3. data/Rakefile +69 -0
  4. data/ext/rsvg2/depend +6 -0
  5. data/ext/rsvg2/extconf.rb +89 -0
  6. data/ext/rsvg2/rbrsvg.c +206 -0
  7. data/ext/rsvg2/rbrsvgdimensiondata.c +194 -0
  8. data/ext/rsvg2/rbrsvghandle.c +496 -0
  9. data/ext/rsvg2/rsvg2.def +2 -0
  10. data/ext/rsvg2/rsvg2.h +70 -0
  11. data/extconf.rb +49 -0
  12. data/lib/2.0/rsvg2.so +0 -0
  13. data/lib/2.1/rsvg2.so +0 -0
  14. data/lib/2.2/rsvg2.so +0 -0
  15. data/lib/rsvg2.rb +33 -0
  16. data/sample/svg-viewer.rb +44 -0
  17. data/sample/svg2.rb +60 -0
  18. data/test/rsvg2-test-utils.rb +23 -0
  19. data/test/run-test.rb +49 -0
  20. data/test/test-handle.rb +91 -0
  21. data/vendor/local/bin/croco-0.6-config +87 -0
  22. data/vendor/local/bin/csslint-0.6.exe +0 -0
  23. data/vendor/local/bin/libcroco-0.6-3.dll +0 -0
  24. data/vendor/local/bin/librsvg-2-2.dll +0 -0
  25. data/vendor/local/bin/rsvg-convert.exe +0 -0
  26. data/vendor/local/include/libcroco-0.6/libcroco/cr-additional-sel.h +98 -0
  27. data/vendor/local/include/libcroco-0.6/libcroco/cr-attr-sel.h +74 -0
  28. data/vendor/local/include/libcroco-0.6/libcroco/cr-cascade.h +74 -0
  29. data/vendor/local/include/libcroco-0.6/libcroco/cr-declaration.h +136 -0
  30. data/vendor/local/include/libcroco-0.6/libcroco/cr-doc-handler.h +298 -0
  31. data/vendor/local/include/libcroco-0.6/libcroco/cr-enc-handler.h +94 -0
  32. data/vendor/local/include/libcroco-0.6/libcroco/cr-fonts.h +315 -0
  33. data/vendor/local/include/libcroco-0.6/libcroco/cr-input.h +174 -0
  34. data/vendor/local/include/libcroco-0.6/libcroco/cr-num.h +127 -0
  35. data/vendor/local/include/libcroco-0.6/libcroco/cr-om-parser.h +98 -0
  36. data/vendor/local/include/libcroco-0.6/libcroco/cr-parser.h +128 -0
  37. data/vendor/local/include/libcroco-0.6/libcroco/cr-parsing-location.h +70 -0
  38. data/vendor/local/include/libcroco-0.6/libcroco/cr-prop-list.h +80 -0
  39. data/vendor/local/include/libcroco-0.6/libcroco/cr-pseudo.h +64 -0
  40. data/vendor/local/include/libcroco-0.6/libcroco/cr-rgb.h +94 -0
  41. data/vendor/local/include/libcroco-0.6/libcroco/cr-sel-eng.h +110 -0
  42. data/vendor/local/include/libcroco-0.6/libcroco/cr-selector.h +95 -0
  43. data/vendor/local/include/libcroco-0.6/libcroco/cr-simple-sel.h +130 -0
  44. data/vendor/local/include/libcroco-0.6/libcroco/cr-statement.h +440 -0
  45. data/vendor/local/include/libcroco-0.6/libcroco/cr-string.h +76 -0
  46. data/vendor/local/include/libcroco-0.6/libcroco/cr-style.h +339 -0
  47. data/vendor/local/include/libcroco-0.6/libcroco/cr-stylesheet.h +102 -0
  48. data/vendor/local/include/libcroco-0.6/libcroco/cr-term.h +190 -0
  49. data/vendor/local/include/libcroco-0.6/libcroco/cr-tknzr.h +115 -0
  50. data/vendor/local/include/libcroco-0.6/libcroco/cr-token.h +212 -0
  51. data/vendor/local/include/libcroco-0.6/libcroco/cr-utils.h +246 -0
  52. data/vendor/local/include/libcroco-0.6/libcroco/libcroco-config.h +17 -0
  53. data/vendor/local/include/libcroco-0.6/libcroco/libcroco.h +44 -0
  54. data/vendor/local/include/librsvg-2.0/librsvg/librsvg-enum-types.h +24 -0
  55. data/vendor/local/include/librsvg-2.0/librsvg/librsvg-features.h +28 -0
  56. data/vendor/local/include/librsvg-2.0/librsvg/rsvg-cairo.h +42 -0
  57. data/vendor/local/include/librsvg-2.0/librsvg/rsvg.h +264 -0
  58. data/vendor/local/lib/girepository-1.0/Rsvg-2.0.typelib +0 -0
  59. data/vendor/local/lib/libcroco-0.6.a +0 -0
  60. data/vendor/local/lib/libcroco-0.6.dll.a +0 -0
  61. data/vendor/local/lib/libcroco-0.6.la +41 -0
  62. data/vendor/local/lib/librsvg-2.a +0 -0
  63. data/vendor/local/lib/librsvg-2.dll.a +0 -0
  64. data/vendor/local/lib/librsvg-2.la +41 -0
  65. data/vendor/local/lib/pkgconfig/libcroco-0.6.pc +11 -0
  66. data/vendor/local/lib/pkgconfig/librsvg-2.0.pc +15 -0
  67. data/vendor/local/share/gir-1.0/Rsvg-2.0.gir +754 -0
  68. data/vendor/local/share/gtk-doc/html/libcroco/ch01.html +113 -0
  69. data/vendor/local/share/gtk-doc/html/libcroco/home.png +0 -0
  70. data/vendor/local/share/gtk-doc/html/libcroco/index.html +109 -0
  71. data/vendor/local/share/gtk-doc/html/libcroco/index.sgml +582 -0
  72. data/vendor/local/share/gtk-doc/html/libcroco/left.png +0 -0
  73. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-additional-sel.html +337 -0
  74. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-attr-sel.html +203 -0
  75. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-cascade.html +240 -0
  76. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-declaration.html +642 -0
  77. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-doc-handler.html +517 -0
  78. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-enc-handler.html +164 -0
  79. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-fonts.html +670 -0
  80. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-input.html +1102 -0
  81. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-num.html +265 -0
  82. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-om-parser.html +380 -0
  83. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-parser.html +913 -0
  84. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-parsing-location.html +205 -0
  85. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-prop-list.html +421 -0
  86. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-pseudo.html +141 -0
  87. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-rgb.html +503 -0
  88. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-sel-eng.html +346 -0
  89. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-selector.html +246 -0
  90. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-simple-sel.html +240 -0
  91. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-statement.html +1408 -0
  92. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-string.html +137 -0
  93. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-style.html +384 -0
  94. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-stylesheet.html +158 -0
  95. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-term.html +304 -0
  96. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-tknzr.html +312 -0
  97. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-token.html +428 -0
  98. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-cr-utils.html +334 -0
  99. data/vendor/local/share/gtk-doc/html/libcroco/libcroco-libcroco-config.html +80 -0
  100. data/vendor/local/share/gtk-doc/html/libcroco/libcroco.devhelp2 +511 -0
  101. data/vendor/local/share/gtk-doc/html/libcroco/right.png +0 -0
  102. data/vendor/local/share/gtk-doc/html/libcroco/style.css +266 -0
  103. data/vendor/local/share/gtk-doc/html/libcroco/up.png +0 -0
  104. data/vendor/local/share/gtk-doc/html/rsvg-2.0/RsvgHandle.html +1420 -0
  105. data/vendor/local/share/gtk-doc/html/rsvg-2.0/annotation-glossary.html +55 -0
  106. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-14.html +55 -0
  107. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-22.html +43 -0
  108. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-32.html +47 -0
  109. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-36.html +46 -0
  110. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-4.html +39 -0
  111. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-8.html +54 -0
  112. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-9.html +53 -0
  113. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-deprecated.html +100 -0
  114. data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-full.html +323 -0
  115. data/vendor/local/share/gtk-doc/html/rsvg-2.0/home.png +0 -0
  116. data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.html +88 -0
  117. data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.sgml +106 -0
  118. data/vendor/local/share/gtk-doc/html/rsvg-2.0/left-insensitive.png +0 -0
  119. data/vendor/local/share/gtk-doc/html/rsvg-2.0/left.png +0 -0
  120. data/vendor/local/share/gtk-doc/html/rsvg-2.0/licence.html +57 -0
  121. data/vendor/local/share/gtk-doc/html/rsvg-2.0/object-tree.html +38 -0
  122. data/vendor/local/share/gtk-doc/html/rsvg-2.0/right-insensitive.png +0 -0
  123. data/vendor/local/share/gtk-doc/html/rsvg-2.0/right.png +0 -0
  124. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-2.0.devhelp2 +94 -0
  125. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html +360 -0
  126. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html +484 -0
  127. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html +154 -0
  128. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Version-check-and-feature-tests.html +142 -0
  129. data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg.html +57 -0
  130. data/vendor/local/share/gtk-doc/html/rsvg-2.0/style.css +476 -0
  131. data/vendor/local/share/gtk-doc/html/rsvg-2.0/up-insensitive.png +0 -0
  132. data/vendor/local/share/gtk-doc/html/rsvg-2.0/up.png +0 -0
  133. data/vendor/local/share/license/libcroco/AUTHORS +13 -0
  134. data/vendor/local/share/license/libcroco/COPYING +481 -0
  135. data/vendor/local/share/license/libcroco/COPYING.LIB +481 -0
  136. data/vendor/local/share/license/librsvg/AUTHORS +1 -0
  137. data/vendor/local/share/license/librsvg/COPYING +340 -0
  138. data/vendor/local/share/license/librsvg/COPYING.LIB +482 -0
  139. data/vendor/local/share/man/man1/rsvg-convert.1 +55 -0
  140. metadata +209 -0
@@ -0,0 +1,94 @@
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 GNU Lesser General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
+ * USA
21
+ */
22
+
23
+ /*
24
+ *$Id$
25
+ */
26
+
27
+ /**
28
+ *@file:
29
+ *The declaration of the #CREncHandler class.
30
+ *
31
+ */
32
+
33
+ #ifndef __CR_ENC_HANDLER_H__
34
+ #define __CR_ENC_HANDLER_H__
35
+
36
+ #include "cr-utils.h"
37
+
38
+ G_BEGIN_DECLS
39
+
40
+
41
+ typedef struct _CREncHandler CREncHandler ;
42
+
43
+ typedef enum CRStatus (*CREncInputFunc) (const guchar * a_in,
44
+ gulong *a_in_len,
45
+ guchar *a_out,
46
+ gulong *a_out_len) ;
47
+
48
+ typedef enum CRStatus (*CREncOutputFunc) (const guchar * a_in,
49
+ gulong *a_in_len,
50
+ guchar *a_out,
51
+ gulong *a_out_len) ;
52
+
53
+ typedef enum CRStatus (*CREncInputStrLenAsUtf8Func)
54
+ (const guchar *a_in_start,
55
+ const guchar *a_in_end,
56
+ gulong *a_in_size);
57
+
58
+ typedef enum CRStatus (*CREncUtf8StrLenAsOutputFunc)
59
+ (const guchar *a_in_start,
60
+ const guchar *a_in_end,
61
+ gulong *a_in_size) ;
62
+
63
+ /**
64
+ *This class is responsible of the
65
+ *the encoding conversions stuffs in
66
+ *libcroco.
67
+ */
68
+
69
+ struct _CREncHandler
70
+ {
71
+ enum CREncoding encoding ;
72
+ CREncInputFunc decode_input ;
73
+ CREncInputFunc encode_output ;
74
+ CREncInputStrLenAsUtf8Func enc_str_len_as_utf8 ;
75
+ CREncUtf8StrLenAsOutputFunc utf8_str_len_as_enc ;
76
+ } ;
77
+
78
+ CREncHandler *
79
+ cr_enc_handler_get_instance (enum CREncoding a_enc) ;
80
+
81
+ enum CRStatus
82
+ cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name,
83
+ enum CREncoding *a_enc) ;
84
+
85
+ enum CRStatus
86
+ cr_enc_handler_convert_input (CREncHandler *a_this,
87
+ const guchar *a_in,
88
+ gulong *a_in_len,
89
+ guchar **a_out,
90
+ gulong *a_out_len) ;
91
+
92
+ G_END_DECLS
93
+
94
+ #endif /*__CR_ENC_HANDLER_H__*/
@@ -0,0 +1,315 @@
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
8
+ * 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
17
+ * GNU Lesser General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
+ * USA
21
+ *
22
+ * Author: Dodji Seketeli
23
+ * See COPYRIGHTS file for copyright information.
24
+ */
25
+
26
+ #ifndef __CR_FONTS_H__
27
+ #define __CR_FONTS_H__
28
+
29
+ #include "cr-utils.h"
30
+ #include "cr-num.h"
31
+
32
+ /**
33
+ *@file
34
+ *Various type declarations about font selection related
35
+ *properties.
36
+ */
37
+ G_BEGIN_DECLS
38
+
39
+
40
+ enum CRFontFamilyType
41
+ {
42
+ FONT_FAMILY_SANS_SERIF,
43
+ FONT_FAMILY_SERIF,
44
+ FONT_FAMILY_CURSIVE,
45
+ FONT_FAMILY_FANTASY,
46
+ FONT_FAMILY_MONOSPACE,
47
+ FONT_FAMILY_NON_GENERIC,
48
+ FONT_FAMILY_INHERIT,
49
+ /**/
50
+ NB_FONT_FAMILIE_TYPES
51
+ } ;
52
+
53
+ typedef struct _CRFontFamily CRFontFamily ;
54
+
55
+ struct _CRFontFamily
56
+ {
57
+ enum CRFontFamilyType type ;
58
+
59
+ /*
60
+ *The name of the font family, in case
61
+ *it is non generic.
62
+ *Is set only if the type is FONT_FAMILY_NON_GENERIC.
63
+ */
64
+ guchar *name ;
65
+
66
+ CRFontFamily *next ;
67
+ CRFontFamily *prev ;
68
+ } ;
69
+
70
+
71
+ /**
72
+ *The different types
73
+ *of absolute font size.
74
+ *This is used by the 'font-size'
75
+ *property defined in css2 spec
76
+ *in chapter 15.2.4 .
77
+ *These values a indexes of
78
+ *table of size so please, do not
79
+ *change their definition order unless
80
+ *you know what you are doing.
81
+ */
82
+ enum CRPredefinedAbsoluteFontSize
83
+ {
84
+ FONT_SIZE_XX_SMALL=0,
85
+ FONT_SIZE_X_SMALL,
86
+ FONT_SIZE_SMALL,
87
+ FONT_SIZE_MEDIUM,
88
+ FONT_SIZE_LARGE,
89
+ FONT_SIZE_X_LARGE,
90
+ FONT_SIZE_XX_LARGE,
91
+ FONT_SIZE_INHERIT,
92
+ NB_PREDEFINED_ABSOLUTE_FONT_SIZES
93
+ } ;
94
+
95
+ /**
96
+ *The different types
97
+ *of relative font size.
98
+ *This is used by the 'font-size'
99
+ *property defined in css2 spec
100
+ *in chapter 15.2.4 .
101
+ *These values a indexes of
102
+ *table of size so please, do not
103
+ *change their definition order unless
104
+ *you know what you are doing.
105
+ */
106
+ enum CRRelativeFontSize
107
+ {
108
+ FONT_SIZE_LARGER,
109
+ FONT_SIZE_SMALLER,
110
+ NB_RELATIVE_FONT_SIZE
111
+ } ;
112
+
113
+ /**
114
+ *The type of font-size property.
115
+ *Used to define the type of #CRFontSize .
116
+ *See css2 spec chapter 15.2.4 to understand.
117
+ */
118
+ enum CRFontSizeType {
119
+ /**
120
+ *If the type of #CRFontSize is
121
+ *PREDEFINED_ABSOLUTE_FONT_SIZE,
122
+ *the CRFontSize::value.predefined_absolute
123
+ *field will be defined.
124
+ */
125
+ PREDEFINED_ABSOLUTE_FONT_SIZE,
126
+
127
+ /**
128
+ *If the type of #CRFontSize is
129
+ *ABSOLUTE_FONT_SIZE,
130
+ *the CRFontSize::value.absolute
131
+ *field will be defined.
132
+ */
133
+ ABSOLUTE_FONT_SIZE,
134
+
135
+ /**
136
+ *If the type of #CRFontSize is
137
+ *RELATIVE_FONT_SIZE,
138
+ *the CRFontSize::value.relative
139
+ *field will be defined.
140
+ */
141
+ RELATIVE_FONT_SIZE,
142
+
143
+ /**
144
+ *If the type of #CRFontSize is
145
+ *INHERITED_FONT_SIZE,
146
+ *the None of the field of the CRFontSize::value enum
147
+ *will be defined.
148
+ */
149
+ INHERITED_FONT_SIZE,
150
+
151
+ NB_FONT_SIZE_TYPE
152
+ } ;
153
+
154
+ typedef struct _CRFontSize CRFontSize ;
155
+ struct _CRFontSize {
156
+ enum CRFontSizeType type ;
157
+ union {
158
+ enum CRPredefinedAbsoluteFontSize predefined ;
159
+ enum CRRelativeFontSize relative ;
160
+ CRNum absolute ;
161
+ } value;
162
+ } ;
163
+
164
+ enum CRFontSizeAdjustType
165
+ {
166
+ FONT_SIZE_ADJUST_NONE = 0,
167
+ FONT_SIZE_ADJUST_NUMBER,
168
+ FONT_SIZE_ADJUST_INHERIT
169
+ } ;
170
+ typedef struct _CRFontSizeAdjust CRFontSizeAdjust ;
171
+ struct _CRFontSizeAdjust
172
+ {
173
+ enum CRFontSizeAdjustType type ;
174
+ CRNum *num ;
175
+ } ;
176
+
177
+ enum CRFontStyle
178
+ {
179
+ FONT_STYLE_NORMAL=0,
180
+ FONT_STYLE_ITALIC,
181
+ FONT_STYLE_OBLIQUE,
182
+ FONT_STYLE_INHERIT
183
+ } ;
184
+
185
+ enum CRFontVariant
186
+ {
187
+ FONT_VARIANT_NORMAL=0,
188
+ FONT_VARIANT_SMALL_CAPS,
189
+ FONT_VARIANT_INHERIT
190
+ } ;
191
+
192
+ enum CRFontWeight
193
+ {
194
+ FONT_WEIGHT_NORMAL = 1,
195
+ FONT_WEIGHT_BOLD = 1<<1,
196
+ FONT_WEIGHT_BOLDER = 1<<2,
197
+ FONT_WEIGHT_LIGHTER = 1<<3,
198
+ FONT_WEIGHT_100 = 1<<4,
199
+ FONT_WEIGHT_200 = 1<<5,
200
+ FONT_WEIGHT_300 = 1<<6,
201
+ FONT_WEIGHT_400 = 1<<7,
202
+ FONT_WEIGHT_500 = 1<<8,
203
+ FONT_WEIGHT_600 = 1<<9,
204
+ FONT_WEIGHT_700 = 1<<10,
205
+ FONT_WEIGHT_800 = 1<<11,
206
+ FONT_WEIGHT_900 = 1<<12,
207
+ FONT_WEIGHT_INHERIT = 1<<13,
208
+ NB_FONT_WEIGHTS
209
+ } ;
210
+
211
+ enum CRFontStretch
212
+ {
213
+ FONT_STRETCH_NORMAL=0,
214
+ FONT_STRETCH_WIDER,
215
+ FONT_STRETCH_NARROWER,
216
+ FONT_STRETCH_ULTRA_CONDENSED,
217
+ FONT_STRETCH_EXTRA_CONDENSED,
218
+ FONT_STRETCH_CONDENSED,
219
+ FONT_STRETCH_SEMI_CONDENSED,
220
+ FONT_STRETCH_SEMI_EXPANDED,
221
+ FONT_STRETCH_EXPANDED,
222
+ FONT_STRETCH_EXTRA_EXPANDED,
223
+ FONT_STRETCH_ULTRA_EXPANDED,
224
+ FONT_STRETCH_INHERIT
225
+ } ;
226
+
227
+ /**************************************
228
+ *'font-family' manipulation functions
229
+ ***************************************/
230
+ CRFontFamily *
231
+ cr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name) ;
232
+
233
+ CRFontFamily *
234
+ cr_font_family_append (CRFontFamily *a_this,
235
+ CRFontFamily *a_family_to_append) ;
236
+
237
+ guchar *
238
+ cr_font_family_to_string (CRFontFamily const *a_this,
239
+ gboolean a_walk_font_family_list) ;
240
+
241
+ CRFontFamily *
242
+ cr_font_family_prepend (CRFontFamily *a_this,
243
+ CRFontFamily *a_family_to_prepend);
244
+
245
+ enum CRStatus
246
+ cr_font_family_destroy (CRFontFamily *a_this) ;
247
+
248
+ enum CRStatus
249
+ cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name) ;
250
+
251
+
252
+ /************************************
253
+ *'font-size' manipulation functions
254
+ ***********************************/
255
+
256
+ CRFontSize * cr_font_size_new (void) ;
257
+
258
+ enum CRStatus cr_font_size_clear (CRFontSize *a_this) ;
259
+
260
+ enum CRStatus cr_font_size_copy (CRFontSize *a_dst,
261
+ CRFontSize const *a_src) ;
262
+ enum CRStatus cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this,
263
+ enum CRPredefinedAbsoluteFontSize a_predefined) ;
264
+ enum CRStatus cr_font_size_set_relative_font_size (CRFontSize *a_this,
265
+ enum CRRelativeFontSize a_relative) ;
266
+
267
+ enum CRStatus cr_font_size_set_absolute_font_size (CRFontSize *a_this,
268
+ enum CRNumType a_num_type,
269
+ gdouble a_value) ;
270
+
271
+ enum CRStatus cr_font_size_set_to_inherit (CRFontSize *a_this) ;
272
+
273
+ gboolean cr_font_size_is_set_to_inherit (CRFontSize const *a_this) ;
274
+
275
+ gchar* cr_font_size_to_string (CRFontSize const *a_this) ;
276
+
277
+ void cr_font_size_destroy (CRFontSize *a_font_size) ;
278
+
279
+ /*******************************************************
280
+ *'font-size-adjust' manipulation function declarations
281
+ *******************************************************/
282
+
283
+ CRFontSizeAdjust * cr_font_size_adjust_new (void) ;
284
+
285
+ gchar * cr_font_size_adjust_to_string (CRFontSizeAdjust const *a_this) ;
286
+
287
+ void cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this) ;
288
+
289
+ void
290
+ cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
291
+ enum CRPredefinedAbsoluteFontSize *a_smaller_size) ;
292
+ void
293
+ cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
294
+ enum CRPredefinedAbsoluteFontSize *a_larger_size) ;
295
+
296
+ gboolean
297
+ cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size) ;
298
+
299
+ /***********************************
300
+ *various other font related functions
301
+ ***********************************/
302
+ const gchar * cr_font_style_to_string (enum CRFontStyle a_code) ;
303
+
304
+ const gchar * cr_font_weight_to_string (enum CRFontWeight a_code) ;
305
+
306
+ enum CRFontWeight
307
+ cr_font_weight_get_bolder (enum CRFontWeight a_weight) ;
308
+
309
+ const gchar * cr_font_variant_to_string (enum CRFontVariant a_code) ;
310
+
311
+ const gchar * cr_font_stretch_to_string (enum CRFontStretch a_code) ;
312
+
313
+ G_END_DECLS
314
+
315
+ #endif
@@ -0,0 +1,174 @@
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 copyrights information.
22
+ */
23
+
24
+ #ifndef __CR_INPUT_SRC_H__
25
+ #define __CR_INPUT_SRC_H__
26
+
27
+
28
+ #include <glib.h>
29
+ #include "cr-utils.h"
30
+ #include "cr-parsing-location.h"
31
+
32
+ G_BEGIN_DECLS
33
+
34
+ /**
35
+ *@file
36
+ *The libcroco basic input stream class
37
+ *declaration file.
38
+ */
39
+
40
+ typedef struct _CRInput CRInput ;
41
+ typedef struct _CRInputPriv CRInputPriv ;
42
+
43
+ /**
44
+ *The #CRInput class provides the abstraction of
45
+ *an utf8-encoded character stream.
46
+ */
47
+ struct _CRInput
48
+ {
49
+ CRInputPriv *priv ;
50
+ } ;
51
+
52
+ typedef struct _CRInputPos CRInputPos ;
53
+
54
+ struct _CRInputPos
55
+ {
56
+ glong line ;
57
+ glong col ;
58
+ gboolean end_of_file ;
59
+ gboolean end_of_line ;
60
+ glong next_byte_index ;
61
+ } ;
62
+
63
+ CRInput *
64
+ cr_input_new_from_buf (guchar *a_buf, gulong a_len,
65
+ enum CREncoding a_enc, gboolean a_free_buf) ;
66
+ CRInput *
67
+ cr_input_new_from_uri (const gchar *a_file_uri,
68
+ enum CREncoding a_enc) ;
69
+
70
+ void
71
+ cr_input_destroy (CRInput *a_this) ;
72
+
73
+ void
74
+ cr_input_ref (CRInput *a_this) ;
75
+
76
+ gboolean
77
+ cr_input_unref (CRInput *a_this) ;
78
+
79
+ enum CRStatus
80
+ cr_input_read_byte (CRInput *a_this, guchar *a_byte) ;
81
+
82
+ enum CRStatus
83
+ cr_input_read_char (CRInput *a_this, guint32 *a_char) ;
84
+
85
+ enum CRStatus
86
+ cr_input_consume_chars (CRInput *a_this, guint32 a_char,
87
+ gulong *a_nb_char) ;
88
+
89
+ enum CRStatus
90
+ cr_input_consume_char (CRInput *a_this, guint32 a_char) ;
91
+
92
+ enum CRStatus
93
+ cr_input_consume_white_spaces (CRInput *a_this, gulong *a_nb_chars) ;
94
+
95
+ enum CRStatus
96
+ cr_input_peek_byte (CRInput const *a_this, enum CRSeekPos a_origin,
97
+ gulong a_offset, guchar *a_byte) ;
98
+
99
+ guchar
100
+ cr_input_peek_byte2 (CRInput const *a_this, gulong a_offset,
101
+ gboolean *a_eof) ;
102
+
103
+ enum CRStatus
104
+ cr_input_peek_char (CRInput const *a_this, guint32 *a_char) ;
105
+
106
+ guchar *
107
+ cr_input_get_byte_addr (CRInput *a_this,
108
+ gulong a_offset) ;
109
+
110
+ enum CRStatus
111
+ cr_input_get_cur_byte_addr (CRInput *a_this, guchar ** a_offset) ;
112
+
113
+ enum CRStatus
114
+ cr_input_seek_index (CRInput *a_this,
115
+ enum CRSeekPos a_origin, gint a_pos) ;
116
+
117
+ enum CRStatus
118
+ cr_input_get_cur_index (CRInput const *a_this, glong *a_index) ;
119
+
120
+ enum CRStatus
121
+ cr_input_set_cur_index (CRInput *a_this, glong a_index) ;
122
+
123
+ enum CRStatus
124
+ cr_input_get_cur_pos (CRInput const *a_this, CRInputPos * a_pos) ;
125
+
126
+ enum CRStatus
127
+ cr_input_set_cur_pos (CRInput *a_this, CRInputPos const *a_pos) ;
128
+
129
+ enum CRStatus
130
+ cr_input_get_parsing_location (CRInput const *a_this,
131
+ CRParsingLocation *a_loc) ;
132
+
133
+ enum CRStatus
134
+ cr_input_get_end_of_line (CRInput const *a_this, gboolean *a_eol) ;
135
+
136
+ enum CRStatus
137
+ cr_input_set_end_of_line (CRInput *a_this, gboolean a_eol) ;
138
+
139
+ enum CRStatus
140
+ cr_input_get_end_of_file (CRInput const *a_this, gboolean *a_eof) ;
141
+
142
+ enum CRStatus
143
+ cr_input_set_end_of_file (CRInput *a_this, gboolean a_eof) ;
144
+
145
+ enum CRStatus
146
+ cr_input_set_line_num (CRInput *a_this, glong a_line_num) ;
147
+
148
+ enum CRStatus
149
+ cr_input_get_line_num (CRInput const *a_this, glong *a_line_num) ;
150
+
151
+ enum CRStatus
152
+ cr_input_set_column_num (CRInput *a_this, glong a_col) ;
153
+
154
+ enum CRStatus
155
+ cr_input_get_column_num (CRInput const *a_this, glong *a_col) ;
156
+
157
+ enum CRStatus
158
+ cr_input_increment_line_num (CRInput *a_this,
159
+ glong a_increment) ;
160
+
161
+ enum CRStatus
162
+ cr_input_increment_col_num (CRInput *a_this,
163
+ glong a_increment) ;
164
+
165
+ glong
166
+ cr_input_get_nb_bytes_left (CRInput const *a_this) ;
167
+
168
+ enum CRStatus
169
+ cr_input_end_of_input (CRInput const *a_this, gboolean *a_end_of_input) ;
170
+
171
+ G_END_DECLS
172
+
173
+ #endif /*__CR_INPUT_SRC_H__*/
174
+