summaryrefslogtreecommitdiff
path: root/deck.h
blob: 57c5aa26df756061f68f0bd19004b1b1b34bb5ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "scrollarea.h"

typedef struct Deck Deck;
typedef struct Slide Slide;

typedef void (* DeckChangeNotify) (gpointer data);

Deck *deck_new              (DeckChangeNotify  notify,
			     gpointer          data);
void  deck_paint            (Deck             *deck,
			     FooScrollArea    *area,
			     cairo_t          *cr,
			     int	       x,
			     int	       y,
			     int	       width);

/* Returns the slide the user is likely looking
 * at, given the viewport.
 */
int
deck_get_view_slide (Deck *deck,
		     GdkRectangle *viewport);
/* Returns the y coordinate of the nth slide given
 * the width of the viewport
 */
int
deck_get_slide_location (Deck *deck,
			 GdkRectangle *viewport,
			 int nth_slide);
int
deck_get_slide_height (Deck *deck,
		       GdkRectangle *viewport);

int
deck_get_height (Deck *deck, GdkRectangle *viewport);