goocanvas 0.90.6-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. data/ChangeLog +87 -0
  2. data/README +37 -0
  3. data/Rakefile +14 -0
  4. data/ext/goocanvas/depend +5 -0
  5. data/ext/goocanvas/extconf.rb +66 -0
  6. data/ext/goocanvas/goocanvas.def +2 -0
  7. data/ext/goocanvas/rbgoocairo.c +74 -0
  8. data/ext/goocanvas/rbgoocanvas.c +236 -0
  9. data/ext/goocanvas/rbgoocanvas.h +66 -0
  10. data/ext/goocanvas/rbgoocanvasellipse.c +50 -0
  11. data/ext/goocanvas/rbgoocanvasgroup.c +41 -0
  12. data/ext/goocanvas/rbgoocanvasimage.c +45 -0
  13. data/ext/goocanvas/rbgoocanvasitem.c +358 -0
  14. data/ext/goocanvas/rbgoocanvaspolyline.c +102 -0
  15. data/ext/goocanvas/rbgoocanvasrect.c +47 -0
  16. data/ext/goocanvas/rbgoocanvasstyle.c +61 -0
  17. data/ext/goocanvas/rbgoocanvastable.c +41 -0
  18. data/ext/goocanvas/rbgoocanvastext.c +58 -0
  19. data/ext/goocanvas/rbgoocanvaswidget.c +48 -0
  20. data/ext/goocanvas/rbgooutils.c +44 -0
  21. data/extconf.rb +49 -0
  22. data/lib/1.8/goocanvas.so +0 -0
  23. data/lib/1.9/goocanvas.so +0 -0
  24. data/lib/goocanvas.rb +145 -0
  25. data/sample/demo-arrowhead.rb +315 -0
  26. data/sample/demo-fifteen.rb +218 -0
  27. data/sample/demo-primitives.rb +720 -0
  28. data/sample/demo.rb +84 -0
  29. data/sample/flower.png +0 -0
  30. data/sample/scalability-demo.rb +130 -0
  31. data/sample/simple-demo.rb +35 -0
  32. data/sample/table-demo.rb +137 -0
  33. data/sample/toroid.png +0 -0
  34. data/sample/units-demo.rb +80 -0
  35. data/sample/widgets-demo.rb +197 -0
  36. data/vendor/local/bin/libgoocanvas-3.dll +0 -0
  37. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvas.h +334 -0
  38. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasatk.h +22 -0
  39. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasellipse.h +120 -0
  40. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasenumtypes.h +33 -0
  41. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgrid.h +153 -0
  42. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgroup.h +109 -0
  43. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasimage.h +121 -0
  44. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitem.h +479 -0
  45. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemmodel.h +275 -0
  46. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemsimple.h +247 -0
  47. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasmarshal.h +61 -0
  48. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspath.h +116 -0
  49. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspolyline.h +176 -0
  50. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasprivate.h +59 -0
  51. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasrect.h +121 -0
  52. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasstyle.h +110 -0
  53. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastable.h +139 -0
  54. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastext.h +133 -0
  55. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasutils.h +333 -0
  56. data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaswidget.h +66 -0
  57. data/vendor/local/include/goocanvas-1.0.0/goocanvas/stamp-goocanvasmarshal.h +1 -0
  58. data/vendor/local/lib/libgoocanvas.a +0 -0
  59. data/vendor/local/lib/libgoocanvas.dll.a +0 -0
  60. data/vendor/local/lib/pkgconfig/goocanvas.pc +13 -0
  61. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvas.html +1982 -0
  62. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipse.html +269 -0
  63. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipseModel.html +274 -0
  64. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGrid.html +469 -0
  65. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGridModel.html +476 -0
  66. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroup.html +183 -0
  67. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroupModel.html +184 -0
  68. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImage.html +247 -0
  69. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImageModel.html +252 -0
  70. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItem.html +3014 -0
  71. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModel.html +1764 -0
  72. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModelSimple.html +298 -0
  73. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemSimple.html +809 -0
  74. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPath.html +279 -0
  75. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPathModel.html +280 -0
  76. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolyline.html +369 -0
  77. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolylineModel.html +375 -0
  78. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRect.html +247 -0
  79. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRectModel.html +252 -0
  80. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasStyle.html +489 -0
  81. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTable.html +452 -0
  82. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTableModel.html +452 -0
  83. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasText.html +324 -0
  84. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTextModel.html +287 -0
  85. data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasWidget.html +266 -0
  86. data/vendor/local/share/gtk-doc/html/goocanvas/ch01.html +53 -0
  87. data/vendor/local/share/gtk-doc/html/goocanvas/ch02.html +50 -0
  88. data/vendor/local/share/gtk-doc/html/goocanvas/ch03.html +62 -0
  89. data/vendor/local/share/gtk-doc/html/goocanvas/ch04.html +60 -0
  90. data/vendor/local/share/gtk-doc/html/goocanvas/ch05.html +33 -0
  91. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-GooCanvas-Types.html +815 -0
  92. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-architecture.html +157 -0
  93. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-coordinates.html +106 -0
  94. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-creating-items.html +420 -0
  95. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-model-view-canvas.html +246 -0
  96. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-overview.html +106 -0
  97. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-simple-canvas.html +238 -0
  98. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-wysiwyg.html +84 -0
  99. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp +608 -0
  100. data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp2 +639 -0
  101. data/vendor/local/share/gtk-doc/html/goocanvas/home.png +0 -0
  102. data/vendor/local/share/gtk-doc/html/goocanvas/index.html +138 -0
  103. data/vendor/local/share/gtk-doc/html/goocanvas/index.sgml +814 -0
  104. data/vendor/local/share/gtk-doc/html/goocanvas/left.png +0 -0
  105. data/vendor/local/share/gtk-doc/html/goocanvas/right.png +0 -0
  106. data/vendor/local/share/gtk-doc/html/goocanvas/style.css +257 -0
  107. data/vendor/local/share/gtk-doc/html/goocanvas/up.png +0 -0
  108. data/vendor/local/share/gtk-doc/tmpl/goocanvas/dummy.sgml +0 -0
  109. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas-unused.sgml +0 -0
  110. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas.sgml +536 -0
  111. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipse.sgml +82 -0
  112. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipsemodel.sgml +82 -0
  113. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgrid.sgml +176 -0
  114. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgridmodel.sgml +176 -0
  115. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroup.sgml +58 -0
  116. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroupmodel.sgml +58 -0
  117. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimage.sgml +81 -0
  118. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimagemodel.sgml +81 -0
  119. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitem.sgml +773 -0
  120. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodel.sgml +490 -0
  121. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodelsimple.sgml +135 -0
  122. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemsimple.sgml +254 -0
  123. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspath.sgml +64 -0
  124. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspathmodel.sgml +64 -0
  125. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolyline.sgml +109 -0
  126. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolylinemodel.sgml +109 -0
  127. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrect.sgml +72 -0
  128. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrectmodel.sgml +72 -0
  129. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasstyle.sgml +186 -0
  130. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastable.sgml +158 -0
  131. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastablemodel.sgml +158 -0
  132. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastext.sgml +103 -0
  133. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastextmodel.sgml +93 -0
  134. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasutils.sgml +241 -0
  135. data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaswidget.sgml +73 -0
  136. metadata +218 -0
