aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.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/sc_editor.c
parent29de55f6415e7dc547f84e7e204e1b93099a0980 (diff)
Structure for callback mechanism
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index ca64c8e..7fa8af4 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -74,7 +74,8 @@ static void rerender(SCEditor *e)
}
e->surface = render_sc(e->scblocks, e->w, e->h, e->log_w, e->log_h,
- e->stylesheets, e->is, ISZ_EDITOR, e->slidenum);
+ e->stylesheets, e->cbl, e->is, ISZ_EDITOR,
+ e->slidenum);
}
@@ -1462,6 +1463,13 @@ static SCBlock **copy_ss_list(SCBlock **stylesheets)
}
+void sc_editor_set_callbacks(SCEditor *e, SCCallbackList *cbl)
+{
+ if ( e->cbl != NULL ) sc_callback_list_free(e->cbl);
+ e->cbl = cbl;
+}
+
+
SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock **stylesheets)
{
SCEditor *sceditor;
@@ -1480,6 +1488,7 @@ SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock **stylesheets)
sceditor->slidenum = 0;
sceditor->min_border = 0.0;
sceditor->top_editable = 0;
+ sceditor->cbl = NULL;
sceditor->stylesheets = copy_ss_list(stylesheets);