diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-15 23:37:27 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-15 23:37:27 +0100 |
commit | 0e1f2f49f4d3b02901c8ba291a8ffb2605418db4 (patch) | |
tree | dedb4e864a02cb8181f2b44d13891bafc91a12d4 /libstorycode/presentation.c | |
parent | 44f874ed89b364bc0b60b35572f64fae44154733 (diff) |
Initial GtkSlideView
Diffstat (limited to 'libstorycode/presentation.c')
-rw-r--r-- | libstorycode/presentation.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libstorycode/presentation.c b/libstorycode/presentation.c index d49f965..d862ac0 100644 --- a/libstorycode/presentation.c +++ b/libstorycode/presentation.c @@ -141,13 +141,13 @@ void presentation_add_slide(Presentation *p, Slide *s) } -int presentation_num_slides(Presentation *p) +int presentation_get_num_slides(Presentation *p) { return p->n_slides; } -Slide *presentation_slide(Presentation *p, int i) +Slide *presentation_get_slide_by_number(Presentation *p, int i) { if ( i >= p->n_slides ) return NULL; if ( i < 0 ) return NULL; @@ -155,6 +155,17 @@ Slide *presentation_slide(Presentation *p, int i) } +signed int presentation_get_slide_number(Presentation *p, Slide *s) +{ + int i; + if ( p == NULL ) return -1; + for ( i=0; i<p->n_slides; i++ ) { + if ( s == p->slides[i] ) return i; + } + return -1; +} + + Stylesheet *presentation_get_stylesheet(Presentation *p) { if ( p == NULL ) return NULL; |