chars.pp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. (******************************************************************************
  2. *
  3. * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
  4. * All rights reserved.
  5. *
  6. * File: Chars.h
  7. *
  8. * Release: Palm OS SDK 4.0 (63220)
  9. *
  10. * Description:
  11. * This file defines the characters in fonts.
  12. *
  13. * History:
  14. * November 3, 1994 Created by Roger Flores
  15. * 11/03/94 rsf Created by Roger Flores.
  16. * 04/21/99 JFS Added list of virtual command key ranges reserved
  17. * for use by licensees.
  18. * 09/13/99 kwk Added vchrTsmMode.
  19. * 10/28/99 kwk Defined vchrPageUp and vchrPageDown.
  20. * 2001-02-10 jwm Added symbol11Help and corrected values of *ArrowDisabled
  21. *
  22. *****************************************************************************)
  23. unit chars;
  24. interface
  25. uses palmos;
  26. // Standard Unicode 2.0 names for the ascii characters. These exist in
  27. // all of the text fonts, no matter what character encoding is being
  28. // used by PalmOS.
  29. const
  30. chrNull = $0000;
  31. chrStartOfHeading = $0001;
  32. chrStartOfText = $0002;
  33. chrEndOfText = $0003;
  34. chrEndOfTransmission = $0004;
  35. chrEnquiry = $0005;
  36. chrAcknowledge = $0006;
  37. chrBell = $0007;
  38. chrBackspace = $0008;
  39. chrHorizontalTabulation = $0009;
  40. chrLineFeed = $000A;
  41. chrVerticalTabulation = $000B;
  42. chrFormFeed = $000C;
  43. chrCarriageReturn = $000D;
  44. chrShiftOut = $000E;
  45. chrShiftIn = $000F;
  46. chrDataLinkEscape = $0010;
  47. chrDeviceControlOne = $0011;
  48. chrDeviceControlTwo = $0012;
  49. chrDeviceControlThree = $0013;
  50. chrDeviceControlFour = $0014;
  51. chrNegativeAcknowledge = $0015;
  52. chrSynchronousIdle = $0016;
  53. chrEndOfTransmissionBlock = $0017;
  54. chrCancel = $0018;
  55. chrEndOfMedium = $0019;
  56. chrSubstitute = $001A;
  57. chrEscape = $001B;
  58. chrFileSeparator = $001C;
  59. chrGroupSeparator = $001D;
  60. chrRecordSeparator = $001E;
  61. chrUnitSeparator = $001F;
  62. chrSpace = $0020;
  63. chrExclamationMark = $0021;
  64. chrQuotationMark = $0022;
  65. chrNumberSign = $0023;
  66. chrDollarSign = $0024;
  67. chrPercentSign = $0025;
  68. chrAmpersand = $0026;
  69. chrApostrophe = $0027;
  70. chrLeftParenthesis = $0028;
  71. chrRightParenthesis = $0029;
  72. chrAsterisk = $002A;
  73. chrPlusSign = $002B;
  74. chrComma = $002C;
  75. chrHyphenMinus = $002D;
  76. chrFullStop = $002E;
  77. chrSolidus = $002F;
  78. chrDigitZero = $0030;
  79. chrDigitOne = $0031;
  80. chrDigitTwo = $0032;
  81. chrDigitThree = $0033;
  82. chrDigitFour = $0034;
  83. chrDigitFive = $0035;
  84. chrDigitSix = $0036;
  85. chrDigitSeven = $0037;
  86. chrDigitEight = $0038;
  87. chrDigitNine = $0039;
  88. chrColon = $003A;
  89. chrSemicolon = $003B;
  90. chrLessThanSign = $003C;
  91. chrEqualsSign = $003D;
  92. chrGreaterThanSign = $003E;
  93. chrQuestionMark = $003F;
  94. chrCommercialAt = $0040;
  95. chrCapital_A = $0041;
  96. chrCapital_B = $0042;
  97. chrCapital_C = $0043;
  98. chrCapital_D = $0044;
  99. chrCapital_E = $0045;
  100. chrCapital_F = $0046;
  101. chrCapital_G = $0047;
  102. chrCapital_H = $0048;
  103. chrCapital_I = $0049;
  104. chrCapital_J = $004A;
  105. chrCapital_K = $004B;
  106. chrCapital_L = $004C;
  107. chrCapital_M = $004D;
  108. chrCapital_N = $004E;
  109. chrCapital_O = $004F;
  110. chrCapital_P = $0050;
  111. chrCapital_Q = $0051;
  112. chrCapital_R = $0052;
  113. chrCapital_S = $0053;
  114. chrCapital_T = $0054;
  115. chrCapital_U = $0055;
  116. chrCapital_V = $0056;
  117. chrCapital_W = $0057;
  118. chrCapital_X = $0058;
  119. chrCapital_Y = $0059;
  120. chrCapital_Z = $005A;
  121. chrLeftSquareBracket = $005B;
  122. // chrReverseSolidus $005C (not in Japanese fonts)
  123. chrRightSquareBracket = $005D;
  124. chrCircumflexAccent = $005E;
  125. chrLowLine = $005F;
  126. chrGraveAccent = $0060;
  127. chrSmall_A = $0061;
  128. chrSmall_B = $0062;
  129. chrSmall_C = $0063;
  130. chrSmall_D = $0064;
  131. chrSmall_E = $0065;
  132. chrSmall_F = $0066;
  133. chrSmall_G = $0067;
  134. chrSmall_H = $0068;
  135. chrSmall_I = $0069;
  136. chrSmall_J = $006A;
  137. chrSmall_K = $006B;
  138. chrSmall_L = $006C;
  139. chrSmall_M = $006D;
  140. chrSmall_N = $006E;
  141. chrSmall_O = $006F;
  142. chrSmall_P = $0070;
  143. chrSmall_Q = $0071;
  144. chrSmall_R = $0072;
  145. chrSmall_S = $0073;
  146. chrSmall_T = $0074;
  147. chrSmall_U = $0075;
  148. chrSmall_V = $0076;
  149. chrSmall_W = $0077;
  150. chrSmall_X = $0078;
  151. chrSmall_Y = $0079;
  152. chrSmall_Z = $007A;
  153. chrLeftCurlyBracket = $007B;
  154. chrVerticalLine = $007C;
  155. chrRightCurlyBracket = $007D;
  156. chrTilde = $007E;
  157. chrDelete = $007F;
  158. // Special meanings given to characters by the PalmOS
  159. chrTab = chrHorizontalTabulation; // $0009
  160. vchrPageUp = chrVerticalTabulation; // $000B
  161. vchrPageDown = chrFormFeed; // $000C
  162. chrOtaSecure = chrDeviceControlFour; // $0014
  163. chrOta = chrNegativeAcknowledge; // $0015
  164. chrCommandStroke = chrSynchronousIdle; // $0016
  165. chrShortcutStroke = chrEndOfTransmissionBlock; // $0017
  166. chrEllipsis = chrCancel; // $0018
  167. chrNumericSpace = chrEndOfMedium; // $0019
  168. chrCardIcon = chrSubstitute; // $001A Card Icon glyph, added in PalmOS 4.0
  169. chrLeftArrow = chrFileSeparator; // $001C
  170. chrRightArrow = chrGroupSeparator; // $001D
  171. chrUpArrow = chrRecordSeparator; // $001E
  172. chrDownArrow = chrUnitSeparator; // $001F
  173. // The following are key codes used for virtual events, like
  174. // low battery warnings, etc. These keyboard events MUST
  175. // have the commandKeyMask bit set in the modifiers in order
  176. // to be recognized.
  177. vchrLowBattery = $0101; // Display low battery dialog
  178. vchrEnterDebugger = $0102; // Enter Debugger
  179. vchrNextField = $0103; // Go to next field in form
  180. vchrStartConsole = $0104; // Startup console task
  181. vchrMenu = $0105; // Ctl-A
  182. vchrCommand = $0106; // Ctl-C
  183. vchrConfirm = $0107; // Ctl-D
  184. vchrLaunch = $0108; // Ctl-E
  185. vchrKeyboard = $0109; // Ctl-F popup the keyboard in appropriate mode
  186. vchrFind = $010A;
  187. vchrCalc = $010B;
  188. vchrPrevField = $010C;
  189. vchrAlarm = $010D; // sent before displaying an alarm
  190. vchrRonamatic = $010E; // stroke from graffiti area to top half of screen
  191. vchrGraffitiReference = $010F; // popup the Graffiti reference
  192. vchrKeyboardAlpha = $0110; // popup the keyboard in alpha mode
  193. vchrKeyboardNumeric = $0111; // popup the keyboard in number mode
  194. vchrLock = $0112; // switch to the Security app and lock the device
  195. vchrBacklight = $0113; // toggle state of backlight
  196. vchrAutoOff = $0114; // power off due to inactivity timer
  197. // Added for PalmOS 3.0
  198. vchrExgTest = $0115; // put exchange Manager into test mode (&.t)
  199. vchrSendData = $0116; // Send data if possible
  200. vchrIrReceive = $0117; // Initiate an Ir receive manually (&.i)
  201. // Added for PalmOS 3.1
  202. vchrTsm1 = $0118; // Text Services silk-screen button
  203. vchrTsm2 = $0119; // Text Services silk-screen button
  204. vchrTsm3 = $011A; // Text Services silk-screen button
  205. vchrTsm4 = $011B; // Text Services silk-screen button
  206. // Added for PalmOS 3.2
  207. vchrRadioCoverageOK = $011C; // Radio coverage check successful
  208. vchrRadioCoverageFail = $011D; // Radio coverage check failure
  209. vchrPowerOff = $011E; // Posted after autoOffChr or hardPowerChr
  210. // to put system to sleep with SysSleep.
  211. // Added for PalmOS 3.5
  212. vchrResumeSleep = $011F; // Posted by NotifyMgr clients after they
  213. // have deferred a sleep request in order
  214. // to resume it.
  215. vchrLateWakeup = $0120; // Posted by the system after waking up
  216. // to broadcast a late wakeup notification.
  217. // FOR SYSTEM USE ONLY
  218. vchrTsmMode = $0121; // Posted by TSM to trigger mode change.
  219. vchrBrightness = $0122; // Activates brightness adjust dialog
  220. vchrContrast = $0123; // Activates contrast adjust dialog
  221. vchrExpCardInserted = $0124; // ExpansionMgr card inserted & removed.
  222. vchrExpCardRemoved = $0125; // NOTE: these keys will never show up in an
  223. // app's event loop (they are caught inside
  224. // EvtGetEvent()), and will probably be
  225. // deprecated soon (see comments in ExpansionMgr.c).
  226. vchrExgIntData = $01FF; // Exchange Manager wakeup event
  227. // Added for PalmOS 4.0 NOTE: 0x1FF is used above - not in numeric order!
  228. vchrAttnStateChanged = $0126; // Posted by AttentionMgr API to open or update dialog
  229. vchrAttnUnsnooze = $0127; // Posted when AttentionMgr snooze timer expires
  230. vchrAttnIndicatorTapped = $0128; // Posted when AttentionIndicator is tapped
  231. vchrAttnAllowClose = $0129; // Posted when AttnAllowClose is called
  232. vchrAttnReopen = $012A; // Posted when AttnReopen is called
  233. vchrCardCloseMenu = $012B; // Posted when a card is inserted
  234. vchrIrGotData = $012C; // Posted when IR Receive initiated
  235. // and copying of an app is imminent
  236. // The application launching buttons generate the following
  237. // key codes and will also set the commandKeyMask bit in the
  238. // modifiers field
  239. vchrHardKeyMin = $0200;
  240. vchrHardKeyMax = $02FF; // 256 hard keys
  241. vchrHard1 = $0204;
  242. vchrHard2 = $0205;
  243. vchrHard3 = $0206;
  244. vchrHard4 = $0207;
  245. vchrHardPower = $0208;
  246. vchrHardCradle = $0209; // Button on cradle pressed
  247. vchrHardCradle2 = $020A; // Button on cradle pressed and hwrDockInGeneric1
  248. // input on dock asserted (low).
  249. vchrHardContrast = $020B; // Sumo's Contrast button
  250. vchrHardAntenna = $020C; // Eleven's Antenna switch
  251. vchrHardBrightness = $020D; // Hypothetical Brightness button
  252. vchrPageUpWhenOff = $020E; // The m100 device's page-up clock button
  253. vchrHardEarbud = $020F; // Hypothetical Earbud button
  254. // The following keycode RANGES are reserved for use by licensees.
  255. // All have the commandKeyMask bit set in the event's modifiers field.
  256. // Note that ranges include the Min and Max values themselves (i.e. key
  257. // codes >= min and <= max are assigned to the following licensees).
  258. //
  259. // Qualcomm
  260. vchrThumperMin = $0300;
  261. vchrThumperMax = $03FF; // 256 command keys
  262. // Motorola
  263. vchrCessnaMin = $14CD;
  264. vchrCessnaMax = $14CD; // 1 command key
  265. // TRG
  266. vchrCFlashMin = $1500;
  267. vchrCFlashMax = $150F; // 16 command keys
  268. // Symbol
  269. vchrSPTMin = $15A0;
  270. vchrSPTMax = $15AF; // 16 command keys
  271. // Handspring
  272. vchrSlinkyMin = $1600;
  273. vchrSlinkyMax = $16FF; // 256 command keys
  274. // Palm
  275. vchrPalmMin = $1700; // 256 command keys
  276. vchrPalmMax = $17ff;
  277. // Old names for some of the characters.
  278. nullChr = chrNull; // $0000
  279. backspaceChr = chrBackspace; // $0008
  280. tabChr = chrHorizontalTabulation; // $0009
  281. linefeedChr = chrLineFeed; // $000A
  282. pageUpChr = vchrPageUp; // $000B
  283. chrPageUp = vchrPageUp; // $000B
  284. pageDownChr = vchrPageDown; // $000C
  285. chrPageDown = vchrPageDown; // $000C
  286. crChr = chrCarriageReturn; // $000D
  287. returnChr = chrCarriageReturn; // $000D
  288. otaSecureChr = chrOtaSecure; // $0014
  289. otaChr = chrOta; // $0015
  290. escapeChr = chrEscape; // $001B
  291. leftArrowChr = chrLeftArrow; // $001C
  292. rightArrowChr = chrRightArrow; // $001D
  293. upArrowChr = chrUpArrow; // $001E
  294. downArrowChr = chrDownArrow; // $001F
  295. spaceChr = chrSpace; // $0020
  296. quoteChr = chrQuotationMark; // $0022 '"'
  297. commaChr = chrComma; // $002C ','
  298. periodChr = chrFullStop; // $002E '.'
  299. colonChr = chrColon; // $003A ':'
  300. lowBatteryChr = vchrLowBattery; // $0101
  301. enterDebuggerChr = vchrEnterDebugger; // $0102
  302. nextFieldChr = vchrNextField; // $0103
  303. startConsoleChr = vchrStartConsole; // $0104
  304. menuChr = vchrMenu; // $0105
  305. commandChr = vchrCommand; // $0106
  306. confirmChr = vchrConfirm; // $0107
  307. launchChr = vchrLaunch; // $0108
  308. keyboardChr = vchrKeyboard; // $0109
  309. findChr = vchrFind; // $010A
  310. calcChr = vchrCalc; // $010B
  311. prevFieldChr = vchrPrevField; // $010C
  312. alarmChr = vchrAlarm; // $010D
  313. ronamaticChr = vchrRonamatic; // $010E
  314. graffitiReferenceChr = vchrGraffitiReference; // $010F
  315. keyboardAlphaChr = vchrKeyboardAlpha; // $0110
  316. keyboardNumericChr = vchrKeyboardNumeric; // $0111
  317. lockChr = vchrLock; // $0112
  318. backlightChr = vchrBacklight; // $0113
  319. autoOffChr = vchrAutoOff; // $0114
  320. exgTestChr = vchrExgTest; // $0115
  321. sendDataChr = vchrSendData; // $0116
  322. irReceiveChr = vchrIrReceive; // $0117
  323. radioCoverageOKChr = vchrRadioCoverageOK; // $011C
  324. radioCoverageFailChr = vchrRadioCoverageFail; // $011D
  325. powerOffChr = vchrPowerOff; // $011E
  326. resumeSleepChr = vchrResumeSleep; // $011F
  327. lateWakeupChr = vchrLateWakeup; // $0120
  328. brightnessChr = vchrBrightness; // $0121
  329. contrastChr = vchrContrast; // $0122
  330. hardKeyMin = vchrHardKeyMin; // $0200
  331. hardKeyMax = vchrHardKeyMax; // $02FF
  332. hard1Chr = vchrHard1; // $0204
  333. hard2Chr = vchrHard2; // $0205
  334. hard3Chr = vchrHard3; // $0206
  335. hard4Chr = vchrHard4; // $0207
  336. hardPowerChr = vchrHardPower; // $0208
  337. hardCradleChr = vchrHardCradle; // $0209
  338. hardCradle2Chr = vchrHardCradle2; // $020A
  339. hardContrastChr = vchrHardContrast; // $020B
  340. hardAntennaChr = vchrHardAntenna; // $020C
  341. hardBrightnessChr = vchrHardBrightness; // $020D
  342. hardEarbudChr = vchrHardEarbud; // 0x020F
  343. // Macros to determine correct character code to use for drawing numeric space
  344. // and horizontal ellipsis.
  345. (*
  346. #define ChrNumericSpace(chP)
  347. do {
  348. UInt32 attribute;
  349. if ((FtrGet(sysFtrCreator, sysFtrNumROMVersion, &attribute) == 0)
  350. && (attribute >= sysMakeROMVersion(3, 1, 0, 0, 0))) {
  351. *(chP) = chrNumericSpace;
  352. } else {
  353. *(chP) = 0x80;
  354. }
  355. } while (0)
  356. #define ChrHorizEllipsis(chP)
  357. do {
  358. UInt32 attribute;
  359. if ((FtrGet(sysFtrCreator, sysFtrNumROMVersion, &attribute) == 0)
  360. && (attribute >= sysMakeROMVersion(3, 1, 0, 0, 0))) {
  361. *(chP) = chrEllipsis;
  362. } else {
  363. *(chP) = 0x85;
  364. }
  365. } while (0)
  366. *)
  367. // Characters in the 9 point symbol font. Resource ID 9003
  368. type
  369. symbolChars = Enum;
  370. const
  371. symbolLeftArrow = 3;
  372. symbolRightArrow = Succ(symbolLeftArrow);
  373. symbolUpArrow = Succ(symbolRightArrow);
  374. symbolDownArrow = Succ(symbolUpArrow);
  375. symbolSmallDownArrow = Succ(symbolDownArrow);
  376. symbolSmallUpArrow = Succ(symbolSmallDownArrow);
  377. symbolMemo = 9;
  378. symbolHelp = Succ(symbolMemo);
  379. symbolNote = Succ(symbolHelp);
  380. symbolNoteSelected = Succ(symbolNote);
  381. symbolCapsLock = Succ(symbolNoteSelected);
  382. symbolNumLock = Succ(symbolCapsLock);
  383. symbolShiftUpper = Succ(symbolNumLock);
  384. symbolShiftPunc = Succ(symbolShiftUpper);
  385. symbolShiftExt = Succ(symbolShiftPunc);
  386. symbolShiftNone = Succ(symbolShiftExt);
  387. symbolNoTime = Succ(symbolShiftNone);
  388. symbolAlarm = Succ(symbolNoTime);
  389. symbolRepeat = Succ(symbolAlarm);
  390. symbolCheckMark = Succ(symbolRepeat);
  391. // These next four characters were moved from the 0x8D..0x90
  392. // range in the main fonts to the 9pt Symbol font in PalmOS 3.1
  393. symbolDiamondChr = Succ(symbolCheckMark);
  394. symbolClubChr = Succ(symbolDiamondChr);
  395. symbolHeartChr = Succ(symbolClubChr);
  396. symbolSpadeCh = Succ(symbolHeartChr);
  397. // Character in the 7 point symbol font. Resource ID 9005
  398. type
  399. symbol7Chars = Enum;
  400. const
  401. symbol7ScrollUp = 1;
  402. symbol7ScrollDown = Succ(symbol7ScrollUp);
  403. symbol7ScrollUpDisabled = Succ(symbol7ScrollDown);
  404. symbol7ScrollDownDisabled = Succ(symbol7ScrollUpDisabled);
  405. // Characters in the 11 point symbol font. Resource ID 9004
  406. type
  407. symbol11Chars = Enum;
  408. const
  409. symbolCheckboxOff = 0;
  410. symbolCheckboxOn = Succ(symbolCheckboxOff);
  411. symbol11LeftArrow = Succ(symbolCheckboxOn);
  412. symbol11RightArrow = Succ(symbol11LeftArrow);
  413. symbol11Help = Succ(symbol11RightArrow);
  414. symbol11LeftArrowDisabled = Succ(symbol11Help); // New for Palm OS v3.2
  415. symbol11RightArrowDisabled = Succ(symbol11LeftArrowDisabled); // New for Palm OS v3.2
  416. implementation
  417. end.