| 1 | #cxx . . $ `<file>/demo/scalability-demo.c`/include <math.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <goocanvas.h>cxx . . $ `<file>/src/goocanvas.h`/ |
| 4 | |
| 5 | #if 1 |
| 6 | #define N_GROUP_COLScxx . . $ `demo/scalability-demo.c:6:9`! 25 |
| 7 | #define N_GROUP_ROWScxx . . $ `demo/scalability-demo.c:7:9`! 200 |
| 8 | #define N_COLScxx . . $ `demo/scalability-demo.c:8:9`! 10 |
| 9 | #define N_ROWScxx . . $ `demo/scalability-demo.c:9:9`! 10 |
| 10 | #define ITEM_WIDTHcxx . . $ `demo/scalability-demo.c:10:9`! 400 |
| 11 | #define PADDINGcxx . . $ `demo/scalability-demo.c:11:9`! 10 |
| 12 | #if 1 |
| 13 | #define ROTATEcxx . . $ `demo/scalability-demo.c:13:9`! |
| 14 | #endif |
| 15 | #else |
| 16 | /* This tests a very wide canvas, nearly up to the 31-bit GDK window size |
| 17 | limit. */ |
| 18 | #define N_GROUP_COLS 100000 |
| 19 | #define N_GROUP_ROWS 1 |
| 20 | #define N_COLS 10 |
| 21 | #define N_ROWS 1 |
| 22 | #define ITEM_WIDTH 1000 |
| 23 | #define PADDING 100 |
| 24 | #endif |
| 25 | |
| 26 | #define N_TOTAL_ID_ITEMScxx . . $ `demo/scalability-demo.c:26:9`! (N_GROUP_COLScxx . . $ `demo/scalability-demo.c:6:9`! * N_GROUP_ROWScxx . . $ `demo/scalability-demo.c:7:9`!) * (N_COLScxx . . $ `demo/scalability-demo.c:8:9`! * N_ROWScxx . . $ `demo/scalability-demo.c:9:9`!) |
| 27 | |
| 28 | /* The maximum length of a string identifying an item (i.e. its coords). */ |
| 29 | #define MAX_ID_LENcxx . . $ `demo/scalability-demo.c:29:9`! 20 |
| 30 | |
| 31 | #if 1 |
| 32 | #define SET_STYLEcxx . . $ `demo/scalability-demo.c:32:9`! |
| 33 | #endif |
| 34 | |
| 35 | #if 1 |
| 36 | #define USE_TEXTcxx . . $ `demo/scalability-demo.c:36:9`! |
| 37 | #endif |
| 38 | |
| 39 | #if 1 |
| 40 | #define SET_IDScxx . . $ `demo/scalability-demo.c:40:9`! |
| 41 | #endif |
| 42 | |
| 43 | #if 0 |
| 44 | #define USE_PIXMAP |
| 45 | #endif |
| 46 | |
| 47 | #if 0 |
| 48 | #define ONLY_ONE |
| 49 | #endif |
| 50 | |
| 51 | double total_widthcxx . . $ total_width., total_heightcxx . . $ total_height.; |
| 52 | double left_offsetcxx . . $ left_offset., top_offsetcxx . . $ top_offset.; |
| 53 | char idscxx . . $ ids.[N_TOTAL_ID_ITEMScxx . . $ `demo/scalability-demo.c:26:9`!][MAX_ID_LENcxx . . $ `demo/scalability-demo.c:29:9`!]; |
| 54 | |
| 55 | GdkPixbufcxx . . $ GdkPixbuf# *pixbufcxx . . $ pixbuf. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 56 | cairo_pattern_tcxx . . $ cairo_pattern_t# *patterncxx . . $ pattern. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 57 | double item_widthcxx . . $ item_width., item_heightcxx . . $ item_height.; |
| 58 | double cell_widthcxx . . $ cell_width., cell_heightcxx . . $ cell_height.; |
| 59 | double group_widthcxx . . $ group_width., group_heightcxx . . $ group_height.; |
| 60 | |
| 61 | static clock_tcxx . . $ clock_t# startcxx . . $ start.; |
| 62 | |
| 63 | static gbooleancxx . . $ gboolean# |
| 64 | on_motion_notifycxx . . $ on_motion_notify(d9fb832b8fd13035). (GooCanvasItemcxx . . $ GooCanvasItem# *item, |
| 65 | GooCanvasItemcxx . . $ GooCanvasItem# *target, |
| 66 | GdkEventMotioncxx . . $ GdkEventMotion# *event, |
| 67 | gpointercxx . . $ gpointer# data) |
| 68 | { |
| 69 | GooCanvasItemcxx . . $ GooCanvasItem# *ancestor = target; |
| 70 | gcharcxx . . $ gchar# *id; |
| 71 | |
| 72 | while (ancestor) |
| 73 | { |
| 74 | id = g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (ancestor), "id"); |
| 75 | if (id) |
| 76 | { |
| 77 | g_printcxx . . $ g_print(326aeb464d16410c). ("%s item received 'motion-notify' signal\n", id); |
| 78 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 79 | } |
| 80 | |
| 81 | ancestor = goo_canvas_item_get_parentcxx . . $ goo_canvas_item_get_parent(1677ac45b20bdb2a). (ancestor); |
| 82 | } |
| 83 | |
| 84 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 85 | } |
| 86 | |
| 87 | |
| 88 | static void |
| 89 | init_idscxx . . $ init_ids(49f6e7a06ebc5aa8). (void) |
| 90 | { |
| 91 | int group_i, group_j, i, j; |
| 92 | int id_item_num = 0;; |
| 93 | |
| 94 | for (group_i = 0; group_i < N_GROUP_COLScxx . . $ `demo/scalability-demo.c:6:9`!; group_i++) |
| 95 | { |
| 96 | for (group_j = 0; group_j < N_GROUP_ROWScxx . . $ `demo/scalability-demo.c:7:9`!; group_j++) |
| 97 | { |
| 98 | double group_x = left_offsetcxx . . $ left_offset. + (group_i * group_widthcxx . . $ group_width.); |
| 99 | double group_y = top_offsetcxx . . $ top_offset. + (group_j * group_heightcxx . . $ group_height.); |
| 100 | |
| 101 | for (i = 0; i < N_COLScxx . . $ `demo/scalability-demo.c:8:9`!; i++) |
| 102 | { |
| 103 | for (j = 0; j < N_ROWScxx . . $ `demo/scalability-demo.c:9:9`!; j++) |
| 104 | { |
| 105 | double item_x = (i * cell_widthcxx . . $ cell_width.) + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`!; |
| 106 | double item_y = (j * cell_heightcxx . . $ cell_height.) + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`!; |
| 107 | |
| 108 | sprintfcxx . . $ sprintf(26c8642d26409d6d). (idscxx . . $ ids.[id_item_num++], "%.10g, %.10g", |
| 109 | group_x + item_x, group_y + item_y); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | |
| 117 | static void |
| 118 | setup_canvascxx . . $ setup_canvas(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *canvas) |
| 119 | { |
| 120 | GooCanvasItemcxx . . $ GooCanvasItem# *root, *group, *item; |
| 121 | int group_i, group_j, i, j; |
| 122 | int total_items = 0, id_item_num = 0;; |
| 123 | GdkRGBAcxx . . $ GdkRGBA# color = { 0, 0, 0, 0 }; |
| 124 | GooCanvasStylecxx . . $ GooCanvasStyle# *style, *style2; |
| 125 | GValuecxx . . $ GValue# tmpval = { 0 }; |
| 126 | cairo_matrix_tcxx . . $ cairo_matrix_t# item_matrix; |
| 127 | GQuarkcxx . . $ GQuark# id_quark = g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("id"); |
| 128 | |
| 129 | root = goo_canvas_get_root_itemcxx . . $ goo_canvas_get_root_item(ce13d83f0f3922dc). (GOO_CANVAScxx . . $ `src/goocanvas.h:27:9`! (canvas)); |
| 130 | |
| 131 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (root, "motion_notify_event", |
| 132 | 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`!); |
| 133 | |
| 134 | g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (root), |
| 135 | "font", "Sans 8", |
| 136 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 137 | |
| 138 | style = goo_canvas_style_newcxx . . $ goo_canvas_style_new(147659303b1bb746). (); |
| 139 | gdk_rgba_parsecxx . . $ gdk_rgba_parse(482ef11efa4439a6). (&color, "mediumseagreen"); |
| 140 | patterncxx . . $ pattern. = cairo_pattern_create_rgbcxx . . $ cairo_pattern_create_rgb(6ac72da6a906a53f). (color.redcxx . . $ _GdkRGBA#red., color.greencxx . . $ _GdkRGBA#green., color.bluecxx . . $ _GdkRGBA#blue.); |
| 141 | g_value_initcxx . . $ g_value_init(afc049a76445919c). (&tmpval, GOO_TYPE_CAIRO_PATTERNcxx . . $ `src/goocanvasutils.h:357:9`!); |
| 142 | g_value_take_boxedcxx . . $ g_value_take_boxed(806599f585dac18b). (&tmpval, patterncxx . . $ pattern.); |
| 143 | goo_canvas_style_set_propertycxx . . $ goo_canvas_style_set_property(759c18138018574e). (style, goo_canvas_style_fill_pattern_idcxx . . $ goo_canvas_style_fill_pattern_id., &tmpval); |
| 144 | g_value_unsetcxx . . $ g_value_unset(15c06aff79890746). (&tmpval); |
| 145 | |
| 146 | style2 = goo_canvas_style_newcxx . . $ goo_canvas_style_new(147659303b1bb746). (); |
| 147 | gdk_rgba_parsecxx . . $ gdk_rgba_parse(482ef11efa4439a6). (&color, "steelblue"); |
| 148 | patterncxx . . $ pattern. = cairo_pattern_create_rgbcxx . . $ cairo_pattern_create_rgb(6ac72da6a906a53f). (color.redcxx . . $ _GdkRGBA#red., color.greencxx . . $ _GdkRGBA#green., color.bluecxx . . $ _GdkRGBA#blue.); |
| 149 | g_value_initcxx . . $ g_value_init(afc049a76445919c). (&tmpval, GOO_TYPE_CAIRO_PATTERNcxx . . $ `src/goocanvasutils.h:357:9`!); |
| 150 | g_value_take_boxedcxx . . $ g_value_take_boxed(806599f585dac18b). (&tmpval, patterncxx . . $ pattern.); |
| 151 | goo_canvas_style_set_propertycxx . . $ goo_canvas_style_set_property(759c18138018574e). (style2, goo_canvas_style_fill_pattern_idcxx . . $ goo_canvas_style_fill_pattern_id., &tmpval); |
| 152 | g_value_unsetcxx . . $ g_value_unset(15c06aff79890746). (&tmpval); |
| 153 | |
| 154 | for (group_i = 0; group_i < N_GROUP_COLScxx . . $ `demo/scalability-demo.c:6:9`!; group_i++) |
| 155 | { |
| 156 | for (group_j = 0; group_j < N_GROUP_ROWScxx . . $ `demo/scalability-demo.c:7:9`!; group_j++) |
| 157 | { |
| 158 | double group_x = left_offsetcxx . . $ left_offset. + (group_i * group_widthcxx . . $ group_width.); |
| 159 | double group_y = top_offsetcxx . . $ top_offset. + (group_j * group_heightcxx . . $ group_height.); |
| 160 | |
| 161 | group = goo_canvas_group_newcxx . . $ goo_canvas_group_new(c01a4b3de4d0ec8d). (root, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 162 | total_items++; |
| 163 | goo_canvas_item_translatecxx . . $ goo_canvas_item_translate(e265ce1cccd7ae25). (group, group_x, group_y); |
| 164 | |
| 165 | for (i = 0; i < N_COLScxx . . $ `demo/scalability-demo.c:8:9`!; i++) |
| 166 | { |
| 167 | for (j = 0; j < N_ROWScxx . . $ `demo/scalability-demo.c:9:9`!; j++) |
| 168 | { |
| 169 | double item_x = (i * cell_widthcxx . . $ cell_width.) + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`!; |
| 170 | double item_y = (j * cell_heightcxx . . $ cell_height.) + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`!; |
| 171 | #ifdef ROTATEcxx . . $ `demo/scalability-demo.c:13:9`! |
| 172 | double rotation = (i % 10 * 2) * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! / 180; |
| 173 | double rotation_x = item_x + item_widthcxx . . $ item_width. / 2; |
| 174 | double rotation_y = item_y + item_heightcxx . . $ item_height. / 2; |
| 175 | #endif |
| 176 | |
| 177 | #ifdef USE_PIXMAP |
| 178 | item = goo_canvas_image_new (group, NULL, item_x, item_y, |
| 179 | "pattern", pattern, |
| 180 | "width", item_width, |
| 181 | "height", item_height, |
| 182 | NULL); |
| 183 | #else |
| 184 | item = goo_canvas_rect_newcxx . . $ goo_canvas_rect_new(81fa6bcda469491f). (group, item_x, item_y, |
| 185 | item_widthcxx . . $ item_width., item_heightcxx . . $ item_height., |
| 186 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 187 | #ifdef SET_STYLEcxx . . $ `demo/scalability-demo.c:32:9`! |
| 188 | goo_canvas_item_set_stylecxx . . $ goo_canvas_item_set_style(9bf0fee6200d191a). (item, (j % 2) ? style : style2); |
| 189 | #endif |
| 190 | #ifdef ROTATEcxx . . $ `demo/scalability-demo.c:13:9`! |
| 191 | cairo_matrix_init_identitycxx . . $ cairo_matrix_init_identity(80024db424ed69ee). (&item_matrix); |
| 192 | cairo_matrix_translatecxx . . $ cairo_matrix_translate(7087b3ddb4e58568). (&item_matrix, rotation_x, rotation_y); |
| 193 | cairo_matrix_rotatecxx . . $ cairo_matrix_rotate(3247a566bd960306). (&item_matrix, rotation); |
| 194 | cairo_matrix_translatecxx . . $ cairo_matrix_translate(7087b3ddb4e58568). (&item_matrix, -rotation_x, -rotation_y); |
| 195 | goo_canvas_item_set_transformcxx . . $ goo_canvas_item_set_transform(dbfb049e0f52eaa0). (item, &item_matrix); |
| 196 | #endif |
| 197 | #endif |
| 198 | #ifdef SET_IDScxx . . $ `demo/scalability-demo.c:40:9`! |
| 199 | g_object_set_qdatacxx . . $ g_object_set_qdata(d7e2e719dfad0cc9). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (item), id_quark, |
| 200 | idscxx . . $ ids.[id_item_num]); |
| 201 | #endif |
| 202 | #if 0 |
| 203 | g_signal_connect (item, "motion_notify_event", |
| 204 | G_CALLBACK (on_motion_notify), NULL); |
| 205 | #endif |
| 206 | |
| 207 | #ifdef USE_TEXTcxx . . $ `demo/scalability-demo.c:36:9`! |
| 208 | item = goo_canvas_text_newcxx . . $ goo_canvas_text_new(a79e558f39c1c3be). (group, idscxx . . $ ids.[id_item_num], |
| 209 | item_x + item_widthcxx . . $ item_width. / 2, |
| 210 | item_y + item_heightcxx . . $ item_height. / 2, |
| 211 | item_widthcxx . . $ item_width., GOO_CANVAS_ANCHOR_CENTERcxx . . $ GOO_CANVAS_ANCHOR_CENTER., |
| 212 | "height", item_heightcxx . . $ item_height., |
| 213 | /*"alignment", PANGO_ALIGN_CENTER,*/ |
| 214 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 215 | /* FIXME: This is slightly naughty, but much faster. */ |
| 216 | GOO_CANVAS_TEXTcxx . . $ `src/goocanvastext.h:31:9`! (item)->text_datacxx . . $ _GooCanvasText#text_data.->alignmentcxx . . $ _GooCanvasTextData#alignment. = PANGO_ALIGN_CENTERcxx . . $ PANGO_ALIGN_CENTER.; |
| 217 | |
| 218 | #else |
| 219 | item = goo_canvas_rect_new (group, item_x + 20, item_y + 4, |
| 220 | item_width - 40, item_height - 8, |
| 221 | NULL); |
| 222 | #endif |
| 223 | |
| 224 | #ifdef ROTATEcxx . . $ `demo/scalability-demo.c:13:9`! |
| 225 | goo_canvas_item_set_transformcxx . . $ goo_canvas_item_set_transform(dbfb049e0f52eaa0). (item, &item_matrix); |
| 226 | #endif |
| 227 | id_item_num++; |
| 228 | total_items += 2; |
| 229 | |
| 230 | #ifdef ONLY_ONE |
| 231 | break; |
| 232 | #endif |
| 233 | } |
| 234 | #ifdef ONLY_ONE |
| 235 | break; |
| 236 | #endif |
| 237 | } |
| 238 | #ifdef ONLY_ONE |
| 239 | break; |
| 240 | #endif |
| 241 | } |
| 242 | #ifdef ONLY_ONE |
| 243 | break; |
| 244 | #endif |
| 245 | } |
| 246 | |
| 247 | if (patterncxx . . $ pattern.) |
| 248 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (patterncxx . . $ pattern.); |
| 249 | |
| 250 | g_printcxx . . $ g_print(326aeb464d16410c). ("Total items: %i\n", total_items); |
| 251 | } |
| 252 | |
| 253 | |
| 254 | static gbooleancxx . . $ gboolean# |
| 255 | on_drawcxx . . $ on_draw(27d3c64eb682b78a). (GtkWidgetcxx . . $ GtkWidget# *canvas, |
| 256 | cairo_tcxx . . $ cairo_t# *cr, |
| 257 | gpointercxx . . $ gpointer# unused_data) |
| 258 | { |
| 259 | static gbooleancxx . . $ gboolean# first_time = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 260 | |
| 261 | if (first_time) |
| 262 | { |
| 263 | printfcxx . . $ printf(581fddd72a8db8fc). ("Update Canvas Time Used: %g\n", |
| 264 | (double) (clockcxx . . $ clock(da6335ded91d79c2).() - startcxx . . $ start.) / CLOCKS_PER_SECcxx . . $ `<external>/89459239771508533/time.h:34:9`!); |
| 265 | first_time = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 266 | } |
| 267 | |
| 268 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 269 | } |
| 270 | |
| 271 | |
| 272 | GtkWidgetcxx . . $ GtkWidget# * |
| 273 | create_canvascxx . . $ create_canvas(2369ce5e9f2c7dfd). (void) |
| 274 | { |
| 275 | GtkWidgetcxx . . $ GtkWidget# *canvas; |
| 276 | |
| 277 | #ifdef USE_PIXMAP |
| 278 | pixbuf = gdk_pixbuf_new_from_file("toroid.png", NULL); |
| 279 | item_width = gdk_pixbuf_get_width (pixbuf); |
| 280 | item_height = gdk_pixbuf_get_height (pixbuf); |
| 281 | pattern = goo_canvas_cairo_pattern_from_pixbuf (pixbuf); |
| 282 | #else |
| 283 | pixbufcxx . . $ pixbuf. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 284 | item_widthcxx . . $ item_width. = ITEM_WIDTHcxx . . $ `demo/scalability-demo.c:10:9`!; |
| 285 | item_heightcxx . . $ item_height. = 19; |
| 286 | #endif |
| 287 | |
| 288 | cell_widthcxx . . $ cell_width. = item_widthcxx . . $ item_width. + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`! * 2; |
| 289 | cell_heightcxx . . $ cell_height. = item_heightcxx . . $ item_height. + PADDINGcxx . . $ `demo/scalability-demo.c:11:9`! * 2; |
| 290 | |
| 291 | group_widthcxx . . $ group_width. = N_COLScxx . . $ `demo/scalability-demo.c:8:9`! * cell_widthcxx . . $ cell_width.; |
| 292 | group_heightcxx . . $ group_height. = N_ROWScxx . . $ `demo/scalability-demo.c:9:9`! * cell_heightcxx . . $ cell_height.; |
| 293 | |
| 294 | total_widthcxx . . $ total_width. = N_GROUP_COLScxx . . $ `demo/scalability-demo.c:6:9`! * group_widthcxx . . $ group_width.; |
| 295 | total_heightcxx . . $ total_height. = N_GROUP_ROWScxx . . $ `demo/scalability-demo.c:7:9`! * group_heightcxx . . $ group_height.; |
| 296 | |
| 297 | /* We use -ve offsets to test if -ve coords are handled correctly. */ |
| 298 | left_offsetcxx . . $ left_offset. = -total_widthcxx . . $ total_width. / 2; |
| 299 | top_offsetcxx . . $ top_offset. = -total_heightcxx . . $ total_height. / 2; |
| 300 | |
| 301 | #ifdef SET_IDScxx . . $ `demo/scalability-demo.c:40:9`! |
| 302 | init_idscxx . . $ init_ids(49f6e7a06ebc5aa8). (); |
| 303 | #endif |
| 304 | |
| 305 | /* Create the canvas. */ |
| 306 | canvas = goo_canvas_newcxx . . $ goo_canvas_new(2369ce5e9f2c7dfd). (); |
| 307 | gtk_widget_set_size_requestcxx . . $ gtk_widget_set_size_request(f5b8e75990cfac4b). (canvas, 600, 450); |
| 308 | |
| 309 | startcxx . . $ start. = clockcxx . . $ clock(da6335ded91d79c2).(); |
| 310 | setup_canvascxx . . $ setup_canvas(d7cf858254b37903). (canvas); |
| 311 | printfcxx . . $ printf(581fddd72a8db8fc). ("Create Canvas Time Used: %g\n", |
| 312 | (double) (clockcxx . . $ clock(da6335ded91d79c2).() - startcxx . . $ start.) / CLOCKS_PER_SECcxx . . $ `<external>/89459239771508533/time.h:34:9`!); |
| 313 | |
| 314 | startcxx . . $ start. = clockcxx . . $ clock(da6335ded91d79c2).(); |
| 315 | goo_canvas_set_boundscxx . . $ goo_canvas_set_bounds(c765acac0aeef5c4). (GOO_CANVAScxx . . $ `src/goocanvas.h:27:9`! (canvas), left_offsetcxx . . $ left_offset., top_offsetcxx . . $ top_offset., |
| 316 | left_offsetcxx . . $ left_offset. + total_widthcxx . . $ total_width., top_offsetcxx . . $ top_offset. + total_heightcxx . . $ total_height.); |
| 317 | gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (canvas); |
| 318 | |
| 319 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (canvas, "draw", |
| 320 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_draw), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 321 | |
| 322 | return canvas; |
| 323 | } |
| 324 | |
| 325 | |
| 326 | static gbooleancxx . . $ gboolean# |
| 327 | on_delete_eventcxx . . $ on_delete_event(cb5c69d635e66e01). (GtkWidgetcxx . . $ GtkWidget# *window, |
| 328 | GdkEventcxx . . $ GdkEvent# *event, |
| 329 | gpointercxx . . $ gpointer# unused_data) |
| 330 | { |
| 331 | gtk_main_quitcxx . . $ gtk_main_quit(49f6e7a06ebc5aa8). (); |
| 332 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 333 | } |
| 334 | |
| 335 | |
| 336 | int |
| 337 | maincxx . . $ main(afcd3168fc1188a4). (int argc, char *argv[]) |
| 338 | { |
| 339 | GtkWidgetcxx . . $ GtkWidget# *window, *scrolled_win, *canvas; |
| 340 | |
| 341 | gtk_initcxx . . $ gtk_init(49aaaae07c8bf5c4). (&argc, &argv); |
| 342 | |
| 343 | window = gtk_window_newcxx . . $ gtk_window_new(77bbe1a96f42772c). (GTK_WINDOW_TOPLEVELcxx . . $ GTK_WINDOW_TOPLEVEL.); |
| 344 | gtk_window_set_default_sizecxx . . $ gtk_window_set_default_size(3ade0f781b002fdd). (GTK_WINDOWcxx . . $ `<external>/3777575239456597881/gtkwindow.h:40:9`! (window), 640, 600); |
| 345 | gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (window); |
| 346 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (window, "delete_event", G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_delete_event), |
| 347 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 348 | |
| 349 | 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`!); |
| 350 | gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (scrolled_win); |
| 351 | gtk_container_addcxx . . $ gtk_container_add(a71b61ec882009c2). (GTK_CONTAINERcxx . . $ `<external>/462093496598485868/gtkcontainer.h:38:9`! (window), scrolled_win); |
| 352 | |
| 353 | canvas = create_canvascxx . . $ create_canvas(2369ce5e9f2c7dfd). (); |
| 354 | gtk_container_addcxx . . $ gtk_container_add(a71b61ec882009c2). (GTK_CONTAINERcxx . . $ `<external>/462093496598485868/gtkcontainer.h:38:9`! (scrolled_win), canvas); |
| 355 | |
| 356 | gtk_maincxx . . $ gtk_main(49f6e7a06ebc5aa8). (); |
| 357 | |
| 358 | return 0; |
| 359 | } |
| 360 | |
| 361 |