[18608] | 1 | /* vim: set sw=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ |
---|
| 2 | /* |
---|
| 3 | rsvg-defs.h : SVG defs utilities |
---|
| 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_DEFS_H |
---|
| 27 | #define RSVG_DEFS_H |
---|
| 28 | |
---|
[17276] | 29 | /* A module for handling SVG defs */ |
---|
| 30 | |
---|
[18608] | 31 | #include <glib/gtypes.h> |
---|
| 32 | |
---|
| 33 | G_BEGIN_DECLS |
---|
| 34 | |
---|
[17276] | 35 | typedef struct _RsvgDefs RsvgDefs; |
---|
| 36 | typedef struct _RsvgDefVal RsvgDefVal; |
---|
| 37 | |
---|
| 38 | typedef enum { |
---|
[18608] | 39 | /* todo: general question: should this be high level, ie a generic |
---|
| 40 | paint server, coupled with a paint server interface; or low level, |
---|
| 41 | ie specific definable things? For now, we're going low level, |
---|
| 42 | but it's not clear that's the best way to go. */ |
---|
| 43 | RSVG_DEF_LINGRAD, |
---|
| 44 | RSVG_DEF_RADGRAD, |
---|
| 45 | RSVG_DEF_PATTERN |
---|
[17276] | 46 | } RsvgDefType; |
---|
| 47 | |
---|
| 48 | struct _RsvgDefVal { |
---|
[18608] | 49 | RsvgDefType type; |
---|
| 50 | void (*free) (RsvgDefVal *self); |
---|
[17276] | 51 | }; |
---|
| 52 | |
---|
| 53 | RsvgDefs * |
---|
| 54 | rsvg_defs_new (void); |
---|
| 55 | |
---|
| 56 | RsvgDefVal * |
---|
| 57 | rsvg_defs_lookup (const RsvgDefs *defs, const char *name); |
---|
| 58 | |
---|
| 59 | void |
---|
| 60 | rsvg_defs_set (RsvgDefs *defs, const char *name, RsvgDefVal *val); |
---|
| 61 | |
---|
| 62 | void |
---|
| 63 | rsvg_defs_free (RsvgDefs *defs); |
---|
[18608] | 64 | |
---|
| 65 | G_END_DECLS |
---|
| 66 | |
---|
| 67 | #endif |
---|