File: | test/test-eel-labeled-image.c |
Warning: | line 72, column 28 This statement is never executed |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | #include <eel/eel-labeled-image.h> |
2 | |
3 | #include "test.h" |
4 | |
5 | static const char pixbuf_name[] = "/usr/share/pixmaps/cafe-globe.png"; |
6 | |
7 | static void |
8 | button_callback (CtkWidget *button, |
9 | gpointer callback_data) |
10 | { |
11 | const char *info = callback_data; |
12 | g_return_if_fail (CTK_IS_BUTTON (button))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((button)); GType __t = ((ctk_button_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_BUTTON (button)"); return; } } while ( 0); |
13 | |
14 | g_print ("%s(%p)\n", info, button); |
15 | } |
16 | |
17 | static CtkWidget * |
18 | labeled_image_button_window_new (const char *title, |
19 | GdkPixbuf *pixbuf) |
20 | { |
21 | CtkWidget *window; |
22 | CtkWidget *vbox; |
23 | CtkWidget *button; |
24 | CtkWidget *toggle_button; |
25 | CtkWidget *check_button; |
26 | CtkWidget *plain; |
27 | |
28 | window = test_window_new (title, 20); |
29 | vbox = ctk_box_new (CTK_ORIENTATION_VERTICAL, 10); |
30 | ctk_container_add (CTK_CONTAINER (window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), ((ctk_container_get_type ())))))), vbox); |
31 | |
32 | if (1) button = eel_labeled_image_button_new ("CtkButton with LabeledImage", pixbuf); |
33 | if (1) toggle_button = eel_labeled_image_toggle_button_new ("CtkToggleButton with LabeledImage", pixbuf); |
34 | if (1) check_button = eel_labeled_image_check_button_new ("CtkCheckButton with LabeledImage", pixbuf); |
35 | if (1) { |
36 | plain = eel_labeled_image_new ("Plain LabeledImage", pixbuf); |
37 | eel_labeled_image_set_can_focus (EEL_LABELED_IMAGE (plain)((((EelLabeledImage*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((plain)), (eel_labeled_image_get_type()))))), TRUE(!(0))); |
38 | } |
39 | |
40 | if (button) ctk_box_pack_start (CTK_BOX (vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((vbox)), ((ctk_box_get_type ())))))), button, TRUE(!(0)), TRUE(!(0)), 0); |
41 | if (toggle_button) ctk_box_pack_start (CTK_BOX (vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((vbox)), ((ctk_box_get_type ())))))), toggle_button, TRUE(!(0)), TRUE(!(0)), 0); |
42 | if (check_button) ctk_box_pack_start (CTK_BOX (vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((vbox)), ((ctk_box_get_type ())))))), check_button, TRUE(!(0)), TRUE(!(0)), 0); |
43 | if (plain) ctk_box_pack_start (CTK_BOX (vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((vbox)), ((ctk_box_get_type ())))))), plain, TRUE(!(0)), TRUE(!(0)), 0); |
44 | |
45 | if (button) { |
46 | g_signal_connect (button, "enter", G_CALLBACK (button_callback), "enter")g_signal_connect_data ((button), ("enter"), (((GCallback) (button_callback ))), ("enter"), ((void*)0), (GConnectFlags) 0); |
47 | g_signal_connect (button, "leave", G_CALLBACK (button_callback), "leave")g_signal_connect_data ((button), ("leave"), (((GCallback) (button_callback ))), ("leave"), ((void*)0), (GConnectFlags) 0); |
48 | g_signal_connect (button, "pressed", G_CALLBACK (button_callback), "pressed")g_signal_connect_data ((button), ("pressed"), (((GCallback) ( button_callback))), ("pressed"), ((void*)0), (GConnectFlags) 0 ); |
49 | g_signal_connect (button, "released", G_CALLBACK (button_callback), "released")g_signal_connect_data ((button), ("released"), (((GCallback) ( button_callback))), ("released"), ((void*)0), (GConnectFlags) 0); |
50 | g_signal_connect (button, "clicked", G_CALLBACK (button_callback), "clicked")g_signal_connect_data ((button), ("clicked"), (((GCallback) ( button_callback))), ("clicked"), ((void*)0), (GConnectFlags) 0 ); |
51 | } |
52 | |
53 | ctk_widget_show_all (vbox); |
54 | |
55 | return window; |
56 | } |
57 | |
58 | int |
59 | main (int argc, char* argv[]) |
60 | { |
61 | CtkWidget *labeled_image_window = NULL((void*)0); |
62 | CtkWidget *labeled_image_button_window = NULL((void*)0); |
63 | GdkPixbuf *pixbuf = NULL((void*)0); |
64 | |
65 | test_init (&argc, &argv); |
66 | |
67 | if (1) pixbuf = test_pixbuf_new_named (pixbuf_name, 1.0); |
68 | if (1) labeled_image_button_window = labeled_image_button_window_new ("LabeledImage in CtkButton Test", pixbuf); |
69 | |
70 | eel_gdk_pixbuf_unref_if_not_null (pixbuf); |
71 | |
72 | if (labeled_image_window) ctk_widget_show (labeled_image_window); |
This statement is never executed | |
73 | if (labeled_image_button_window) ctk_widget_show (labeled_image_button_window); |
74 | |
75 | ctk_main (); |
76 | |
77 | return test_quit (EXIT_SUCCESS0); |
78 | } |