2
* GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
3
* Released under the GNU LGPL license. See COPYING for details.
5
* goocanvasstyle.h - cascading styles.
7
#ifndef __GOO_CANVAS_STYLE_H__
8
#define __GOO_CANVAS_STYLE_H__
15
/* GQuarks for the basic properties. */
16
extern GQuark goo_canvas_style_stroke_pattern_id;
17
extern GQuark goo_canvas_style_fill_pattern_id;
18
extern GQuark goo_canvas_style_fill_rule_id;
19
extern GQuark goo_canvas_style_operator_id;
20
extern GQuark goo_canvas_style_antialias_id;
21
extern GQuark goo_canvas_style_line_width_id;
22
extern GQuark goo_canvas_style_line_cap_id;
23
extern GQuark goo_canvas_style_line_join_id;
24
extern GQuark goo_canvas_style_line_join_miter_limit_id;
25
extern GQuark goo_canvas_style_line_dash_id;
26
extern GQuark goo_canvas_style_font_desc_id;
27
extern GQuark goo_canvas_style_hint_metrics_id;
31
* GooCanvasStyleProperty
32
* @id: the unique property identifier.
33
* @value: the value of the property.
35
* #GooCanvasStyleProperty represents a property setting.
37
typedef struct _GooCanvasStyleProperty GooCanvasStyleProperty;
38
struct _GooCanvasStyleProperty
45
#define GOO_TYPE_CANVAS_STYLE (goo_canvas_style_get_type ())
46
#define GOO_CANVAS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_STYLE, GooCanvasStyle))
47
#define GOO_CANVAS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_STYLE, GooCanvasStyleClass))
48
#define GOO_IS_CANVAS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_STYLE))
49
#define GOO_IS_CANVAS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_STYLE))
50
#define GOO_CANVAS_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_STYLE, GooCanvasStyleClass))
53
typedef struct _GooCanvasStyle GooCanvasStyle;
54
typedef struct _GooCanvasStyleClass GooCanvasStyleClass;
58
* @parent: the parent style.
59
* @properties: an array of #GooCanvasStyleProperty property settings.
61
* #GooCanvasStyle holds the style properties of a canvas item, as well as a
62
* pointer to the parent style.
64
struct _GooCanvasStyle
67
GObject parent_object;
70
GooCanvasStyle *parent;
74
struct _GooCanvasStyleClass
76
GObjectClass parent_class;
80
/* Padding for future expansion */
81
void (*_goo_canvas_reserved1) (void);
82
void (*_goo_canvas_reserved2) (void);
83
void (*_goo_canvas_reserved3) (void);
84
void (*_goo_canvas_reserved4) (void);
88
GType goo_canvas_style_get_type (void) G_GNUC_CONST;
89
GooCanvasStyle* goo_canvas_style_new (void);
90
GooCanvasStyle* goo_canvas_style_copy (GooCanvasStyle *style);
92
GooCanvasStyle* goo_canvas_style_get_parent (GooCanvasStyle *style);
93
void goo_canvas_style_set_parent (GooCanvasStyle *style,
94
GooCanvasStyle *parent);
96
GValue* goo_canvas_style_get_property (GooCanvasStyle *style,
98
void goo_canvas_style_set_property (GooCanvasStyle *style,
100
const GValue *value);
102
/* Convenience functions to set the standard cairo stroke and fill options. */
103
gboolean goo_canvas_style_set_stroke_options (GooCanvasStyle *style,
105
gboolean goo_canvas_style_set_fill_options (GooCanvasStyle *style,
110
#endif /* __GOO_CANVAS_STYLE_H__ */