/*********************************************************/
/* This source code copyright (c) 1991-2001, Aaron Giles */
/* See the Read Me file for licensing information.       */
/* Contact email: mac@aarongiles.com                     */
/*********************************************************/

#ifndef __SLIDESHOW__
#define __SLIDESHOW__

/*
 * sSlideItem = linked list item containing information pertaining to the current
 *					slide image [SlideItem, *SlidePtr, **SlideHandle]
 */
 
typedef struct SlideItem 
{
    struct SlideItem **next;		// pointer to next slide item
	Boolean mem;					// flag: true if the given image is in memory
	FSSpec spec;					// the filespec for the image
} SlideItem, *SlidePtr, **SlideHandle;

typedef struct LoopCheck {
	struct LoopCheck *prev;
	short vRefNum;
	long dirID;
} LoopCheck, *LoopCheckPtr;

#if defined(powerc) || defined(__powerc)
#pragma options align=mac68k
#endif
typedef struct SlideOptions
{
	Boolean userControl;		// user-controlled?
	long delay;					// delay time, in seconds
	Boolean random;				// show slide in random order?
	Boolean repeat;				// repeat indefinitely?
	Boolean noErrors;			// stop when we get an error?
	Boolean hideWindoids;		// hide the windoids?
	Boolean hideControls;		// hide the controls?
	Boolean autoComments;		// automatically show comments?
	Boolean fromMemory;			// run from memory or disk?
	Boolean recursive;			// do a recursive directory scan?
	Boolean allFiles;			// try to import files?
	Boolean fileNames;			// display filenames?
	Boolean offscreen;			// render offscreen first?
} SlideOptions, *SlideOptionsPtr, **SlideOptionsHandle;
#if defined(powerc) || defined(__powerc)
#pragma options align=reset
#endif

enum {
	kStopped = 0,
	kRunning = 1,
	kPaused = 2
};

extern WindowPtr GetSlideBackWindow(void);
extern void CloseSlideBackWindow(void);
extern void DrawSlideBackWindow(void);
extern void ResetSlideTimer(void);
extern void HandleSlideNullEvent(void);
extern void PointToPreviousSlide(void);
extern void InitSlideShow(void);
extern void ReinitSlideShow(SlideOptionsPtr oldOptions);
extern OSErr AddSlideDir(FSSpec *spec, Boolean recursive, ICMProgressProcRecordPtr theProg,
			LoopCheckPtr theLoop);
extern void CleanUpSlideShow(void);
extern Boolean LoadSlide(Boolean *advance);
extern Boolean EndSlideShow(void);
extern Boolean NextSlide(Boolean *advance);

#endif
