#include int main(int argc, char* argv[]) { /* this variable will store a pointer to the window object. */ GtkWidget* main_window; /* This is called in all GTK applications. Arguments */ /* are parsed from the command line and are returned */ /* to the application. */ gtk_init(&argc, &argv); /* create a new top-level window. */ main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); /* define some of the window's attributes. */ gtk_window_set_default_size(GTK_WINDOW(main_window), 500, 300); gtk_window_set_title(GTK_WINDOW (main_window), "A Top Window For The Rest Of Us..."); gtk_container_set_border_width(GTK_CONTAINER (main_window), 5); /* make the window visible. */ gtk_widget_show(main_window); /* All GTK applications must have a gtk_main(). Control * ends here and waits for an event to occur (like a * key press or mouse event). */ gtk_main(); exit(0); }