📄 app.h
字号:
#ifndef APP_H
#define APP_H
//////////////////////////////////////////////////////////////////////////////
// app.h
// Definitions for the application.
// Copyright (c) 1999, Robert Mykland. All rights reserved.
//////////////////////////////////////////////////////////////////////////////
//////////////
// Includes //
//////////////
#include <Pilot.h> // All the Palm includes
#include "MathLib.h" // Definitions for MathLib
#include "Calculator_res.h" // Resource definitions
#include "fabout.h" // Definitions for the "about" form
#include "fcalc.h" // Definitions for the "calc" form
#include "fprefs.h" // Definitions for the "prefs" form
#include "main.h" // Definitions for the main entry point
#include "moptions.h" // Definitions for the "options" menu
//////////////////////////////
// Definitions for fabout.c //
//////////////////////////////
// The menu event handler macro for the "about" form
#define aboutFormMenuEventHandler(spEvent)
/////////////////////////////
// Definitions for fcalc.c //
/////////////////////////////
// The menu event handler macro for the "calc" form
#define calcFormMenuEventHandler(spEvent) \
{\
optionsMenuEventHandler( spEvent );\
}
//////////////////////////////
// Definitions for fprefs.c //
//////////////////////////////
// The menu event handler macro for the "prefs" form
#define prefsFormMenuEventHandler(spEvent)
////////////////////////////
// Definitions for main.c //
////////////////////////////
// The prototype for getEventHandler()
static FormEventHandlerPtr getEventHandler( Word );
// This creates the function getEventHandler,
// which returns the event handler for a given form
// in this application.
#define EVENT_HANDLER_LIST \
static FormEventHandlerPtr getEventHandler( Word wFormID )\
{\
switch( wFormID )\
{\
case AboutForm:\
return( aboutFormEventHandler );\
case CalcForm:\
return( calcFormEventHandler );\
case PrefsForm:\
return( prefsFormEventHandler );\
}\
return( NULL );\
}
// This defines the macro that initializes the app
#define appInit() \
{\
calcInit();\
}
// This defines the macro that cleans up the app
#define appStop() \
{\
calcStop();\
}
// This application works on PalmOS 2.0 and above
#define ROM_VERSION_MIN ROM_VERSION_2
// Define the starting form
#define StartForm CalcForm
////////////////////////////////
// Definitions for moptions.c //
////////////////////////////////
// Menu ID name conversions
#define OptionsAbout OptionsAboutCalculator
#endif // APP_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -