/* BOUNCER.H - Header file for BOUNCER sample screen saver application.
 */

/* Include scrnsaver stuff. */
#include <scrnsave.h>

/* IDs for configuration dialog box. */
#define ID_SPEED    101		// Speed of movement (# pixels/move)
#define ID_BDELAY   102		// Delay between playbacks
#define ID_MDELAY   103		// Delay between moves of playback window
#define ID_MAGNIFY  104		// Magnification factor
#define ID_CLEVEL   105		// Frequency of random changes
#define ID_BLANKIT  106		// Screen blanking toggle
#define ID_MUTE     107		// Mute Audio toggle

#define ID_PASSWORDPROTECTED  108	// Password protection toggle
#define ID_SETPASSWORD        109	// Set password
#define ID_HELP               110	// Help
#define ID_FNAME	            111	// Filename for dialog 
#define ID_CONT               112	// Continuous replay toggle

#define ID_TIMER 200			// Timer ID
#define STRLEN   256			// Maximum length of certain buffers.

/* Default values for new INI data. */
#define DEF_SPEED        5       // Starting maximum pixels per move
#define DEF_INIT_BDELAY  60      // Starting Between delay
#define DEF_INIT_MDELAY  120     // Starting Move delay
#define DEF_INIT_MAGNIFY 100     // Startomg Magnification
#define DEF_INIT_CLEVEL  30      // Starting change level
#define DEF_BLANKIT      TRUE    // Starting Blank Screen state
#define DEF_MUTE         FALSE   // Starting Mute audio state
#define DEF_FNAME	       "c:\\windows\\scr_sav.avi"   // Default filename
#define DEF_CONT         TRUE   // Default for continuous repeat

/* Function prototypes
 */
// This is a function from the MM API.
BOOL WINAPI mciExecute (LPCSTR lpstrCommand);

// Window procedure for the playback window.
LONG FAR PASCAL WndProc(HWND,UINT,WPARAM,LPARAM);

// Dialog procedure for condiguration dialog.
extern BOOL FAR PASCAL ScreenSaverConfigureDialog(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);

// A function to open the AVI file and get information about the
//   file.  It uses a number of global vaiables and structures.
UINT SetupPlayback(HWND hWnd, char * AVIFile);

// This function loads settings from a string table.
void GetIniEntries(void);

// This function is used to read values from CONTROL.INI.
void GetIniSettings(void);

void MoveImage(HWND hWnd);

// This function is a wrapper for WritePrivateProfileString.
void WriteProfileInt(LPSTR key, LPSTR tag, int i);

// This function is used to play the AVI file from beginning to end.  
//   It assumes that the file is already opened and set up with 
//   SetupPlayback().
void PlayFile(HWND hWnd);

// This function moves the playback window incrementally while the
//   AVI file is playing.
void MovePlayer(HWND hWnd);

// This function moves the playback window to a random position on
//   the screen.
void MovePlayerRandom(HWND hWnd);

// This function checks to make sure that the initialization settings
//   are OK.
void VerifyIniSettings(void);

// Put a bitmap into a window at 0,0.
void PlaceBitmap (HWND hWindow);

// Play a sound resource.
void PlaySoundResource(void);
