1 /*
2  * Copyright © 2007 Christian Persch
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef AISLERIOT_WINDOW_H
19 #define AISLERIOT_WINDOW_H
20 
21 #include <gtk/gtk.h>
22 
23 #include "game.h"
24 
25 G_BEGIN_DECLS
26 
27 #define AISLERIOT_TYPE_WINDOW         (aisleriot_window_get_type ())
28 #define AISLERIOT_WINDOW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), AISLERIOT_TYPE_WINDOW, AisleriotWindow))
29 #define AISLERIOT_WINDOW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), AISLERIOT_TYPE_WINDOW, AisleriotWindowClass))
30 #define AISLERIOT_IS_WINDOW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), AISLERIOT_TYPE_WINDOW))
31 #define AISLERIOT_IS_WINDOW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), AISLERIOT_TYPE_WINDOW))
32 #define AISLERIOT_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), AISLERIOT_TYPE_WINDOW, AisleriotWindowClass))
33 
34 typedef struct _AisleriotWindow	        AisleriotWindow;
35 typedef struct _AisleriotWindowPrivate  AisleriotWindowPrivate;
36 typedef struct _AisleriotWindowClass    AisleriotWindowClass;
37 
38 struct _AisleriotWindow {
39   GtkApplicationWindow parent_instance;
40 
41   /*< private >*/
42   AisleriotWindowPrivate *priv;
43 };
44 
45 struct _AisleriotWindowClass {
46   GtkApplicationWindowClass base_class;
47 };
48 
49 GType aisleriot_window_get_type (void);
50 
51 GtkWidget *aisleriot_window_new (GtkApplication *application);
52 
53 GtkUIManager *aisleriot_window_get_ui_manager (AisleriotWindow *window);
54 
55 GtkAction *aisleriot_window_get_action (AisleriotWindow *window,
56                                         const char *action_name);
57 
58 void aisleriot_window_set_game_module (AisleriotWindow * window,
59                                        const char *game_module,
60                                        GRand *rand);
61 
62 const char *aisleriot_window_get_game_module (AisleriotWindow *window);
63 
64 void aisleriot_window_new_game (AisleriotWindow * window);
65 void aisleriot_window_change_game (AisleriotWindow * window);
66 void aisleriot_window_show_statistics_dialog (AisleriotWindow * window);
67 void aisleriot_window_show_about_dialog (AisleriotWindow * window);
68 
69 
70 G_END_DECLS
71 
72 #endif /* !AISLERIOT_WINDOW_H */
73