]> Pileus Git - ~andy/gtk/blob - examples/tictactoe/tictactoe.h
Add hint about calling gdk_flush() before gdk_threads_leave(). (#70665,
[~andy/gtk] / examples / tictactoe / tictactoe.h
1
2 /* GTK - The GIMP Toolkit
3  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 #ifndef __TICTACTOE_H__
21 #define __TICTACTOE_H__
22
23
24 #include <gdk/gdk.h>
25 #include <gtk/gtkvbox.h>
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 #define TICTACTOE(obj)          GTK_CHECK_CAST (obj, tictactoe_get_type (), Tictactoe)
33 #define TICTACTOE_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, tictactoe_get_type (), TictactoeClass)
34 #define IS_TICTACTOE(obj)       GTK_CHECK_TYPE (obj, tictactoe_get_type ())
35
36
37 typedef struct _Tictactoe       Tictactoe;
38 typedef struct _TictactoeClass  TictactoeClass;
39
40 struct _Tictactoe
41 {
42   GtkVBox vbox;
43   
44   GtkWidget *buttons[3][3];
45 };
46
47 struct _TictactoeClass
48 {
49   GtkVBoxClass parent_class;
50
51   void (* tictactoe) (Tictactoe *ttt);
52 };
53
54 GtkType        tictactoe_get_type        (void);
55 GtkWidget*     tictactoe_new             (void);
56 void           tictactoe_clear           (Tictactoe *ttt);
57
58 #ifdef __cplusplus
59 }
60 #endif /* __cplusplus */
61
62 #endif /* __TICTACTOE_H__ */
63