/* basicgtk.c */
#include <gtk/gtk.h>
/* Function which stops the program */ void CloseTheApp(GtkWidget * window, gpointer data ) { gtk_main_quit (); }
gint i;
gint main ( gint argc, gchar * argv[] ) {
/* Declare a GtkWidget to use as the main window */ GtkWidget * window ;
/* Start GTK+ up, and let it process any arguments that were */ /* passed in on the command line */ gtk_init ( &argc, &argv );
/* Create the window itself */ window = gtk_window_new ( GTK_WINDOW_TOPLEVEL ) ; gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(CloseTheApp), NULL);
/* Show the window, as far as GTK+ is concerned though we just want */ /* to make a widget visible */
for ( i = 0 ; i < 1000 ; i ++ ) { gtk_widget_show (window); }
/*gtk_widget_hide(window);*/ g_print("The window should be hidden now\n");
/* Start GTK+ running so that it can catch any signals */ gtk_main () ;
/* This line will never be reached in this app */ return 0; }
_________________________________________________________________
Winterize your home with tips from MSN House & Home. http://special.msn.com/home/warmhome.armx
_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list