aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-09-27 00:24:41 +0200
committerThomas White <taw@bitwiz.org.uk>2014-09-27 00:24:41 +0200
commitab6af6b34c9e5fdfa8cff44fa0f78f9c34ed28ef (patch)
tree8b655e9b7befeff6e370b278bd2c20dbb2bf3be3 /src/narrative_window.c
parent217a194d10d404d1b78dec1b8ea89cfcc123ac29 (diff)
SCEditor, part I
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
new file mode 100644
index 0000000..7fd51a3
--- /dev/null
+++ b/src/narrative_window.c
@@ -0,0 +1,62 @@
+/*
+ * narrative_window.c
+ *
+ * Copyright © 2014 Thomas White <taw@bitwiz.org.uk>
+ *
+ * This file is part of Colloquium.
+ *
+ * Colloquium 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include "presentation.h"
+#include "narrative_window.h"
+
+
+struct _narrative_window
+{
+ GtkWidget *window;
+};
+
+
+NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app)
+{
+ NarrativeWindow *nw;
+
+ if ( p->narrative_window != NULL ) {
+ fprintf(stderr, "Narrative window is already open!\n");
+ return NULL;
+ }
+
+ nw = calloc(1, sizeof(NarrativeWindow));
+ if ( nw == NULL ) return NULL;
+
+ nw->window = gtk_application_window_new(GTK_APPLICATION(app));
+ p->narrative_window = nw;
+
+// update_titlebar(nw);
+
+ gtk_widget_show_all(nw->window);
+
+ return nw;
+}