Debian Codegraph @

demo/mv-demo.c

raw symbols SCIP
1 /*
2 * GooCanvas Demo. Copyright (C) 2005 Damon Chaplin.
3 * Released under the GNU LGPL license. See COPYING for details.
4 *
5 * main.c - demo app.
6 */
7 #include <config.h>cxx . . $ `<file>/config.h`/
8 #include <math.h>
9 #include <string.h>
10 #include <stdlib.h>
11 #include <glib/gi18n.h>
12 #include <gtk/gtk.h>
13 #include <cairo.h>
14 #if CAIRO_HAS_PDF_SURFACEcxx . . $ `<external>/14630995186892600159/cairo-features.h:22:9`!
15 #include <cairo-pdf.h>
16 #endif
17 #include <goocanvas.h>cxx . . $ `<file>/src/goocanvas.h`/
18
19 static GooCanvasItemModelcxx . . $ GooCanvasItemModel# *ellipse2cxx . . $ ellipse2., *textitemcxx . . $ textitem.;
20
21 static gbooleancxx . . $ gboolean# draggingcxx . . $ dragging. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
22 static double drag_xcxx . . $ drag_x., drag_ycxx . . $ drag_y.;
23
24 GtkWidgetcxx . . $ GtkWidget# *create_canvas_fifteencxx . . $ create_canvas_fifteen(2369ce5e9f2c7dfd). (void);
25 GtkWidgetcxx . . $ GtkWidget# *create_canvas_featurescxx . . $ create_canvas_features(2369ce5e9f2c7dfd). (void);
26 GtkWidgetcxx . . $ GtkWidget# *create_canvas_arrowheadcxx . . $ create_canvas_arrowhead(2369ce5e9f2c7dfd). (void);
27 GtkWidgetcxx . . $ GtkWidget# *create_canvas_scalabilitycxx . . $ create_canvas_scalability(2369ce5e9f2c7dfd). (void);
28 GtkWidgetcxx . . $ GtkWidget# *create_grabs_pagecxx . . $ create_grabs_page(2369ce5e9f2c7dfd). (void);
29 GtkWidgetcxx . . $ GtkWidget# *create_events_pagecxx . . $ create_events_page(2369ce5e9f2c7dfd). (void);
30 GtkWidgetcxx . . $ GtkWidget# *create_paths_pagecxx . . $ create_paths_page(2369ce5e9f2c7dfd). (void);
31 GtkWidgetcxx . . $ GtkWidget# *create_focus_pagecxx . . $ create_focus_page(2369ce5e9f2c7dfd). (void);
32 GtkWidgetcxx . . $ GtkWidget# *create_animation_pagecxx . . $ create_animation_page(2369ce5e9f2c7dfd). (void);
33 GtkWidgetcxx . . $ GtkWidget# *create_clipping_pagecxx . . $ create_clipping_page(2369ce5e9f2c7dfd). (void);
34 GtkWidgetcxx . . $ GtkWidget# *create_table_pagecxx . . $ create_table_page(2369ce5e9f2c7dfd). (void);
35
36 #if CAIRO_HAS_PDF_SURFACEcxx . . $ `<external>/14630995186892600159/cairo-features.h:22:9`!
37 static void
38 write_pdf_clickedcxx . . $ write_pdf_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
39 {
40 cairo_surface_tcxx . . $ cairo_surface_t# *surface;
41 cairo_tcxx . . $ cairo_t# *cr;
42
43 g_printcxx . . $ g_print(326aeb464d16410c). ("In write_pdf_clicked\n");
44
45 surface = cairo_pdf_surface_createcxx . . $ cairo_pdf_surface_create(c0e5a590c28f25d8). ("demo.pdf", 9 * 72, 10 * 72);
46 cr = cairo_createcxx . . $ cairo_create(b6f0039b687ec546). (surface);
47
48 /* Place it in the middle of our 9x10 page. */
49 cairo_translatecxx . . $ cairo_translate(e818af540ecaa23a). (cr, 20, 130);
50
51 goo_canvas_rendercxx . . $ goo_canvas_render(f302943162366fdd). (canvas, cr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 1.0);
52
53 cairo_show_pagecxx . . $ cairo_show_page(21788b7825b29bf). (cr);
54
55 cairo_surface_destroycxx . . $ cairo_surface_destroy(2fa2b40fabeeffa2). (surface);
56 cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr);
57 }
58 #endif
59
60 static void
61 zoom_changedcxx . . $ zoom_changed(78b277098fa3d554). (GtkAdjustmentcxx . . $ GtkAdjustment# *adj, GooCanvascxx . . $ GooCanvas# *canvas)
62 {
63 goo_canvas_set_scalecxx . . $ goo_canvas_set_scale(c37ee1de0f59ec0e). (canvas, gtk_adjustment_get_valuecxx . . $ gtk_adjustment_get_value(23c94c3b49116bb3). (adj));
64 }
65
66
67 static void
68 center_toggledcxx . . $ center_toggled(4e43d67e4b96ef03). (GtkToggleButtoncxx . . $ GtkToggleButton# *button, gpointercxx . . $ gpointer# data)
69 {
70 /*foo_canvas_set_center_scroll_region (data,
71 gtk_toggle_button_get_active (button));*/
72 }
73
74
75 static void
76 anchor_toggledcxx . . $ anchor_toggled(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
77 {
78 GooCanvasAnchorTypecxx . . $ GooCanvasAnchorType# anchor;
79
80 anchor = GPOINTER_TO_INTcxx . . $ `<external>/10505296616216143549/glibconfig.h:103:9`! (g_object_get_data (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (button), "anchor"));
81
82 if (gtk_toggle_button_get_activecxx . . $ gtk_toggle_button_get_active(a71b61b8ee1ea69c). (GTK_TOGGLE_BUTTONcxx . . $ `<external>/15753648026364605063/gtktogglebutton.h:39:9`! (button)))
83 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (canvas, "anchor", anchor, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
84 }
85
86
87 static void
88 scroll_to_50_50_clickedcxx . . $ scroll_to_50_50_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
89 {
90 goo_canvas_scroll_tocxx . . $ goo_canvas_scroll_to(357cc703b9a7d012). (canvas, 50, 50);
91 }
92
93
94 static void
95 scroll_to_500_500_clickedcxx . . $ scroll_to_500_500_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
96 {
97 goo_canvas_scroll_tocxx . . $ goo_canvas_scroll_to(357cc703b9a7d012). (canvas, 500, 500);
98 }
99
100
101 static void
102 scroll_to_250_250_clickedcxx . . $ scroll_to_250_250_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
103 {
104 goo_canvas_scroll_tocxx . . $ goo_canvas_scroll_to(357cc703b9a7d012). (canvas, 250, 250);
105 }
106
107
108 static void
109 animate_ellipse_clickedcxx . . $ animate_ellipse_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
110 {
111 #if 1
112 goo_canvas_item_model_animatecxx . . $ goo_canvas_item_model_animate(fc773420c510e2c4). (ellipse2cxx . . $ ellipse2., 100, 100, 1, 90, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, 1000, 40,
113 GOO_CANVAS_ANIMATE_BOUNCEcxx . . $ GOO_CANVAS_ANIMATE_BOUNCE.);
114 #endif
115 #if 0
116 goo_canvas_item_model_animate (textitem, -300, -200, 1, 90, TRUE, 1000, 40,
117 GOO_CANVAS_ANIMATE_BOUNCE);
118 #endif
119 }
120
121
122 static void
123 stop_animation_clickedcxx . . $ stop_animation_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
124 {
125 goo_canvas_item_model_stop_animationcxx . . $ goo_canvas_item_model_stop_animation(3d25d2f44613fd4). (ellipse2cxx . . $ ellipse2.);
126 }
127
128
129 static void
130 change_bounds_clickedcxx . . $ change_bounds_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
131 {
132 static gdoublecxx . . $ gdouble# bounds[4][4] = {
133 { -100, -100, 200, 200 },
134 { 100, 100, 200, 200 },
135 { 0, 0, 300, 300 },
136 { 0, 0, 604, 454 }
137 };
138 static gintcxx . . $ gint# bounds_num = 0;
139
140 gbooleancxx . . $ gboolean# automatic_bounds = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
141 gbooleancxx . . $ gboolean# bounds_from_origin = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
142 gdoublecxx . . $ gdouble# bounds_padding = 50.0;
143
144 if (bounds_num < 4)
145 {
146 automatic_bounds = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
147 goo_canvas_set_boundscxx . . $ goo_canvas_set_bounds(c765acac0aeef5c4). (canvas,
148 bounds[bounds_num][0], bounds[bounds_num][1],
149 bounds[bounds_num][2], bounds[bounds_num][3]);
150 }
151 else if (bounds_num == 4)
152 {
153 bounds_from_origin = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
154 bounds_padding = 50.0;
155 }
156
157 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (canvas),
158 "automatic-bounds", automatic_bounds,
159 "bounds-from-origin", bounds_from_origin,
160 "bounds-padding", bounds_padding,
161 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
162
163 bounds_num = (bounds_num + 1) % 6;
164 }
165
166
167 static void
168 move_ellipse_clickedcxx . . $ move_ellipse_clicked(b62913d0731e48df). (GtkWidgetcxx . . $ GtkWidget# *button, GooCanvascxx . . $ GooCanvas# *canvas)
169 {
170 static int last_state = 0;
171
172 #if 0
173 g_print ("Moving ellipse\n");
174 #endif
175
176 goo_canvas_item_model_set_transformcxx . . $ goo_canvas_item_model_set_transform(1468d9f743732aac). (ellipse2cxx . . $ ellipse2., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
177
178 if (last_state == 0)
179 {
180 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (ellipse2cxx . . $ ellipse2.,
181 "center-x", 300.0,
182 "center-y", 70.0,
183 "radius-x", 45.0,
184 "radius-y", 30.0,
185 "fill-color", "red",
186 "stroke-color", "midnightblue",
187 "line-width", 4.0,
188 "title", "A red ellipse",
189 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
190 last_state = 1;
191 }
192 else if (last_state == 1)
193 {
194 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (ellipse2cxx . . $ ellipse2.,
195 "center-x", 390.0,
196 "center-y", 150.0,
197 "radius-x", 45.0,
198 "radius-y", 40.0,
199 "fill-color", "brown",
200 "stroke-color", "midnightblue",
201 "line-width", 4.0,
202 "title", "A brown ellipse",
203 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
204 last_state = 2;
205 }
206 else if (last_state == 2)
207 {
208 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (ellipse2cxx . . $ ellipse2.,
209 "center-x", 0.0,
210 "center-y", 0.0,
211 "radius-y", 30.0,
212 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
213 goo_canvas_item_model_set_simple_transformcxx . . $ goo_canvas_item_model_set_simple_transform(d8fe5dfada0c7dbf). (ellipse2cxx . . $ ellipse2., 100, 100, 1, 0);
214 last_state = 3;
215 }
216 else if (last_state == 3)
217 {
218 goo_canvas_item_model_set_simple_transformcxx . . $ goo_canvas_item_model_set_simple_transform(d8fe5dfada0c7dbf). (ellipse2cxx . . $ ellipse2., 200, 100, 2, 0);
219 last_state = 4;
220 }
221 else if (last_state == 4)
222 {
223 goo_canvas_item_model_set_simple_transformcxx . . $ goo_canvas_item_model_set_simple_transform(d8fe5dfada0c7dbf). (ellipse2cxx . . $ ellipse2., 200, 200, 1, 45);
224 last_state = 5;
225 }
226 else if (last_state == 5)
227 {
228 goo_canvas_item_model_set_simple_transformcxx . . $ goo_canvas_item_model_set_simple_transform(d8fe5dfada0c7dbf). (ellipse2cxx . . $ ellipse2., 50, 50, 0.2, 225);
229 last_state = 6;
230 }
231 else
232 {
233 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (ellipse2cxx . . $ ellipse2.,
234 "center-x", 335.0,
235 "center-y", 70.0,
236 "radius-x", 45.0,
237 "radius-y", 30.0,
238 "fill-color", "purple",
239 "stroke-color", "midnightblue",
240 "line-width", 4.0,
241 "title", "A purple ellipse",
242 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
243 last_state = 0;
244 }
245 }
246
247
248 static gbooleancxx . . $ gboolean#
249 on_motion_notifycxx . . $ on_motion_notify(d9fb832b8fd13035). (GooCanvasItemcxx . . $ GooCanvasItem# *item,
250 GooCanvasItemcxx . . $ GooCanvasItem# *target,
251 GdkEventMotioncxx . . $ GdkEventMotion# *event,
252 gpointercxx . . $ gpointer# data)
253 {
254 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model = goo_canvas_item_get_modelcxx . . $ goo_canvas_item_get_model(1a19c08073fb15b7). (item);
255
256 #if 0
257 g_print ("received 'motion-notify' signal at %g, %g\n",
258 event->x, event->y);
259 #endif
260
261 if (draggingcxx . . $ dragging. && (event->statecxx . . $ _GdkEventMotion#state. & GDK_BUTTON1_MASKcxx . . $ GDK_BUTTON1_MASK.))
262 {
263 double new_x = event->xcxx . . $ _GdkEventMotion#x.;
264 double new_y = event->ycxx . . $ _GdkEventMotion#y.;
265
266 #if 0
267 g_print ("Translating by %g, %g\n", new_x - drag_x, new_y - drag_y);
268 #endif
269 goo_canvas_item_model_translatecxx . . $ goo_canvas_item_model_translate(18acfa3c6414e423). (model, new_x - drag_xcxx . . $ drag_x., new_y - drag_ycxx . . $ drag_y.);
270 }
271
272 return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
273 }
274
275
276 static gbooleancxx . . $ gboolean#
277 on_button_presscxx . . $ on_button_press(a06191997683bf2d). (GooCanvasItemcxx . . $ GooCanvasItem# *item,
278 GooCanvasItemcxx . . $ GooCanvasItem# *target,
279 GdkEventButtoncxx . . $ GdkEventButton# *event,
280 gpointercxx . . $ gpointer# data)
281 {
282 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model = goo_canvas_item_get_modelcxx . . $ goo_canvas_item_get_model(1a19c08073fb15b7). (item);
283 GooCanvascxx . . $ GooCanvas# *canvas;
284 GdkDisplaycxx . . $ GdkDisplay# *display;
285 GdkCursorcxx . . $ GdkCursor# *fleur;
286
287 #if 0
288 g_print ("%p received 'button-press' signal at %g, %g (root: %g, %g)\n",
289 item, event->x, event->y, event->x_root, event->y_root);
290 #endif
291
292 switch (event->buttoncxx . . $ _GdkEventButton#button.)
293 {
294 case 1:
295 if (event->statecxx . . $ _GdkEventButton#state. & GDK_SHIFT_MASKcxx . . $ GDK_SHIFT_MASK.)
296 {
297 goo_canvas_item_model_removecxx . . $ goo_canvas_item_model_remove(3d25d2f44613fd4). (model);
298 }
299 else
300 {
301 drag_xcxx . . $ drag_x. = event->xcxx . . $ _GdkEventButton#x.;
302 drag_ycxx . . $ drag_y. = event->ycxx . . $ _GdkEventButton#y.;
303
304 canvas = goo_canvas_item_get_canvascxx . . $ goo_canvas_item_get_canvas(ea994a9c906aac4f). (item);
305 display = gtk_widget_get_displaycxx . . $ gtk_widget_get_display(6423c64908d5796a). (GTK_WIDGETcxx . . $ `<external>/6031079988677191796/gtkwidget.h:58:9`! (canvas));
306 fleur = gdk_cursor_new_for_displaycxx . . $ gdk_cursor_new_for_display(9a6292f6f573b4fe). (display, GDK_FLEURcxx . . $ GDK_FLEUR.);
307 goo_canvas_pointer_grabcxx . . $ goo_canvas_pointer_grab(e6ff14dc3a0e571f). (canvas, item,
308 GDK_POINTER_MOTION_MASKcxx . . $ GDK_POINTER_MOTION_MASK. | GDK_POINTER_MOTION_HINT_MASKcxx . . $ GDK_POINTER_MOTION_HINT_MASK. | GDK_BUTTON_RELEASE_MASKcxx . . $ GDK_BUTTON_RELEASE_MASK.,
309 fleur,
310 event->timecxx . . $ _GdkEventButton#time.);
311 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (fleur);
312 draggingcxx . . $ dragging. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
313 }
314 break;
315
316 case 2:
317 goo_canvas_item_model_lowercxx . . $ goo_canvas_item_model_lower(364e9552a9a7fa66). (model, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
318 break;
319
320 case 3:
321 goo_canvas_item_model_raisecxx . . $ goo_canvas_item_model_raise(364e9552a9a7fa66). (model, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
322 break;
323
324 default:
325 break;
326 }
327
328 return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
329 }
330
331
332 static gbooleancxx . . $ gboolean#
333 on_button_releasecxx . . $ on_button_release(a06191997683bf2d). (GooCanvasItemcxx . . $ GooCanvasItem# *item,
334 GooCanvasItemcxx . . $ GooCanvasItem# *target,
335 GdkEventButtoncxx . . $ GdkEventButton# *event,
336 gpointercxx . . $ gpointer# data)
337 {
338 GooCanvascxx . . $ GooCanvas# *canvas;
339
340 #if 0
341 g_print ("received 'button-release' signal\n");
342 #endif
343
344 canvas = goo_canvas_item_get_canvascxx . . $ goo_canvas_item_get_canvas(ea994a9c906aac4f). (item);
345 goo_canvas_pointer_ungrabcxx . . $ goo_canvas_pointer_ungrab(80564f52a27fdbd2). (canvas, item, event->timecxx . . $ _GdkEventButton#time.);
346 draggingcxx . . $ dragging. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
347
348 return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
349 }
350
351
352 static gbooleancxx . . $ gboolean#
353 on_background_button_presscxx . . $ on_background_button_press(a06191997683bf2d). (GooCanvasItemcxx . . $ GooCanvasItem# *item,
354 GooCanvasItemcxx . . $ GooCanvasItem# *target,
355 GdkEventButtoncxx . . $ GdkEventButton# *event,
356 gpointercxx . . $ gpointer# data)
357 {
358 #if 1
359 g_printcxx . . $ g_print(326aeb464d16410c). ("background item view received 'button-press' signal\n");
360 #endif
361
362 return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
363 }
364
365
366 static void
367 on_item_createdcxx . . $ on_item_created(a9a13474c36c991d). (GooCanvascxx . . $ GooCanvas# *canvas,
368 GooCanvasItemcxx . . $ GooCanvasItem# *item,
369 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model,
370 gpointercxx . . $ gpointer# data)
371 {
372 if (!goo_canvas_item_model_get_parentcxx . . $ goo_canvas_item_model_get_parent(10a63acc61c98505). (model))
373 {
374 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (item, "button_press_event",
375 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_background_button_press), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
376 }
377 else if (!g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (model), "skip-signal-connection"))
378 {
379 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (item, "motion_notify_event",
380 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_motion_notify), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
381 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (item, "button_press_event",
382 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_button_press), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
383 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (item, "button_release_event",
384 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_button_release), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
385 }
386 }
387
388
389 GtkWidgetcxx . . $ GtkWidget# *
390 create_canvas_primitivescxx . . $ create_canvas_primitives(d408d8d169d30a94). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model,
391 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *static_model)
392 {
393 GtkWidgetcxx . . $ GtkWidget# *vbox;
394 GtkWidgetcxx . . $ GtkWidget# *hbox;
395 GtkWidgetcxx . . $ GtkWidget# *w;
396 GtkWidgetcxx . . $ GtkWidget# *scrolled_win, *canvas;
397 GtkAdjustmentcxx . . $ GtkAdjustment# *adj;
398 GSListcxx . . $ GSList# *group = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
399
400 vbox = gtk_box_newcxx . . $ gtk_box_new(b19e0ce02196028e). (GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL., 4);
401 gtk_container_set_border_widthcxx . . $ gtk_container_set_border_width(4f2d4e7d5639aede). (GTK_CONTAINERcxx . . $ `<external>/462093496598485868/gtkcontainer.h:38:9`! (vbox), 4);
402 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (vbox);
403
404 w = gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Drag an item with button 1. Click button 2 on an item to lower it, or button 3 to raise it.");
405 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (vbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
406 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
407
408 hbox = gtk_box_newcxx . . $ gtk_box_new(b19e0ce02196028e). (GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL., 4);
409 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (vbox), hbox, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
410 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (hbox);
411
412 /* Create the canvas */
413
414 canvas = goo_canvas_newcxx . . $ goo_canvas_new(2369ce5e9f2c7dfd). ();
415 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (canvas),
416 "automatic-bounds", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
417 "bounds-from-origin", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
418 "bounds-padding", 4.0,
419 "background-color-rgb", 0xC3C3FF,
420 "has-tooltip", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
421 #if 0
422 "redraw-when-scrolled", TRUE,
423 #endif
424 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
425 goo_canvas_set_boundscxx . . $ goo_canvas_set_bounds(c765acac0aeef5c4). (GOO_CANVAScxx . . $ `src/goocanvas.h:27:9`! (canvas), 0, 0, 604, 454);
426
427 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (canvas, "item_created",
428 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_item_created), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
429
430 /* Zoom */
431
432 w = gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Zoom:");
433 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
434 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
435
436 adj = GTK_ADJUSTMENTcxx . . $ `<external>/1328654795110337964/gtkadjustment.h:38:9`! (gtk_adjustment_new (1.00, 0.05, 50.00, 0.05, 0.50, 0.50));
437 w = gtk_spin_button_newcxx . . $ gtk_spin_button_new(9363f6587239bbb7). (adj, 0.0, 2);
438 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (adj, "value_changed",
439 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (zoom_changed),
440 canvas);
441 gtk_widget_set_size_requestcxx . . $ gtk_widget_set_size_request(f5b8e75990cfac4b). (w, 50, -1);
442 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
443 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
444
445 /* Center: */
446
447 w = gtk_check_button_new_with_labelcxx . . $ gtk_check_button_new_with_label(6d90f3ec8782e10d).("Center scroll region");
448 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
449 /*gtk_widget_show (w);*/
450 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
451 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (center_toggled),
452 canvas);
453
454 /* Move Ellipse */
455
456 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("Move Ellipse");
457 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
458 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
459 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
460 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (move_ellipse_clicked),
461 canvas);
462
463 /* Animate Ellipse */
464
465 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("Animate Ellipse");
466 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
467 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
468 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
469 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (animate_ellipse_clicked),
470 canvas);
471
472 /* Stop Animation */
473
474 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("Stop Animation");
475 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
476 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
477 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
478 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (stop_animation_clicked),
479 canvas);
480
481
482 #if CAIRO_HAS_PDF_SURFACEcxx . . $ `<external>/14630995186892600159/cairo-features.h:22:9`!
483 /* Create PDF */
484
485 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("Write PDF");
486 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
487 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
488 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
489 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (write_pdf_clicked),
490 canvas);
491 #endif
492
493 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("Change Bounds");
494 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
495 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
496 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
497 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (change_bounds_clicked),
498 canvas);
499
500 hbox = gtk_box_newcxx . . $ gtk_box_new(b19e0ce02196028e). (GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL., 4);
501 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (vbox), hbox, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
502 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (hbox);
503
504 /* Scroll to */
505
506 w = gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Scroll To:");
507 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
508 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
509
510 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("50,50");
511 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
512 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
513 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
514 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (scroll_to_50_50_clicked),
515 canvas);
516
517 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("250,250");
518 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
519 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
520 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
521 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (scroll_to_250_250_clicked),
522 canvas);
523
524 w = gtk_button_new_with_labelcxx . . $ gtk_button_new_with_label(6d90f3ec8782e10d).("500,500");
525 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
526 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
527 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "clicked",
528 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (scroll_to_500_500_clicked),
529 canvas);
530
531 /* Scroll anchor */
532
533 w = gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Anchor:");
534 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
535 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
536
537 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "NW");
538 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
539 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
540 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
541 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
542 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
543 canvas);
544 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
545 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_NW));
546
547 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "N");
548 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
549 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
550 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
551 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
552 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
553 canvas);
554 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
555 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_N));
556
557 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "NE");
558 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
559 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
560 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
561 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
562 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
563 canvas);
564 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
565 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_NE));
566
567 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "W");
568 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
569 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
570 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
571 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
572 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
573 canvas);
574 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
575 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_W));
576
577 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "C");
578 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
579 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
580 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
581 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
582 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
583 canvas);
584 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
585 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_CENTER));
586
587 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "E");
588 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
589 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
590 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
591 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
592 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
593 canvas);
594 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
595 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_E));
596
597 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "SW");
598 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
599 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
600 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
601 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
602 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
603 canvas);
604 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
605 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_SW));
606
607 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "S");
608 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
609 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
610 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
611 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
612 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
613 canvas);
614 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
615 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_S));
616
617 w = gtk_radio_button_new_with_labelcxx . . $ gtk_radio_button_new_with_label(1ff82311dbbe8c07). (group, "SE");
618 group = gtk_radio_button_get_groupcxx . . $ gtk_radio_button_get_group(fdc6c137b6f019b7). (GTK_RADIO_BUTTONcxx . . $ `<external>/3115651446838247977/gtkradiobutton.h:39:9`! (w));
619 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (hbox), w, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0);
620 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (w);
621 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (w, "toggled",
622 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (anchor_toggled),
623 canvas);
624 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (w), "anchor",
625 GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (GOO_CANVAS_ANCHOR_SE));
626
627
628 /* Layout the stuff */
629
630 scrolled_win = gtk_scrolled_window_newcxx . . $ gtk_scrolled_window_new(e400dcb18f76639). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
631 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (scrolled_win);
632 gtk_box_pack_startcxx . . $ gtk_box_pack_start(e6ae6b264cb15f6b). (GTK_BOXcxx . . $ `<external>/14176280485027674556/gtkbox.h:40:9`! (vbox), scrolled_win, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, 0);
633
634 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (canvas);
635 gtk_container_addcxx . . $ gtk_container_add(a71b61ec882009c2). (GTK_CONTAINERcxx . . $ `<external>/462093496598485868/gtkcontainer.h:38:9`! (scrolled_win), canvas);
636
637 /* Set the model on the canvas view. The canvas view will then create
638 item views to render each of the items. */
639 goo_canvas_set_root_item_modelcxx . . $ goo_canvas_set_root_item_model(c091109a778736a6). (GOO_CANVAScxx . . $ `src/goocanvas.h:27:9`! (canvas), model);
640
641 goo_canvas_set_static_root_item_modelcxx . . $ goo_canvas_set_static_root_item_model(c091109a778736a6). (GOO_CANVAScxx . . $ `src/goocanvas.h:27:9`! (canvas), static_model);
642
643 #if 0
644 g_signal_connect_after (canvas, "key_press_event",
645 G_CALLBACK (key_press),
646 NULL);
647
648 GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
649 gtk_widget_grab_focus (canvas);
650 #endif
651
652 return vbox;
653 }
654
655
656 static void
657 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root, char *text, int pos)
658 {
659 double x = (pos % 3) * 200 + 100;
660 double y = (pos / 3) * 150 + 5;
661 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *item;
662
663 item = goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root, text, x, y, -1, GOO_CANVAS_ANCHOR_Ncxx . . $ GOO_CANVAS_ANCHOR_N.,
664 "font", "Sans 12",
665 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
666 goo_canvas_item_model_skew_ycxx . . $ goo_canvas_item_model_skew_y(a32e5284c2b242de). (item, 30, x, y);
667 /*goo_canvas_item_rotate (item, 30, x, y);*/
668 }
669
670
671 static void
672 setup_divisionscxx . . $ setup_divisions(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
673 {
674 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *group, *item;
675
676 group = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (root, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
677 goo_canvas_item_model_translatecxx . . $ goo_canvas_item_model_translate(18acfa3c6414e423). (group, 2, 2);
678
679 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (group, 0, 0, 600, 450,
680 "line-width", 4.0,
681 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
682 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
683
684 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group, 0, 150, 600, 150,
685 "line-width", 4.0,
686 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
687 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
688
689 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group, 0, 300, 600, 300,
690 "line-width", 4.0,
691 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
692 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
693
694 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group, 200, 0, 200, 450,
695 "line-width", 4.0,
696 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
697 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
698
699 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group, 400, 0, 400, 450,
700 "line-width", 4.0,
701 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
702 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
703
704 #if 1
705 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Rectangles", 0);
706 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Ellipses", 1);
707 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Texts", 2);
708 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Images", 3);
709 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Lines", 4);
710 /*setup_heading (group, "No Curves", 5);*/
711 /*setup_heading (group, "Arcs", 6);*/
712 setup_headingcxx . . $ setup_heading(b7df2b47e85261dc). (group, "Polygons", 7);
713 /*setup_heading (group, "Widgets", 8);*/
714 #endif
715 }
716
717
718 /* FIXME: I think we may need to check byte order. */
719 static cairo_pattern_tcxx . . $ cairo_pattern_t#*
720 create_stipplecxx . . $ create_stipple(213932e02f2f936d). (const char *color_name, gucharcxx . . $ guchar# stipple_data[16])
721 {
722 cairo_surface_tcxx . . $ cairo_surface_t# *surface;
723 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
724 GdkRGBAcxx . . $ GdkRGBA# color;
725
726 gdk_rgba_parsecxx . . $ gdk_rgba_parse(482ef11efa4439a6). (&color, color_name);
727 stipple_data[2] = stipple_data[14] = color.redcxx . . $ _GdkRGBA#red. * 255;
728 stipple_data[1] = stipple_data[13] = color.greencxx . . $ _GdkRGBA#green. * 255;
729 stipple_data[0] = stipple_data[12] = color.bluecxx . . $ _GdkRGBA#blue. * 255;
730 surface = cairo_image_surface_create_for_datacxx . . $ cairo_image_surface_create_for_data(ced8dd1547170d92). (stipple_data,
731 CAIRO_FORMAT_ARGB32cxx . . $ CAIRO_FORMAT_ARGB32.,
732 2, 2, 8);
733 pattern = cairo_pattern_create_for_surfacecxx . . $ cairo_pattern_create_for_surface(50d60da38c69f49a). (surface);
734 cairo_surface_destroycxx . . $ cairo_surface_destroy(2fa2b40fabeeffa2). (surface);
735 cairo_pattern_set_extendcxx . . $ cairo_pattern_set_extend(7370c5455ab683a). (pattern, CAIRO_EXTEND_REPEATcxx . . $ CAIRO_EXTEND_REPEAT.);
736
737 return pattern;
738 }
739
740 static void
741 setup_rectanglescxx . . $ setup_rectangles(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
742 {
743 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *item G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
744 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
745 static gucharcxx . . $ guchar# stipple_data[16] = {
746 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255
747 };
748
749 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 20, 30, 50, 30,
750 "stroke-color", "red",
751 "line-width", 8.0,
752 "tooltip", "Red stroked rectangle",
753 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
754
755 pattern = create_stipplecxx . . $ create_stipple(213932e02f2f936d). ("mediumseagreen", stipple_data);
756 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 90, 40, 90, 60,
757 "fill-pattern", pattern,
758 "stroke-color", "black",
759 "line-width", 4.0,
760 "tooltip", "Medium Sea Green stippled rectangle",
761 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
762 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
763
764 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 10, 80, 70, 60,
765 "fill-color", "steelblue",
766 /*"fill-pattern", NULL,*/
767 "tooltip", "Steel Blue rectangle",
768 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
769
770 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 20, 90, 70, 60,
771 "fill-color-rgba", 0x3cb37180,
772 "stroke-color", "blue",
773 "line-width", 2.0,
774 "tooltip", "Partially transparent rectangle",
775 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
776
777 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 110, 80, 50, 30,
778 "radius-x", 20.0,
779 "radius-y", 10.0,
780 "stroke-color", "yellow",
781 "fill-color-rgba", 0x3cb3f180,
782 "tooltip", "Rectangle with rounded corners",
783 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
784 }
785
786
787 static void
788 setup_ellipsescxx . . $ setup_ellipses(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
789 {
790 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *ellipse1 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *ellipse3 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
791 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
792 static gucharcxx . . $ guchar# stipple_data[16] = {
793 0, 0, 0, 255, 0, 0, 0, 0,
794 0, 0, 0, 0, 0, 0, 0, 255
795 };
796
797 ellipse1 = goo_canvas_ellipse_model_newcxx . . $ goo_canvas_ellipse_model_new(350e94a866f63a3b). (root, 245, 45, 25, 15,
798 "stroke-color", "goldenrod",
799 "line-width", 8.0,
800 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
801
802 #if 1
803 ellipse2cxx . . $ ellipse2. = goo_canvas_ellipse_model_newcxx . . $ goo_canvas_ellipse_model_new(350e94a866f63a3b). (root, 335, 70, 45, 30,
804 "fill-color", "wheat",
805 "stroke-color", "midnightblue",
806 "line-width", 4.0,
807 "title", "An ellipse",
808 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
809 #if 0
810 goo_canvas_item_model_rotate (ellipse2, 45, 335, 70);
811 #endif
812
813 pattern = create_stipplecxx . . $ create_stipple(213932e02f2f936d). ("cadetblue", stipple_data);
814 ellipse3 = goo_canvas_ellipse_model_newcxx . . $ goo_canvas_ellipse_model_new(350e94a866f63a3b). (root, 245, 110, 35, 30,
815 "fill-pattern", pattern,
816 "stroke-color", "black",
817 "line-width", 1.0,
818 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
819 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
820 #endif
821
822 #if 0
823 {
824 GooCanvasItem *clone = goo_canvas_clone_model_new (root, ellipse1);
825 goo_canvas_item_translate (clone, 100, 100);
826 }
827 #endif
828 }
829
830
831 #define VERTICEScxx . . $ `demo/mv-demo.c:831:9`! 10
832 #define RADIUScxx . . $ `demo/mv-demo.c:832:9`! 60.0
833
834 static void
835 polish_diamondcxx . . $ polish_diamond(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
836 {
837 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *group, *item;
838 int i, j;
839 double a, x1, y1, x2, y2;
840
841 group = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (root,
842 "line-width", 1.0,
843 "line-cap", CAIRO_LINE_CAP_ROUNDcxx . . $ CAIRO_LINE_CAP_ROUND.,
844 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
845 goo_canvas_item_model_translatecxx . . $ goo_canvas_item_model_translate(18acfa3c6414e423). (group, 270, 230);
846
847 for (i = 0; i < VERTICEScxx . . $ `demo/mv-demo.c:831:9`!; i++) {
848 a = 2.0 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * i / VERTICEScxx . . $ `demo/mv-demo.c:831:9`!;
849 x1 = RADIUScxx . . $ `demo/mv-demo.c:832:9`! * cos (a);
850 y1 = RADIUScxx . . $ `demo/mv-demo.c:832:9`! * sin (a);
851
852 for (j = i + 1; j < VERTICEScxx . . $ `demo/mv-demo.c:831:9`!; j++) {
853 a = 2.0 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * j / VERTICEScxx . . $ `demo/mv-demo.c:831:9`!;
854 x2 = RADIUScxx . . $ `demo/mv-demo.c:832:9`! * cos (a);
855 y2 = RADIUScxx . . $ `demo/mv-demo.c:832:9`! * sin (a);
856 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group, x1, y1, x2, y2, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
857 g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), "skip-signal-connection", "TRUE");
858 }
859 }
860 }
861
862
863 #define SCALEcxx . . $ `demo/mv-demo.c:863:9`! 7.0
864
865 static void
866 make_hilbertcxx . . $ make_hilbert(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
867 {
868 char hilbert[] = "urdrrulurulldluuruluurdrurddldrrruluurdrurddldrddlulldrdldrrurd";
869 char *c;
870 double *pp, *p;
871 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *item G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
872 GooCanvasPointscxx . . $ GooCanvasPoints# *points;
873 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
874 static gucharcxx . . $ guchar# stipple_data[16] = {
875 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255
876 };
877
878 points = goo_canvas_points_newcxx . . $ goo_canvas_points_new(917271c98bfa43a4). (strlencxx . . $ strlen(751346f8406fd082). (hilbert) + 1);
879 points->coordscxx . . $ _GooCanvasPoints#coords.[0] = 340.0;
880 points->coordscxx . . $ _GooCanvasPoints#coords.[1] = 290.0;
881
882 pp = points->coordscxx . . $ _GooCanvasPoints#coords.;
883 for (c = hilbert, p = points->coordscxx . . $ _GooCanvasPoints#coords. + 2; *c; c++, p += 2, pp += 2)
884 switch (*c) {
885 case 'u':
886 p[0] = pp[0];
887 p[1] = pp[1] - SCALEcxx . . $ `demo/mv-demo.c:863:9`!;
888 break;
889
890 case 'd':
891 p[0] = pp[0];
892 p[1] = pp[1] + SCALEcxx . . $ `demo/mv-demo.c:863:9`!;
893 break;
894
895 case 'l':
896 p[0] = pp[0] - SCALEcxx . . $ `demo/mv-demo.c:863:9`!;
897 p[1] = pp[1];
898 break;
899
900 case 'r':
901 p[0] = pp[0] + SCALEcxx . . $ `demo/mv-demo.c:863:9`!;
902 p[1] = pp[1];
903 break;
904 }
905
906 pattern = create_stipplecxx . . $ create_stipple(213932e02f2f936d). ("red", stipple_data);
907 item = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0,
908 "points", points,
909 "line-width", 4.0,
910 "stroke-pattern", pattern,
911 "line-cap", CAIRO_LINE_CAP_SQUAREcxx . . $ CAIRO_LINE_CAP_SQUARE.,
912 "line-join", CAIRO_LINE_JOIN_MITERcxx . . $ CAIRO_LINE_JOIN_MITER.,
913 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
914 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
915
916 goo_canvas_points_unrefcxx . . $ goo_canvas_points_unref(54d111ab8a8ff766). (points);
917 }
918
919 static void
920 setup_linescxx . . $ setup_lines(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
921 {
922 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *polyline1 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *polyline2 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *polyline3 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *polyline4 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *polyline5 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
923
924 polish_diamondcxx . . $ polish_diamond(3d25d2f44613fd4). (root);
925 make_hilbertcxx . . $ make_hilbert(3d25d2f44613fd4). (root);
926
927 /* Arrow tests */
928
929 polyline1 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 4,
930 340.0, 170.0,
931 340.0, 230.0,
932 390.0, 230.0,
933 390.0, 170.0,
934 "stroke-color", "midnightblue",
935 "line-width", 3.0,
936 "start-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
937 "end-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
938 "arrow-tip-length", 3.0,
939 "arrow-length", 4.0,
940 "arrow-width", 3.5,
941 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
942
943 polyline2 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 2,
944 356.0, 180.0,
945 374.0, 220.0,
946 "stroke-color", "blue",
947 "line-width", 1.0,
948 "start-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
949 "end-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
950 "arrow-tip-length", 5.0,
951 "arrow-length", 6.0,
952 "arrow-width", 6.0,
953 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
954
955 polyline3 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 2,
956 356.0, 220.0,
957 374.0, 180.0,
958 "stroke-color", "blue",
959 "line-width", 1.0,
960 "start-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
961 "end-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
962 "arrow-tip-length", 5.0,
963 "arrow-length", 6.0,
964 "arrow-width", 6.0,
965 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
966
967 /* Test polyline without any coords. */
968 polyline4 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 0,
969 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
970
971 /* Test polyline with 1 coord and arrows. */
972 polyline5 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, 1,
973 356.0, 220.0,
974 "start-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
975 "end-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
976 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
977 }
978
979
980 static void
981 setup_polygonscxx . . $ setup_polygons(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
982 {
983 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *polyline1 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!, *polyline2 G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
984 GooCanvasPointscxx . . $ GooCanvasPoints# *points;
985 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
986 static gucharcxx . . $ guchar# stipple_data[16] = {
987 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255
988 };
989
990 points = goo_canvas_points_newcxx . . $ goo_canvas_points_new(917271c98bfa43a4). (3);
991 points->coordscxx . . $ _GooCanvasPoints#coords.[0] = 210.0;
992 points->coordscxx . . $ _GooCanvasPoints#coords.[1] = 320.0;
993 points->coordscxx . . $ _GooCanvasPoints#coords.[2] = 210.0;
994 points->coordscxx . . $ _GooCanvasPoints#coords.[3] = 380.0;
995 points->coordscxx . . $ _GooCanvasPoints#coords.[4] = 260.0;
996 points->coordscxx . . $ _GooCanvasPoints#coords.[5] = 350.0;
997 pattern = create_stipplecxx . . $ create_stipple(213932e02f2f936d). ("blue", stipple_data);
998 polyline1 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, 0,
999 "line-width", 1.0,
1000 "points", points,
1001 "fill_pattern", pattern,
1002 "stroke_color", "black",
1003 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1004 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
1005 goo_canvas_points_unrefcxx . . $ goo_canvas_points_unref(54d111ab8a8ff766). (points);
1006
1007 points = goo_canvas_points_newcxx . . $ goo_canvas_points_new(917271c98bfa43a4). (14);
1008 points->coordscxx . . $ _GooCanvasPoints#coords.[0] = 270.0;
1009 points->coordscxx . . $ _GooCanvasPoints#coords.[1] = 330.0;
1010 points->coordscxx . . $ _GooCanvasPoints#coords.[2] = 270.0;
1011 points->coordscxx . . $ _GooCanvasPoints#coords.[3] = 430.0;
1012 points->coordscxx . . $ _GooCanvasPoints#coords.[4] = 390.0;
1013 points->coordscxx . . $ _GooCanvasPoints#coords.[5] = 430.0;
1014 points->coordscxx . . $ _GooCanvasPoints#coords.[6] = 390.0;
1015 points->coordscxx . . $ _GooCanvasPoints#coords.[7] = 330.0;
1016 points->coordscxx . . $ _GooCanvasPoints#coords.[8] = 310.0;
1017 points->coordscxx . . $ _GooCanvasPoints#coords.[9] = 330.0;
1018 points->coordscxx . . $ _GooCanvasPoints#coords.[10] = 310.0;
1019 points->coordscxx . . $ _GooCanvasPoints#coords.[11] = 390.0;
1020 points->coordscxx . . $ _GooCanvasPoints#coords.[12] = 350.0;
1021 points->coordscxx . . $ _GooCanvasPoints#coords.[13] = 390.0;
1022 points->coordscxx . . $ _GooCanvasPoints#coords.[14] = 350.0;
1023 points->coordscxx . . $ _GooCanvasPoints#coords.[15] = 370.0;
1024 points->coordscxx . . $ _GooCanvasPoints#coords.[16] = 330.0;
1025 points->coordscxx . . $ _GooCanvasPoints#coords.[17] = 370.0;
1026 points->coordscxx . . $ _GooCanvasPoints#coords.[18] = 330.0;
1027 points->coordscxx . . $ _GooCanvasPoints#coords.[19] = 350.0;
1028 points->coordscxx . . $ _GooCanvasPoints#coords.[20] = 370.0;
1029 points->coordscxx . . $ _GooCanvasPoints#coords.[21] = 350.0;
1030 points->coordscxx . . $ _GooCanvasPoints#coords.[22] = 370.0;
1031 points->coordscxx . . $ _GooCanvasPoints#coords.[23] = 410.0;
1032 points->coordscxx . . $ _GooCanvasPoints#coords.[24] = 290.0;
1033 points->coordscxx . . $ _GooCanvasPoints#coords.[25] = 410.0;
1034 points->coordscxx . . $ _GooCanvasPoints#coords.[26] = 290.0;
1035 points->coordscxx . . $ _GooCanvasPoints#coords.[27] = 330.0;
1036 polyline2 = goo_canvas_polyline_model_newcxx . . $ goo_canvas_polyline_model_new(2503739ef475d46e). (root, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, 0,
1037 "points", points,
1038 "fill_color", "tan",
1039 "stroke_color", "black",
1040 "line-width", 3.0,
1041 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1042 goo_canvas_points_unrefcxx . . $ goo_canvas_points_unref(54d111ab8a8ff766). (points);
1043 }
1044
1045
1046 static GooCanvasItemModelcxx . . $ GooCanvasItemModel# *
1047 make_anchorcxx . . $ make_anchor(a60ea72a50524332). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root, double x, double y)
1048 {
1049 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *group, *item G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1050 cairo_matrix_tcxx . . $ cairo_matrix_t# transform = { 0.8, 0.2, -0.3, 0.5, x, y };
1051
1052 group = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (root, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1053 goo_canvas_item_model_translatecxx . . $ goo_canvas_item_model_translate(18acfa3c6414e423). (group, x, y);
1054 #if 1
1055 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (group,
1056 "transform", &transform,
1057 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1058 #endif
1059
1060 item = goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (group, -2.5, -2.5, 4, 4,
1061 "line-width", 1.0,
1062 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1063
1064 return group;
1065 }
1066
1067 static void
1068 setup_textscxx . . $ setup_texts(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
1069 {
1070 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
1071 static gucharcxx . . $ guchar# stipple_data[16] = {
1072 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255
1073 };
1074
1075 #if 1
1076 pattern = create_stipplecxx . . $ create_stipple(213932e02f2f936d). ("blue", stipple_data);
1077 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (make_anchorcxx . . $ make_anchor(a60ea72a50524332). (root, 420, 20),
1078 "Anchor NW", 0, 0, -1, GOO_CANVAS_ANCHOR_NWcxx . . $ GOO_CANVAS_ANCHOR_NW.,
1079 "font", "Sans Bold 24",
1080 "fill_pattern", pattern,
1081 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1082 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
1083
1084 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (make_anchorcxx . . $ make_anchor(a60ea72a50524332). (root, 470, 75),
1085 "Anchor center\nJustify center\nMultiline text\nb8bit text ÅÄÖåäö",
1086 0, 0, -1, GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER.,
1087 "font", "monospace bold 14",
1088 "alignment", PANGO_ALIGN_CENTERcxx . . $ PANGO_ALIGN_CENTER.,
1089 "fill_color", "firebrick",
1090 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1091 #endif
1092
1093 #if 0
1094 goo_canvas_text_model_new (make_anchor (root, 590, 140),
1095 "Clipped text\nClipped text\nClipped text\nClipped text\nClipped text\nClipped text",
1096 0, 0, -1, GOO_CANVAS_ANCHOR_SE,
1097 "font", "Sans 12",
1098 /*"clip", TRUE,*/
1099 /*"clip_width", 50.0,*/
1100 /*"clip_height", 55.0,*/
1101 /*"x_offset", 10.0,*/
1102 "fill_color", "darkgreen",
1103 NULL);
1104 #endif
1105
1106 #if 1
1107 textitemcxx . . $ textitem. = goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (make_anchorcxx . . $ make_anchor(a60ea72a50524332). (root, 420, 240),
1108 "This is a very long paragraph that will need to be wrapped over several lines so we can see what happens to line-breaking as the view is zoomed in and out.",
1109 0, 0, 180, GOO_CANVAS_ANCHOR_Wcxx . . $ GOO_CANVAS_ANCHOR_W.,
1110 "font", "Sans 12",
1111 "fill_color", "goldenrod",
1112 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1113 #endif
1114
1115 #if 1
1116 textitemcxx . . $ textitem. = goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root,
1117 "Ellipsized text.",
1118 20, 420, 115, GOO_CANVAS_ANCHOR_Wcxx . . $ GOO_CANVAS_ANCHOR_W.,
1119 "font", "Sans 12",
1120 "fill_color", "blue",
1121 "ellipsize", PANGO_ELLIPSIZE_ENDcxx . . $ PANGO_ELLIPSIZE_END.,
1122 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1123 #endif
1124 }
1125
1126
1127 static void
1128 setup_invisible_textscxx . . $ setup_invisible_texts(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
1129 {
1130 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root, "Visible above 0.8x", 500, 330, -1,
1131 GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER.,
1132 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1133 "visibility-threshold", 0.8,
1134 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1135 goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 410.5, 322.5, 180, 15,
1136 "line-width", 1.0,
1137 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1138 "visibility-threshold", 0.8,
1139 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1140
1141 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root, "Visible above 1.5x", 500, 350, -1,
1142 GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER.,
1143 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1144 "visibility-threshold", 1.5,
1145 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1146 goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 410.5, 342.5, 180, 15,
1147 "line-width", 1.0,
1148 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1149 "visibility-threshold", 1.5,
1150 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1151
1152 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root, "Visible above 3.0x", 500, 370, -1,
1153 GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER.,
1154 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1155 "visibility-threshold", 3.0,
1156 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1157 goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 410.5, 362.5, 180, 15,
1158 "line-width", 1.0,
1159 "visibility", GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLDcxx . . $ GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.,
1160 "visibility-threshold", 3.0,
1161 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1162
1163 /* This should never be seen. */
1164 goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (root, "Always Invisible", 500, 390, -1,
1165 GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER.,
1166 "visibility", GOO_CANVAS_ITEM_INVISIBLEcxx . . $ GOO_CANVAS_ITEM_INVISIBLE.,
1167 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1168 goo_canvas_rect_model_newcxx . . $ goo_canvas_rect_model_new(350e94a866f63a3b). (root, 410.5, 350.5, 180, 15,
1169 "line-width", 1.0,
1170 "visibility", GOO_CANVAS_ITEM_INVISIBLEcxx . . $ GOO_CANVAS_ITEM_INVISIBLE.,
1171 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1172 }
1173
1174
1175 static void
1176 plant_flowercxx . . $ plant_flower(ca7364572b1b5b43). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root,
1177 double x, double y,
1178 GooCanvasAnchorTypecxx . . $ GooCanvasAnchorType# anchor,
1179 double opacity)
1180 {
1181 cairo_pattern_tcxx . . $ cairo_pattern_t# *pattern;
1182 cairo_surface_tcxx . . $ cairo_surface_t# *surface;
1183 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *image G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1184 double w, h;
1185
1186 surface = cairo_image_surface_create_from_pngcxx . . $ cairo_image_surface_create_from_png(c5e7ae373f87313e). ("flower.png");
1187 w = cairo_image_surface_get_widthcxx . . $ cairo_image_surface_get_width(b86466da63dedb14). (surface);
1188 h = cairo_image_surface_get_heightcxx . . $ cairo_image_surface_get_height(b86466da63dedb14). (surface);
1189
1190 pattern = cairo_pattern_create_for_surfacecxx . . $ cairo_pattern_create_for_surface(50d60da38c69f49a). (surface);
1191 cairo_surface_destroycxx . . $ cairo_surface_destroy(2fa2b40fabeeffa2). (surface);
1192
1193 image = goo_canvas_image_model_newcxx . . $ goo_canvas_image_model_new(ddc3b35313ae3e43). (root, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, x, y,
1194 "pattern", pattern,
1195 "width", w * 1.5,
1196 "height", h * 2,
1197 "scale-to-fit", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
1198 "alpha", opacity,
1199 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1200 cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (pattern);
1201 }
1202
1203 static void
1204 setup_imagescxx . . $ setup_images(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
1205 {
1206 GdkPixbufcxx . . $ GdkPixbuf# *im;
1207 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *image G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1208
1209 im = gdk_pixbuf_new_from_filecxx . . $ gdk_pixbuf_new_from_file(8b25a2a6a5513022). ("toroid.png", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1210
1211 if (im)
1212 {
1213 double w = gdk_pixbuf_get_widthcxx . . $ gdk_pixbuf_get_width(7fdfbba8aeda927f). (im);
1214 double h = gdk_pixbuf_get_heightcxx . . $ gdk_pixbuf_get_height(7fdfbba8aeda927f). (im);
1215 image = goo_canvas_image_model_newcxx . . $ goo_canvas_image_model_new(ddc3b35313ae3e43). (root, im, 100.0 - w / 2, 225.0 - h / 2,
1216 "width", w,
1217 "height", h,
1218 /* "anchor", GOO_CANVAS_ANCHOR_CENTER, */
1219 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1220 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(im);
1221 }
1222 else
1223 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("Could not find the toroid.png sample file");
1224
1225 plant_flowercxx . . $ plant_flower(ca7364572b1b5b43). (root, 20.0, 170.0, GOO_CANVAS_ANCHOR_NWcxx . . $ GOO_CANVAS_ANCHOR_NW., 0.3);
1226 plant_flowercxx . . $ plant_flower(ca7364572b1b5b43). (root, 180.0, 170.0, GOO_CANVAS_ANCHOR_NEcxx . . $ GOO_CANVAS_ANCHOR_NE., 0.5);
1227 plant_flowercxx . . $ plant_flower(ca7364572b1b5b43). (root, 20.0, 280.0, GOO_CANVAS_ANCHOR_SWcxx . . $ GOO_CANVAS_ANCHOR_SW., 0.7);
1228 plant_flowercxx . . $ plant_flower(ca7364572b1b5b43). (root, 180.0, 280.0, GOO_CANVAS_ANCHOR_SEcxx . . $ GOO_CANVAS_ANCHOR_SE., 1.0);
1229 }
1230
1231
1232 static GooCanvasItemModelcxx . . $ GooCanvasItemModel#*
1233 create_static_modelcxx . . $ create_static_model(e19948e678a2645). ()
1234 {
1235 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *static_root, *group, *item G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1236
1237 static_root = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1238
1239 group = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (static_root, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1240
1241 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group,
1242 40.0, 410.0,
1243 40.0, 330.0,
1244 "stroke-color", "midnightblue",
1245 "line-width", 3.0,
1246 "end-arrow", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
1247 "arrow-tip-length", 3.0,
1248 "arrow-length", 4.0,
1249 "arrow-width", 3.5,
1250 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1251
1252 item = goo_canvas_polyline_model_new_linecxx . . $ goo_canvas_polyline_model_new_line(350e94a866f63a3b). (group,
1253 32.0, 370.0,
1254 48.0, 370.0,
1255 "stroke-color", "midnightblue",
1256 "line-width", 3.0,
1257 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1258
1259 item = goo_canvas_text_model_newcxx . . $ goo_canvas_text_model_new(88e948b2607c9cf0). (group, "N", 40, 320, -1, GOO_CANVAS_ANCHOR_Scxx . . $ GOO_CANVAS_ANCHOR_S.,
1260 "font", "Sans 12",
1261 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1262
1263 return static_root;
1264 }
1265
1266
1267 static void
1268 test_simple_transformscxx . . $ test_simple_transforms(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
1269 {
1270 #if 0
1271 GooCanvasItemModel *item;
1272 int rotation, x, y;
1273 double scale, x_out, y_out, scale_out, rotation_out, max_error = 0.0000001;
1274
1275 item = goo_canvas_rect_model_new (root, 20, 30, 50, 30,
1276 NULL);
1277
1278 for (rotation = 0; rotation < 360; rotation += 20)
1279 {
1280 scale = 0.1;
1281 while (scale < 10)
1282 {
1283 g_print ("Rotation: %i Scale: %g\n", rotation, scale);
1284
1285 for (x = -100; x < 100; x += 10)
1286 {
1287 for (y = -100; y < 100; y += 10)
1288 {
1289 goo_canvas_item_model_set_simple_transform (item, x, y, scale,
1290 rotation);
1291
1292 goo_canvas_item_model_get_simple_transform (item, &x_out, &y_out,
1293 &scale_out,
1294 &rotation_out);
1295
1296 if (fabs (x_out - x) > max_error
1297 || fabs (y_out - y) > max_error
1298 || fabs (scale_out - scale) > max_error
1299 || fabs (rotation_out - rotation) > max_error)
1300 {
1301 g_print ("IN X:%i Y:%i Scale:%g Rotation:%i -> %g, %g, %g, %g\n", x, y, scale, rotation, x_out, y_out, scale_out, rotation_out);
1302 }
1303 }
1304 }
1305 scale += 0.1;
1306 }
1307 }
1308 #endif
1309 }
1310
1311
1312 static void
1313 setup_gridscxx . . $ setup_grids(3d25d2f44613fd4). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root)
1314 {
1315 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *item G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1316
1317 item = goo_canvas_grid_model_newcxx . . $ goo_canvas_grid_model_new(ec8555c7a53f9e9a). (root, 80, 310, 90, 90, 10, 10, 5, 5,
1318 "stroke-color", "yellow",
1319 "fill-color", "pink",
1320 "border-width", 2.0,
1321 "border-color", "red",
1322 "vert-grid-line-color", "lightblue",
1323 "horz-grid-line-width", 1.0,
1324 "vert-grid-line-width", 1.0,
1325 "vert-grid-lines-on-top", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
1326 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1327 }
1328
1329
1330 static GooCanvasItemModelcxx . . $ GooCanvasItemModel#*
1331 create_modelcxx . . $ create_model(242d43ef3a615fde). (void)
1332 {
1333 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *root;
1334
1335 root = goo_canvas_group_model_newcxx . . $ goo_canvas_group_model_new(7f896cf3adb67825). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1336
1337 /* Setup canvas items */
1338 #if 1
1339 setup_divisionscxx . . $ setup_divisions(3d25d2f44613fd4). (root);
1340 setup_rectanglescxx . . $ setup_rectangles(3d25d2f44613fd4). (root);
1341 setup_ellipsescxx . . $ setup_ellipses(3d25d2f44613fd4). (root);
1342 setup_linescxx . . $ setup_lines(3d25d2f44613fd4). (root);
1343 setup_polygonscxx . . $ setup_polygons(3d25d2f44613fd4). (root);
1344 setup_textscxx . . $ setup_texts(3d25d2f44613fd4). (root);
1345 setup_imagescxx . . $ setup_images(3d25d2f44613fd4). (root);
1346 setup_invisible_textscxx . . $ setup_invisible_texts(3d25d2f44613fd4). (root);
1347 setup_gridscxx . . $ setup_grids(3d25d2f44613fd4). (root);
1348 #endif
1349 #if 0
1350 setup_widgets (root);
1351 #endif
1352
1353 test_simple_transformscxx . . $ test_simple_transforms(3d25d2f44613fd4). (root);
1354
1355 return root;
1356 }
1357
1358
1359 static gbooleancxx . . $ gboolean#
1360 on_delete_eventcxx . . $ on_delete_event(cb5c69d635e66e01). (GtkWidgetcxx . . $ GtkWidget# *window,
1361 GdkEventcxx . . $ GdkEvent# *event,
1362 gpointercxx . . $ gpointer# unused_data)
1363 {
1364 gtk_main_quitcxx . . $ gtk_main_quit(49f6e7a06ebc5aa8). ();
1365 return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
1366 }
1367
1368
1369 static GtkWidgetcxx . . $ GtkWidget#*
1370 create_windowcxx . . $ create_window(d408d8d169d30a94). (GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model,
1371 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *static_model)
1372 {
1373 GtkWidgetcxx . . $ GtkWidget# *window, *notebook;
1374
1375 window = gtk_window_newcxx . . $ gtk_window_new(77bbe1a96f42772c). (GTK_WINDOW_TOPLEVELcxx . . $ GTK_WINDOW_TOPLEVEL.);
1376 gtk_window_set_default_sizecxx . . $ gtk_window_set_default_size(3ade0f781b002fdd). (GTK_WINDOWcxx . . $ `<external>/3777575239456597881/gtkwindow.h:40:9`! (window), 640, 600);
1377 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (window);
1378 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (window, "delete_event", G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_delete_event),
1379 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1380
1381 notebook = gtk_notebook_newcxx . . $ gtk_notebook_new(2369ce5e9f2c7dfd). ();
1382 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (notebook);
1383 gtk_container_addcxx . . $ gtk_container_add(a71b61ec882009c2). (GTK_CONTAINERcxx . . $ `<external>/462093496598485868/gtkcontainer.h:38:9`! (window), notebook);
1384
1385 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1386 create_canvas_primitivescxx . . $ create_canvas_primitives(d408d8d169d30a94). (model, static_model),
1387 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Primitives"));
1388 #if 1
1389 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1390 create_canvas_arrowheadcxx . . $ create_canvas_arrowhead(2369ce5e9f2c7dfd). (),
1391 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Arrowhead"));
1392 #endif
1393 #if 1
1394 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1395 create_canvas_fifteencxx . . $ create_canvas_fifteen(2369ce5e9f2c7dfd). (),
1396 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Fifteen"));
1397 #endif
1398 #if 1
1399 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1400 create_canvas_featurescxx . . $ create_canvas_features(2369ce5e9f2c7dfd). (),
1401 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Features"));
1402 #endif
1403 #if 1
1404 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1405 create_canvas_scalabilitycxx . . $ create_canvas_scalability(2369ce5e9f2c7dfd). (),
1406 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Scalability"));
1407 #endif
1408 #if 1
1409 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1410 create_grabs_pagecxx . . $ create_grabs_page(2369ce5e9f2c7dfd). (),
1411 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Grabs"));
1412 #endif
1413 #if 1
1414 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1415 create_events_pagecxx . . $ create_events_page(2369ce5e9f2c7dfd). (),
1416 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Events"));
1417 #endif
1418 #if 1
1419 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1420 create_paths_pagecxx . . $ create_paths_page(2369ce5e9f2c7dfd). (),
1421 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Paths"));
1422 #endif
1423 #if 1
1424 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1425 create_focus_pagecxx . . $ create_focus_page(2369ce5e9f2c7dfd). (),
1426 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Focus"));
1427 #endif
1428 #if 1
1429 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1430 create_animation_pagecxx . . $ create_animation_page(2369ce5e9f2c7dfd). (),
1431 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Animation"));
1432 #endif
1433 #if 1
1434 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1435 create_clipping_pagecxx . . $ create_clipping_page(2369ce5e9f2c7dfd). (),
1436 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Clipping"));
1437 #endif
1438 #if 1
1439 gtk_notebook_append_pagecxx . . $ gtk_notebook_append_page(902513e9e6333ff4). (GTK_NOTEBOOKcxx . . $ `<external>/13347135798791584871/gtknotebook.h:40:9`! (notebook),
1440 create_table_pagecxx . . $ create_table_page(2369ce5e9f2c7dfd). (),
1441 gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). ("Table"));
1442 #endif
1443
1444 return window;
1445 }
1446
1447
1448 int
1449 maincxx . . $ main(afcd3168fc1188a4). (int argc, char *argv[])
1450 {
1451 GooCanvasItemModelcxx . . $ GooCanvasItemModel# *model, *static_model;
1452 GtkWidgetcxx . . $ GtkWidget# *window G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!;
1453
1454 gtk_initcxx . . $ gtk_init(49aaaae07c8bf5c4). (&argc, &argv);
1455
1456 model = create_modelcxx . . $ create_model(242d43ef3a615fde). ();
1457 static_model = create_static_modelcxx . . $ create_static_model(e19948e678a2645). ();
1458
1459 /* Create 2 windows to show off multiple views. */
1460 window = create_windowcxx . . $ create_window(d408d8d169d30a94). (model, static_model);
1461 #if 1
1462 window = create_windowcxx . . $ create_window(d408d8d169d30a94). (model, static_model);
1463 #endif
1464
1465 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (model);
1466 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (static_model);
1467
1468 gtk_maincxx . . $ gtk_main(49f6e7a06ebc5aa8). ();
1469 return 0;
1470 }