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,334 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvas.h - the main canvas widget.
6
+ */
7
+ #ifndef __GOO_CANVAS_H__
8
+ #define __GOO_CANVAS_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include <goocanvasenumtypes.h>
12
+ #include <goocanvasellipse.h>
13
+ #include <goocanvasgrid.h>
14
+ #include <goocanvasgroup.h>
15
+ #include <goocanvasimage.h>
16
+ #include <goocanvaspath.h>
17
+ #include <goocanvaspolyline.h>
18
+ #include <goocanvasrect.h>
19
+ #include <goocanvastable.h>
20
+ #include <goocanvastext.h>
21
+ #include <goocanvaswidget.h>
22
+
23
+ G_BEGIN_DECLS
24
+
25
+
26
+ #define GOO_TYPE_CANVAS (goo_canvas_get_type ())
27
+ #define GOO_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS, GooCanvas))
28
+ #define GOO_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS, GooCanvasClass))
29
+ #define GOO_IS_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS))
30
+ #define GOO_IS_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS))
31
+ #define GOO_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS, GooCanvasClass))
32
+
33
+
34
+ typedef struct _GooCanvasClass GooCanvasClass;
35
+
36
+ /**
37
+ * GooCanvas
38
+ *
39
+ * The #GooCanvas-struct struct contains private data only.
40
+ */
41
+ struct _GooCanvas
42
+ {
43
+ GtkContainer container;
44
+
45
+ /* The model for the root item, in model/view mode. */
46
+ GooCanvasItemModel *root_item_model;
47
+
48
+ /* The root canvas item. */
49
+ GooCanvasItem *root_item;
50
+
51
+ /* The bounds of the canvas, in canvas units (not pixels). */
52
+ GooCanvasBounds bounds;
53
+
54
+ /* The scale/zoom factors of the canvas. */
55
+ gdouble scale_x, scale_y;
56
+
57
+ /* The minimum of scale_x and scale_y, to compare with items' visibility
58
+ thresholds. */
59
+ gdouble scale;
60
+
61
+ /* Where the canvas is anchored (where it is displayed when it is smaller
62
+ than the entire window). */
63
+ GtkAnchorType anchor;
64
+
65
+ /* Idle handler ID, for processing updates. */
66
+ guint idle_id;
67
+
68
+ /* This is TRUE if some item in the canvas needs an update. */
69
+ guint need_update : 1;
70
+
71
+ /* This is TRUE if all items in the canvas need to be updated. */
72
+ guint need_entire_subtree_update : 1;
73
+
74
+ /* This is TRUE if all layout should be done to the nearest integer. */
75
+ guint integer_layout : 1;
76
+
77
+ /* This is TRUE if the bounds are calculated automatically, using the bounds
78
+ of all the items in the canvas. */
79
+ guint automatic_bounds : 1;
80
+
81
+ /* This is TRUE if the automatic bounds are calculated from the origin. */
82
+ guint bounds_from_origin : 1;
83
+
84
+ /* This is TRUE if the background is cleared before painting the canvas. */
85
+ guint clear_background : 1;
86
+
87
+ /* This is TRUE if the canvas is completely redrawn when scrolled. It is
88
+ useful when there are sticky items to reduce flicker, but is slower. */
89
+ guint redraw_when_scrolled : 1;
90
+
91
+ /* If the canvas hasn't received the initial expose event yet. */
92
+ guint before_initial_expose : 1;
93
+
94
+ /* This is the padding around the automatic bounds. */
95
+ gdouble bounds_padding;
96
+
97
+ /* The item that the mouse is over. */
98
+ GooCanvasItem *pointer_item;
99
+
100
+ /* The item that has the pointer grab, or NULL. */
101
+ GooCanvasItem *pointer_grab_item;
102
+
103
+ /* This is the item that the grab was started from. When the grab ends
104
+ we synthesize enter/leave notify events from this item. */
105
+ GooCanvasItem *pointer_grab_initial_item;
106
+
107
+ /* This is the mouse button that started an implicit pointer grab.
108
+ When the same button is released the implicit grab ends. */
109
+ guint pointer_grab_button;
110
+
111
+ /* The item that has the keyboard focus, or NULL. */
112
+ GooCanvasItem *focused_item;
113
+
114
+ /* The item that has the keyboard grab, or NULL. */
115
+ GooCanvasItem *keyboard_grab_item;
116
+
117
+ /* The synthesized event used for sending enter-notify and leave-notify
118
+ events to items. */
119
+ GdkEventCrossing crossing_event;
120
+
121
+ /* The main canvas window, which gets scrolled around. */
122
+ GdkWindow *canvas_window;
123
+
124
+ /* The offsets of the canvas within the canvas window, in pixels. These are
125
+ used when the canvas is smaller than the window size and the anchor is not
126
+ NORTH_WEST. */
127
+ gint canvas_x_offset;
128
+ gint canvas_y_offset;
129
+
130
+ /* The adjustments used for scrolling. */
131
+ GtkAdjustment *hadjustment;
132
+ GtkAdjustment *vadjustment;
133
+
134
+ /* Freezes any movement of the canvas window, until thawed. This is used
135
+ when we need to set both adjustments and don't want it to scroll twice. */
136
+ gint freeze_count;
137
+
138
+ /* A window temporarily mapped above the canvas to stop X from scrolling
139
+ the contents unnecessarily (i.e. when we zoom in/out). */
140
+ GdkWindow *tmp_window;
141
+
142
+ /* A hash table mapping canvas item models to canvas items. */
143
+ GHashTable *model_to_item;
144
+
145
+ /* The units of the canvas, which applies to all item coords. */
146
+ GtkUnit units;
147
+
148
+ /* The horizontal and vertical resolution of the display, in dots per inch.
149
+ This is only needed when units other than pixels are used. */
150
+ gdouble resolution_x, resolution_y;
151
+
152
+ /* The multiplers to convert from device units to pixels, taking into account
153
+ the canvas scale, the units setting and the display resolution. */
154
+ gdouble device_to_pixels_x, device_to_pixels_y;
155
+
156
+ /* The list of child widgets (using GooCanvasWidget items). */
157
+ GList *widget_items;
158
+ };
159
+
160
+ /**
161
+ * GooCanvasClass
162
+ * @create_item: a virtual method that subclasses may override to create custom
163
+ * canvas items for item models.
164
+ * @item_created: signal emitted when a new canvas item has been created.
165
+ * Applications can connect to this to setup signal handlers for the new item.
166
+ *
167
+ * The #GooCanvasClass-struct struct contains one virtual method that
168
+ * subclasses may override.
169
+ */
170
+ struct _GooCanvasClass
171
+ {
172
+ /*< private >*/
173
+ GtkContainerClass parent_class;
174
+
175
+ void (* set_scroll_adjustments) (GooCanvas *canvas,
176
+ GtkAdjustment *hadjustment,
177
+ GtkAdjustment *vadjustment);
178
+
179
+ /* Virtual methods. */
180
+ /*< public >*/
181
+ GooCanvasItem* (* create_item) (GooCanvas *canvas,
182
+ GooCanvasItemModel *model);
183
+
184
+ /* Signals. */
185
+ void (* item_created) (GooCanvas *canvas,
186
+ GooCanvasItem *item,
187
+ GooCanvasItemModel *model);
188
+
189
+ /*< private >*/
190
+
191
+ /* Padding for future expansion */
192
+ void (*_goo_canvas_reserved1) (void);
193
+ void (*_goo_canvas_reserved2) (void);
194
+ void (*_goo_canvas_reserved3) (void);
195
+ void (*_goo_canvas_reserved4) (void);
196
+ void (*_goo_canvas_reserved5) (void);
197
+ void (*_goo_canvas_reserved6) (void);
198
+ void (*_goo_canvas_reserved7) (void);
199
+ void (*_goo_canvas_reserved8) (void);
200
+ };
201
+
202
+
203
+ GType goo_canvas_get_type (void) G_GNUC_CONST;
204
+ GtkWidget* goo_canvas_new (void);
205
+
206
+ GooCanvasItem* goo_canvas_get_root_item (GooCanvas *canvas);
207
+ void goo_canvas_set_root_item (GooCanvas *canvas,
208
+ GooCanvasItem *item);
209
+
210
+ GooCanvasItemModel* goo_canvas_get_root_item_model (GooCanvas *canvas);
211
+ void goo_canvas_set_root_item_model (GooCanvas *canvas,
212
+ GooCanvasItemModel *model);
213
+
214
+ GooCanvasItem* goo_canvas_get_static_root_item (GooCanvas *canvas);
215
+ void goo_canvas_set_static_root_item (GooCanvas *canvas,
216
+ GooCanvasItem *item);
217
+
218
+ GooCanvasItemModel* goo_canvas_get_static_root_item_model (GooCanvas *canvas);
219
+ void goo_canvas_set_static_root_item_model (GooCanvas *canvas,
220
+ GooCanvasItemModel *model);
221
+
222
+ GooCanvasItem* goo_canvas_get_item (GooCanvas *canvas,
223
+ GooCanvasItemModel *model);
224
+ GooCanvasItem* goo_canvas_get_item_at (GooCanvas *canvas,
225
+ gdouble x,
226
+ gdouble y,
227
+ gboolean is_pointer_event);
228
+ GList* goo_canvas_get_items_at (GooCanvas *canvas,
229
+ gdouble x,
230
+ gdouble y,
231
+ gboolean is_pointer_event);
232
+ GList* goo_canvas_get_items_in_area(GooCanvas *canvas,
233
+ const GooCanvasBounds *area,
234
+ gboolean inside_area,
235
+ gboolean allow_overlaps,
236
+ gboolean include_containers);
237
+
238
+ gdouble goo_canvas_get_scale (GooCanvas *canvas);
239
+ void goo_canvas_set_scale (GooCanvas *canvas,
240
+ gdouble scale);
241
+
242
+ void goo_canvas_get_bounds (GooCanvas *canvas,
243
+ gdouble *left,
244
+ gdouble *top,
245
+ gdouble *right,
246
+ gdouble *bottom);
247
+ void goo_canvas_set_bounds (GooCanvas *canvas,
248
+ gdouble left,
249
+ gdouble top,
250
+ gdouble right,
251
+ gdouble bottom);
252
+
253
+ void goo_canvas_scroll_to (GooCanvas *canvas,
254
+ gdouble left,
255
+ gdouble top);
256
+
257
+ void goo_canvas_grab_focus (GooCanvas *canvas,
258
+ GooCanvasItem *item);
259
+
260
+ void goo_canvas_render (GooCanvas *canvas,
261
+ cairo_t *cr,
262
+ const GooCanvasBounds *bounds,
263
+ gdouble scale);
264
+
265
+ /*
266
+ * Coordinate conversion.
267
+ */
268
+ void goo_canvas_convert_to_pixels (GooCanvas *canvas,
269
+ gdouble *x,
270
+ gdouble *y);
271
+ void goo_canvas_convert_from_pixels (GooCanvas *canvas,
272
+ gdouble *x,
273
+ gdouble *y);
274
+
275
+ void goo_canvas_convert_to_item_space (GooCanvas *canvas,
276
+ GooCanvasItem *item,
277
+ gdouble *x,
278
+ gdouble *y);
279
+ void goo_canvas_convert_from_item_space (GooCanvas *canvas,
280
+ GooCanvasItem *item,
281
+ gdouble *x,
282
+ gdouble *y);
283
+ void goo_canvas_convert_bounds_to_item_space (GooCanvas *canvas,
284
+ GooCanvasItem *item,
285
+ GooCanvasBounds *bounds);
286
+
287
+
288
+ /*
289
+ * Pointer/keyboard grabbing & ungrabbing.
290
+ */
291
+ GdkGrabStatus goo_canvas_pointer_grab (GooCanvas *canvas,
292
+ GooCanvasItem *item,
293
+ GdkEventMask event_mask,
294
+ GdkCursor *cursor,
295
+ guint32 time);
296
+ void goo_canvas_pointer_ungrab (GooCanvas *canvas,
297
+ GooCanvasItem *item,
298
+ guint32 time);
299
+ GdkGrabStatus goo_canvas_keyboard_grab (GooCanvas *canvas,
300
+ GooCanvasItem *item,
301
+ gboolean owner_events,
302
+ guint32 time);
303
+ void goo_canvas_keyboard_ungrab (GooCanvas *canvas,
304
+ GooCanvasItem *item,
305
+ guint32 time);
306
+
307
+
308
+ /*
309
+ * Internal functions, mainly for canvas subclasses and item implementations.
310
+ */
311
+ cairo_t* goo_canvas_create_cairo_context (GooCanvas *canvas);
312
+ GooCanvasItem* goo_canvas_create_item (GooCanvas *canvas,
313
+ GooCanvasItemModel *model);
314
+ void goo_canvas_unregister_item (GooCanvas *canvas,
315
+ GooCanvasItemModel *model);
316
+ void goo_canvas_update (GooCanvas *canvas);
317
+ void goo_canvas_request_update (GooCanvas *canvas);
318
+ void goo_canvas_request_redraw (GooCanvas *canvas,
319
+ const GooCanvasBounds *bounds);
320
+ void goo_canvas_request_item_redraw (GooCanvas *canvas,
321
+ const GooCanvasBounds *bounds,
322
+ gboolean is_static);
323
+ gdouble goo_canvas_get_default_line_width (GooCanvas *canvas);
324
+
325
+
326
+ void goo_canvas_register_widget_item (GooCanvas *canvas,
327
+ GooCanvasWidget *witem);
328
+ void goo_canvas_unregister_widget_item (GooCanvas *canvas,
329
+ GooCanvasWidget *witem);
330
+
331
+
332
+ G_END_DECLS
333
+
334
+ #endif /* __GOO_CANVAS_H__ */
@@ -0,0 +1,22 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasatk.h - the accessibility code.
6
+ */
7
+ #ifndef __GOO_CANVAS_ATK_H__
8
+ #define __GOO_CANVAS_ATK_H__
9
+
10
+ #include <gtk/gtk.h>
11
+
12
+
13
+ G_BEGIN_DECLS
14
+
15
+ GType goo_canvas_accessible_factory_get_type (void) G_GNUC_CONST;
16
+ GType goo_canvas_item_accessible_factory_get_type (void) G_GNUC_CONST;
17
+ GType goo_canvas_widget_accessible_factory_get_type (void) G_GNUC_CONST;
18
+
19
+
20
+ G_END_DECLS
21
+
22
+ #endif /* __GOO_CANVAS_ATK_H__ */
@@ -0,0 +1,120 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasellipse.h - ellipse item.
6
+ */
7
+ #ifndef __GOO_CANVAS_ELLIPSE_H__
8
+ #define __GOO_CANVAS_ELLIPSE_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 _GooCanvasEllipseData GooCanvasEllipseData;
18
+ struct _GooCanvasEllipseData
19
+ {
20
+ gdouble center_x, center_y, radius_x, radius_y;
21
+ };
22
+
23
+
24
+ #define GOO_TYPE_CANVAS_ELLIPSE (goo_canvas_ellipse_get_type ())
25
+ #define GOO_CANVAS_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_ELLIPSE, GooCanvasEllipse))
26
+ #define GOO_CANVAS_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_ELLIPSE, GooCanvasEllipseClass))
27
+ #define GOO_IS_CANVAS_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_ELLIPSE))
28
+ #define GOO_IS_CANVAS_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_ELLIPSE))
29
+ #define GOO_CANVAS_ELLIPSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_ELLIPSE, GooCanvasEllipseClass))
30
+
31
+
32
+ typedef struct _GooCanvasEllipse GooCanvasEllipse;
33
+ typedef struct _GooCanvasEllipseClass GooCanvasEllipseClass;
34
+
35
+ /**
36
+ * GooCanvasEllipse
37
+ *
38
+ * The #GooCanvasEllipse-struct struct contains private data only.
39
+ */
40
+ struct _GooCanvasEllipse
41
+ {
42
+ GooCanvasItemSimple parent_object;
43
+
44
+ GooCanvasEllipseData *ellipse_data;
45
+ };
46
+
47
+ struct _GooCanvasEllipseClass
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_ellipse_get_type (void) G_GNUC_CONST;
62
+
63
+ GooCanvasItem* goo_canvas_ellipse_new (GooCanvasItem *parent,
64
+ gdouble center_x,
65
+ gdouble center_y,
66
+ gdouble radius_x,
67
+ gdouble radius_y,
68
+ ...);
69
+
70
+
71
+
72
+ #define GOO_TYPE_CANVAS_ELLIPSE_MODEL (goo_canvas_ellipse_model_get_type ())
73
+ #define GOO_CANVAS_ELLIPSE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_ELLIPSE_MODEL, GooCanvasEllipseModel))
74
+ #define GOO_CANVAS_ELLIPSE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_ELLIPSE_MODEL, GooCanvasEllipseModelClass))
75
+ #define GOO_IS_CANVAS_ELLIPSE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_ELLIPSE_MODEL))
76
+ #define GOO_IS_CANVAS_ELLIPSE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_ELLIPSE_MODEL))
77
+ #define GOO_CANVAS_ELLIPSE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_ELLIPSE_MODEL, GooCanvasEllipseModelClass))
78
+
79
+
80
+ typedef struct _GooCanvasEllipseModel GooCanvasEllipseModel;
81
+ typedef struct _GooCanvasEllipseModelClass GooCanvasEllipseModelClass;
82
+
83
+ /**
84
+ * GooCanvasEllipseModel
85
+ *
86
+ * The #GooCanvasEllipseModel-struct struct contains private data only.
87
+ */
88
+ struct _GooCanvasEllipseModel
89
+ {
90
+ GooCanvasItemModelSimple parent_object;
91
+
92
+ GooCanvasEllipseData ellipse_data;
93
+ };
94
+
95
+ struct _GooCanvasEllipseModelClass
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_ellipse_model_get_type (void) G_GNUC_CONST;
110
+
111
+ GooCanvasItemModel* goo_canvas_ellipse_model_new (GooCanvasItemModel *parent,
112
+ gdouble center_x,
113
+ gdouble center_y,
114
+ gdouble radius_x,
115
+ gdouble radius_y,
116
+ ...);
117
+
118
+ G_END_DECLS
119
+
120
+ #endif /* __GOO_CANVAS_ELLIPSE_H__ */
@@ -0,0 +1,33 @@
1
+
2
+ /* Generated data (by glib-mkenums) */
3
+
4
+ #ifndef __GOO_CANVAS_ENUM_TYPES_H__
5
+ #define __GOO_CANVAS_ENUM_TYPES_H__
6
+
7
+ #include <glib-object.h>
8
+
9
+ G_BEGIN_DECLS
10
+ /* Enumerations from "goocanvasitem.h" */
11
+ GType goo_canvas_animate_type_get_type (void);
12
+ #define GOO_TYPE_CANVAS_ANIMATE_TYPE (goo_canvas_animate_type_get_type())
13
+
14
+
15
+ /* Enumerations from "goocanvasutils.h" */
16
+ GType goo_canvas_pointer_events_get_type (void);
17
+ #define GOO_TYPE_CANVAS_POINTER_EVENTS (goo_canvas_pointer_events_get_type())
18
+
19
+
20
+ GType goo_canvas_item_visibility_get_type (void);
21
+ #define GOO_TYPE_CANVAS_ITEM_VISIBILITY (goo_canvas_item_visibility_get_type())
22
+
23
+
24
+ GType goo_canvas_path_command_type_get_type (void);
25
+ #define GOO_TYPE_CANVAS_PATH_COMMAND_TYPE (goo_canvas_path_command_type_get_type())
26
+
27
+
28
+ G_END_DECLS
29
+
30
+ #endif /* __GOO_CANVAS_ENUM_TYPES_H__ */
31
+
32
+ /* Generated data ends here */
33
+
@@ -0,0 +1,153 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005-8 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasgrid.h - a grid item.
6
+ */
7
+ #ifndef __GOO_CANVAS_GRID_H__
8
+ #define __GOO_CANVAS_GRID_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 _GooCanvasGridData GooCanvasGridData;
18
+ struct _GooCanvasGridData
19
+ {
20
+ /* The area that the grid covers. */
21
+ gdouble x, y, width, height;
22
+
23
+ /* The distance between grid lines. */
24
+ gdouble x_step, y_step;
25
+
26
+ /* The offset before the first grid line. */
27
+ gdouble x_offset, y_offset;
28
+
29
+ /* The widths of the grid lines, or -ve to use item's stroke width. */
30
+ gdouble horz_grid_line_width, vert_grid_line_width;
31
+
32
+ /* The color/pattern for the grid lines, or NULL to use the stroke color. */
33
+ cairo_pattern_t *horz_grid_line_pattern, *vert_grid_line_pattern;
34
+
35
+ /* The width of the border around the grid, or -1 for no border. */
36
+ gdouble border_width;
37
+
38
+ /* The color/pattern for the border, or NULL to use the stroke color. */
39
+ cairo_pattern_t *border_pattern;
40
+
41
+ /* If the horizontal and vertical grid lines should be shown. */
42
+ guint show_horz_grid_lines : 1;
43
+ guint show_vert_grid_lines : 1;
44
+
45
+ /* If vertical grid lines are drawn on top. */
46
+ guint vert_grid_lines_on_top : 1;
47
+ };
48
+
49
+
50
+ #define GOO_TYPE_CANVAS_GRID (goo_canvas_grid_get_type ())
51
+ #define GOO_CANVAS_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_GRID, GooCanvasGrid))
52
+ #define GOO_CANVAS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_GRID, GooCanvasGridClass))
53
+ #define GOO_IS_CANVAS_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_GRID))
54
+ #define GOO_IS_CANVAS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_GRID))
55
+ #define GOO_CANVAS_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_GRID, GooCanvasGridClass))
56
+
57
+
58
+ typedef struct _GooCanvasGrid GooCanvasGrid;
59
+ typedef struct _GooCanvasGridClass GooCanvasGridClass;
60
+
61
+ /**
62
+ * GooCanvasGrid
63
+ *
64
+ * The #GooCanvasGrid-struct struct contains private data only.
65
+ */
66
+ struct _GooCanvasGrid
67
+ {
68
+ GooCanvasItemSimple parent_object;
69
+
70
+ GooCanvasGridData *grid_data;
71
+ };
72
+
73
+ struct _GooCanvasGridClass
74
+ {
75
+ GooCanvasItemSimpleClass parent_class;
76
+
77
+ /*< private >*/
78
+
79
+ /* Padding for future expansion */
80
+ void (*_goo_canvas_reserved1) (void);
81
+ void (*_goo_canvas_reserved2) (void);
82
+ void (*_goo_canvas_reserved3) (void);
83
+ void (*_goo_canvas_reserved4) (void);
84
+ };
85
+
86
+
87
+ GType goo_canvas_grid_get_type (void) G_GNUC_CONST;
88
+ GooCanvasItem* goo_canvas_grid_new (GooCanvasItem *parent,
89
+ gdouble x,
90
+ gdouble y,
91
+ gdouble width,
92
+ gdouble height,
93
+ gdouble x_step,
94
+ gdouble y_step,
95
+ gdouble x_offset,
96
+ gdouble y_offset,
97
+ ...);
98
+
99
+
100
+
101
+ #define GOO_TYPE_CANVAS_GRID_MODEL (goo_canvas_grid_model_get_type ())
102
+ #define GOO_CANVAS_GRID_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_GRID_MODEL, GooCanvasGridModel))
103
+ #define GOO_CANVAS_GRID_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_GRID_MODEL, GooCanvasGridModelClass))
104
+ #define GOO_IS_CANVAS_GRID_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_GRID_MODEL))
105
+ #define GOO_IS_CANVAS_GRID_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_GRID_MODEL))
106
+ #define GOO_CANVAS_GRID_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_GRID_MODEL, GooCanvasGridModelClass))
107
+
108
+
109
+ typedef struct _GooCanvasGridModel GooCanvasGridModel;
110
+ typedef struct _GooCanvasGridModelClass GooCanvasGridModelClass;
111
+
112
+ /**
113
+ * GooCanvasGridModel
114
+ *
115
+ * The #GooCanvasGridModel-struct struct contains private data only.
116
+ */
117
+ struct _GooCanvasGridModel
118
+ {
119
+ GooCanvasItemModelSimple parent_object;
120
+
121
+ GooCanvasGridData grid_data;
122
+ };
123
+
124
+ struct _GooCanvasGridModelClass
125
+ {
126
+ GooCanvasItemModelSimpleClass parent_class;
127
+
128
+ /*< private >*/
129
+
130
+ /* Padding for future expansion */
131
+ void (*_goo_canvas_reserved1) (void);
132
+ void (*_goo_canvas_reserved2) (void);
133
+ void (*_goo_canvas_reserved3) (void);
134
+ void (*_goo_canvas_reserved4) (void);
135
+ };
136
+
137
+
138
+ GType goo_canvas_grid_model_get_type (void) G_GNUC_CONST;
139
+ GooCanvasItemModel* goo_canvas_grid_model_new (GooCanvasItemModel *parent,
140
+ gdouble x,
141
+ gdouble y,
142
+ gdouble width,
143
+ gdouble height,
144
+ gdouble x_step,
145
+ gdouble y_step,
146
+ gdouble x_offset,
147
+ gdouble y_offset,
148
+ ...);
149
+
150
+
151
+ G_END_DECLS
152
+
153
+ #endif /* __GOO_CANVAS_GRID_H__ */