~ml-launchpad/ubuntu/natty/gcompris/fix-for-777349

« back to all changes in this revision

Viewing changes to src/goocanvas/src/goocanvasstyle.h

  • Committer: Bazaar Package Importer
  • Author(s): Marc Gariepy, Marc Gariepy, Stephane Graber
  • Date: 2010-01-04 17:42:49 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20100104174249-7bupatd9dtxyhvs4
Tags: 9.0-0ubuntu1
[Marc Gariepy]
* New upstream release (9.0).
* Remove cache.c from POTFILES to avoid FTBFS
* Remove unneeded rm in debian/rules (file no longer exists upstream)

[Stephane Graber]
* Bump Debian standards to 3.8.3
* Add patch system (dpatch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
 
3
 * Released under the GNU LGPL license. See COPYING for details.
 
4
 *
 
5
 * goocanvasstyle.h - cascading styles.
 
6
 */
 
7
#ifndef __GOO_CANVAS_STYLE_H__
 
8
#define __GOO_CANVAS_STYLE_H__
 
9
 
 
10
#include <gtk/gtk.h>
 
11
 
 
12
G_BEGIN_DECLS
 
13
 
 
14
 
 
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;
 
28
 
 
29
 
 
30
/**
 
31
 * GooCanvasStyleProperty
 
32
 * @id: the unique property identifier.
 
33
 * @value: the value of the property.
 
34
 *
 
35
 * #GooCanvasStyleProperty represents a property setting.
 
36
 */
 
37
typedef struct _GooCanvasStyleProperty GooCanvasStyleProperty;
 
38
struct _GooCanvasStyleProperty
 
39
{
 
40
  GQuark id;
 
41
  GValue value;
 
42
};
 
43
 
 
44
 
 
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))
 
51
 
 
52
 
 
53
typedef struct _GooCanvasStyle       GooCanvasStyle;
 
54
typedef struct _GooCanvasStyleClass  GooCanvasStyleClass;
 
55
 
 
56
/**
 
57
 * GooCanvasStyle
 
58
 * @parent: the parent style.
 
59
 * @properties: an array of #GooCanvasStyleProperty property settings.
 
60
 *
 
61
 * #GooCanvasStyle holds the style properties of a canvas item, as well as a
 
62
 * pointer to the parent style.
 
63
 */
 
64
struct _GooCanvasStyle
 
65
{
 
66
  /* <private> */
 
67
  GObject parent_object;
 
68
 
 
69
  /* <public> */
 
70
  GooCanvasStyle *parent;
 
71
  GArray *properties;
 
72
};
 
73
 
 
74
struct _GooCanvasStyleClass
 
75
{
 
76
  GObjectClass parent_class;
 
77
 
 
78
  /*< private >*/
 
79
 
 
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);
 
85
};
 
86
 
 
87
 
 
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);
 
91
 
 
92
GooCanvasStyle* goo_canvas_style_get_parent         (GooCanvasStyle *style);
 
93
void            goo_canvas_style_set_parent         (GooCanvasStyle *style,
 
94
                                                     GooCanvasStyle *parent);
 
95
 
 
96
GValue*         goo_canvas_style_get_property       (GooCanvasStyle *style,
 
97
                                                     GQuark          property_id);
 
98
void            goo_canvas_style_set_property       (GooCanvasStyle *style,
 
99
                                                     GQuark          property_id,
 
100
                                                     const GValue   *value);
 
101
 
 
102
/* Convenience functions to set the standard cairo stroke and fill options. */
 
103
gboolean        goo_canvas_style_set_stroke_options (GooCanvasStyle *style,
 
104
                                                     cairo_t        *cr);
 
105
gboolean        goo_canvas_style_set_fill_options   (GooCanvasStyle *style,
 
106
                                                     cairo_t        *cr);
 
107
 
 
108
G_END_DECLS
 
109
 
 
110
#endif /* __GOO_CANVAS_STYLE_H__ */