23 #ifndef BAGEL_BOFLIB_APP_H 24 #define BAGEL_BOFLIB_APP_H 26 #include "video/video_decoder.h" 27 #include "bagel/spacebar/boflib/gui/window.h" 28 #include "bagel/spacebar/boflib/gfx/cursor.h" 29 #include "bagel/boflib/error.h" 30 #include "bagel/spacebar/boflib/list.h" 35 #define MAX_APP_NAME 128 36 #define DEFAULT_MAINLOOPS 1 37 #define kReallyFastPPC 50 38 #define kReallySlowPPC 200 51 char _szAppName[MAX_APP_NAME] = { 0 };
62 int _nIterations = DEFAULT_MAINLOOPS;
66 virtual bool shouldQuit()
const = 0;
70 CBofApp(
const char *pszAppName);
77 virtual ErrorCode initialize();
78 virtual ErrorCode runApp();
79 virtual ErrorCode shutdown();
81 virtual void setAppName(
const char *pszNewAppName) {
85 const char *getAppName()
const {
86 return (
const char *)_szAppName;
106 int screenWidth()
const {
109 int screenHeight()
const {
112 int screenDepth()
const {
117 return _cDefaultCursor;
120 _cDefaultCursor = cCursor;
124 void delCursor(
int nIndex);
127 return _cCursorList[nIndex];
129 int getNumberOfCursors()
const {
130 return _cCursorList.getCount();
134 _captureControl = ctl;
137 return _captureControl;
143 return _focusControl;
147 static uint32 getMachineSpeed() {
148 return kReallyFastPPC;
158 void bofMessageBox(
const char *pszTitle,
const char *pszMessage);
Definition: video_decoder.h:53
void strcpy_s(char *dst, size_t size, const char *src)