2
#include <libgd/gd-revealer.h>
8
GtkWidget *window, *revealer, *box, *widget, *entry;
10
gtk_init (&argc, &argv);
12
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
13
gtk_widget_set_size_request (window, 300, 300);
15
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
16
widget = gtk_toggle_button_new_with_label ("Revealed");
17
gtk_container_add (GTK_CONTAINER (box), widget);
18
gtk_container_add (GTK_CONTAINER (window), box);
20
revealer = gd_revealer_new ();
21
entry = gtk_entry_new ();
22
gtk_container_add (GTK_CONTAINER (revealer), entry);
23
gtk_container_add (GTK_CONTAINER (box), revealer);
25
g_object_bind_property (widget, "active", revealer, "reveal-child", 0);
27
gtk_widget_show_all (window);
30
gtk_widget_destroy (window);