sources/SimplePres.h

/*
    File:       SimplePres.h
 
    Copyright:  © 2000-2001 by Apple Computer, Inc., all rights reserved.
 
 
*/
 
#ifndef __SIMPLEPRES__
#define __SIMPLEPRES__
 
// ---------------------------------------------------------------------------
//      D E F I N I T I O N S
// ---------------------------------------------------------------------------
 
typedef enum SimplePresState {
    kSimplePresState_Idle = 1,
    kSimplePresState_StartingPreview,
    kSimplePresState_Previewing,
    kSimplePresState_StartingPreroll,
    kSimplePresState_ReadyToPlay,   // sucessfully prerolled
    kSimplePresState_Starting,
    kSimplePresState_Playing
} SimplePresState;
 
 
struct SimplePresRecord {
    OSType                  signature;  // this is always a constant so we can identify our structure
    QTSPresentation         presentation;
    SimplePresState         state;
    SimplePresState         targetState;
    
    QTSNotificationUPP      ownerNotificationProc;
    void                    *ownerNotificationRefCon;
            
};
typedef struct SimplePresRecord SimplePresRecord;
 
 
// ---------------------------------------------------------------------------
//      P R O T O T Y P E S
// ---------------------------------------------------------------------------
 
OSErr SimplePres_NewFromFile(const FSSpec *inFileSpec, GWorldPtr inGWorld,
                    GDHandle inGD, const Rect *inPresBox, SimplePresRecord **outSimplePres);
                
void SimplePres_Dispose(SimplePresRecord *inSimplePres);
 
void SimplePres_Idle(SimplePresRecord *inSimplePres);
OSErr SimplePres_Start(SimplePresRecord *inSimplePres);
OSErr SimplePres_Stop(SimplePresRecord *inSimplePres);
 
 
OSErr SimplePres_GetInfo(SimplePresRecord *inSimplePres, OSType inSelector, void *ioParams);
OSErr SimplePres_SetInfo(SimplePresRecord *inSimplePres, OSType inSelector, void *ioParams);
 
OSErr SimplePres_SettingsDialog(SimplePresRecord *inSimplePres);
OSErr SimplePres_ExportToFile(SimplePresRecord *inSimplePres, OSType inFileCreator);
 
 
// set this if you want to be sent all the notifications
OSErr SimplePres_SetOwnerNotification(SimplePresRecord *inSimplePres,
                    QTSNotificationUPP inOwnerNotificationProc, void *inRefCon); 
 
#define SimplePres_GetPresentation(_sp)     ((_sp)->presentation)
#define SimplePres_GetState(_sp)            ((_sp)->state)
 
 
 
 
 
 
#endif /* __SIMPLEPRES__ */