2 * This is an example button widget which counts the number of clicks
4 * It is also showing how you can use inline gtk-doc like documentation
5 * which will be correctly translated and put into the resulting source
8 class Gtk:Button:Count from Gtk:Button {
27 * Makes a new #GtkButtonCount widget
29 * Returns: a new widget
35 /* It's ok to use a normal cast here, as we are sure that we
36 * have gotten the right type */
37 return (GtkWidget *)GET_NEW;
42 * @label: the label text
44 * Makes a new #GtkButtonCount widget with a label
46 * Returns: a new widget
50 new_with_label(char *label (check null)) onerror NULL
52 /* It's ok to use a normal cast here, as we are sure that we
53 * have gotten the right type */
54 GtkWidget *widget = (GtkWidget *)GET_NEW;
55 GtkWidget *label_widget = gtk_label_new(label);
56 gtk_container_add(GTK_CONTAINER(widget), label_widget);
57 gtk_widget_show(label_widget);
63 clicked(Gtk:Button *self (check null type))
65 GtkButtonCount *bc = GTK_BUTTON_COUNT(self);