📄 rcp2c.h
字号:
RCMenuBarBA16Type s16;
RCMenuBarBA32Type s32;
}
RCMENUBAR;
/*-----------------------------------------------------------------------------
| ALERTS
-------------------------------------------------------------WESC------------*/
typedef struct _rcALERTTEMPLATE
{
int alertType; /* w */
int helpRscID; /* w */
int numButtons; /* w */
int defaultButton; /* w */
char *szHelpRscIdName;
}
RCALERTTEMPLATE;
#define szRCALERTTEMPLATE "w,w,w,w"
/*-----------------------------------------------------------------------------
| BITMAP
-------------------------------------------------------------WESC------------*/
typedef struct _rcBitmapFlagsType
{
int compressed; /* u *//* Data format: 0=raw; 1=compressed */
int hasColorTable; /* u *//* if true, color table stored before bits[] */
int hasTransparency; /* u *//* true if transparency is used */
int indirect; /* u *//* true if bits are stored indirectly */
/*
* Never set this flag. Only the display (screen) bitmap has the indirect bit set.
*/
int forScreen; /* u *//* system use only */
int directColor; /* u *//* direct color bitmap */
//int reserved; /* zu10 */
}
RCBitmapFlagsType;
typedef struct _rcBITMAP
{ /* bm */
int cx; /* w */
int cy; /* w */
int cbRow; /* w */
RCBitmapFlagsType flags; /* uuuuuuzu10 *//* RMa struct updated */
int pixelsize; /* b */
int version; /* b */
int nextDepthOffset; /* w */
int transparentIndex; /* b */
int compressionType; /* b */
/*
* ushort and_reserved_and_colorTable[3]
*//*
* z1w
*/
unsigned char *pbBits;
/*
* private, not stored into file
*/
int cbDst;
}
RCBITMAP;
#define szRCBITMAP "w,w,w,uuuuuuzu10,b,b,w,b,b,zw"
/*-----------------------------------------------------------------------------
| FONT
-------------------------------------------------------------RMa------------*/
typedef struct _rcFONTCHARINFO
{
int offset; /* b */
int width; /* b */
}
RCFONTCHARINFOTYPE,
*RCFONTCHARINFOTYPEPTR;
#define szRCFONTCHARINFO "b,b"
typedef struct _rcFONT
{
int fontType; /* w */// font type
int firstChar; /* w */// ASCII code of first character
int lastChar; /* w */// ASCII code of last character
int maxWidth; /* w */// maximum character width
int kernMax; /* w */// negative of maximum character kern
int nDescent; /* w */// negative of descent
int fRectWidth; /* w */// width of font rectangle
int fRectHeight; /* w */// height of font rectangle
int owTLoc; /* w */// offset to offset/width table
int ascent; /* w */// ascent
int descent; /* w */// descent
int leading; /* w */// leading
int rowWords; /* w */// row width of bit image / 2
}
RCFONTTYPE;
#define szRCFONT "w,w,w,w,w,w,w,w,w,w,w,w"
/*-----------------------------------------------------------------------------
| Graffiti Input Area
-------------------------------------------------------------RMa------------*/
typedef struct _rcSilkAreaBA16Type
{
RCRECT bounds; /* w4 */
int areaType; /* l */
int areaIndex; /* w */
}
RCSilkAreaBA16Type;
#define szRCSilkAreaBA16EmitStr "w4,l,w"
typedef struct _rcSilkAreaBA32Type
{
RCRECT bounds; /* w4 */
int areaType; /* l */
int areaIndex; /* w */
}
RCSilkAreaBA32Type;
#define szRCSilkAreaBA32EmitStr "w4,l,w,zw"
#define szRCSILKAREA (vfLE32?szRCSilkAreaBA32EmitStr:szRCSilkAreaBA16EmitStr)
typedef union _RCSILKAREA
{
RCSilkAreaBA16Type s16;
RCSilkAreaBA32Type s32;
}
RCSILKAREA;
typedef struct _rcSilkButtonBA16Type
{
// int buttonCount; /* w */
RCRECT bounds; /* w4 */
int keyDownChr; /* w */
int keyDownKeyCode; /* w */
int keyDownModifiers; /* w */
}
RCSilkButtonBA16Type;
#define szRCSilkButtonBA16EmitStr "w4,w,w,w"
typedef struct _rcSilkButtonBA32Type
{
// int buttonCount; /* w */
RCRECT bounds; /* w4 */
int keyDownChr; /* w */
int keyDownKeyCode; /* w */
int keyDownModifiers; /* w */
}
RCSilkButtonBA32Type;
#define szRCSilkButtonBA32EmitStr "w4,w,w,w,zw"
#define szRCSILKBUTTON (vfLE32?szRCSilkButtonBA32EmitStr:szRCSilkButtonBA16EmitStr)
typedef union _RCSILKBUTTON
{
RCSilkButtonBA16Type s16;
RCSilkButtonBA32Type s32;
}
RCSILKBUTTON;
typedef struct _rcSilkBA16Type
{
int version; /* w */
int vendorCreator; /* l */
int localeLanguage; /* w */
int localeCountry; /* w */
int areaCount; /* w */
}
RCSilkBA16Type;
#define szRCSilkBA16EmitStr "w,l,w,w,w"
typedef struct _rcSilkBA32Type
{
int version; /* w */
int areaCount; /* w */
int vendorCreator; /* l */
int localeLanguage; /* w */
int localeCountry; /* w */
}
RCSilkBA32Type;
#define szRCSilkBA32EmitStr "w,w,l,w,w"
#define szRCSILK (vfLE32?szRCSilkBA32EmitStr:szRCSilkBA16EmitStr)
typedef union _RCSILK
{
RCSilkBA16Type s16;
RCSilkBA32Type s32;
}
RCSILK;
/*-----------------------------------------------------------------------------
| cnty Contry
| An array of these structures (one per country) is kept in the system
| resource.
| Preferences.h, DateTime.h, Localize.h,
-------------------------------------------------------------RMa------------*/
#define countryNameLength 20
#define currencyNameLength 20
#define currencySymbolLength 6
typedef struct CountryPreferencesBA16Type
{
int country; // Country the structure represents
// int filler1; // (Word alignment)
int countryName[countryNameLength];
int dateFormat; // Format to display date in
int longDateFormat; // Format to display date in
int weekStartDay; // Sunday or Monday
int timeFormat; // Format to display time in
int numberFormat; // Format to display numbers in
// int filler2; // (Word alignment)
int currencyName[currencyNameLength]; // Dollars
int currencySymbol[currencySymbolLength]; // $
int uniqueCurrencySymbol[currencySymbolLength]; // US$
int currencyDecimalPlaces; // 2 for 1.00
int daylightSavings; // Type of daylight savings correction
int minutesWestOfGMT; // minutes west of Greenwich
int measurementSystem; // metric, english, etc.
// int filler3; // (Word alignment)
}
CountryPreferencesBA16Type;
#define szRCCountryBA16EmitStr "b,zb,b20,b,b,b,b,b,zb,b20,b6,b6,b,b,l,b,zb"
typedef struct CountryPreferencesBA32Type
{
int country; // Country the structure represents - 1 byte, 0
int dateFormat; // Format to display date in - 1 byte, 1
int longDateFormat; // Format to display date in - 1 byte, 2
int weekStartDay; // Sunday or Monday - 1 byte, 3
int countryName[countryNameLength]; // 20 bytes, 4
int timeFormat; // Format to display time in - 1 byte, 24
int numberFormat; // Format to display numbers in - 1 byte, 25
int daylightSavings; // Type of daylight savings correction - 1 byte, 26
int measurementSystem; // metric, english, etc. - 1 byte, 27
int currencyName[currencyNameLength]; // Dollars - 20 bytes, 28
int currencySymbol[currencySymbolLength]; // $ - 6 bytes, 48
int uniqueCurrencySymbol[currencySymbolLength]; // US$ - 6 bytes, 54
int minutesWestOfGMT; // minutes west of Greenwich - 4 bytes, 60
int currencyDecimalPlaces; // 2 for 1.00 - 1 byte, 61
// int reserved1; // padding
// int reserved2; // padding
}
CountryPreferencesBA32Type;
#define szRCCountryBA32EmitStr "b,b,b,b,b20,b,b,b,b,b20,b6,b6,l,b,zb,zw"
#define szRCCOUNTRY (vfLE32?szRCCountryBA32EmitStr:szRCCountryBA16EmitStr)
typedef union _RCCOUNTRY
{
CountryPreferencesBA16Type s16;
CountryPreferencesBA32Type s32;
}
RCCOUNTRY;
/*-----------------------------------------------------------------------------
| feat feature
-------------------------------------------------------------RMa------------*/
typedef struct ROMFtrFeatureBA16Type
{
int num; // feature number
int value; // feature value
}
ROMFtrFeatureBA16Type;
#define szRCFeatureBA16EmitStr "w,l"
typedef struct ROMFtrFeatureBA32Type
{
int num; // feature number
// int reserved;
int value; // feature value
}
ROMFtrFeatureBA32Type;
#define szRCFeatureBA32EmitStr "w,zw,l"
#define szRCFEATUREFEATURE (vfLE32?szRCFeatureBA32EmitStr:szRCFeatureBA16EmitStr)
typedef union _RCFEATUREFEATURE
{
ROMFtrFeatureBA16Type s16;
ROMFtrFeatureBA32Type s32;
}
RCFEATUREFEATURE;
typedef struct ROMFtrCreatorBA16Type
{
int creator; // feature creator
int numEntries; // # of entries
// ROMFtrFeatureBA16Type feature[1]; // variable size array of Features
}
ROMFtrCreatorBA16Type;
#define szRCFeatureCreatorBA16EmitStr "l,w"
typedef struct ROMFtrCreatorBA32Type
{
int creator; // feature creator
int numEntries; // # of entries
// int reserved;
// ROMFtrFeatureBA32Type feature[1]; // variable size array of Features
}
ROMFtrCreatorBA32Type;
#define szRCFeatureCreatorBA32EmitStr "l,w,zw"
#define szRCFEATURECREATOR (vfLE32?szRCFeatureCreatorBA32EmitStr:szRCFeatureCreatorBA16EmitStr)
typedef union _RCFEATURECREATOR
{
ROMFtrCreatorBA16Type s16;
ROMFtrCreatorBA32Type s32;
}
RCFEATURECREATOR;
typedef struct ROMFtrTableBA16Type
{
int numEntries; // # of entries
// ROMFtrCreatorBA16Type creator[1]; // var. size array of Creators
}
ROMFtrTableBA16Type;
#define szRCFeatureTableBA16EmitStr "w"
typedef struct ROMFtrTableBA32Type
{
int numEntries; // # of entries
// int reserved;
// ROMFtrCreatorBA32Type creator[1]; // var. size array of Creators
}
ROMFtrTableBA32Type;
#define szRCFeatureTableBA32EmitStr "w,zw"
#define szRCFEATURE (vfLE32?szRCFeatureTableBA32EmitStr:szRCFeatureTableBA16EmitStr)
typedef union _RCFEATURE
{
ROMFtrTableBA16Type s16;
ROMFtrTableBA32Type s32;
}
RCFEATURE;
/*-----------------------------------------------------------------------------
| KEYBOARD
-------------------------------------------------------------RMa------------*/
#define keyboardRows 4
#define numKeyboards 3 // alpha, punc/number, and int'l
typedef struct _KeyboardKeyBA16Type
{
int shiftedKey; // key to use if shift is on
int capsKey; // key to use if caps lock is on
int unshiftedKey;
int width; // the width of the key. The text is drawn centered.
int labelOffset; // if there is a label display it instead
// of a key (all modes)
}
KeyboardKeyType;
#define szRCKeyboardKeyBA16EmitStr "b,b,b,b,w"
#define szRCKeyboardKeyBA32EmitStr "b,b,b,b,l"
#define szRCKEYBOARDKEY (vfLE32?szRCKeyboardKeyBA32EmitStr:szRCKeyboardKeyBA16EmitStr)
typedef struct _keyboardlayoutBA16Type
{
RCRECT bounds;
int rowHeight;
int font;
int keys;
int keysPerRow[keyboardRows];
int shiftKey;
int capsKey;
int lastLayoutInKeyboard;
/*
* int reserved
*/
}
KeyboardLayoutType;
#define szRCKeyboardLayoutBA16EmitStr "w4,b,b,w,b4,b,b,b,zb"
#define szRCKeyboardLayoutBA32EmitStr "w4,b,b,w,b4,b,b,b,zb"
#define szRCKEYBOARDLAYOUT (vfLE32?szRCKeyboardLayoutBA32EmitStr:szRCKeyboardLayoutBA16EmitStr)
/*-----------------------------------------------------------------------------
These macros are used to manipulate PalmOS Objects without the need of taking
care of byte ordering.
Depending on the value of vfLE32, it uses the appropriate struct in the union
defining each object.
Using these macros allows to avoid to test vfLE32 and write the code twice...
-------------------------------------------------------------RNi-------------*/
#define BAFIELD(obj, field) (vfLE32?obj.s32. ## field:obj.s16. ## field)
#define PBAFIELD(pobj, field) (vfLE32?pobj->s32. ## field:pobj->s16. ## field)
#define SETBAFIELD(obj, field, value) do { if (vfLE32) obj.s32. ## field = (value); else obj.s16. ## field = (value); } while (0)
#define SETPBAFIELD(pobj, field, value) do { if (vfLE32) pobj->s32. ## field = (value); else pobj->s16. ## field = (value); } while (0)
#define BAFIELD16(obj, field) obj.s16. ## field
#define BAFIELD32(obj, field) obj.s32. ## field
#define PBAFIELD16(obj, field) obj->s16. ## field
#define PBAFIELD32(obj, field) obj->s32. ## field
/*-----------------------------------------------------------------------------
| Other PILRC types and such
-------------------------------------------------------------WESC------------*/
//#define ifrmMax 32
DEFPL(PLEXFORMOBJLIST)
typedef struct _FRMBA16
{
RCFormBA16Type form;
PLEXFORMOBJLIST pllt;
// RCFORMOBJLIST *rglt;
}
FRMBA16Type;
typedef struct _FRMBA32
{
RCFormBA32Type form;
PLEXFORMOBJLIST pllt;
// RCFORMOBJLIST *rglt;
}
FRMBA32Type;
typedef union _FRM
{
FRMBA16Type s16;
FRMBA32Type s32;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -