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,64 @@
|
|
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
|
+
#ifndef __CR_PSEUDO_H__
|
24
|
+
#define __CR_PSEUDO_H__
|
25
|
+
|
26
|
+
#include <stdio.h>
|
27
|
+
#include <glib.h>
|
28
|
+
#include "cr-attr-sel.h"
|
29
|
+
#include "cr-parsing-location.h"
|
30
|
+
|
31
|
+
G_BEGIN_DECLS
|
32
|
+
|
33
|
+
enum CRPseudoType
|
34
|
+
{
|
35
|
+
IDENT_PSEUDO = 0,
|
36
|
+
FUNCTION_PSEUDO
|
37
|
+
} ;
|
38
|
+
|
39
|
+
typedef struct _CRPseudo CRPseudo ;
|
40
|
+
|
41
|
+
/**
|
42
|
+
*The CRPseudo Class.
|
43
|
+
*Abstract a "pseudo" as defined by the css2 spec
|
44
|
+
*in appendix D.1 .
|
45
|
+
*/
|
46
|
+
struct _CRPseudo
|
47
|
+
{
|
48
|
+
enum CRPseudoType type ;
|
49
|
+
CRString *name ;
|
50
|
+
CRString *extra ;
|
51
|
+
CRParsingLocation location ;
|
52
|
+
} ;
|
53
|
+
|
54
|
+
CRPseudo * cr_pseudo_new (void) ;
|
55
|
+
|
56
|
+
guchar * cr_pseudo_to_string (CRPseudo const *a_this) ;
|
57
|
+
|
58
|
+
void cr_pseudo_dump (CRPseudo const *a_this, FILE *a_fp) ;
|
59
|
+
|
60
|
+
void cr_pseudo_destroy (CRPseudo *a_this) ;
|
61
|
+
|
62
|
+
G_END_DECLS
|
63
|
+
|
64
|
+
#endif /*__CR_PSEUDO_H__*/
|
@@ -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
|
+
* 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
|
+
#ifndef __CR_RGB_H__
|
24
|
+
#define __CR_RGB_H__
|
25
|
+
|
26
|
+
#include <stdio.h>
|
27
|
+
#include <glib.h>
|
28
|
+
#include "cr-utils.h"
|
29
|
+
#include "cr-parsing-location.h"
|
30
|
+
|
31
|
+
G_BEGIN_DECLS
|
32
|
+
|
33
|
+
|
34
|
+
typedef struct _CRRgb CRRgb ;
|
35
|
+
struct _CRRgb
|
36
|
+
{
|
37
|
+
/*
|
38
|
+
*the unit of the rgb.
|
39
|
+
*Either NO_UNIT (integer) or
|
40
|
+
*UNIT_PERCENTAGE (percentage).
|
41
|
+
*/
|
42
|
+
const guchar *name ;
|
43
|
+
glong red ;
|
44
|
+
glong green ;
|
45
|
+
glong blue ;
|
46
|
+
gboolean is_percentage ;
|
47
|
+
gboolean inherit ;
|
48
|
+
gboolean is_transparent ;
|
49
|
+
CRParsingLocation location ;
|
50
|
+
} ;
|
51
|
+
|
52
|
+
CRRgb * cr_rgb_new (void) ;
|
53
|
+
|
54
|
+
CRRgb * cr_rgb_new_with_vals (gulong a_red, gulong a_green,
|
55
|
+
gulong a_blue, gboolean a_is_percentage) ;
|
56
|
+
|
57
|
+
CRRgb *cr_rgb_parse_from_buf(const guchar *a_str,
|
58
|
+
enum CREncoding a_enc);
|
59
|
+
|
60
|
+
enum CRStatus cr_rgb_compute_from_percentage (CRRgb *a_this) ;
|
61
|
+
|
62
|
+
enum CRStatus cr_rgb_set (CRRgb *a_this, gulong a_red,
|
63
|
+
gulong a_green, gulong a_blue,
|
64
|
+
gboolean a_is_percentage) ;
|
65
|
+
|
66
|
+
enum CRStatus cr_rgb_copy (CRRgb *a_dest, CRRgb const *a_src) ;
|
67
|
+
|
68
|
+
enum CRStatus cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) ;
|
69
|
+
|
70
|
+
gboolean cr_rgb_is_set_to_inherit (CRRgb const *a_this) ;
|
71
|
+
|
72
|
+
gboolean cr_rgb_is_set_to_transparent (CRRgb const *a_this) ;
|
73
|
+
|
74
|
+
enum CRStatus cr_rgb_set_to_transparent (CRRgb *a_this,
|
75
|
+
gboolean a_is_transparent) ;
|
76
|
+
enum CRStatus cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb const *a_rgb) ;
|
77
|
+
|
78
|
+
enum CRStatus cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) ;
|
79
|
+
|
80
|
+
enum CRStatus cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar * a_hex_value) ;
|
81
|
+
|
82
|
+
struct _CRTerm;
|
83
|
+
|
84
|
+
enum CRStatus cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value);
|
85
|
+
|
86
|
+
guchar * cr_rgb_to_string (CRRgb const *a_this) ;
|
87
|
+
|
88
|
+
void cr_rgb_dump (CRRgb const *a_this, FILE *a_fp) ;
|
89
|
+
|
90
|
+
void cr_rgb_destroy (CRRgb *a_this) ;
|
91
|
+
|
92
|
+
G_END_DECLS
|
93
|
+
|
94
|
+
#endif /*__CR_RGB_H__*/
|
@@ -0,0 +1,110 @@
|
|
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_SEL_ENG_H__
|
25
|
+
#define __CR_SEL_ENG_H__
|
26
|
+
|
27
|
+
#include "cr-utils.h"
|
28
|
+
#include "cr-stylesheet.h"
|
29
|
+
#include "cr-cascade.h"
|
30
|
+
#include "cr-style.h"
|
31
|
+
#include "cr-prop-list.h"
|
32
|
+
|
33
|
+
#include <libxml/tree.h>
|
34
|
+
|
35
|
+
/**
|
36
|
+
*@file:
|
37
|
+
*The declaration of the #CRSelEng class.
|
38
|
+
*The #CRSelEng is actually the "Selection Engine"
|
39
|
+
*class.
|
40
|
+
*/
|
41
|
+
|
42
|
+
G_BEGIN_DECLS
|
43
|
+
|
44
|
+
typedef struct _CRSelEng CRSelEng ;
|
45
|
+
typedef struct _CRSelEngPriv CRSelEngPriv ;
|
46
|
+
|
47
|
+
/**
|
48
|
+
*The Selection engine class.
|
49
|
+
*The main service provided by this class, is
|
50
|
+
*the ability to interpret a libcroco implementation
|
51
|
+
*of css2 selectors, and given an xml node, say if
|
52
|
+
*the selector matches the node or not.
|
53
|
+
*/
|
54
|
+
struct _CRSelEng
|
55
|
+
{
|
56
|
+
CRSelEngPriv *priv ;
|
57
|
+
} ;
|
58
|
+
|
59
|
+
|
60
|
+
typedef gboolean (*CRPseudoClassSelectorHandler) (CRSelEng* a_this,
|
61
|
+
CRAdditionalSel *a_add_sel,
|
62
|
+
xmlNode *a_node) ;
|
63
|
+
CRSelEng * cr_sel_eng_new (void) ;
|
64
|
+
|
65
|
+
enum CRStatus cr_sel_eng_register_pseudo_class_sel_handler (CRSelEng *a_this,
|
66
|
+
guchar *a_pseudo_class_sel_name,
|
67
|
+
enum CRPseudoType a_pseudo_class_type,
|
68
|
+
CRPseudoClassSelectorHandler a_handler) ;
|
69
|
+
|
70
|
+
enum CRStatus cr_sel_eng_unregister_pseudo_class_sel_handler (CRSelEng *a_this,
|
71
|
+
guchar *a_pseudo_class_sel_name,
|
72
|
+
enum CRPseudoType a_pseudo_class_type) ;
|
73
|
+
|
74
|
+
enum CRStatus cr_sel_eng_unregister_all_pseudo_class_sel_handlers (CRSelEng *a_this) ;
|
75
|
+
|
76
|
+
enum CRStatus cr_sel_eng_get_pseudo_class_selector_handler (CRSelEng *a_this,
|
77
|
+
guchar *a_pseudo_class_sel_name,
|
78
|
+
enum CRPseudoType a_pseudo_class_type,
|
79
|
+
CRPseudoClassSelectorHandler *a_handler) ;
|
80
|
+
|
81
|
+
enum CRStatus cr_sel_eng_matches_node (CRSelEng *a_this,
|
82
|
+
CRSimpleSel *a_sel,
|
83
|
+
xmlNode *a_node,
|
84
|
+
gboolean *a_result) ;
|
85
|
+
|
86
|
+
enum CRStatus cr_sel_eng_get_matched_rulesets (CRSelEng *a_this,
|
87
|
+
CRStyleSheet *a_sheet,
|
88
|
+
xmlNode *a_node,
|
89
|
+
CRStatement ***a_rulesets,
|
90
|
+
gulong *a_len) ;
|
91
|
+
|
92
|
+
enum CRStatus
|
93
|
+
cr_sel_eng_get_matched_properties_from_cascade (CRSelEng *a_this,
|
94
|
+
CRCascade *a_cascade,
|
95
|
+
xmlNode *a_node,
|
96
|
+
CRPropList **a_props) ;
|
97
|
+
|
98
|
+
enum CRStatus cr_sel_eng_get_matched_style (CRSelEng *a_this,
|
99
|
+
CRCascade *a_cascade,
|
100
|
+
xmlNode *a_node,
|
101
|
+
CRStyle *a_parent_style,
|
102
|
+
CRStyle **a_style,
|
103
|
+
gboolean a_set_props_to_initial_values) ;
|
104
|
+
|
105
|
+
void cr_sel_eng_destroy (CRSelEng *a_this) ;
|
106
|
+
|
107
|
+
G_END_DECLS
|
108
|
+
|
109
|
+
|
110
|
+
#endif/*__CR_SEL_ENG_H__*/
|
@@ -0,0 +1,95 @@
|
|
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
|
+
*
|
21
|
+
* Author: Dodji Seketeli
|
22
|
+
* See COPYRIGHTS file for copyright information.
|
23
|
+
*/
|
24
|
+
|
25
|
+
#ifndef __CR_SELECTOR_H__
|
26
|
+
#define __CR_SELECTOR_H__
|
27
|
+
|
28
|
+
#include <stdio.h>
|
29
|
+
#include "cr-utils.h"
|
30
|
+
#include "cr-simple-sel.h"
|
31
|
+
#include "cr-parsing-location.h"
|
32
|
+
|
33
|
+
/**
|
34
|
+
*@file
|
35
|
+
*The declaration file of the #CRSelector file.
|
36
|
+
*/
|
37
|
+
|
38
|
+
G_BEGIN_DECLS
|
39
|
+
|
40
|
+
typedef struct _CRSelector CRSelector ;
|
41
|
+
|
42
|
+
/**
|
43
|
+
*Abstracts a CSS2 selector as defined in the right part
|
44
|
+
*of the 'ruleset" production in the appendix D.1 of the
|
45
|
+
*css2 spec.
|
46
|
+
*It is actually the abstraction of a comma separated list
|
47
|
+
*of simple selectors list.
|
48
|
+
*In a css2 file, a selector is a list of simple selectors
|
49
|
+
*separated by a comma.
|
50
|
+
*e.g: sel0, sel1, sel2 ...
|
51
|
+
*Each seln is a simple selector
|
52
|
+
*/
|
53
|
+
struct _CRSelector
|
54
|
+
{
|
55
|
+
/**
|
56
|
+
*A Selection expression.
|
57
|
+
*It is a list of basic selectors.
|
58
|
+
*Each basic selector can be either an element
|
59
|
+
*selector, an id selector, a class selector, an
|
60
|
+
*attribute selector, an universal selector etc ...
|
61
|
+
*/
|
62
|
+
CRSimpleSel *simple_sel ;
|
63
|
+
|
64
|
+
/**The next selector list element*/
|
65
|
+
CRSelector *next ;
|
66
|
+
CRSelector *prev ;
|
67
|
+
CRParsingLocation location ;
|
68
|
+
glong ref_count ;
|
69
|
+
};
|
70
|
+
|
71
|
+
CRSelector* cr_selector_new (CRSimpleSel *a_sel_expr) ;
|
72
|
+
|
73
|
+
CRSelector * cr_selector_parse_from_buf (const guchar * a_char_buf,
|
74
|
+
enum CREncoding a_enc) ;
|
75
|
+
|
76
|
+
CRSelector* cr_selector_append (CRSelector *a_this, CRSelector *a_new) ;
|
77
|
+
|
78
|
+
CRSelector* cr_selector_append_simple_sel (CRSelector *a_this,
|
79
|
+
CRSimpleSel *a_simple_sel) ;
|
80
|
+
|
81
|
+
CRSelector* cr_selector_prepend (CRSelector *a_this, CRSelector *a_new) ;
|
82
|
+
|
83
|
+
guchar * cr_selector_to_string (CRSelector const *a_this) ;
|
84
|
+
|
85
|
+
void cr_selector_dump (CRSelector const *a_this, FILE *a_fp) ;
|
86
|
+
|
87
|
+
void cr_selector_ref (CRSelector *a_this) ;
|
88
|
+
|
89
|
+
gboolean cr_selector_unref (CRSelector *a_this) ;
|
90
|
+
|
91
|
+
void cr_selector_destroy (CRSelector *a_this) ;
|
92
|
+
|
93
|
+
G_END_DECLS
|
94
|
+
|
95
|
+
#endif /*__CR_SELECTOR_H__*/
|
@@ -0,0 +1,130 @@
|
|
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
|
+
#ifndef __CR_SEL_H__
|
26
|
+
#define __CR_SEL_H__
|
27
|
+
|
28
|
+
#include <stdio.h>
|
29
|
+
#include <glib.h>
|
30
|
+
#include "cr-additional-sel.h"
|
31
|
+
#include "cr-parsing-location.h"
|
32
|
+
|
33
|
+
G_BEGIN_DECLS
|
34
|
+
|
35
|
+
/**
|
36
|
+
*@file
|
37
|
+
*the declaration of the #CRSimpleSel class.
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
enum Combinator
|
41
|
+
{
|
42
|
+
NO_COMBINATOR,
|
43
|
+
COMB_WS,/*whitespace: descendent*/
|
44
|
+
COMB_PLUS,/*'+': preceded by*/
|
45
|
+
COMB_GT/*greater than ('>'): child*/
|
46
|
+
} ;
|
47
|
+
|
48
|
+
enum SimpleSelectorType
|
49
|
+
{
|
50
|
+
NO_SELECTOR_TYPE = 0,
|
51
|
+
UNIVERSAL_SELECTOR = 1,
|
52
|
+
TYPE_SELECTOR = 1 << 1
|
53
|
+
} ;
|
54
|
+
|
55
|
+
typedef struct _CRSimpleSel CRSimpleSel ;
|
56
|
+
|
57
|
+
/**
|
58
|
+
*The abstraction of a css2 simple selection list
|
59
|
+
*as defined by the right part of the "selector" production in the
|
60
|
+
*appendix D.1 of the css2 spec.
|
61
|
+
*It is basically a list of simple selector, each
|
62
|
+
*simple selector being separated by a combinator.
|
63
|
+
*
|
64
|
+
*In the libcroco's implementation, each simple selector
|
65
|
+
*is made of at most two parts:
|
66
|
+
*
|
67
|
+
*1/An element name or 'type selector' (which can hold a '*' and
|
68
|
+
*then been called 'universal selector')
|
69
|
+
*
|
70
|
+
*2/An additional selector that "specializes" the preceding type or
|
71
|
+
*universal selector. The additionnal selector can be either
|
72
|
+
*an id selector, or a class selector, or an attribute selector.
|
73
|
+
*/
|
74
|
+
struct _CRSimpleSel
|
75
|
+
{
|
76
|
+
enum SimpleSelectorType type_mask ;
|
77
|
+
gboolean is_case_sentive ;
|
78
|
+
CRString * name ;
|
79
|
+
/**
|
80
|
+
*The combinator that separates
|
81
|
+
*this simple selector from the previous
|
82
|
+
*one.
|
83
|
+
*/
|
84
|
+
enum Combinator combinator ;
|
85
|
+
|
86
|
+
/**
|
87
|
+
*The additional selector list of the
|
88
|
+
*current simple selector.
|
89
|
+
*An additional selector may
|
90
|
+
*be a class selector, an id selector,
|
91
|
+
*or an attribute selector.
|
92
|
+
*Note that this field is a linked list.
|
93
|
+
*/
|
94
|
+
CRAdditionalSel *add_sel ;
|
95
|
+
|
96
|
+
/*
|
97
|
+
*the specificity as specified by
|
98
|
+
*chapter 6.4.3 of the spec.
|
99
|
+
*/
|
100
|
+
gulong specificity ;
|
101
|
+
|
102
|
+
CRSimpleSel *next ;
|
103
|
+
CRSimpleSel *prev ;
|
104
|
+
CRParsingLocation location ;
|
105
|
+
} ;
|
106
|
+
|
107
|
+
CRSimpleSel * cr_simple_sel_new (void) ;
|
108
|
+
|
109
|
+
CRSimpleSel * cr_simple_sel_append_simple_sel (CRSimpleSel *a_this,
|
110
|
+
CRSimpleSel *a_sel) ;
|
111
|
+
|
112
|
+
CRSimpleSel * cr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this,
|
113
|
+
CRSimpleSel *a_sel) ;
|
114
|
+
|
115
|
+
guchar * cr_simple_sel_to_string (CRSimpleSel const *a_this) ;
|
116
|
+
|
117
|
+
guchar * cr_simple_sel_one_to_string (CRSimpleSel const * a_this) ;
|
118
|
+
|
119
|
+
enum CRStatus cr_simple_sel_dump (CRSimpleSel const *a_this, FILE *a_fp) ;
|
120
|
+
|
121
|
+
enum CRStatus cr_simple_sel_dump_attr_sel_list (CRSimpleSel const *a_this) ;
|
122
|
+
|
123
|
+
enum CRStatus cr_simple_sel_compute_specificity (CRSimpleSel *a_this) ;
|
124
|
+
|
125
|
+
void cr_simple_sel_destroy (CRSimpleSel *a_this) ;
|
126
|
+
|
127
|
+
G_END_DECLS
|
128
|
+
|
129
|
+
|
130
|
+
#endif /*__CR_SIMPLE_SEL_H__*/
|