home *** CD-ROM | disk | FTP | other *** search
- #ifndef GAMESHELL_H_
- #define GAMESHELL_H_
-
- /*
- GameShell.h
- Written by Hiep Dam
- From The Witches' Brew
- Version 1.0
- Dec 2 95
-
- A simplified gameshell for Mac game programmers. Deals with most
- of the MacOS so you don't have to!
-
- Handles:
- - hiding/showing menubar
- - backdrop windows for current and all monitors
- - appropriate behavior when switching in/out of GameShell
- */
-
- #ifndef CP_DATA_H_
- #include "CP_Data.h"
- #endif
-
-
- typedef struct {
- short windowWidth;
- short windowHeight;
-
- short preferredDepth;
- short minimumDepth;
-
- short useBackdrop;
- short useBlackout;
- short useMenuBar;
- short padding;
-
- void (*menuInitFunction)(); // Optional
- void (*menuHandlerFunction)(long); // Optional
-
- void (*keyHandlerFunction)(long); // Optional
-
- void (*idleHandlerFunction)(); // Optional
-
- void (*mainWindowUpdateFunction)(); // Mandatory
- void (*mouseHandlerFunction)(CP_Point*); // Mandatory
- } UserParameters;
-
-
- OSErr GameShellInitialize(UserParameters *userInfo);
- void GameShellCleanup();
- void GameShellLoop();
-
- CP_Window_Ref GameShellGetMainWindow();
- CP_OutputDevice_Ref GameShellGetOutputDevice();
- void GameShellGetWindowCoords(CP_Rect *globCoords);
-
- // Pass true or false; usually you'll just pass
- // true to quit the shell
- void GameShellSetQuitFlag(long quitFlag);
-
- #endif // GAMESHELL_H_