IntlResources.pas 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. {
  2. File: IntlResources.p
  3. Contains: International Resource definitions.
  4. Version: Technology: System 7.5+
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1983-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit IntlResources;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes;
  92. {$ALIGN MAC68K}
  93. const
  94. { Bits in the itlcFlags byte }
  95. itlcShowIcon = 7; { Show icon even if only one script }
  96. itlcDualCaret = 6; { Use dual caret for mixed direction text }
  97. { Bits in the itlcSysFlags word }
  98. itlcSysDirection = 15; { System direction - left to right/right to left }
  99. { One more flag in the itlcFlags byte }
  100. itlcDisableKeyScriptSync = 3; { Disable font and keyboard script synchrinozation }
  101. { We should define masks, too. }
  102. itlcDisableKeyScriptSyncMask = $08; { Disable font and keyboard script synchrinozation mask }
  103. tokLeftQuote = 1; { NumberParts.data[] enumerators }
  104. tokRightQuote = 2; { In general, these are NOT to be considered indices into the data[] array }
  105. tokLeadPlacer = 3;
  106. tokLeader = 4;
  107. tokNonLeader = 5;
  108. tokZeroLead = 6;
  109. tokPercent = 7;
  110. tokPlusSign = 8;
  111. tokMinusSign = 9;
  112. tokThousands = 10;
  113. tokReserved = 11; { 11 is reserved field }
  114. tokSeparator = 12;
  115. tokEscape = 13;
  116. tokDecPoint = 14;
  117. tokEPlus = 15;
  118. tokEMinus = 16;
  119. tokMaxSymbols = 31;
  120. curNumberPartsVersion = 1; { current version of NumberParts record }
  121. currSymLead = 16;
  122. currNegSym = 32;
  123. currTrailingZ = 64;
  124. currLeadingZ = 128;
  125. mdy = 0;
  126. dmy = 1;
  127. ymd = 2;
  128. myd = 3;
  129. dym = 4;
  130. ydm = 5;
  131. type
  132. DateOrders = SInt8;
  133. const
  134. timeCycle24 = 0; { time sequence 0:00 - 23:59 }
  135. timeCycleZero = 1; { time sequence 0:00-11:59, 0:00 - 11:59 }
  136. timeCycle12 = 255; { time sequence 12:00 - 11:59, 12:00 - 11:59 }
  137. zeroCycle = 1; { old name for timeCycleZero }
  138. longDay = 0; { day of the month }
  139. longWeek = 1; { day of the week }
  140. longMonth = 2; { month of the year }
  141. longYear = 3; { year }
  142. supDay = 1; { suppress day of month }
  143. supWeek = 2; { suppress day of week }
  144. supMonth = 4; { suppress month }
  145. supYear = 8; { suppress year }
  146. dayLdingZ = 32;
  147. mntLdingZ = 64;
  148. century = 128;
  149. secLeadingZ = 32;
  150. minLeadingZ = 64;
  151. hrLeadingZ = 128;
  152. { moved OffsetTable back here from QuickdrawText }
  153. type
  154. OffPairPtr = ^OffPair;
  155. OffPair = record
  156. offFirst: SInt16;
  157. offSecond: SInt16;
  158. end;
  159. OffsetTable = array [0..2] of OffPair;
  160. Intl0RecPtr = ^Intl0Rec;
  161. Intl0Rec = packed record
  162. decimalPt: char; { decimal point character }
  163. thousSep: char; { thousands separator character }
  164. listSep: char; { list separator character }
  165. currSym1: char; { currency symbol }
  166. currSym2: char;
  167. currSym3: char;
  168. currFmt: UInt8; { currency format flags }
  169. dateOrder: UInt8; { order of short date elements: mdy, dmy, etc. }
  170. shrtDateFmt: UInt8; { format flags for each short date element }
  171. dateSep: char; { date separator character }
  172. timeCycle: UInt8; { specifies time cycle: 0..23, 1..12, or 0..11 }
  173. timeFmt: UInt8; { format flags for each time element }
  174. mornStr: packed array [1..4] of char; { trailing string for AM if 12-hour cycle }
  175. eveStr: packed array [1..4] of char; { trailing string for PM if 12-hour cycle }
  176. timeSep: char; { time separator character }
  177. time1Suff: char; { trailing string for AM if 24-hour cycle }
  178. time2Suff: char;
  179. time3Suff: char;
  180. time4Suff: char;
  181. time5Suff: char; { trailing string for PM if 24-hour cycle }
  182. time6Suff: char;
  183. time7Suff: char;
  184. time8Suff: char;
  185. metricSys: UInt8; { 255 if metric, 0 if inches etc. }
  186. intl0Vers: SInt16; { region code (hi byte) and version (lo byte) }
  187. end;
  188. Intl0Ptr = ^Intl0Rec;
  189. Intl0Hndl = ^Intl0Ptr;
  190. Intl1RecPtr = ^Intl1Rec;
  191. Intl1Rec = packed record
  192. days: array [1..7] of Str15; { day names }
  193. months: array [1..12] of Str15; { month names }
  194. suppressDay: UInt8; { 255 for no day, or flags to suppress any element }
  195. lngDateFmt: UInt8; { order of long date elements }
  196. dayLeading0: UInt8; { 255 for leading 0 in day number }
  197. abbrLen: UInt8; { length for abbreviating names }
  198. st0: packed array [1..4] of char; { separator strings for long date format }
  199. st1: packed array [1..4] of char;
  200. st2: packed array [1..4] of char;
  201. st3: packed array [1..4] of char;
  202. st4: packed array [1..4] of char;
  203. intl1Vers: SInt16; { region code (hi byte) and version (lo byte) }
  204. localRtn: array [0..0] of SInt16; { now a flag for opt extension }
  205. end;
  206. Intl1Ptr = ^Intl1Rec;
  207. Intl1Hndl = ^Intl1Ptr;
  208. { fields for optional itl1 extension }
  209. Itl1ExtRecPtr = ^Itl1ExtRec;
  210. Itl1ExtRec = record
  211. base: Intl1Rec; { un-extended Intl1Rec }
  212. version: SInt16;
  213. format: SInt16;
  214. calendarCode: SInt16; { calendar code for this itl1 resource }
  215. extraDaysTableOffset: SInt32; { offset in itl1 to extra days table }
  216. extraDaysTableLength: SInt32; { length of extra days table }
  217. extraMonthsTableOffset: SInt32; { offset in itl1 to extra months table }
  218. extraMonthsTableLength: SInt32; { length of extra months table }
  219. abbrevDaysTableOffset: SInt32; { offset in itl1 to abbrev days table }
  220. abbrevDaysTableLength: SInt32; { length of abbrev days table }
  221. abbrevMonthsTableOffset: SInt32; { offset in itl1 to abbrev months table }
  222. abbrevMonthsTableLength: SInt32; { length of abbrev months table }
  223. extraSepsTableOffset: SInt32; { offset in itl1 to extra seps table }
  224. extraSepsTableLength: SInt32; { length of extra seps table }
  225. tables: array [0..0] of SInt16; { now a flag for opt extension }
  226. end;
  227. UntokenTablePtr = ^UntokenTable;
  228. UntokenTable = record
  229. len: SInt16;
  230. lastToken: SInt16;
  231. index: array [0..255] of SInt16; { index table; last = lastToken }
  232. end;
  233. UntokenTableHandle = ^UntokenTablePtr;
  234. WideCharPtr = ^WideChar;
  235. WideChar = packed record
  236. case SInt16 of
  237. 0: (
  238. a: packed array [0..1] of char; { 0 is the high order character [for PPC] }
  239. );
  240. 2: (
  241. {$ifc TARGET_RT_BIG_ENDIAN}
  242. hi: char;
  243. lo: char;
  244. {$elsec}
  245. lo: char;
  246. hi: char;
  247. {$endc}
  248. );
  249. 1: (
  250. b: SInt16;
  251. );
  252. end;
  253. WideCharArrPtr = ^WideCharArr;
  254. WideCharArr = record
  255. size: SInt16;
  256. data: array [0..9] of WideChar;
  257. end;
  258. NumberPartsPtr = ^NumberParts;
  259. NumberParts = record
  260. version: SInt16;
  261. data: array [0..30] of WideChar; { index by [tokLeftQuote..tokMaxSymbols] }
  262. pePlus: WideCharArr;
  263. peMinus: WideCharArr;
  264. peMinusPlus: WideCharArr;
  265. altNumTable: WideCharArr;
  266. reserved: packed array [0..19] of char;
  267. end;
  268. Itl4RecPtr = ^Itl4Rec;
  269. Itl4Rec = record
  270. flags: SInt16; { reserved }
  271. resourceType: SInt32; { contains 'itl4' }
  272. resourceNum: SInt16; { resource ID }
  273. version: SInt16; { version number }
  274. resHeader1: SInt32; { reserved }
  275. resHeader2: SInt32; { reserved }
  276. numTables: SInt16; { number of tables, one-based }
  277. mapOffset: SInt32; { offset to table that maps byte to token }
  278. strOffset: SInt32; { offset to routine that copies canonical string }
  279. fetchOffset: SInt32; { offset to routine that gets next byte of character }
  280. unTokenOffset: SInt32; { offset to table that maps token to canonical string }
  281. defPartsOffset: SInt32; { offset to default number parts table }
  282. resOffset6: SInt32; { reserved }
  283. resOffset7: SInt32; { reserved }
  284. resOffset8: SInt32; { reserved }
  285. end;
  286. Itl4Ptr = ^Itl4Rec;
  287. Itl4Handle = ^Itl4Ptr;
  288. { New NItl4Rec for System 7.0: }
  289. NItl4RecPtr = ^NItl4Rec;
  290. NItl4Rec = record
  291. flags: SInt16; { reserved }
  292. resourceType: SInt32; { contains 'itl4' }
  293. resourceNum: SInt16; { resource ID }
  294. version: SInt16; { version number }
  295. format: SInt16; { format code }
  296. resHeader: SInt16; { reserved }
  297. resHeader2: SInt32; { reserved }
  298. numTables: SInt16; { number of tables, one-based }
  299. mapOffset: SInt32; { offset to table that maps byte to token }
  300. strOffset: SInt32; { offset to routine that copies canonical string }
  301. fetchOffset: SInt32; { offset to routine that gets next byte of character }
  302. unTokenOffset: SInt32; { offset to table that maps token to canonical string }
  303. defPartsOffset: SInt32; { offset to default number parts table }
  304. whtSpListOffset: SInt32; { offset to white space code list }
  305. resOffset7: SInt32; { reserved }
  306. resOffset8: SInt32; { reserved }
  307. resLength1: SInt16; { reserved }
  308. resLength2: SInt16; { reserved }
  309. resLength3: SInt16; { reserved }
  310. unTokenLength: SInt16; { length of untoken table }
  311. defPartsLength: SInt16; { length of default number parts table }
  312. whtSpListLength: SInt16; { length of white space code list }
  313. resLength7: SInt16; { reserved }
  314. resLength8: SInt16; { reserved }
  315. end;
  316. NItl4Ptr = ^NItl4Rec;
  317. NItl4Handle = ^NItl4Ptr;
  318. TableDirectoryRecordPtr = ^TableDirectoryRecord;
  319. TableDirectoryRecord = record
  320. tableSignature: OSType; { 4 byte long table name }
  321. reserved: UInt32; { Reserved for internal use }
  322. tableStartOffset: UInt32; { Table start offset in byte }
  323. tableSize: UInt32; { Table size in byte }
  324. end;
  325. Itl5RecordPtr = ^Itl5Record;
  326. Itl5Record = record
  327. versionNumber: Fixed; { itl5 resource version number }
  328. numberOfTables: UInt16; { Number of tables it contains }
  329. reserved: array [0..2] of UInt16; { Reserved for internal use }
  330. tableDirectory: array [0..0] of TableDirectoryRecord; { Table directory records }
  331. end;
  332. RuleBasedTrslRecordPtr = ^RuleBasedTrslRecord;
  333. RuleBasedTrslRecord = record
  334. sourceType: SInt16; { Transliterate target type for the LHS of the rule }
  335. targetType: SInt16; { Transliterate target type for the RHS of the rule }
  336. formatNumber: SInt16; { Transliterate resource format number }
  337. propertyFlag: SInt16; { Transliterate property flags }
  338. numberOfRules: SInt16; { Number of rules following this field }
  339. end;
  340. ItlcRecordPtr = ^ItlcRecord;
  341. ItlcRecord = record
  342. itlcSystem: SInt16; { default system script }
  343. itlcReserved: SInt16; { reserved }
  344. itlcFontForce: SInt8; { default font force flag }
  345. itlcIntlForce: SInt8; { default intl force flag }
  346. itlcOldKybd: SInt8; { MacPlus intl keybd flag }
  347. itlcFlags: SInt8; { general flags }
  348. itlcIconOffset: SInt16; { keyboard icon offset; not used in 7.0 }
  349. itlcIconSide: SInt8; { keyboard icon side; not used in 7.0 }
  350. itlcIconRsvd: SInt8; { rsvd for other icon info }
  351. itlcRegionCode: SInt16; { preferred verXxx code }
  352. itlcSysFlags: SInt16; { flags for setting system globals }
  353. itlcReserved4: array [0..31] of SInt8; { for future use }
  354. end;
  355. ItlbRecordPtr = ^ItlbRecord;
  356. ItlbRecord = record
  357. itlbNumber: SInt16; { itl0 id number }
  358. itlbDate: SInt16; { itl1 id number }
  359. itlbSort: SInt16; { itl2 id number }
  360. itlbFlags: SInt16; { Script flags }
  361. itlbToken: SInt16; { itl4 id number }
  362. itlbEncoding: SInt16; { itl5 ID # (optional; char encoding) }
  363. itlbLang: SInt16; { current language for script }
  364. itlbNumRep: SInt8; { number representation code }
  365. itlbDateRep: SInt8; { date representation code }
  366. itlbKeys: SInt16; { KCHR id number }
  367. itlbIcon: SInt16; { ID # of SICN or kcs#/kcs4/kcs8 suite. }
  368. end;
  369. { New ItlbExtRecord structure for System 7.0 }
  370. ItlbExtRecordPtr = ^ItlbExtRecord;
  371. ItlbExtRecord = packed record
  372. base: ItlbRecord; { un-extended ItlbRecord }
  373. itlbLocalSize: SInt32; { size of script's local record }
  374. itlbMonoFond: SInt16; { default monospace FOND ID }
  375. itlbMonoSize: SInt16; { default monospace font size }
  376. itlbPrefFond: SInt16; { preferred FOND ID }
  377. itlbPrefSize: SInt16; { preferred font size }
  378. itlbSmallFond: SInt16; { default small FOND ID }
  379. itlbSmallSize: SInt16; { default small font size }
  380. itlbSysFond: SInt16; { default system FOND ID }
  381. itlbSysSize: SInt16; { default system font size }
  382. itlbAppFond: SInt16; { default application FOND ID }
  383. itlbAppSize: SInt16; { default application font size }
  384. itlbHelpFond: SInt16; { default Help Mgr FOND ID }
  385. itlbHelpSize: SInt16; { default Help Mgr font size }
  386. itlbValidStyles: Style; { set of valid styles for script }
  387. itlbAliasStyle: Style; { style (set) to mark aliases }
  388. end;
  389. {$ALIGN MAC68K}
  390. end.