aboutsummaryrefslogtreecommitdiff
path: root/src/slideshow.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-08-17 21:44:08 +0200
committerThomas White <taw@bitwiz.org.uk>2015-08-17 21:44:08 +0200
commit8d8eccb93da07559c675f053d5dce3781423b253 (patch)
tree64ede67247367cf36281d4b023b7160e04197e7e /src/slideshow.h
parent91eb4f02e4a539bc8b9fb3b475b6644717846d2b (diff)
Dispatch table for slideshow controller
Diffstat (limited to 'src/slideshow.h')
-rw-r--r--src/slideshow.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/slideshow.h b/src/slideshow.h
index 16bd6e0..99d5549 100644
--- a/src/slideshow.h
+++ b/src/slideshow.h
@@ -1,7 +1,7 @@
/*
* slideshow.h
*
- * Copyright © 2013-2014 Thomas White <taw@bitwiz.org.uk>
+ * Copyright © 2013-2015 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
*
@@ -27,12 +27,30 @@
#include <config.h>
#endif
-#include "slide_window.h"
-
/* Opaque data structure representing a slideshow */
typedef struct _slideshow SlideShow;
-extern SlideShow *try_start_slideshow(SlideWindow *sw, struct presentation *p);
+struct sscontrolfuncs
+{
+ /* Controller should switch slide forwards or backwards */
+ void (*next_slide)(SlideShow *ss, void *vp);
+ void (*prev_slide)(SlideShow *ss, void *vp);
+
+ /* Controller should return what it thinks is the current slide
+ * (this might not be what is on the screen, e.g. if the display
+ * is unlinked) */
+ struct slide *(*current_slide)(SlideShow *ss, void *vp);
+
+ /* Controller should update whatever visual representation of
+ * whether or not the display is linked */
+ void (*changed_link)(SlideShow *ss, void *vp);
+
+ /* Slideshow ended (including if you called end_slideshow) */
+ void (*end_show)(SlideShow *ss, void *vp);
+};
+
+extern SlideShow *try_start_slideshow(struct presentation *p,
+ struct sscontrolfuncs ssc, void *vp);
extern void end_slideshow(SlideShow *ss);
extern void change_proj_slide(SlideShow *ss, struct slide *np);