gtk2/examples/tictactoe/ttt_test.c
GMT 1998 Tony Gale 3821880398 - re-write the GtkProgressBar section to the 1.1 API. - add an Appendix
Thu Dec 10 17:58:49 GMT 1998  Tony Gale  <gale@gtk.org>

        * docs/gtk_tut.sgml:
          - re-write the GtkProgressBar section to the 1.1 API.
          - add an Appendix listing all the signals
            (apologies to TimJ for taking so long in using his hard work
             in automating the extraction - thanx Tim).
        * examples/*: bring them all upto the tutorial versions
1998-12-10 17:31:04 +00:00

46 lines
862 B
C

/* example-start tictactoe ttt_test.c */
#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");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_exit), NULL);
gtk_container_border_width (GTK_CONTAINER (window), 10);
ttt = tictactoe_new ();
gtk_container_add (GTK_CONTAINER (window), ttt);
gtk_widget_show (ttt);
gtk_signal_connect (GTK_OBJECT (ttt), "tictactoe",
GTK_SIGNAL_FUNC (win), NULL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
/* example-end */