Code

Store cached icons to disk between runs, and invalidate/purge as needed.
[inkscape.git] / src / sp-root.h
1 #ifndef SP_ROOT_H_SEEN
2 #define SP_ROOT_H_SEEN
4 /** \file
5  * SPRoot: SVG \<svg\> implementation.
6  */
7 /*
8  * Authors:
9  *   Lauris Kaplinski <lauris@kaplinski.com>
10  *
11  * Copyright (C) 1999-2002 Lauris Kaplinski
12  * Copyright (C) 2000-2001 Ximian, Inc.
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #define SP_TYPE_ROOT (sp_root_get_type())
18 #define SP_ROOT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_ROOT, SPRoot))
19 #define SP_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_ROOT, SPRootClass))
20 #define SP_IS_ROOT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ROOT))
21 #define SP_IS_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_ROOT))
23 #include "version.h"
24 #include "svg/svg-length.h"
25 #include "enums.h"
26 #include "sp-item-group.h"
28 /** \<svg\> element */
29 struct SPRoot : public SPGroup {
30     struct {
31         Inkscape::Version svg;
32         Inkscape::Version inkscape;
33     } version, original;
35     SVGLength x;
36     SVGLength y;
37     SVGLength width;
38     SVGLength height;
40     /* viewBox; */
41     unsigned int viewBox_set : 1;
42     NRRect viewBox;
44     /* preserveAspectRatio */
45     unsigned int aspect_set : 1;
46     unsigned int aspect_align : 4;
47     unsigned int aspect_clip : 1;
49     /** Child to parent additional transform. */
50     Geom::Matrix c2p;
52     gchar *onload;
54     /**
55      * Primary \<defs\> element where we put new defs (patterns, gradients etc.).
56      *
57      * At the time of writing, this is chosen as the first \<defs\> child of
58      * this \<svg\> element: see writers of this member in sp-root.cpp.
59      */
60     SPDefs *defs;
61 };
63 struct SPRootClass {
64     SPGroupClass parent_class;
65 };
67 GType sp_root_get_type();
70 #endif /* !SP_ROOT_H_SEEN */
72 /*
73   Local Variables:
74   mode:c++
75   c-file-style:"stroustrup"
76   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77   indent-tabs-mode:nil
78   fill-column:99
79   End:
80 */
81 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :