7 /* GtkWidget is the storage type for widgets */
12 gtk_init (&argc, &argv);
14 /* Create a new window */
15 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
16 gtk_window_set_title (GTK_WINDOW (window), "Frame Example");
18 /* Here we connect the "destroy" event to a signal handler */
19 g_signal_connect (G_OBJECT (window), "destroy",
20 G_CALLBACK (gtk_main_quit), NULL);
22 gtk_widget_set_size_request (window, 300, 300);
23 /* Sets the border width of the window. */
24 gtk_container_set_border_width (GTK_CONTAINER (window), 10);
27 frame = gtk_frame_new (NULL);
28 gtk_container_add (GTK_CONTAINER (window), frame);
30 /* Set the frame's label */
31 gtk_frame_set_label (GTK_FRAME (frame), "GTK Frame Widget");
33 /* Align the label at the right of the frame */
34 gtk_frame_set_label_align (GTK_FRAME (frame), 1.0, 0.0);
36 /* Set the style of the frame */
37 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT);
39 gtk_widget_show (frame);
41 /* Display the window */
42 gtk_widget_show (window);
44 /* Enter the event loop */