source: trunk/third/librsvg/rsvg-private.h @ 18609

Revision 18609, 2.2 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18608, which included commits to RCS files with non-trunk default branches.
Line 
1/* vim: set sw=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/*
3   rsvg-private.h: Internals of RSVG
4
5   Copyright (C) 2000 Eazel, Inc.
6   Copyright (C) 2002 Dom Lachowicz <cinamod@hotmail.com>
7
8   This program is free software; you can redistribute it and/or
9   modify it under the terms of the GNU Library General Public License as
10   published by the Free Software Foundation; either version 2 of the
11   License, or (at your option) any later version.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   Library General Public License for more details.
17
18   You should have received a copy of the GNU Library General Public
19   License along with this program; if not, write to the
20   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21   Boston, MA 02111-1307, USA.
22
23   Author: Raph Levien <raph@artofcode.com>
24*/
25
26#ifndef RSVG_PRIVATE_H
27#define RSVG_PRIVATE_H
28
29#include "rsvg.h"
30#include "rsvg-styles.h"
31
32#include <libxml/SAX.h>
33#include <libxml/xmlmemory.h>
34
35G_BEGIN_DECLS
36
37typedef struct RsvgSaxHandler RsvgSaxHandler;
38
39struct RsvgSaxHandler {
40  void (*free) (RsvgSaxHandler *self);
41  void (*start_element) (RsvgSaxHandler *self, const xmlChar *name, const xmlChar **atts);
42  void (*end_element) (RsvgSaxHandler *self, const xmlChar *name);
43  void (*characters) (RsvgSaxHandler *self, const xmlChar *ch, int len);
44};
45
46struct RsvgHandle {
47  RsvgSizeFunc size_func;
48  gpointer user_data;
49  GDestroyNotify user_data_destroy;
50  GdkPixbuf *pixbuf;
51
52  /* stack; there is a state for each element */
53  RsvgState *state;
54  int n_state;
55  int n_state_max;
56
57  RsvgDefs *defs;
58  GHashTable *css_props;
59
60  /* not a handler stack. each nested handler keeps
61   * track of its parent
62   */
63  RsvgSaxHandler *handler;
64  int handler_nest;
65
66  GHashTable *entities; /* g_malloc'd string -> xmlEntityPtr */
67
68  PangoContext *pango_context;
69  xmlParserCtxtPtr ctxt;
70  GError **error;
71
72  int width;
73  int height;
74  double dpi;
75};
76
77void rsvg_linear_gradient_free (RsvgDefVal *self);
78void rsvg_radial_gradient_free (RsvgDefVal *self);
79
80G_END_DECLS
81
82#endif
Note: See TracBrowser for help on using the repository browser.