@@ -0,0 +1,176 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvaspolyline.h - polyline item, with optional arrows.
6
+ */
7
+ #ifndef __GOO_CANVAS_POLYLINE_H__
8
+ #define __GOO_CANVAS_POLYLINE_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include "goocanvasitemsimple.h"
12
+
13
+ G_BEGIN_DECLS
14
+
15
+
16
+ /**
17
+ * GooCanvasPoints
18
+ * @coords: the coordinates of the points, in pairs.
19
+ * @num_points: the number of points.
20
+ * @ref_count: the reference count of the struct.
21
+ *
22
+ * #GooCairoPoints represents an array of points.
23
+ */
24
+ typedef struct _GooCanvasPoints GooCanvasPoints;
25
+ struct _GooCanvasPoints
26
+ {
27
+ double *coords;
28
+ int num_points;
29
+ int ref_count;
30
+ };
31
+
32
+ #define GOO_TYPE_CANVAS_POINTS goo_canvas_points_get_type()
33
+ GType goo_canvas_points_get_type (void);
34
+ GooCanvasPoints* goo_canvas_points_new (int num_points);
35
+ GooCanvasPoints* goo_canvas_points_ref (GooCanvasPoints *points);
36
+ void goo_canvas_points_unref (GooCanvasPoints *points);
37
+
38
+
39
+ #define NUM_ARROW_POINTS 5 /* number of points in an arrowhead */
40
+
41
+ typedef struct _GooCanvasPolylineArrowData GooCanvasPolylineArrowData;
42
+ struct _GooCanvasPolylineArrowData
43
+ {
44
+ /* These are specified in multiples of the line width, e.g. if arrow_width
45
+ is 2 the width of the arrow will be twice the width of the line. */
46
+ gdouble arrow_width, arrow_length, arrow_tip_length;
47
+
48
+ gdouble line_start[2], line_end[2];
49
+ gdouble start_arrow_coords[NUM_ARROW_POINTS * 2];
50
+ gdouble end_arrow_coords[NUM_ARROW_POINTS * 2];
51
+ };
52
+
53
+
54
+ /* This is the data used by both model and view classes. */
55
+ typedef struct _GooCanvasPolylineData GooCanvasPolylineData;
56
+ struct _GooCanvasPolylineData
57
+ {
58
+ gdouble *coords;
59
+
60
+ GooCanvasPolylineArrowData *arrow_data;
61
+
62
+ guint num_points : 16;
63
+ guint close_path : 1;
64
+ guint start_arrow : 1;
65
+ guint end_arrow : 1;
66
+ guint reconfigure_arrows : 1; /* Not used any more. */
67
+ };
68
+
69
+
70
+ #define GOO_TYPE_CANVAS_POLYLINE (goo_canvas_polyline_get_type ())
71
+ #define GOO_CANVAS_POLYLINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_POLYLINE, GooCanvasPolyline))
72
+ #define GOO_CANVAS_POLYLINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_POLYLINE, GooCanvasPolylineClass))
73
+ #define GOO_IS_CANVAS_POLYLINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_POLYLINE))
74
+ #define GOO_IS_CANVAS_POLYLINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_POLYLINE))
75
+ #define GOO_CANVAS_POLYLINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_POLYLINE, GooCanvasPolylineClass))
76
+
77
+
78
+ typedef struct _GooCanvasPolyline GooCanvasPolyline;
79
+ typedef struct _GooCanvasPolylineClass GooCanvasPolylineClass;
80
+
81
+ /**
82
+ * GooCanvasPolyline
83
+ *
84
+ * The #GooCanvasPolyline-struct struct contains private data only.
85
+ */
86
+ struct _GooCanvasPolyline
87
+ {
88
+ GooCanvasItemSimple parent;
89
+
90
+ GooCanvasPolylineData *polyline_data;
91
+ };
92
+
93
+ struct _GooCanvasPolylineClass
94
+ {
95
+ GooCanvasItemSimpleClass parent_class;
96
+
97
+ /*< private >*/
98
+
99
+ /* Padding for future expansion */
100
+ void (*_goo_canvas_reserved1) (void);
101
+ void (*_goo_canvas_reserved2) (void);
102
+ void (*_goo_canvas_reserved3) (void);
103
+ void (*_goo_canvas_reserved4) (void);
104
+ };
105
+
106
+
107
+ GType goo_canvas_polyline_get_type (void) G_GNUC_CONST;
108
+
109
+ GooCanvasItem* goo_canvas_polyline_new (GooCanvasItem *parent,
110
+ gboolean close_path,
111
+ gint num_points,
112
+ ...);
113
+
114
+ GooCanvasItem* goo_canvas_polyline_new_line (GooCanvasItem *parent,
115
+ gdouble x1,
116
+ gdouble y1,
117
+ gdouble x2,
118
+ gdouble y2,
119
+ ...);
120
+
121
+
122
+
123
+ #define GOO_TYPE_CANVAS_POLYLINE_MODEL (goo_canvas_polyline_model_get_type ())
124
+ #define GOO_CANVAS_POLYLINE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_POLYLINE_MODEL, GooCanvasPolylineModel))
125
+ #define GOO_CANVAS_POLYLINE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_POLYLINE_MODEL, GooCanvasPolylineModelClass))
126
+ #define GOO_IS_CANVAS_POLYLINE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_POLYLINE_MODEL))
127
+ #define GOO_IS_CANVAS_POLYLINE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_POLYLINE_MODEL))
128
+ #define GOO_CANVAS_POLYLINE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_POLYLINE_MODEL, GooCanvasPolylineModelClass))
129
+
130
+
131
+ typedef struct _GooCanvasPolylineModel GooCanvasPolylineModel;
132
+ typedef struct _GooCanvasPolylineModelClass GooCanvasPolylineModelClass;
133
+
134
+ /**
135
+ * GooCanvasPolylineModel
136
+ *
137
+ * The #GooCanvasPolylineModel-struct struct contains private data only.
138
+ */
139
+ struct _GooCanvasPolylineModel
140
+ {
141
+ GooCanvasItemModelSimple parent_object;
142
+
143
+ GooCanvasPolylineData polyline_data;
144
+ };
145
+
146
+ struct _GooCanvasPolylineModelClass
147
+ {
148
+ GooCanvasItemModelSimpleClass parent_class;
149
+
150
+ /*< private >*/
151
+
152
+ /* Padding for future expansion */
153
+ void (*_goo_canvas_reserved1) (void);
154
+ void (*_goo_canvas_reserved2) (void);
155
+ void (*_goo_canvas_reserved3) (void);
156
+ void (*_goo_canvas_reserved4) (void);
157
+ };
158
+
159
+
160
+ GType goo_canvas_polyline_model_get_type (void) G_GNUC_CONST;
161
+
162
+ GooCanvasItemModel* goo_canvas_polyline_model_new (GooCanvasItemModel *parent,
163
+ gboolean close_path,
164
+ gint num_points,
165
+ ...);
166
+
167
+ GooCanvasItemModel* goo_canvas_polyline_model_new_line (GooCanvasItemModel *parent,
168
+ gdouble x1,
169
+ gdouble y1,
170
+ gdouble x2,
171
+ gdouble y2,
172
+ ...);
173
+
174
+ G_END_DECLS
175
+
176
+ #endif /* __GOO_CANVAS_POLYLINE_H__ */
@@ -0,0 +1,59 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasprivate.h - private types & utility functions.
6
+ */
7
+ #ifndef __GOO_CANVAS_PRIVATE_H__
8
+ #define __GOO_CANVAS_PRIVATE_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include "goocanvasstyle.h"
12
+
13
+ G_BEGIN_DECLS
14
+
15
+
16
+ /*
17
+ * GPtrArray extensions.
18
+ */
19
+ void goo_canvas_util_ptr_array_insert (GPtrArray *ptr_array,
20
+ gpointer data,
21
+ gint index);
22
+
23
+ void goo_canvas_util_ptr_array_move (GPtrArray *ptr_array,
24
+ gint old_index,
25
+ gint new_index);
26
+
27
+ gint goo_canvas_util_ptr_array_find_index (GPtrArray *ptr_array,
28
+ gpointer data);
29
+
30
+
31
+ cairo_pattern_t* goo_canvas_cairo_pattern_from_pixbuf (GdkPixbuf *pixbuf);
32
+ cairo_surface_t* goo_canvas_cairo_surface_from_pixbuf (GdkPixbuf *pixbuf);
33
+
34
+ guint goo_canvas_convert_colors_to_rgba (double red,
35
+ double green,
36
+ double blue,
37
+ double alpha);
38
+
39
+ void goo_canvas_get_rgba_value_from_pattern (cairo_pattern_t *pattern,
40
+ GValue *value);
41
+
42
+ void goo_canvas_set_style_property_from_pattern (GooCanvasStyle *style,
43
+ GQuark property_id,
44
+ cairo_pattern_t *pattern);
45
+
46
+ cairo_pattern_t* goo_canvas_create_pattern_from_color_value (const GValue *value);
47
+ cairo_pattern_t* goo_canvas_create_pattern_from_rgba_value (const GValue *value);
48
+ cairo_pattern_t* goo_canvas_create_pattern_from_pixbuf_value (const GValue *value);
49
+
50
+
51
+ gboolean goo_canvas_boolean_handled_accumulator (GSignalInvocationHint *ihint,
52
+ GValue *return_accu,
53
+ const GValue *handler_return,
54
+ gpointer dummy);
55
+
56
+
57
+ G_END_DECLS
58
+
59
+ #endif /* __GOO_CANVAS_PRIVATE_H__ */
@@ -0,0 +1,121 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasrect.h - rectangle item.
6
+ */
7
+ #ifndef __GOO_CANVAS_RECT_H__
8
+ #define __GOO_CANVAS_RECT_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include "goocanvasitemsimple.h"
12
+
13
+ G_BEGIN_DECLS
14
+
15
+
16
+ /* This is the data used by both model and view classes. */
17
+ typedef struct _GooCanvasRectData GooCanvasRectData;
18
+ struct _GooCanvasRectData
19
+ {
20
+ gdouble x, y, width, height, radius_x, radius_y;
21
+ };
22
+
23
+
24
+ #define GOO_TYPE_CANVAS_RECT (goo_canvas_rect_get_type ())
25
+ #define GOO_CANVAS_RECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_RECT, GooCanvasRect))
26
+ #define GOO_CANVAS_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_RECT, GooCanvasRectClass))
27
+ #define GOO_IS_CANVAS_RECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_RECT))
28
+ #define GOO_IS_CANVAS_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_RECT))
29
+ #define GOO_CANVAS_RECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_RECT, GooCanvasRectClass))
30
+
31
+
32
+ typedef struct _GooCanvasRect GooCanvasRect;
33
+ typedef struct _GooCanvasRectClass GooCanvasRectClass;
34
+
35
+ /**
36
+ * GooCanvasRect
37
+ *
38
+ * The #GooCanvasRect-struct struct contains private data only.
39
+ */
40
+ struct _GooCanvasRect
41
+ {
42
+ GooCanvasItemSimple parent;
43
+
44
+ GooCanvasRectData *rect_data;
45
+ };
46
+
47
+ struct _GooCanvasRectClass
48
+ {
49
+ GooCanvasItemSimpleClass parent_class;
50
+
51
+ /*< private >*/
52
+
53
+ /* Padding for future expansion */
54
+ void (*_goo_canvas_reserved1) (void);
55
+ void (*_goo_canvas_reserved2) (void);
56
+ void (*_goo_canvas_reserved3) (void);
57
+ void (*_goo_canvas_reserved4) (void);
58
+ };
59
+
60
+
61
+ GType goo_canvas_rect_get_type (void) G_GNUC_CONST;
62
+
63
+ GooCanvasItem* goo_canvas_rect_new (GooCanvasItem *parent,
64
+ gdouble x,
65
+ gdouble y,
66
+ gdouble width,
67
+ gdouble height,
68
+ ...);
69
+
70
+
71
+
72
+ #define GOO_TYPE_CANVAS_RECT_MODEL (goo_canvas_rect_model_get_type ())
73
+ #define GOO_CANVAS_RECT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_RECT_MODEL, GooCanvasRectModel))
74
+ #define GOO_CANVAS_RECT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_RECT_MODEL, GooCanvasRectModelClass))
75
+ #define GOO_IS_CANVAS_RECT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_RECT_MODEL))
76
+ #define GOO_IS_CANVAS_RECT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_RECT_MODEL))
77
+ #define GOO_CANVAS_RECT_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_RECT_MODEL, GooCanvasRectModelClass))
78
+
79
+
80
+ typedef struct _GooCanvasRectModel GooCanvasRectModel;
81
+ typedef struct _GooCanvasRectModelClass GooCanvasRectModelClass;
82
+
83
+ /**
84
+ * GooCanvasRectModel
85
+ *
86
+ * The #GooCanvasRectModel-struct struct contains private data only.
87
+ */
88
+ struct _GooCanvasRectModel
89
+ {
90
+ GooCanvasItemModelSimple parent_object;
91
+
92
+ GooCanvasRectData rect_data;
93
+ };
94
+
95
+ struct _GooCanvasRectModelClass
96
+ {
97
+ GooCanvasItemModelSimpleClass parent_class;
98
+
99
+ /*< private >*/
100
+
101
+ /* Padding for future expansion */
102
+ void (*_goo_canvas_reserved1) (void);
103
+ void (*_goo_canvas_reserved2) (void);
104
+ void (*_goo_canvas_reserved3) (void);
105
+ void (*_goo_canvas_reserved4) (void);
106
+ };
107
+
108
+
109
+ GType goo_canvas_rect_model_get_type (void) G_GNUC_CONST;
110
+
111
+ GooCanvasItemModel* goo_canvas_rect_model_new (GooCanvasItemModel *parent,
112
+ gdouble x,
113
+ gdouble y,
114
+ gdouble width,
115
+ gdouble height,
116
+ ...);
117
+
118
+
119
+ G_END_DECLS
120
+
121
+ #endif /* __GOO_CANVAS_RECT_H__ */
@@ -0,0 +1,110 @@
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__ */
@@ -0,0 +1,139 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvastable.h - table item.
6
+ */
7
+ #ifndef __GOO_CANVAS_TABLE_H__
8
+ #define __GOO_CANVAS_TABLE_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include "goocanvasgroup.h"
12
+
13
+ G_BEGIN_DECLS
14
+
15
+
16
+ typedef struct _GooCanvasTableDimension GooCanvasTableDimension;
17
+ struct _GooCanvasTableDimension
18
+ {
19
+ gint size;
20
+
21
+ gdouble default_spacing;
22
+
23
+ /* These are specific spacings for particular rows or columns. A negative
24
+ value indicates that the default should be used. */
25
+ gdouble *spacings;
26
+
27
+ guint homogeneous : 1;
28
+ };
29
+
30
+
31
+ /* This is the data used by both model and view classes. */
32
+ typedef struct _GooCanvasTableData GooCanvasTableData;
33
+ typedef struct _GooCanvasTableLayoutData GooCanvasTableLayoutData;
34
+ struct _GooCanvasTableData
35
+ {
36
+ /* The explicitly set width or height, or -1. */
37
+ gdouble width, height;
38
+
39
+ /* One for rows & one for columns. */
40
+ GooCanvasTableDimension dimensions[2];
41
+
42
+ gdouble border_width;
43
+
44
+ /* An array of GooCanvasTableChild. */
45
+ GArray *children;
46
+
47
+ GooCanvasTableLayoutData *layout_data;
48
+ };
49
+
50
+
51
+ #define GOO_TYPE_CANVAS_TABLE (goo_canvas_table_get_type ())
52
+ #define GOO_CANVAS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_TABLE, GooCanvasTable))
53
+ #define GOO_CANVAS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_TABLE, GooCanvasTableClass))
54
+ #define GOO_IS_CANVAS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_TABLE))
55
+ #define GOO_IS_CANVAS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_TABLE))
56
+ #define GOO_CANVAS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_TABLE, GooCanvasTableClass))
57
+
58
+
59
+ typedef struct _GooCanvasTable GooCanvasTable;
60
+ typedef struct _GooCanvasTableClass GooCanvasTableClass;
61
+
62
+ /**
63
+ * GooCanvasTable
64
+ *
65
+ * The #GooCanvasTable-struct struct contains private data only.
66
+ */
67
+ struct _GooCanvasTable
68
+ {
69
+ GooCanvasGroup parent;
70
+
71
+ GooCanvasTableData *table_data;
72
+ };
73
+
74
+ struct _GooCanvasTableClass
75
+ {
76
+ GooCanvasGroupClass 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_table_get_type (void) G_GNUC_CONST;
89
+ GooCanvasItem* goo_canvas_table_new (GooCanvasItem *parent,
90
+ ...);
91
+
92
+
93
+
94
+
95
+ #define GOO_TYPE_CANVAS_TABLE_MODEL (goo_canvas_table_model_get_type ())
96
+ #define GOO_CANVAS_TABLE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_TABLE_MODEL, GooCanvasTableModel))
97
+ #define GOO_CANVAS_TABLE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_TABLE_MODEL, GooCanvasTableModelClass))
98
+ #define GOO_IS_CANVAS_TABLE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_TABLE_MODEL))
99
+ #define GOO_IS_CANVAS_TABLE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_TABLE_MODEL))
100
+ #define GOO_CANVAS_TABLE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_TABLE_MODEL, GooCanvasTableModelClass))
101
+
102
+
103
+ typedef struct _GooCanvasTableModel GooCanvasTableModel;
104
+ typedef struct _GooCanvasTableModelClass GooCanvasTableModelClass;
105
+
106
+ /**
107
+ * GooCanvasTableModel
108
+ *
109
+ * The #GooCanvasTableModel-struct struct contains private data only.
110
+ */
111
+ struct _GooCanvasTableModel
112
+ {
113
+ GooCanvasGroupModel parent_object;
114
+
115
+ GooCanvasTableData table_data;
116
+ };
117
+
118
+ struct _GooCanvasTableModelClass
119
+ {
120
+ GooCanvasGroupModelClass parent_class;
121
+
122
+ /*< private >*/
123
+
124
+ /* Padding for future expansion */
125
+ void (*_goo_canvas_reserved1) (void);
126
+ void (*_goo_canvas_reserved2) (void);
127
+ void (*_goo_canvas_reserved3) (void);
128
+ void (*_goo_canvas_reserved4) (void);
129
+ };
130
+
131
+
132
+ GType goo_canvas_table_model_get_type (void) G_GNUC_CONST;
133
+ GooCanvasItemModel* goo_canvas_table_model_new (GooCanvasItemModel *parent,
134
+ ...);
135
+
136
+
137
+ G_END_DECLS
138
+
139
+ #endif /* __GOO_CANVAS_TABLE_H__ */