aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-12-24 17:22:49 +0000
committerThomas White <taw@bitwiz.org.uk>2014-12-24 17:22:49 +0000
commitd36470bcebf57644464754f5ef045a4f8d057c2b (patch)
treef4ee2561d79d7d94ade9d212d3ced14ffbd4b9db /src/narrative_window.c
parent29de55f6415e7dc547f84e7e204e1b93099a0980 (diff)
Structure for callback mechanism
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
index b5ecf9f..da1d8f1 100644
--- a/src/narrative_window.c
+++ b/src/narrative_window.c
@@ -190,7 +190,14 @@ static void update_toolbar(NarrativeWindow *nw)
static SCBlock *narrative_stylesheet()
{
- return sc_parse("\\stylesheet{\\ss[slide]{\nSLIDE\n}}");
+ return sc_parse("\\stylesheet{\\ss[slide]{\n\\callback[sthumb]\n}}");
+}
+
+
+static cairo_surface_t *render_thumbnail(SCBlock *scblocks, void *vp)
+{
+ struct presentation *p = vp;
+ return NULL;
}
@@ -202,6 +209,7 @@ NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app)
GtkWidget *toolbar;
GtkToolItem *button;
SCBlock *stylesheets[3];
+ SCCallbackList *cbl;
if ( p->narrative_window != NULL ) {
fprintf(stderr, "Narrative window is already open!\n");
@@ -229,6 +237,8 @@ NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app)
stylesheets[1] = narrative_stylesheet();
stylesheets[2] = NULL;
nw->sceditor = sc_editor_new(nw->p->scblocks, stylesheets);
+ cbl = sc_callback_list_new();
+ sc_editor_set_callbacks(nw->sceditor, cbl);
toolbar = gtk_toolbar_new();
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);