[atomix/wip/gtk3-port] Reorganization started for GtkApplication



commit e0d4915c052c152b0e48e8d37a2c3adbb6f275fb
Author: Robert Roth <robert roth off gmail com>
Date:   Tue Jun 2 00:34:35 2015 +0300

    Reorganization started for GtkApplication

 src/Makefile.am          |    1 +
 src/atomix-application.h |   62 ++++++++++++++++++++++++++++++++++++++++++++++
 src/main.h               |   38 +---------------------------
 3 files changed, 64 insertions(+), 37 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 55bd8a3..8e40ef8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,7 @@ bin_PROGRAMS = atomix
 noinst_PROGRAMS = pf-test
 
 atomix_SOURCES = \
+       atomix-application.h \
        main.c main.h \
        board-gtk.c board-gtk.h \
        undo.c undo.h \
diff --git a/src/atomix-application.h b/src/atomix-application.h
new file mode 100644
index 0000000..c81c20e
--- /dev/null
+++ b/src/atomix-application.h
@@ -0,0 +1,62 @@
+/* Atomix -- a little puzzle game about atoms and molecules.
+ * Copyright (C) 1999 Jens Finke
+ * Copyright (C) 2005 Guilherme de S. Pastore
+ * Copyright (C) 2015 Robert Roth
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _ATOMIX_APPLICATION_H_
+#define _ATOMIX_APPLICATION_H_
+
+#include <gtk/gtk.h>
+#include "theme-manager.h"
+#include "level-manager.h"
+#include "goal.h"
+#include "atomix-application.h"
+
+typedef enum
+{
+  GAME_STATE_NOT_RUNNING,
+  GAME_STATE_RUNNING_UNMOVED,
+  GAME_STATE_RUNNING,
+  GAME_STATE_PAUSED
+} GameState;
+
+typedef struct
+{
+  GtkWidget *mainwin;
+  GHashTable *actions;
+
+  GtkWidget *fi_matrix;
+  GtkWidget *fi_goal;
+  GtkWidget *lb_level;
+  GtkWidget *lb_name;
+  GtkWidget *lb_formula;
+  GtkWidget *lb_score;
+  GtkWidget *clock;
+
+  LevelManager *lm;
+  ThemeManager *tm;
+  Theme *theme;
+
+  GameState state;
+  Level *level;
+  Goal *goal;
+  gint level_no;
+  guint score;
+} AtomixApp;
+
+#endif /* _ATOMIX_APPLICATION_H_ */
diff --git a/src/main.h b/src/main.h
index a5e51d7..f2efd0e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -20,44 +20,8 @@
 #ifndef _ATOMIX_MAIN_H_
 #define _ATOMIX_MAIN_H_
 
-#include <glib.h>
 #include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include "theme-manager.h"
-#include "level-manager.h"
-#include "goal.h"
-
-typedef enum
-{
-  GAME_STATE_NOT_RUNNING,
-  GAME_STATE_RUNNING_UNMOVED,
-  GAME_STATE_RUNNING,
-  GAME_STATE_PAUSED
-} GameState;
-
-typedef struct
-{
-  GtkWidget *mainwin;
-  GHashTable *actions;
-
-  GtkWidget *fi_matrix;
-  GtkWidget *fi_goal;
-  GtkWidget *lb_level;
-  GtkWidget *lb_name;
-  GtkWidget *lb_formula;
-  GtkWidget *lb_score;
-  GtkWidget *clock;
-
-  LevelManager *lm;
-  ThemeManager *tm;
-  Theme *theme;
-
-  GameState state;
-  Level *level;
-  Goal *goal;
-  gint level_no;
-  guint score;
-} AtomixApp;
+#include "atomix-application.h"
 
 void game_level_finished (void);
 void update_menu_item_state (void);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]