aboutsummaryrefslogtreecommitdiff
path: root/libstorycode
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-02-19 08:23:44 +0100
committerThomas White <taw@bitwiz.me.uk>2019-02-19 08:23:44 +0100
commit9fbe4d66565e6ab11c5022bcfe5ed0ddfb91dc7e (patch)
treeb95e39c462cc147b2f8e998df5f7010e73834d59 /libstorycode
parent135cc1ef50930b86189be2303f68ab387ebf7f27 (diff)
Add lots of function skeletons
Diffstat (limited to 'libstorycode')
-rw-r--r--libstorycode/scparse_priv.h11
-rw-r--r--libstorycode/slide.c30
-rw-r--r--libstorycode/slide.h18
-rw-r--r--libstorycode/storycode.y11
4 files changed, 56 insertions, 14 deletions
diff --git a/libstorycode/scparse_priv.h b/libstorycode/scparse_priv.h
index 4a1e5db..51d0d8a 100644
--- a/libstorycode/scparse_priv.h
+++ b/libstorycode/scparse_priv.h
@@ -25,16 +25,7 @@
#include "presentation.h"
#include "narrative.h"
-
-struct frame_geom
-{
- double x;
- double y;
- double w;
- double h;
- /* FIXME: units */
-};
-
+#include "slide.h"
struct scpctx
{
diff --git a/libstorycode/slide.c b/libstorycode/slide.c
index 3246713..28ca159 100644
--- a/libstorycode/slide.c
+++ b/libstorycode/slide.c
@@ -68,3 +68,33 @@ void slide_free(Slide *s)
free(s->items);
free(s);
}
+
+
+int slide_add_prestitle(Slide *s, char *prestitle)
+{
+ return 0;
+}
+
+
+int slide_add_image(Slide *s, char *filename, struct frame_geom geom)
+{
+ return 0;
+}
+
+
+int slide_add_text(Slide *s, char *text, struct frame_geom geom)
+{
+ return 0;
+}
+
+
+int slide_add_footer(Slide *s)
+{
+ return 0;
+}
+
+
+int slide_add_slidetitle(Slide *s, char *slidetitle)
+{
+ return 0;
+}
diff --git a/libstorycode/slide.h b/libstorycode/slide.h
index 0e1f005..2c0607f 100644
--- a/libstorycode/slide.h
+++ b/libstorycode/slide.h
@@ -30,8 +30,24 @@
typedef struct _slide Slide;
typedef struct _slideitem SlideItem;
+struct frame_geom
+{
+ double x;
+ double y;
+ double w;
+ double h;
+ /* FIXME: units */
+};
+
+
extern Slide *slide_new(void);
-extern void slide_free(Slide *n);
+extern void slide_free(Slide *s);
+
+extern int slide_add_prestitle(Slide *s, char *prestitle);
+extern int slide_add_image(Slide *s, char *filename, struct frame_geom geom);
+extern int slide_add_text(Slide *s, char *text, struct frame_geom geom);
+extern int slide_add_footer(Slide *s);
+extern int slide_add_slidetitle(Slide *s, char *slidetitle);
#endif /* SLIDE_H */
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index e17c56b..654dec3 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -39,7 +39,6 @@
Stylesheet *ss;
Narrative *n;
Slide *s;
- SlideItem *si;
char *str;
}
@@ -76,9 +75,9 @@
%type <ss> stylesheet
%type <str> prestitle
%type <str> STRING
+%type <str> textframe
+%type <str> imageframe
%type <str> bulletpoint
-%type <si> textframe
-%type <si> imageframe
%type <str> multi_line_string
%type <str> frameopt
%type <str> geometry /* FIXME: Should have its own type */
@@ -96,6 +95,12 @@
ctx->s = slide_new();
}
+%{
+ void frameopts_reset(struct scpctx *ctx)
+ {
+ }
+%}
+
%%
presentation: