gtk/examples/tictactoe/ttt_test.c
Federico Mena Quintero 80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00

47 lines
891 B
C

#include <config.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "tictactoe.h"
void win( GtkWidget *widget,
gpointer data )
{
g_print ("Yay!\n");
tictactoe_clear (TICTACTOE (widget));
}
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *ttt;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Aspect Frame");
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (exit), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
ttt = tictactoe_new ();
gtk_container_add (GTK_CONTAINER (window), ttt);
gtk_widget_show (ttt);
/* And attach to its "tictactoe" signal */
g_signal_connect (G_OBJECT (ttt), "tictactoe",
G_CALLBACK (win), NULL);
gtk_widget_show (window);
gtk_main ();
return 0;
}