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,479 @@
1
+ /*
2
+ * GooCanvas. Copyright (C) 2005 Damon Chaplin.
3
+ * Released under the GNU LGPL license. See COPYING for details.
4
+ *
5
+ * goocanvasitem.h - interface for canvas items & groups.
6
+ */
7
+ #ifndef __GOO_CANVAS_ITEM_H__
8
+ #define __GOO_CANVAS_ITEM_H__
9
+
10
+ #include <gtk/gtk.h>
11
+ #include "goocanvasstyle.h"
12
+
13
+ G_BEGIN_DECLS
14
+
15
+
16
+ /**
17
+ * GooCanvasAnimateType
18
+ * @GOO_CANVAS_ANIMATE_FREEZE: the item remains in the final position.
19
+ * @GOO_CANVAS_ANIMATE_RESET: the item is moved back to the initial position.
20
+ * @GOO_CANVAS_ANIMATE_RESTART: the animation is restarted from the initial
21
+ * position.
22
+ * @GOO_CANVAS_ANIMATE_BOUNCE: the animation bounces back and forth between the
23
+ * start and end positions.
24
+ *
25
+ * #GooCanvasAnimateType is used to specify what happens when the end of an
26
+ * animation is reached.
27
+ */
28
+ typedef enum
29
+ {
30
+ GOO_CANVAS_ANIMATE_FREEZE,
31
+ GOO_CANVAS_ANIMATE_RESET,
32
+ GOO_CANVAS_ANIMATE_RESTART,
33
+ GOO_CANVAS_ANIMATE_BOUNCE
34
+ } GooCanvasAnimateType;
35
+
36
+
37
+ /**
38
+ * GooCanvasBounds
39
+ * @x1: the left edge.
40
+ * @y1: the top edge.
41
+ * @x2: the right edge.
42
+ * @y2: the bottom edge.
43
+ *
44
+ * #GooCanvasBounds represents the bounding box of an item in the canvas.
45
+ */
46
+ typedef struct _GooCanvasBounds GooCanvasBounds;
47
+ struct _GooCanvasBounds
48
+ {
49
+ gdouble x1, y1, x2, y2;
50
+ };
51
+
52
+ GType goo_canvas_bounds_get_type (void) G_GNUC_CONST;
53
+ #define GOO_TYPE_CANVAS_BOUNDS (goo_canvas_bounds_get_type ())
54
+
55
+
56
+ #define GOO_TYPE_CANVAS_ITEM (goo_canvas_item_get_type ())
57
+ #define GOO_CANVAS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_ITEM, GooCanvasItem))
58
+ #define GOO_IS_CANVAS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_ITEM))
59
+ #define GOO_CANVAS_ITEM_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GOO_TYPE_CANVAS_ITEM, GooCanvasItemIface))
60
+
61
+
62
+ /* Workaround for circular dependencies. Include this file first. */
63
+ typedef struct _GooCanvas GooCanvas;
64
+ typedef struct _GooCanvasItemModel GooCanvasItemModel;
65
+
66
+
67
+ /**
68
+ * GooCanvasItem
69
+ *
70
+ * #GooCanvasItem is a typedef used for objects that implement the
71
+ * #GooCanvasItem interface.
72
+ *
73
+ * (There is no actual #GooCanvasItem struct, since it is only an interface.
74
+ * But using '#GooCanvasItem' is more helpful than using '#GObject'.)
75
+ */
76
+ typedef struct _GooCanvasItem GooCanvasItem;
77
+
78
+
79
+ /**
80
+ * GooCanvasItemIface
81
+ * @get_canvas: returns the canvas the item is in.
82
+ * @set_canvas: sets the canvas the item is in.
83
+ * @get_n_children: returns the number of children of the item.
84
+ * @get_child: returns the child at the given index.
85
+ * @request_update: requests that an update is scheduled.
86
+ * @add_child: adds a child.
87
+ * @move_child: moves a child up or down the stacking order.
88
+ * @remove_child: removes a child.
89
+ * @get_child_property: gets a child property of a given child item,
90
+ * e.g. the "row" or "column" property of an item in a #GooCanvasTable.
91
+ * @set_child_property: sets a child property for a given child item.
92
+ * @get_transform_for_child: gets the transform used to lay out a given child.
93
+ * @get_parent: gets the item's parent.
94
+ * @set_parent: sets the item's parent.
95
+ * @get_bounds: gets the bounds of the item.
96
+ * @get_items_at: gets all the items at the given point.
97
+ * @update: updates the item, if needed. It recalculates the bounds of the item
98
+ * and requests redraws of parts of the canvas if necessary.
99
+ * @paint: renders the item to the given cairo context.
100
+ * @get_requested_area: returns the requested area of the item, in its parent's
101
+ * coordinate space. This is only used for items in layout containers such as
102
+ * #GooCanvasTable.
103
+ * @allocate_area: allocates the item's area, in its parent's coordinate space.
104
+ * The item must recalculate its bounds and request redraws of parts of the
105
+ * canvas if necessary. This is only used for items in layout containers such
106
+ * as #GooCanvasTable.
107
+ * @get_transform: gets the item's transformation matrix.
108
+ * @set_transform: sets the item's transformation matrix.
109
+ * @get_style: gets the item's style.
110
+ * @set_style: sets the item's style.
111
+ * @is_visible: returns %TRUE if the item is currently visible.
112
+ * @get_is_static: returns %TRUE if the item is static.
113
+ * @set_is_static: notifies the item whether it is static or not.
114
+ * @get_requested_height: returns the requested height of the item,
115
+ * given a particular allocated width, using the parent's coordinate space.
116
+ * @get_model: gets the model that the canvas item is viewing.
117
+ * @set_model: sets the model that the canvas item will view.
118
+ * @enter_notify_event: signal emitted when the mouse enters the item.
119
+ * @leave_notify_event: signal emitted when the mouse leaves the item.
120
+ * @motion_notify_event: signal emitted when the mouse moves within the item.
121
+ * @button_press_event: signal emitted when a mouse button is pressed within
122
+ * the item.
123
+ * @button_release_event: signal emitted when a mouse button is released.
124
+ * @focus_in_event: signal emitted when the item receices the keyboard focus.
125
+ * @focus_out_event: signal emitted when the item loses the keyboard focus.
126
+ * @key_press_event: signal emitted when a key is pressed.
127
+ * @key_release_event: signal emitted when a key is released.
128
+ * @grab_broken_event: signal emitted when a grab that the item has is lost.
129
+ * @child_notify: signal emitted when a child property is changed.
130
+ * @query_tooltip: signal emitted to query the tooltip of an item.
131
+ * @animation_finished: signal emitted when the item's animation has finished.
132
+ * @scroll_event: signal emitted when the mouse wheel is activated within
133
+ * the item.
134
+ *
135
+ * #GooCanvasItemIFace holds the virtual methods that make up the
136
+ * #GooCanvasItem interface.
137
+ *
138
+ * Simple canvas items only need to implement the get_parent(), set_parent(),
139
+ * get_bounds(), get_items_at(), update() and paint() methods (and also
140
+ * get_requested_area() and allocate_area() if they are going to be used
141
+ * inside a layout container like #GooCanvasTable).
142
+ *
143
+ * Items that support transforms should also implement get_transform() and
144
+ * set_transform(). Items that support styles should implement get_style()
145
+ * and set_style().
146
+ *
147
+ * Container items must implement get_canvas(), set_canvas(),
148
+ * get_n_children(), get_child() and request_update(). Containers that support
149
+ * dynamic changes to their children should implement add_child(),
150
+ * move_child() and remove_child(). Layout containers like #GooCanvasTable
151
+ * may implement get_child_property(), set_child_property() and
152
+ * get_transform_for_child().
153
+ */
154
+ typedef struct _GooCanvasItemIface GooCanvasItemIface;
155
+
156
+ struct _GooCanvasItemIface
157
+ {
158
+ /*< private >*/
159
+ GTypeInterface base_iface;
160
+
161
+ /*< public >*/
162
+ /* Virtual methods that group items must implement. */
163
+ GooCanvas* (* get_canvas) (GooCanvasItem *item);
164
+ void (* set_canvas) (GooCanvasItem *item,
165
+ GooCanvas *canvas);
166
+ gint (* get_n_children) (GooCanvasItem *item);
167
+ GooCanvasItem* (* get_child) (GooCanvasItem *item,
168
+ gint child_num);
169
+ void (* request_update) (GooCanvasItem *item);
170
+
171
+ /* Virtual methods that group items may implement. */
172
+ void (* add_child) (GooCanvasItem *item,
173
+ GooCanvasItem *child,
174
+ gint position);
175
+ void (* move_child) (GooCanvasItem *item,
176
+ gint old_position,
177
+ gint new_position);
178
+ void (* remove_child) (GooCanvasItem *item,
179
+ gint child_num);
180
+ void (* get_child_property) (GooCanvasItem *item,
181
+ GooCanvasItem *child,
182
+ guint property_id,
183
+ GValue *value,
184
+ GParamSpec *pspec);
185
+ void (* set_child_property) (GooCanvasItem *item,
186
+ GooCanvasItem *child,
187
+ guint property_id,
188
+ const GValue *value,
189
+ GParamSpec *pspec);
190
+ gboolean (* get_transform_for_child) (GooCanvasItem *item,
191
+ GooCanvasItem *child,
192
+ cairo_matrix_t *transform);
193
+
194
+ /* Virtual methods that all canvas items must implement. */
195
+ GooCanvasItem* (* get_parent) (GooCanvasItem *item);
196
+ void (* set_parent) (GooCanvasItem *item,
197
+ GooCanvasItem *parent);
198
+ void (* get_bounds) (GooCanvasItem *item,
199
+ GooCanvasBounds *bounds);
200
+ GList* (* get_items_at) (GooCanvasItem *item,
201
+ gdouble x,
202
+ gdouble y,
203
+ cairo_t *cr,
204
+ gboolean is_pointer_event,
205
+ gboolean parent_is_visible,
206
+ GList *found_items);
207
+ void (* update) (GooCanvasItem *item,
208
+ gboolean entire_tree,
209
+ cairo_t *cr,
210
+ GooCanvasBounds *bounds);
211
+ void (* paint) (GooCanvasItem *item,
212
+ cairo_t *cr,
213
+ const GooCanvasBounds *bounds,
214
+ gdouble scale);
215
+
216
+ gboolean (* get_requested_area) (GooCanvasItem *item,
217
+ cairo_t *cr,
218
+ GooCanvasBounds *requested_area);
219
+ void (* allocate_area) (GooCanvasItem *item,
220
+ cairo_t *cr,
221
+ const GooCanvasBounds *requested_area,
222
+ const GooCanvasBounds *allocated_area,
223
+ gdouble x_offset,
224
+ gdouble y_offset);
225
+
226
+ /* Virtual methods that canvas items may implement. */
227
+ gboolean (* get_transform) (GooCanvasItem *item,
228
+ cairo_matrix_t *transform);
229
+ void (* set_transform) (GooCanvasItem *item,
230
+ const cairo_matrix_t *transform);
231
+ GooCanvasStyle* (* get_style) (GooCanvasItem *item);
232
+ void (* set_style) (GooCanvasItem *item,
233
+ GooCanvasStyle *style);
234
+ gboolean (* is_visible) (GooCanvasItem *item);
235
+ gdouble (* get_requested_height) (GooCanvasItem *item,
236
+ cairo_t *cr,
237
+ gdouble width);
238
+
239
+ /* Virtual methods that model/view items must implement. */
240
+ GooCanvasItemModel* (* get_model) (GooCanvasItem *item);
241
+ void (* set_model) (GooCanvasItem *item,
242
+ GooCanvasItemModel *model);
243
+
244
+
245
+ /* Signals. */
246
+ gboolean (* enter_notify_event) (GooCanvasItem *item,
247
+ GooCanvasItem *target,
248
+ GdkEventCrossing *event);
249
+ gboolean (* leave_notify_event) (GooCanvasItem *item,
250
+ GooCanvasItem *target,
251
+ GdkEventCrossing *event);
252
+ gboolean (* motion_notify_event) (GooCanvasItem *item,
253
+ GooCanvasItem *target,
254
+ GdkEventMotion *event);
255
+ gboolean (* button_press_event) (GooCanvasItem *item,
256
+ GooCanvasItem *target,
257
+ GdkEventButton *event);
258
+ gboolean (* button_release_event) (GooCanvasItem *item,
259
+ GooCanvasItem *target,
260
+ GdkEventButton *event);
261
+ gboolean (* focus_in_event) (GooCanvasItem *item,
262
+ GooCanvasItem *target,
263
+ GdkEventFocus *event);
264
+ gboolean (* focus_out_event) (GooCanvasItem *item,
265
+ GooCanvasItem *target,
266
+ GdkEventFocus *event);
267
+ gboolean (* key_press_event) (GooCanvasItem *item,
268
+ GooCanvasItem *target,
269
+ GdkEventKey *event);
270
+ gboolean (* key_release_event) (GooCanvasItem *item,
271
+ GooCanvasItem *target,
272
+ GdkEventKey *event);
273
+ gboolean (* grab_broken_event) (GooCanvasItem *item,
274
+ GooCanvasItem *target,
275
+ GdkEventGrabBroken *event);
276
+ void (* child_notify) (GooCanvasItem *item,
277
+ GParamSpec *pspec);
278
+ gboolean (* query_tooltip) (GooCanvasItem *item,
279
+ gdouble x,
280
+ gdouble y,
281
+ gboolean keyboard_tooltip,
282
+ GtkTooltip *tooltip);
283
+
284
+ gboolean (* get_is_static) (GooCanvasItem *item);
285
+ void (* set_is_static) (GooCanvasItem *item,
286
+ gboolean is_static);
287
+
288
+ void (* animation_finished) (GooCanvasItem *item,
289
+ gboolean stopped);
290
+
291
+ gboolean (* scroll_event) (GooCanvasItem *item,
292
+ GooCanvasItem *target,
293
+ GdkEventScroll *event);
294
+
295
+ /*< private >*/
296
+
297
+ /* Padding for future expansion */
298
+ void (*_goo_canvas_reserved1) (void);
299
+ void (*_goo_canvas_reserved2) (void);
300
+ void (*_goo_canvas_reserved3) (void);
301
+ void (*_goo_canvas_reserved4) (void);
302
+ };
303
+
304
+
305
+ GType goo_canvas_item_get_type (void) G_GNUC_CONST;
306
+
307
+
308
+ /*
309
+ * Group functions - these should only be called on container items.
310
+ */
311
+ gint goo_canvas_item_get_n_children (GooCanvasItem *item);
312
+ GooCanvasItem* goo_canvas_item_get_child (GooCanvasItem *item,
313
+ gint child_num);
314
+ gint goo_canvas_item_find_child (GooCanvasItem *item,
315
+ GooCanvasItem *child);
316
+ void goo_canvas_item_add_child (GooCanvasItem *item,
317
+ GooCanvasItem *child,
318
+ gint position);
319
+ void goo_canvas_item_move_child (GooCanvasItem *item,
320
+ gint old_position,
321
+ gint new_position);
322
+ void goo_canvas_item_remove_child (GooCanvasItem *item,
323
+ gint child_num);
324
+
325
+ void goo_canvas_item_get_child_property (GooCanvasItem *item,
326
+ GooCanvasItem *child,
327
+ const gchar *property_name,
328
+ GValue *value);
329
+ void goo_canvas_item_set_child_property (GooCanvasItem *item,
330
+ GooCanvasItem *child,
331
+ const gchar *property_name,
332
+ const GValue *value);
333
+ void goo_canvas_item_get_child_properties (GooCanvasItem *item,
334
+ GooCanvasItem *child,
335
+ ...) G_GNUC_NULL_TERMINATED;
336
+ void goo_canvas_item_set_child_properties (GooCanvasItem *item,
337
+ GooCanvasItem *child,
338
+ ...) G_GNUC_NULL_TERMINATED;
339
+ void goo_canvas_item_get_child_properties_valist (GooCanvasItem *item,
340
+ GooCanvasItem *child,
341
+ va_list var_args);
342
+ void goo_canvas_item_set_child_properties_valist (GooCanvasItem *item,
343
+ GooCanvasItem *child,
344
+ va_list var_args);
345
+
346
+ gboolean goo_canvas_item_get_transform_for_child (GooCanvasItem *item,
347
+ GooCanvasItem *child,
348
+ cairo_matrix_t *transform);
349
+
350
+
351
+ /*
352
+ * Item functions - these are safe to call on all items.
353
+ */
354
+ GooCanvas* goo_canvas_item_get_canvas (GooCanvasItem *item);
355
+ void goo_canvas_item_set_canvas (GooCanvasItem *item,
356
+ GooCanvas *canvas);
357
+ GooCanvasItem* goo_canvas_item_get_parent (GooCanvasItem *item);
358
+ void goo_canvas_item_set_parent (GooCanvasItem *item,
359
+ GooCanvasItem *parent);
360
+ void goo_canvas_item_remove (GooCanvasItem *item);
361
+ gboolean goo_canvas_item_is_container (GooCanvasItem *item);
362
+
363
+ void goo_canvas_item_raise (GooCanvasItem *item,
364
+ GooCanvasItem *above);
365
+ void goo_canvas_item_lower (GooCanvasItem *item,
366
+ GooCanvasItem *below);
367
+
368
+ gboolean goo_canvas_item_get_transform (GooCanvasItem *item,
369
+ cairo_matrix_t *transform);
370
+ void goo_canvas_item_set_transform (GooCanvasItem *item,
371
+ const cairo_matrix_t *transform);
372
+ gboolean goo_canvas_item_get_simple_transform (GooCanvasItem *item,
373
+ gdouble *x,
374
+ gdouble *y,
375
+ gdouble *scale,
376
+ gdouble *rotation);
377
+ void goo_canvas_item_set_simple_transform (GooCanvasItem *item,
378
+ gdouble x,
379
+ gdouble y,
380
+ gdouble scale,
381
+ gdouble rotation);
382
+
383
+ void goo_canvas_item_translate (GooCanvasItem *item,
384
+ gdouble tx,
385
+ gdouble ty);
386
+ void goo_canvas_item_scale (GooCanvasItem *item,
387
+ gdouble sx,
388
+ gdouble sy);
389
+ void goo_canvas_item_rotate (GooCanvasItem *item,
390
+ gdouble degrees,
391
+ gdouble cx,
392
+ gdouble cy);
393
+ void goo_canvas_item_skew_x (GooCanvasItem *item,
394
+ gdouble degrees,
395
+ gdouble cx,
396
+ gdouble cy);
397
+ void goo_canvas_item_skew_y (GooCanvasItem *item,
398
+ gdouble degrees,
399
+ gdouble cx,
400
+ gdouble cy);
401
+
402
+ GooCanvasStyle* goo_canvas_item_get_style (GooCanvasItem *item);
403
+ void goo_canvas_item_set_style (GooCanvasItem *item,
404
+ GooCanvasStyle *style);
405
+
406
+ void goo_canvas_item_animate (GooCanvasItem *item,
407
+ gdouble x,
408
+ gdouble y,
409
+ gdouble scale,
410
+ gdouble degrees,
411
+ gboolean absolute,
412
+ gint duration,
413
+ gint step_time,
414
+ GooCanvasAnimateType type);
415
+ void goo_canvas_item_stop_animation (GooCanvasItem *item);
416
+
417
+
418
+
419
+ void goo_canvas_item_get_bounds (GooCanvasItem *item,
420
+ GooCanvasBounds *bounds);
421
+ GList* goo_canvas_item_get_items_at (GooCanvasItem *item,
422
+ gdouble x,
423
+ gdouble y,
424
+ cairo_t *cr,
425
+ gboolean is_pointer_event,
426
+ gboolean parent_is_visible,
427
+ GList *found_items);
428
+ gboolean goo_canvas_item_is_visible (GooCanvasItem *item);
429
+
430
+ GooCanvasItemModel* goo_canvas_item_get_model (GooCanvasItem *item);
431
+ void goo_canvas_item_set_model (GooCanvasItem *item,
432
+ GooCanvasItemModel *model);
433
+
434
+ void goo_canvas_item_request_update (GooCanvasItem *item);
435
+ void goo_canvas_item_ensure_updated (GooCanvasItem *item);
436
+ void goo_canvas_item_update (GooCanvasItem *item,
437
+ gboolean entire_tree,
438
+ cairo_t *cr,
439
+ GooCanvasBounds *bounds);
440
+ void goo_canvas_item_paint (GooCanvasItem *item,
441
+ cairo_t *cr,
442
+ const GooCanvasBounds *bounds,
443
+ gdouble scale);
444
+
445
+ gboolean goo_canvas_item_get_requested_area (GooCanvasItem *item,
446
+ cairo_t *cr,
447
+ GooCanvasBounds *requested_area);
448
+ gdouble goo_canvas_item_get_requested_height (GooCanvasItem *item,
449
+ cairo_t *cr,
450
+ gdouble width);
451
+ void goo_canvas_item_allocate_area (GooCanvasItem *item,
452
+ cairo_t *cr,
453
+ const GooCanvasBounds *requested_area,
454
+ const GooCanvasBounds *allocated_area,
455
+ gdouble x_offset,
456
+ gdouble y_offset);
457
+
458
+ gboolean goo_canvas_item_get_is_static (GooCanvasItem *item);
459
+ void goo_canvas_item_set_is_static (GooCanvasItem *item,
460
+ gboolean is_static);
461
+
462
+
463
+ /*
464
+ * Functions to support child properties when implementing new canvas items.
465
+ */
466
+ void goo_canvas_item_class_install_child_property (GObjectClass *iclass,
467
+ guint property_id,
468
+ GParamSpec *pspec);
469
+ GParamSpec* goo_canvas_item_class_find_child_property (GObjectClass *iclass,
470
+ const gchar *property_name);
471
+ GParamSpec** goo_canvas_item_class_list_child_properties (GObjectClass *iclass,
472
+ guint *n_properties);
473
+
474
+
475
+
476
+
477
+ G_END_DECLS
478
+
479
+ #endif /* __GOO_CANVAS_ITEM_H__ */