Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

366 lines
17 KiB

  1. /*
  2. File: IntlResources.h
  3. Contains: International Resource definitions.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1983-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __INTLRESOURCES__
  11. #define __INTLRESOURCES__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #if PRAGMA_ONCE
  16. #pragma once
  17. #endif
  18. #if PRAGMA_IMPORT
  19. #pragma import on
  20. #endif
  21. #if PRAGMA_STRUCT_ALIGN
  22. #pragma options align=mac68k
  23. #elif PRAGMA_STRUCT_PACKPUSH
  24. #pragma pack(push, 2)
  25. #elif PRAGMA_STRUCT_PACK
  26. #pragma pack(2)
  27. #endif
  28. enum {
  29. /* Bits in the itlcFlags byte */
  30. itlcShowIcon = 7, /*Show icon even if only one script*/
  31. itlcDualCaret = 6, /*Use dual caret for mixed direction text*/
  32. /* Bits in the itlcSysFlags word */
  33. itlcSysDirection = 15 /*System direction - left to right/right to left*/
  34. };
  35. enum {
  36. /* One more flag in the itlcFlags byte */
  37. itlcDisableKeyScriptSync = 3 /*Disable font and keyboard script synchrinozation*/
  38. };
  39. enum {
  40. /* We should define masks, too. */
  41. itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync /*Disable font and keyboard script synchrinozation mask*/
  42. };
  43. enum {
  44. tokLeftQuote = 1, /* NumberParts.data[] enumerators */
  45. tokRightQuote = 2, /* In general, these are NOT to be considered indices into the data[] array */
  46. tokLeadPlacer = 3,
  47. tokLeader = 4,
  48. tokNonLeader = 5,
  49. tokZeroLead = 6,
  50. tokPercent = 7,
  51. tokPlusSign = 8,
  52. tokMinusSign = 9,
  53. tokThousands = 10,
  54. tokReserved = 11, /* 11 is reserved field */
  55. tokSeparator = 12,
  56. tokEscape = 13,
  57. tokDecPoint = 14,
  58. tokEPlus = 15,
  59. tokEMinus = 16,
  60. tokMaxSymbols = 31,
  61. curNumberPartsVersion = 1 /*current version of NumberParts record*/
  62. };
  63. enum {
  64. currSymLead = 16,
  65. currNegSym = 32,
  66. currTrailingZ = 64,
  67. currLeadingZ = 128
  68. };
  69. enum {
  70. mdy = 0,
  71. dmy = 1,
  72. ymd = 2,
  73. myd = 3,
  74. dym = 4,
  75. ydm = 5
  76. };
  77. typedef SInt8 DateOrders;
  78. enum {
  79. timeCycle24 = 0, /*time sequence 0:00 - 23:59*/
  80. timeCycleZero = 1, /*time sequence 0:00-11:59, 0:00 - 11:59*/
  81. timeCycle12 = 255, /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
  82. zeroCycle = 1, /*old name for timeCycleZero*/
  83. longDay = 0, /*day of the month*/
  84. longWeek = 1, /*day of the week*/
  85. longMonth = 2, /*month of the year*/
  86. longYear = 3, /*year*/
  87. supDay = 1, /*suppress day of month*/
  88. supWeek = 2, /*suppress day of week*/
  89. supMonth = 4, /*suppress month*/
  90. supYear = 8, /*suppress year*/
  91. dayLdingZ = 32,
  92. mntLdingZ = 64,
  93. century = 128,
  94. secLeadingZ = 32,
  95. minLeadingZ = 64,
  96. hrLeadingZ = 128
  97. };
  98. /* moved OffsetTable back here from QuickdrawText */
  99. struct OffPair {
  100. short offFirst;
  101. short offSecond;
  102. };
  103. typedef struct OffPair OffPair;
  104. typedef OffPair OffsetTable[3];
  105. struct Intl0Rec {
  106. char decimalPt; /*decimal point character*/
  107. char thousSep; /*thousands separator character*/
  108. char listSep; /*list separator character*/
  109. char currSym1; /*currency symbol*/
  110. char currSym2;
  111. char currSym3;
  112. UInt8 currFmt; /*currency format flags*/
  113. UInt8 dateOrder; /*order of short date elements: mdy, dmy, etc.*/
  114. UInt8 shrtDateFmt; /*format flags for each short date element*/
  115. char dateSep; /*date separator character*/
  116. UInt8 timeCycle; /*specifies time cycle: 0..23, 1..12, or 0..11*/
  117. UInt8 timeFmt; /*format flags for each time element*/
  118. char mornStr[4]; /*trailing string for AM if 12-hour cycle*/
  119. char eveStr[4]; /*trailing string for PM if 12-hour cycle*/
  120. char timeSep; /*time separator character*/
  121. char time1Suff; /*trailing string for AM if 24-hour cycle*/
  122. char time2Suff;
  123. char time3Suff;
  124. char time4Suff;
  125. char time5Suff; /*trailing string for PM if 24-hour cycle*/
  126. char time6Suff;
  127. char time7Suff;
  128. char time8Suff;
  129. UInt8 metricSys; /*255 if metric, 0 if inches etc.*/
  130. short intl0Vers; /*region code (hi byte) and version (lo byte)*/
  131. };
  132. typedef struct Intl0Rec Intl0Rec;
  133. typedef Intl0Rec * Intl0Ptr;
  134. typedef Intl0Ptr * Intl0Hndl;
  135. struct Intl1Rec {
  136. Str15 days[7]; /*day names*/
  137. Str15 months[12]; /*month names*/
  138. UInt8 suppressDay; /*255 for no day, or flags to suppress any element*/
  139. UInt8 lngDateFmt; /*order of long date elements*/
  140. UInt8 dayLeading0; /*255 for leading 0 in day number*/
  141. UInt8 abbrLen; /*length for abbreviating names*/
  142. char st0[4]; /*separator strings for long date format*/
  143. char st1[4];
  144. char st2[4];
  145. char st3[4];
  146. char st4[4];
  147. short intl1Vers; /*region code (hi byte) and version (lo byte)*/
  148. short localRtn[1]; /*now a flag for opt extension*/
  149. };
  150. typedef struct Intl1Rec Intl1Rec;
  151. typedef Intl1Rec * Intl1Ptr;
  152. typedef Intl1Ptr * Intl1Hndl;
  153. /*fields for optional itl1 extension*/
  154. struct Itl1ExtRec {
  155. Intl1Rec base; /*un-extended Intl1Rec*/
  156. short version;
  157. short format;
  158. short calendarCode; /*calendar code for this itl1 resource*/
  159. long extraDaysTableOffset; /*offset in itl1 to extra days table*/
  160. long extraDaysTableLength; /*length of extra days table*/
  161. long extraMonthsTableOffset; /*offset in itl1 to extra months table*/
  162. long extraMonthsTableLength; /*length of extra months table*/
  163. long abbrevDaysTableOffset; /*offset in itl1 to abbrev days table*/
  164. long abbrevDaysTableLength; /*length of abbrev days table*/
  165. long abbrevMonthsTableOffset; /*offset in itl1 to abbrev months table*/
  166. long abbrevMonthsTableLength; /*length of abbrev months table*/
  167. long extraSepsTableOffset; /*offset in itl1 to extra seps table*/
  168. long extraSepsTableLength; /*length of extra seps table*/
  169. short tables[1]; /*now a flag for opt extension*/
  170. };
  171. typedef struct Itl1ExtRec Itl1ExtRec;
  172. struct UntokenTable {
  173. short len;
  174. short lastToken;
  175. short index[256]; /*index table; last = lastToken*/
  176. };
  177. typedef struct UntokenTable UntokenTable;
  178. typedef UntokenTable * UntokenTablePtr;
  179. typedef UntokenTablePtr * UntokenTableHandle;
  180. union WideChar {
  181. char a[2]; /*0 is the high order character*/
  182. short b;
  183. };
  184. typedef union WideChar WideChar;
  185. struct WideCharArr {
  186. short size;
  187. WideChar data[10];
  188. };
  189. typedef struct WideCharArr WideCharArr;
  190. struct NumberParts {
  191. short version;
  192. WideChar data[31]; /*index by [tokLeftQuote..tokMaxSymbols]*/
  193. WideCharArr pePlus;
  194. WideCharArr peMinus;
  195. WideCharArr peMinusPlus;
  196. WideCharArr altNumTable;
  197. char reserved[20];
  198. };
  199. typedef struct NumberParts NumberParts;
  200. typedef NumberParts * NumberPartsPtr;
  201. struct Itl4Rec {
  202. short flags; /*reserved*/
  203. long resourceType; /*contains 'itl4'*/
  204. short resourceNum; /*resource ID*/
  205. short version; /*version number*/
  206. long resHeader1; /*reserved*/
  207. long resHeader2; /*reserved*/
  208. short numTables; /*number of tables, one-based*/
  209. long mapOffset; /*offset to table that maps byte to token*/
  210. long strOffset; /*offset to routine that copies canonical string*/
  211. long fetchOffset; /*offset to routine that gets next byte of character*/
  212. long unTokenOffset; /*offset to table that maps token to canonical string*/
  213. long defPartsOffset; /*offset to default number parts table*/
  214. long resOffset6; /*reserved*/
  215. long resOffset7; /*reserved*/
  216. long resOffset8; /*reserved*/
  217. };
  218. typedef struct Itl4Rec Itl4Rec;
  219. typedef Itl4Rec * Itl4Ptr;
  220. typedef Itl4Ptr * Itl4Handle;
  221. /* New NItl4Rec for System 7.0: */
  222. struct NItl4Rec {
  223. short flags; /*reserved*/
  224. long resourceType; /*contains 'itl4'*/
  225. short resourceNum; /*resource ID*/
  226. short version; /*version number*/
  227. short format; /*format code*/
  228. short resHeader; /*reserved*/
  229. long resHeader2; /*reserved*/
  230. short numTables; /*number of tables, one-based*/
  231. long mapOffset; /*offset to table that maps byte to token*/
  232. long strOffset; /*offset to routine that copies canonical string*/
  233. long fetchOffset; /*offset to routine that gets next byte of character*/
  234. long unTokenOffset; /*offset to table that maps token to canonical string*/
  235. long defPartsOffset; /*offset to default number parts table*/
  236. long whtSpListOffset; /*offset to white space code list*/
  237. long resOffset7; /*reserved*/
  238. long resOffset8; /*reserved*/
  239. short resLength1; /*reserved*/
  240. short resLength2; /*reserved*/
  241. short resLength3; /*reserved*/
  242. short unTokenLength; /*length of untoken table*/
  243. short defPartsLength; /*length of default number parts table*/
  244. short whtSpListLength; /*length of white space code list*/
  245. short resLength7; /*reserved*/
  246. short resLength8; /*reserved*/
  247. };
  248. typedef struct NItl4Rec NItl4Rec;
  249. typedef NItl4Rec * NItl4Ptr;
  250. typedef NItl4Ptr * NItl4Handle;
  251. struct TableDirectoryRecord {
  252. OSType tableSignature; /*4 byte long table name */
  253. unsigned long reserved; /*Reserved for internal use */
  254. unsigned long tableStartOffset; /*Table start offset in byte*/
  255. unsigned long tableSize; /*Table size in byte*/
  256. };
  257. typedef struct TableDirectoryRecord TableDirectoryRecord;
  258. struct Itl5Record {
  259. Fixed versionNumber; /*itl5 resource version number */
  260. unsigned short numberOfTables; /*Number of tables it contains */
  261. unsigned short reserved[3]; /*Reserved for internal use */
  262. TableDirectoryRecord tableDirectory[1]; /*Table directory records */
  263. };
  264. typedef struct Itl5Record Itl5Record;
  265. struct RuleBasedTrslRecord {
  266. short sourceType; /*Transliterate target type for the LHS of the rule */
  267. short targetType; /*Transliterate target type for the RHS of the rule */
  268. short formatNumber; /*Transliterate resource format number */
  269. short propertyFlag; /*Transliterate property flags */
  270. short numberOfRules; /*Number of rules following this field */
  271. };
  272. typedef struct RuleBasedTrslRecord RuleBasedTrslRecord;
  273. struct ItlcRecord {
  274. short itlcSystem; /*default system script*/
  275. short itlcReserved; /*reserved*/
  276. SInt8 itlcFontForce; /*default font force flag*/
  277. SInt8 itlcIntlForce; /*default intl force flag*/
  278. SInt8 itlcOldKybd; /*MacPlus intl keybd flag*/
  279. SInt8 itlcFlags; /*general flags*/
  280. short itlcIconOffset; /*keyboard icon offset; not used in 7.0*/
  281. SInt8 itlcIconSide; /*keyboard icon side; not used in 7.0*/
  282. SInt8 itlcIconRsvd; /*rsvd for other icon info*/
  283. short itlcRegionCode; /*preferred verXxx code*/
  284. short itlcSysFlags; /*flags for setting system globals*/
  285. SInt8 itlcReserved4[32]; /*for future use*/
  286. };
  287. typedef struct ItlcRecord ItlcRecord;
  288. struct ItlbRecord {
  289. short itlbNumber; /*itl0 id number*/
  290. short itlbDate; /*itl1 id number*/
  291. short itlbSort; /*itl2 id number*/
  292. short itlbFlags; /*Script flags*/
  293. short itlbToken; /*itl4 id number*/
  294. short itlbEncoding; /*itl5 ID # (optional; char encoding)*/
  295. short itlbLang; /*current language for script */
  296. SInt8 itlbNumRep; /*number representation code*/
  297. SInt8 itlbDateRep; /*date representation code */
  298. short itlbKeys; /*KCHR id number*/
  299. short itlbIcon; /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  300. };
  301. typedef struct ItlbRecord ItlbRecord;
  302. /* New ItlbExtRecord structure for System 7.0 */
  303. struct ItlbExtRecord {
  304. ItlbRecord base; /*un-extended ItlbRecord*/
  305. long itlbLocalSize; /*size of script's local record*/
  306. short itlbMonoFond; /*default monospace FOND ID*/
  307. short itlbMonoSize; /*default monospace font size*/
  308. short itlbPrefFond; /*preferred FOND ID*/
  309. short itlbPrefSize; /*preferred font size*/
  310. short itlbSmallFond; /*default small FOND ID*/
  311. short itlbSmallSize; /*default small font size*/
  312. short itlbSysFond; /*default system FOND ID*/
  313. short itlbSysSize; /*default system font size*/
  314. short itlbAppFond; /*default application FOND ID*/
  315. short itlbAppSize; /*default application font size*/
  316. short itlbHelpFond; /*default Help Mgr FOND ID*/
  317. short itlbHelpSize; /*default Help Mgr font size*/
  318. Style itlbValidStyles; /*set of valid styles for script*/
  319. Style itlbAliasStyle; /*style (set) to mark aliases*/
  320. };
  321. typedef struct ItlbExtRecord ItlbExtRecord;
  322. #if PRAGMA_STRUCT_ALIGN
  323. #pragma options align=reset
  324. #elif PRAGMA_STRUCT_PACKPUSH
  325. #pragma pack(pop)
  326. #elif PRAGMA_STRUCT_PACK
  327. #pragma pack()
  328. #endif
  329. #ifdef PRAGMA_IMPORT_OFF
  330. #pragma import off
  331. #elif PRAGMA_IMPORT
  332. #pragma import reset
  333. #endif
  334. #endif /* __INTLRESOURCES__ */