Common Data Types used in Palm OS Programming Reference: Ch.8—PDA Programming in C Book
150 likes | 167 Vues
Common Data Types used in Palm OS Programming Reference: Ch.8—PDA Programming in C Book. Common Data Types. MemHandle Int8 Int16 Int32 Boolean UInt8 UInt16 UInt32. Common Data Types (cont.). FormType FieldType ControlType Err EventType Enum. Common Data Types. Reference
Common Data Types used in Palm OS Programming Reference: Ch.8—PDA Programming in C Book
E N D
Presentation Transcript
Common Data Types used in Palm OS Programming Reference: Ch.8—PDA Programming in C Book
Common Data Types • MemHandle • Int8 • Int16 • Int32 • Boolean • UInt8 • UInt16 • UInt32
Common Data Types (cont.) • FormType • FieldType • ControlType • Err • EventType • Enum
Common Data Types • Reference • http://www.palmos.com/dev/support/docs/palmos/PalmOSReference/ReferenceTOC.html • PalmTypes.h
Explanation forCommon Data Types • Int8 • signed 8-bit value • typedefsignedchar Int8; • Int16 • signed 16-bit value • typedefsignedshort Int16
Explanation forCommon Data Types • Int32 • signed 32-bit value • typedefsignedlong Int32 • Boolean • true / false • typedefunsignedchar Boolean;
Explanation forCommon Data Types • UInt8 • unsigned 8-bit value • typedefunsignedcharUInt8; • UInt16 • unsigned 16-bit value • typedefunsignedshort UInt16;
Explanation forCommon Data Types • UInt32 • unsigned 32-bit value • typedefunsignedlong UInt32; • MemHandle • a handle to a memory chunk • typedefstruct _opaque *MemHandle;
Explanation forCommon Data Types • FormType typedef struct { WindowType window; UInt16 formId; FormAttrType attr; WinHandle bitsBehindForm; FormEventHandlerType *handler; UInt16 focus; UInt16 defaultButton; UInt16 helpRscId; UInt16 menuRscId; UInt16 numObjects; FormObjListType *objects; } FormType;
Explanation forCommon Data Types • FieldType • represents a field
FieldType typedef struct { UInt16 id; RectangleType rect; FieldAttrType attr; Char *text; MemHandle textHandle; LineInfoPtr lines; UInt16 textLen; UInt16 textBlockSize; UInt16 maxChars; UInt16 selFirstPos; UInt16 selLastPos; UInt16 insPtXPos; UInt16 insPtYPos; FontID fontID; UInt8 reserved; } FieldType;
Explanation forCommon Data Types • Control Resources • Button—Button Resource (tBTN) • Popup trigger— Popup Trigger Resource (tPUT) • Selector trigger—Selector Trigger Resource (tSLT) • Repeat control—Repeating Button Resource (tREP) • Push button—Push Button Resource (tPBN) • Check box—Check Box Resource (tCBX) • Slider— Slider Resource (tsld) • Feedback slider— Feedback Slider Resource (tslf)
Explanation forCommon Data Types • ControlType typedef struct { UInt16 id; RectangleType bounds; Char *text; ControlAttrType attr; ControlStyleType style; FontID font; UInt8 group; UInt8 reserved; } ControlType;
Explanation forCommon Data Types • ControlType typedef struct { UInt16 id; RectangleType bounds; Char *text; ControlAttrType attr; ControlStyleType style; FontID font; UInt8 group; UInt8 reserved; } ControlType;
Explanation forCommon Data Types • EventType typedef struct { eventsEnum eType; Boolean penDown; UInt8 tapCount; Int16 screenX; Int16 screenY; union{ ... } data; } EventType;