Show window for a few seconds and delete it?
- From: "george carter" <cglobal25 hotmail com>
- To: gtk-list gnome org
- Subject: Show window for a few seconds and delete it?
- Date: Mon, 08 Dec 2003 10:01:44 -0500
The "gtk_timeout_add" that Paul posted sounds like what I might be looking
for. I think I might want to delete the window and not just hide it though.
I figure by hiding it, it will still reside in memory. I couldn't find the
"gtk_timeout_add" in the Gnome Api Reference. If anyone has any idea how I
might go about using it I would appreciate it. I used the the source code
below just to keep it as simple as possible. But I'm still unsure where
exactly to place it in the code and it's format. Initially, I thought it
would be as easy as showing the window, creating a loop count, and calling
"gtk_window_destroy" for example. I'm new to gtk programming so I might
need a little "hand holding" on this example.
/* basicgtk.c */
#include <gtk/gtk.h>
/* Function which stops the program */
void CloseTheApp(GtkWidget * window, gpointer data )
{
gtk_main_quit ();
}
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 */
gtk_widget_show (window);
/* Start GTK+ running so that it can catch any signals */
gtk_main () ;
/* This line will never be reached in this app */
return 0;
}
_________________________________________________________________
Cell phone ‘switch’ rules are taking effect — find out more here.
http://special.msn.com/msnbc/consumeradvocate.armx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]