Bug Summary

File:test/test-eel-image-table.c
Warning:line 196, column 9
This statement is never executed

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test-eel-image-table.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/rootdir/test -resource-dir /usr/lib/llvm-16/lib/clang/16 -D HAVE_CONFIG_H -I . -I .. -I .. -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/cafe-desktop-2.0 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/startup-notification-1.0 -I /usr/include/dconf -I /usr/include/cail-3.0 -I /usr/include/libxml2 -D VERSION="1.25.0" -D BAUL_DATADIR="/usr/share/baul" -D CAFELOCALEDIR="/usr//locale" -internal-isystem /usr/lib/llvm-16/lib/clang/16/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/13/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir=/rootdir/test -ferror-limit 19 -fgnuc-version=4.2.1 -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2024-07-10-192015-28295-1 -x c test-eel-image-table.c
1#include <stdlib.h>
2#include <ctk/ctk.h>
3
4#include <eel/eel-image-table.h>
5
6#include "test.h"
7
8static const char pixbuf_name[] = "/usr/share/pixmaps/cafe-about-logo.png";
9
10#define BG_COLOR0xFFFFFF 0xFFFFFF
11#define BG_COLOR_SPEC"white" "white"
12
13static const char *names[] =
14{
15 "Tomaso Albinoni",
16 "Isaac Albéniz",
17 "Georges Bizet",
18 "Luigi Boccherini",
19 "Alexander Borodin",
20 "Johannes Brahms",
21 "Max Bruch",
22 "Anton Bruckner",
23 "Frédéric Chopin",
24 "Aaron Copland",
25 "John Corigliano",
26 "Claude Debussy",
27 "Léo Delibes",
28 "Antonín Dvorák",
29 "Edward Elgar",
30 "Manuel de Falla",
31 "George Gershwin",
32 "Alexander Glazunov",
33 "Mikhail Glinka",
34 "Enrique Granados",
35 "Edvard Grieg",
36 "Joseph Haydn",
37 "Scott Joplin",
38 "Franz Liszt",
39 "Gustav Mahler",
40 "Igor Markevitch",
41 "Felix Mendelssohn",
42 "Modest Mussorgsky",
43 "Sergei Prokofiev",
44 "Giacomo Puccini",
45 "Maurice Ravel",
46 "Ottorino Respighi",
47 "Joaquin Rodrigo",
48 "Gioachino Rossini",
49 "Domenico Scarlatti",
50 "Franz Schubert",
51 "Robert Schumann",
52 "Jean Sibelius",
53 "Bedrich Smetana",
54 "Johann Strauss",
55 "Igor Stravinsky",
56 "Giuseppe Verdi",
57 "Antonio Vivaldi",
58 "Richard Wagner",
59};
60
61static CtkWidget *
62labeled_image_new (const char *text,
63 const char *icon_name)
64{
65 CtkWidget *image;
66 GdkPixbuf *pixbuf = NULL((void*)0);
67
68 if (icon_name) {
69 float sizes[] = { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
70 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0 };
71 pixbuf = test_pixbuf_new_named (icon_name, sizes[random () % G_N_ELEMENTS (sizes)(sizeof (sizes) / sizeof ((sizes)[0]))]);
72 }
73
74 image = eel_labeled_image_new (text, pixbuf);
75
76 eel_gdk_pixbuf_unref_if_not_null (pixbuf);
77
78 return image;
79}
80
81
82static void
83image_table_child_enter_callback (CtkWidget *image_table,
84 CtkWidget *item,
85 gpointer callback_data)
86{
87#if 0
88 char *text;
89
90 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
91 g_return_if_fail (EEL_IS_LABELED_IMAGE (item))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((item)); GType __t = (eel_labeled_image_get_type()); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; })))))) { }
else { g_return_if_fail_warning (((gchar*) 0), ((const char*
) (__func__)), "EEL_IS_LABELED_IMAGE (item)"); return; } } while
(0)
;
92
93 text = eel_labeled_image_get_text (EEL_LABELED_IMAGE (item)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((item)), (eel_labeled_image_get_type())))))
);
94
95 g_print ("%s(%s)\n", G_STRFUNC((const char*) (__func__)), text);
96#endif
97}
98
99static void
100image_table_child_leave_callback (CtkWidget *image_table,
101 CtkWidget *item,
102 gpointer callback_data)
103{
104#if 0
105 char *text;
106
107 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
108 g_return_if_fail (EEL_IS_LABELED_IMAGE (item))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((item)); GType __t = (eel_labeled_image_get_type()); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; })))))) { }
else { g_return_if_fail_warning (((gchar*) 0), ((const char*
) (__func__)), "EEL_IS_LABELED_IMAGE (item)"); return; } } while
(0)
;
109
110 text = eel_labeled_image_get_text (EEL_LABELED_IMAGE (item)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((item)), (eel_labeled_image_get_type())))))
);
111
112 g_print ("%s(%s)\n", G_STRFUNC((const char*) (__func__)), text);
113#endif
114}
115
116static void
117image_table_child_pressed_callback (CtkWidget *image_table,
118 CtkWidget *item,
119 gpointer callback_data)
120{
121 char *text;
122
123 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
124 g_return_if_fail (EEL_IS_LABELED_IMAGE (item))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((item)); GType __t = (eel_labeled_image_get_type()); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; })))))) { }
else { g_return_if_fail_warning (((gchar*) 0), ((const char*
) (__func__)), "EEL_IS_LABELED_IMAGE (item)"); return; } } while
(0)
;
125
126 text = eel_labeled_image_get_text (EEL_LABELED_IMAGE (item)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((item)), (eel_labeled_image_get_type())))))
);
127
128 g_print ("%s(%s)\n", G_STRFUNC((const char*) (__func__)), text);
129}
130
131static void
132image_table_child_released_callback (CtkWidget *image_table,
133 CtkWidget *item,
134 gpointer callback_data)
135{
136 char *text;
137
138 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
139 g_return_if_fail (EEL_IS_LABELED_IMAGE (item))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((item)); GType __t = (eel_labeled_image_get_type()); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; })))))) { }
else { g_return_if_fail_warning (((gchar*) 0), ((const char*
) (__func__)), "EEL_IS_LABELED_IMAGE (item)"); return; } } while
(0)
;
140
141 text = eel_labeled_image_get_text (EEL_LABELED_IMAGE (item)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((item)), (eel_labeled_image_get_type())))))
);
142
143 g_print ("%s(%s)\n", G_STRFUNC((const char*) (__func__)), text);
144}
145
146static void
147image_table_child_clicked_callback (CtkWidget *image_table,
148 CtkWidget *item,
149 gpointer callback_data)
150{
151 char *text;
152
153 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
154 g_return_if_fail (EEL_IS_LABELED_IMAGE (item))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((item)); GType __t = (eel_labeled_image_get_type()); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; })))))) { }
else { g_return_if_fail_warning (((gchar*) 0), ((const char*
) (__func__)), "EEL_IS_LABELED_IMAGE (item)"); return; } } while
(0)
;
155
156 text = eel_labeled_image_get_text (EEL_LABELED_IMAGE (item)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((item)), (eel_labeled_image_get_type())))))
);
157
158 g_print ("%s(%s)\n", G_STRFUNC((const char*) (__func__)), text);
159}
160
161static int
162foo_timeout (gpointer callback_data)
163{
164 static int recursion_count = 0;
165 g_return_val_if_fail (CTK_IS_WINDOW (callback_data), FALSE)do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((callback_data)); GType __t = ((ctk_window_get_type ()));
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "CTK_IS_WINDOW (callback_data)"); return
((0)); } } while (0)
;
166
167 recursion_count++;
168
169 g_print ("%s(%d)\n", G_STRFUNC((const char*) (__func__)), recursion_count);
170 ctk_widget_queue_resize (CTK_WIDGET (callback_data)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((callback_data)), ((ctk_widget_get_type ()))))))
);
171
172 recursion_count--;
173
174 return FALSE(0);
175}
176
177static void
178image_table_size_allocate (CtkWidget *image_table,
179 CtkAllocation *allocation,
180 gpointer callback_data)
181{
182 static int recursion_count = 0;
183 CtkAllocation w_allocation;
184
185 g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((image_table)); GType __t = (eel_image_table_get_type());
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "EEL_IS_IMAGE_TABLE (image_table)"); return
; } } while (0)
;
186 g_return_if_fail (allocation != NULL)do { if ((allocation != ((void*)0))) { } else { g_return_if_fail_warning
(((gchar*) 0), ((const char*) (__func__)), "allocation != NULL"
); return; } } while (0)
;
187 g_return_if_fail (CTK_IS_WINDOW (callback_data))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance
*) ((callback_data)); GType __t = ((ctk_window_get_type ()));
gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class
&& __inst->g_class->g_type == __t) __r = (!(0)
); else __r = g_type_check_instance_is_a (__inst, __t); __r; }
)))))) { } else { g_return_if_fail_warning (((gchar*) 0), ((const
char*) (__func__)), "CTK_IS_WINDOW (callback_data)"); return
; } } while (0)
;
188
189 recursion_count++;
190
191 if (0) g_timeout_add (0, foo_timeout, callback_data);
192
193 /*ctk_widget_queue_resize (CTK_WIDGET (callback_data));*/
194
195 ctk_widget_get_allocation (CTK_WIDGET (image_table)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((image_table)), ((ctk_widget_get_type ()))))))
, &w_allocation);
196 if (0) ctk_widget_size_allocate (CTK_WIDGET (image_table)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((image_table)), ((ctk_widget_get_type ()))))))
,
This statement is never executed
197 &w_allocation);
198
199 g_print ("%s(%d)\n", G_STRFUNC((const char*) (__func__)), recursion_count);
200
201 recursion_count--;
202}
203
204static CtkWidget *
205image_table_new_scrolled (void)
206{
207 CtkWidget *scrolled;
208 CtkWidget *viewport;
209 CtkWidget *window;
210 CtkWidget *image_table;
211 int i;
212
213 window = test_window_new ("Image Table Test", 10);
214
215 ctk_window_set_default_size (CTK_WINDOW (window)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_window_get_type ()))))))
, 400, 300);
216
217 /* Scrolled window */
218 scrolled = ctk_scrolled_window_new (NULL((void*)0), NULL((void*)0));
219 ctk_scrolled_window_set_policy (CTK_SCROLLED_WINDOW (scrolled)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((scrolled)), ((ctk_scrolled_window_get_type
()))))))
,
220 CTK_POLICY_NEVER,
221 CTK_POLICY_AUTOMATIC);
222 ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((window)), ((ctk_container_get_type ()))))))
, scrolled);
223
224 /* Viewport */
225 viewport = ctk_viewport_new (NULL((void*)0), NULL((void*)0));
226 ctk_viewport_set_shadow_type (CTK_VIEWPORT (viewport)((((CtkViewport*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((viewport)), ((ctk_viewport_get_type ()))))))
, CTK_SHADOW_OUT);
227 ctk_container_add (CTK_CONTAINER (scrolled)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((scrolled)), ((ctk_container_get_type ()))))))
, viewport);
228
229 image_table = eel_image_table_new (FALSE(0));
230
231 if (0) g_signal_connect (image_table,g_signal_connect_data ((image_table), ("size_allocate"), (((GCallback
) (image_table_size_allocate))), (window), ((void*)0), (GConnectFlags
) 0)
232 "size_allocate",g_signal_connect_data ((image_table), ("size_allocate"), (((GCallback
) (image_table_size_allocate))), (window), ((void*)0), (GConnectFlags
) 0)
233 G_CALLBACK (image_table_size_allocate),g_signal_connect_data ((image_table), ("size_allocate"), (((GCallback
) (image_table_size_allocate))), (window), ((void*)0), (GConnectFlags
) 0)
234 window)g_signal_connect_data ((image_table), ("size_allocate"), (((GCallback
) (image_table_size_allocate))), (window), ((void*)0), (GConnectFlags
) 0)
;
235
236 eel_wrap_table_set_x_justification (EEL_WRAP_TABLE (image_table)((((EelWrapTable*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((image_table)), (eel_wrap_table_get_type())))))
,
237 EEL_JUSTIFICATION_MIDDLE);
238 eel_wrap_table_set_y_justification (EEL_WRAP_TABLE (image_table)((((EelWrapTable*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((image_table)), (eel_wrap_table_get_type())))))
,
239 EEL_JUSTIFICATION_END);
240
241 ctk_container_add (CTK_CONTAINER (viewport)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((viewport)), ((ctk_container_get_type ()))))))
, image_table);
242
243 g_signal_connect (image_table,g_signal_connect_data ((image_table), ("child_enter"), (((GCallback
) (image_table_child_enter_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
244 "child_enter",g_signal_connect_data ((image_table), ("child_enter"), (((GCallback
) (image_table_child_enter_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
245 G_CALLBACK (image_table_child_enter_callback),g_signal_connect_data ((image_table), ("child_enter"), (((GCallback
) (image_table_child_enter_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
246 NULL)g_signal_connect_data ((image_table), ("child_enter"), (((GCallback
) (image_table_child_enter_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
;
247
248 g_signal_connect (image_table,g_signal_connect_data ((image_table), ("child_leave"), (((GCallback
) (image_table_child_leave_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
249 "child_leave",g_signal_connect_data ((image_table), ("child_leave"), (((GCallback
) (image_table_child_leave_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
250 G_CALLBACK (image_table_child_leave_callback),g_signal_connect_data ((image_table), ("child_leave"), (((GCallback
) (image_table_child_leave_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
251 NULL)g_signal_connect_data ((image_table), ("child_leave"), (((GCallback
) (image_table_child_leave_callback))), (((void*)0)), ((void*
)0), (GConnectFlags) 0)
;
252
253 g_signal_connect (image_table,g_signal_connect_data ((image_table), ("child_pressed"), (((GCallback
) (image_table_child_pressed_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
254 "child_pressed",g_signal_connect_data ((image_table), ("child_pressed"), (((GCallback
) (image_table_child_pressed_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
255 G_CALLBACK (image_table_child_pressed_callback),g_signal_connect_data ((image_table), ("child_pressed"), (((GCallback
) (image_table_child_pressed_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
256 NULL)g_signal_connect_data ((image_table), ("child_pressed"), (((GCallback
) (image_table_child_pressed_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
;
257
258 g_signal_connect (image_table,g_signal_connect_data ((image_table), ("child_released"), (((
GCallback) (image_table_child_released_callback))), (((void*)
0)), ((void*)0), (GConnectFlags) 0)
259 "child_released",g_signal_connect_data ((image_table), ("child_released"), (((
GCallback) (image_table_child_released_callback))), (((void*)
0)), ((void*)0), (GConnectFlags) 0)
260 G_CALLBACK (image_table_child_released_callback),g_signal_connect_data ((image_table), ("child_released"), (((
GCallback) (image_table_child_released_callback))), (((void*)
0)), ((void*)0), (GConnectFlags) 0)
261 NULL)g_signal_connect_data ((image_table), ("child_released"), (((
GCallback) (image_table_child_released_callback))), (((void*)
0)), ((void*)0), (GConnectFlags) 0)
;
262
263 g_signal_connect (image_table,g_signal_connect_data ((image_table), ("child_clicked"), (((GCallback
) (image_table_child_clicked_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
264 "child_clicked",g_signal_connect_data ((image_table), ("child_clicked"), (((GCallback
) (image_table_child_clicked_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
265 G_CALLBACK (image_table_child_clicked_callback),g_signal_connect_data ((image_table), ("child_clicked"), (((GCallback
) (image_table_child_clicked_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
266 NULL)g_signal_connect_data ((image_table), ("child_clicked"), (((GCallback
) (image_table_child_clicked_callback))), (((void*)0)), ((void
*)0), (GConnectFlags) 0)
;
267
268 for (i = 0; i < 100; i++) {
269 char *text;
270 CtkWidget *image;
271
272 text = g_strdup_printf ("%s %d",
273 names[random () % G_N_ELEMENTS (names)(sizeof (names) / sizeof ((names)[0]))],
274 i);
275 image = labeled_image_new (text, pixbuf_name);
276 g_free (text);
277
278 ctk_container_add (CTK_CONTAINER (image_table)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((image_table)), ((ctk_container_get_type ()))))))
, image);
279 ctk_widget_show (image);
280 }
281
282 ctk_widget_show (viewport);
283 ctk_widget_show (scrolled);
284 ctk_widget_show (image_table);
285
286 return window;
287}
288
289int
290main (int argc, char* argv[])
291{
292 CtkWidget *window = NULL((void*)0);
293
294 test_init (&argc, &argv);
295
296 window = image_table_new_scrolled ();
297
298 ctk_widget_show (window);
299
300 ctk_main ();
301
302 return 0;
303}