23 #ifndef BAGEL_BOFLIB_APP_H 24 #define BAGEL_BOFLIB_APP_H 26 #include "video/video_decoder.h" 27 #include "bagel/boflib/gui/window.h" 28 #include "bagel/boflib/gfx/cursor.h" 29 #include "bagel/boflib/error.h" 30 #include "bagel/boflib/list.h" 34 #define MAX_APP_NAME 128 35 #define DEFAULT_MAINLOOPS 1 36 #define kReallyFastPPC 50 37 #define kReallySlowPPC 200 50 char _szAppName[MAX_APP_NAME] = { 0 };
61 int _nIterations = DEFAULT_MAINLOOPS;
65 virtual bool shouldQuit()
const = 0;
69 CBofApp(
const char *pszAppName);
76 virtual ErrorCode initialize();
77 virtual ErrorCode runApp();
78 virtual ErrorCode shutdown();
80 virtual void setAppName(
const char *pszNewAppName) {
84 const char *getAppName()
const {
85 return (
const char *)_szAppName;
105 int screenWidth()
const {
108 int screenHeight()
const {
111 int screenDepth()
const {
116 return _cDefaultCursor;
119 _cDefaultCursor = cCursor;
123 void delCursor(
int nIndex);
126 return _cCursorList[nIndex];
128 int getNumberOfCursors()
const {
129 return _cCursorList.getCount();
133 _captureControl = ctl;
136 return _captureControl;
142 return _focusControl;
146 static uint32 getMachineSpeed() {
147 return kReallyFastPPC;
157 void bofMessageBox(
const char *pszTitle,
const char *pszMessage);
Definition: video_decoder.h:53
void strcpy_s(char *dst, size_t size, const char *src)