Script.pas 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734
  1. {
  2. File: CarbonCore/Script.h
  3. Contains: Script Manager interfaces
  4. The contents of this header file are deprecated.
  5. Copyright: © 1986-2011 by Apple Inc. All rights reserved.
  6. }
  7. {
  8. Modified for use with Free Pascal
  9. Version 308
  10. Please report any bugs to <[email protected]>
  11. }
  12. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  13. {$mode macpas}
  14. {$packenum 1}
  15. {$macro on}
  16. {$inline on}
  17. {$calling mwpascal}
  18. unit Script;
  19. interface
  20. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  21. {$setc GAP_INTERFACES_VERSION := $0308}
  22. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  23. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  24. {$endc}
  25. {$ifc defined CPUPOWERPC and defined CPUI386}
  26. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  27. {$endc}
  28. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  29. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  30. {$endc}
  31. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  32. {$setc __ppc__ := 1}
  33. {$elsec}
  34. {$setc __ppc__ := 0}
  35. {$endc}
  36. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  37. {$setc __ppc64__ := 1}
  38. {$elsec}
  39. {$setc __ppc64__ := 0}
  40. {$endc}
  41. {$ifc not defined __i386__ and defined CPUI386}
  42. {$setc __i386__ := 1}
  43. {$elsec}
  44. {$setc __i386__ := 0}
  45. {$endc}
  46. {$ifc not defined __x86_64__ and defined CPUX86_64}
  47. {$setc __x86_64__ := 1}
  48. {$elsec}
  49. {$setc __x86_64__ := 0}
  50. {$endc}
  51. {$ifc not defined __arm__ and defined CPUARM}
  52. {$setc __arm__ := 1}
  53. {$elsec}
  54. {$setc __arm__ := 0}
  55. {$endc}
  56. {$ifc not defined __arm64__ and defined CPUAARCH64}
  57. {$setc __arm64__ := 1}
  58. {$elsec}
  59. {$setc __arm64__ := 0}
  60. {$endc}
  61. {$ifc defined cpu64}
  62. {$setc __LP64__ := 1}
  63. {$elsec}
  64. {$setc __LP64__ := 0}
  65. {$endc}
  66. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  67. {$error Conflicting definitions for __ppc__ and __i386__}
  68. {$endc}
  69. {$ifc defined __ppc__ and __ppc__}
  70. {$setc TARGET_CPU_PPC := TRUE}
  71. {$setc TARGET_CPU_PPC64 := FALSE}
  72. {$setc TARGET_CPU_X86 := FALSE}
  73. {$setc TARGET_CPU_X86_64 := FALSE}
  74. {$setc TARGET_CPU_ARM := FALSE}
  75. {$setc TARGET_CPU_ARM64 := FALSE}
  76. {$setc TARGET_OS_MAC := TRUE}
  77. {$setc TARGET_OS_IPHONE := FALSE}
  78. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  79. {$setc TARGET_OS_EMBEDDED := FALSE}
  80. {$elifc defined __ppc64__ and __ppc64__}
  81. {$setc TARGET_CPU_PPC := FALSE}
  82. {$setc TARGET_CPU_PPC64 := TRUE}
  83. {$setc TARGET_CPU_X86 := FALSE}
  84. {$setc TARGET_CPU_X86_64 := FALSE}
  85. {$setc TARGET_CPU_ARM := FALSE}
  86. {$setc TARGET_CPU_ARM64 := FALSE}
  87. {$setc TARGET_OS_MAC := TRUE}
  88. {$setc TARGET_OS_IPHONE := FALSE}
  89. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  90. {$setc TARGET_OS_EMBEDDED := FALSE}
  91. {$elifc defined __i386__ and __i386__}
  92. {$setc TARGET_CPU_PPC := FALSE}
  93. {$setc TARGET_CPU_PPC64 := FALSE}
  94. {$setc TARGET_CPU_X86 := TRUE}
  95. {$setc TARGET_CPU_X86_64 := FALSE}
  96. {$setc TARGET_CPU_ARM := FALSE}
  97. {$setc TARGET_CPU_ARM64 := FALSE}
  98. {$ifc defined(iphonesim)}
  99. {$setc TARGET_OS_MAC := FALSE}
  100. {$setc TARGET_OS_IPHONE := TRUE}
  101. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  102. {$elsec}
  103. {$setc TARGET_OS_MAC := TRUE}
  104. {$setc TARGET_OS_IPHONE := FALSE}
  105. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  106. {$endc}
  107. {$setc TARGET_OS_EMBEDDED := FALSE}
  108. {$elifc defined __x86_64__ and __x86_64__}
  109. {$setc TARGET_CPU_PPC := FALSE}
  110. {$setc TARGET_CPU_PPC64 := FALSE}
  111. {$setc TARGET_CPU_X86 := FALSE}
  112. {$setc TARGET_CPU_X86_64 := TRUE}
  113. {$setc TARGET_CPU_ARM := FALSE}
  114. {$setc TARGET_CPU_ARM64 := FALSE}
  115. {$ifc defined(iphonesim)}
  116. {$setc TARGET_OS_MAC := FALSE}
  117. {$setc TARGET_OS_IPHONE := TRUE}
  118. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  119. {$elsec}
  120. {$setc TARGET_OS_MAC := TRUE}
  121. {$setc TARGET_OS_IPHONE := FALSE}
  122. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  123. {$endc}
  124. {$setc TARGET_OS_EMBEDDED := FALSE}
  125. {$elifc defined __arm__ and __arm__}
  126. {$setc TARGET_CPU_PPC := FALSE}
  127. {$setc TARGET_CPU_PPC64 := FALSE}
  128. {$setc TARGET_CPU_X86 := FALSE}
  129. {$setc TARGET_CPU_X86_64 := FALSE}
  130. {$setc TARGET_CPU_ARM := TRUE}
  131. {$setc TARGET_CPU_ARM64 := FALSE}
  132. { will require compiler define when/if other Apple devices with ARM cpus ship }
  133. {$setc TARGET_OS_MAC := FALSE}
  134. {$setc TARGET_OS_IPHONE := TRUE}
  135. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  136. {$setc TARGET_OS_EMBEDDED := TRUE}
  137. {$elifc defined __arm64__ and __arm64__}
  138. {$setc TARGET_CPU_PPC := FALSE}
  139. {$setc TARGET_CPU_PPC64 := FALSE}
  140. {$setc TARGET_CPU_X86 := FALSE}
  141. {$setc TARGET_CPU_X86_64 := FALSE}
  142. {$setc TARGET_CPU_ARM := FALSE}
  143. {$setc TARGET_CPU_ARM64 := TRUE}
  144. { will require compiler define when/if other Apple devices with ARM cpus ship }
  145. {$setc TARGET_OS_MAC := FALSE}
  146. {$setc TARGET_OS_IPHONE := TRUE}
  147. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  148. {$setc TARGET_OS_EMBEDDED := TRUE}
  149. {$elsec}
  150. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  151. {$endc}
  152. {$ifc defined __LP64__ and __LP64__ }
  153. {$setc TARGET_CPU_64 := TRUE}
  154. {$elsec}
  155. {$setc TARGET_CPU_64 := FALSE}
  156. {$endc}
  157. {$ifc defined FPC_BIG_ENDIAN}
  158. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  159. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  160. {$elifc defined FPC_LITTLE_ENDIAN}
  161. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  162. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  163. {$elsec}
  164. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  165. {$endc}
  166. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  167. {$setc CALL_NOT_IN_CARBON := FALSE}
  168. {$setc OLDROUTINENAMES := FALSE}
  169. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  170. {$setc OPAQUE_UPP_TYPES := TRUE}
  171. {$setc OTCARBONAPPLICATION := TRUE}
  172. {$setc OTKERNEL := FALSE}
  173. {$setc PM_USE_SESSION_APIS := TRUE}
  174. {$setc TARGET_API_MAC_CARBON := TRUE}
  175. {$setc TARGET_API_MAC_OS8 := FALSE}
  176. {$setc TARGET_API_MAC_OSX := TRUE}
  177. {$setc TARGET_CARBON := TRUE}
  178. {$setc TARGET_CPU_68K := FALSE}
  179. {$setc TARGET_CPU_MIPS := FALSE}
  180. {$setc TARGET_CPU_SPARC := FALSE}
  181. {$setc TARGET_OS_UNIX := FALSE}
  182. {$setc TARGET_OS_WIN32 := FALSE}
  183. {$setc TARGET_RT_MAC_68881 := FALSE}
  184. {$setc TARGET_RT_MAC_CFM := FALSE}
  185. {$setc TARGET_RT_MAC_MACHO := TRUE}
  186. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  187. {$setc TYPE_BOOL := FALSE}
  188. {$setc TYPE_EXTENDED := FALSE}
  189. {$setc TYPE_LONGLONG := TRUE}
  190. uses MacTypes,IntlResources;
  191. {$endc} {not MACOSALLINCLUDE}
  192. {$ifc TARGET_OS_MAC}
  193. {$ALIGN MAC68K}
  194. { Meta script codes:}
  195. const
  196. smSystemScript = -1; { designates system script.}
  197. smCurrentScript = -2; { designates current font script.}
  198. smAllScripts = -3; { designates any script}
  199. {
  200. Script codes:
  201. These specify a Mac OS encoding that is related to a FOND ID range.
  202. Some of the encodings have several variants (e.g. for different localized systems)
  203. which all share the same script code.
  204. Not all of these script codes are currently supported by Apple software.
  205. Notes:
  206. - Script code 0 (smRoman) is also used (instead of smGreek) for the Greek encoding
  207. in the Greek localized system.
  208. - Script code 28 (smEthiopic) is also used for the Inuit encoding in the Inuktitut
  209. system.
  210. }
  211. const
  212. smRoman = 0;
  213. smJapanese = 1;
  214. smTradChinese = 2; { Traditional Chinese}
  215. smKorean = 3;
  216. smArabic = 4;
  217. smHebrew = 5;
  218. smGreek = 6;
  219. smCyrillic = 7;
  220. smRSymbol = 8; { Right-left symbol}
  221. smDevanagari = 9;
  222. smGurmukhi = 10;
  223. smGujarati = 11;
  224. smOriya = 12;
  225. smBengali = 13;
  226. smTamil = 14;
  227. smTelugu = 15;
  228. smKannada = 16; { Kannada/Kanarese}
  229. smMalayalam = 17;
  230. smSinhalese = 18;
  231. smBurmese = 19;
  232. smKhmer = 20; { Khmer/Cambodian}
  233. smThai = 21;
  234. smLao = 22;
  235. smGeorgian = 23;
  236. smArmenian = 24;
  237. smSimpChinese = 25; { Simplified Chinese}
  238. smTibetan = 26;
  239. smMongolian = 27;
  240. smEthiopic = 28;
  241. smGeez = 28; { Synonym for smEthiopic}
  242. smCentralEuroRoman = 29; { For Czech, Slovak, Polish, Hungarian, Baltic langs}
  243. smVietnamese = 30;
  244. smExtArabic = 31; { extended Arabic}
  245. smUninterp = 32; { uninterpreted symbols, e.g. palette symbols}
  246. { Extended script code for full Unicode input}
  247. const
  248. smUnicodeScript = $7E;
  249. { Obsolete script code names (kept for backward compatibility):}
  250. const
  251. smChinese = 2; { (Use smTradChinese or smSimpChinese)}
  252. smRussian = 7; { Use smCyrillic}
  253. { smMaldivian = 25: deleted, no code for Maldivian}
  254. smLaotian = 22; { Use smLao }
  255. smAmharic = 28; { Use smEthiopic or smGeez}
  256. smSlavic = 29; { Use smCentralEuroRoman}
  257. smEastEurRoman = 29; { Use smCentralEuroRoman}
  258. smSindhi = 31; { Use smExtArabic}
  259. smKlingon = 32;
  260. {
  261. Language codes:
  262. These specify a language implemented using a particular Mac OS encoding.
  263. Not all of these language codes are currently supported by Apple software.
  264. }
  265. const
  266. langEnglish = 0; { smRoman script}
  267. langFrench = 1; { smRoman script}
  268. langGerman = 2; { smRoman script}
  269. langItalian = 3; { smRoman script}
  270. langDutch = 4; { smRoman script}
  271. langSwedish = 5; { smRoman script}
  272. langSpanish = 6; { smRoman script}
  273. langDanish = 7; { smRoman script}
  274. langPortuguese = 8; { smRoman script}
  275. langNorwegian = 9; { (Bokmal) smRoman script}
  276. langHebrew = 10; { smHebrew script}
  277. langJapanese = 11; { smJapanese script}
  278. langArabic = 12; { smArabic script}
  279. langFinnish = 13; { smRoman script}
  280. langGreek = 14; { Greek script (monotonic) using smRoman script code}
  281. langIcelandic = 15; { modified smRoman/Icelandic script}
  282. langMaltese = 16; { Roman script}
  283. langTurkish = 17; { modified smRoman/Turkish script}
  284. langCroatian = 18; { modified smRoman/Croatian script}
  285. langTradChinese = 19; { Chinese (Mandarin) in traditional characters}
  286. langUrdu = 20; { smArabic script}
  287. langHindi = 21; { smDevanagari script}
  288. langThai = 22; { smThai script}
  289. langKorean = 23; { smKorean script}
  290. const
  291. langLithuanian = 24; { smCentralEuroRoman script}
  292. langPolish = 25; { smCentralEuroRoman script}
  293. langHungarian = 26; { smCentralEuroRoman script}
  294. langEstonian = 27; { smCentralEuroRoman script}
  295. langLatvian = 28; { smCentralEuroRoman script}
  296. langSami = 29; { language of the Sami people of N. Scandinavia }
  297. langFaroese = 30; { modified smRoman/Icelandic script }
  298. langFarsi = 31; { modified smArabic/Farsi script}
  299. langPersian = 31; { Synonym for langFarsi}
  300. langRussian = 32; { smCyrillic script}
  301. langSimpChinese = 33; { Chinese (Mandarin) in simplified characters}
  302. langFlemish = 34; { smRoman script}
  303. langIrishGaelic = 35; { smRoman or modified smRoman/Celtic script (without dot above) }
  304. langAlbanian = 36; { smRoman script}
  305. langRomanian = 37; { modified smRoman/Romanian script}
  306. langCzech = 38; { smCentralEuroRoman script}
  307. langSlovak = 39; { smCentralEuroRoman script}
  308. langSlovenian = 40; { modified smRoman/Croatian script}
  309. langYiddish = 41; { smHebrew script}
  310. langSerbian = 42; { smCyrillic script}
  311. langMacedonian = 43; { smCyrillic script}
  312. langBulgarian = 44; { smCyrillic script}
  313. langUkrainian = 45; { modified smCyrillic/Ukrainian script}
  314. langByelorussian = 46; { smCyrillic script}
  315. langBelorussian = 46; { Synonym for langByelorussian }
  316. const
  317. langUzbek = 47; { Cyrillic script}
  318. langKazakh = 48; { Cyrillic script}
  319. langAzerbaijani = 49; { Azerbaijani in Cyrillic script}
  320. langAzerbaijanAr = 50; { Azerbaijani in Arabic script}
  321. langArmenian = 51; { smArmenian script}
  322. langGeorgian = 52; { smGeorgian script}
  323. langMoldavian = 53; { smCyrillic script}
  324. langKirghiz = 54; { Cyrillic script}
  325. langTajiki = 55; { Cyrillic script}
  326. langTurkmen = 56; { Cyrillic script}
  327. langMongolian = 57; { Mongolian in smMongolian script}
  328. langMongolianCyr = 58; { Mongolian in Cyrillic script}
  329. langPashto = 59; { Arabic script}
  330. langKurdish = 60; { smArabic script}
  331. langKashmiri = 61; { Arabic script}
  332. langSindhi = 62; { Arabic script}
  333. langTibetan = 63; { smTibetan script}
  334. langNepali = 64; { smDevanagari script}
  335. langSanskrit = 65; { smDevanagari script}
  336. langMarathi = 66; { smDevanagari script}
  337. langBengali = 67; { smBengali script}
  338. langAssamese = 68; { smBengali script}
  339. langGujarati = 69; { smGujarati script}
  340. langPunjabi = 70; { smGurmukhi script}
  341. const
  342. langOriya = 71; { smOriya script}
  343. langMalayalam = 72; { smMalayalam script}
  344. langKannada = 73; { smKannada script}
  345. langTamil = 74; { smTamil script}
  346. langTelugu = 75; { smTelugu script}
  347. langSinhalese = 76; { smSinhalese script}
  348. langBurmese = 77; { smBurmese script}
  349. langKhmer = 78; { smKhmer script}
  350. langLao = 79; { smLao script}
  351. langVietnamese = 80; { smVietnamese script}
  352. langIndonesian = 81; { smRoman script}
  353. langTagalog = 82; { Roman script}
  354. langMalayRoman = 83; { Malay in smRoman script}
  355. langMalayArabic = 84; { Malay in Arabic script}
  356. langAmharic = 85; { smEthiopic script}
  357. langTigrinya = 86; { smEthiopic script}
  358. langOromo = 87; { smEthiopic script}
  359. langSomali = 88; { smRoman script}
  360. langSwahili = 89; { smRoman script}
  361. langKinyarwanda = 90; { smRoman script}
  362. langRuanda = 90; { synonym for langKinyarwanda}
  363. langRundi = 91; { smRoman script}
  364. langNyanja = 92; { smRoman script}
  365. langChewa = 92; { synonym for langNyanja}
  366. langMalagasy = 93; { smRoman script}
  367. langEsperanto = 94; { Roman script}
  368. const
  369. langWelsh = 128; { modified smRoman/Celtic script}
  370. langBasque = 129; { smRoman script}
  371. langCatalan = 130; { smRoman script}
  372. langLatin = 131; { smRoman script}
  373. langQuechua = 132; { smRoman script}
  374. langGuarani = 133; { smRoman script}
  375. langAymara = 134; { smRoman script}
  376. langTatar = 135; { Cyrillic script}
  377. langUighur = 136; { Arabic script}
  378. langDzongkha = 137; { (lang of Bhutan) smTibetan script}
  379. langJavaneseRom = 138; { Javanese in smRoman script}
  380. langSundaneseRom = 139; { Sundanese in smRoman script}
  381. langGalician = 140; { smRoman script}
  382. langAfrikaans = 141; { smRoman script }
  383. const
  384. langBreton = 142; { smRoman or modified smRoman/Celtic script }
  385. langInuktitut = 143; { Inuit script using smEthiopic script code }
  386. langScottishGaelic = 144; { smRoman or modified smRoman/Celtic script }
  387. langManxGaelic = 145; { smRoman or modified smRoman/Celtic script }
  388. langIrishGaelicScript = 146; { modified smRoman/Gaelic script (using dot above) }
  389. langTongan = 147; { smRoman script }
  390. langGreekAncient = 148; { Classical Greek, polytonic orthography }
  391. langGreenlandic = 149; { smRoman script }
  392. langAzerbaijanRoman = 150; { Azerbaijani in Roman script }
  393. langNynorsk = 151; { Norwegian Nyorsk in smRoman}
  394. const
  395. langUnspecified = 32767; { Special code for use in resources (such as 'itlm') }
  396. {
  397. Obsolete language code names (kept for backward compatibility):
  398. Misspelled, ambiguous, misleading, considered pejorative, archaic, etc.
  399. }
  400. const
  401. langPortugese = 8; { Use langPortuguese}
  402. langMalta = 16; { Use langMaltese}
  403. langYugoslavian = 18; { (use langCroatian, langSerbian, etc.)}
  404. langChinese = 19; { (use langTradChinese or langSimpChinese)}
  405. langLettish = 28; { Use langLatvian }
  406. langLapponian = 29; { Use langSami}
  407. langLappish = 29; { Use langSami}
  408. langSaamisk = 29; { Use langSami }
  409. langFaeroese = 30; { Use langFaroese }
  410. langIrish = 35; { Use langIrishGaelic }
  411. langGalla = 87; { Use langOromo }
  412. langAfricaans = 141; { Use langAfrikaans }
  413. langGreekPoly = 148; { Use langGreekAncient}
  414. {
  415. Region codes:
  416. These typically specify a combination of a language code and a particular region.
  417. Some of these numeric values are reserved just for extra resource IDs associated
  418. with certain regions; these are not actual region codes, and are noted in the comments.
  419. Not all of the region codes are currently supported by Apple software.
  420. When relevant, the following list also provides:
  421. - The Apple part number (P/N) code for software localized for the specified region.
  422. - The two-letter ISO language and country codes (from ISO 639 and ISO 3166). The
  423. language code (lowercase) is first, then '_', then the country code (uppercase).
  424. }
  425. const
  426. { P/N ISO codes comments}
  427. verUS = 0; { en_US}
  428. verFrance = 1; { F fr_FR}
  429. verBritain = 2; { B en_GB}
  430. verGermany = 3; { D de_DE}
  431. verItaly = 4; { T it_IT}
  432. verNetherlands = 5; { N nl_NL}
  433. verFlemish = 6; { FN nl_BE Flemish (Dutch) for Belgium }
  434. verSweden = 7; { S sv_SE}
  435. verSpain = 8; { E es_ES Spanish for Spain}
  436. verDenmark = 9; { DK da_DK}
  437. verPortugal = 10; { PO pt_PT Portuguese for Portugal}
  438. verFrCanada = 11; { C fr_CA French for Canada}
  439. verNorway = 12; { H nb_NO Bokmål}
  440. verIsrael = 13; { HB he_IL Hebrew}
  441. verJapan = 14; { J ja_JP}
  442. verAustralia = 15; { X en_AU English for Australia}
  443. verArabic = 16; { AB ar Arabic for N Africa, Arabian peninsula, Levant}
  444. verFinland = 17; { K fi_FI}
  445. verFrSwiss = 18; { SF fr_CH French Swiss}
  446. verGrSwiss = 19; { SD de_CH German Swiss}
  447. verGreece = 20; { GR el_GR Monotonic Greek (modern)}
  448. verIceland = 21; { IS is_IS}
  449. verMalta = 22; { MA mt_MT}
  450. verCyprus = 23; { CY el_CY}
  451. verTurkey = 24; { TU tr_TR}
  452. verYugoCroatian = 25; { YU hr_HR Croatian for Yugoslavia; now use verCroatia (68)}
  453. const
  454. verNetherlandsComma = 26; { ID for KCHR resource - Dutch}
  455. verFlemishPoint = 27; { ID for KCHR resource - Belgium}
  456. verCanadaComma = 28; { ID for KCHR resource - Canadian ISO}
  457. verCanadaPoint = 29; { ID for KCHR resource - Canadian; now unused}
  458. vervariantPortugal = 30; { ID for resource; now unused}
  459. vervariantNorway = 31; { ID for resource; now unused}
  460. vervariantDenmark = 32; { ID for KCHR resource - Danish Mac Plus}
  461. const
  462. verIndiaHindi = 33; { hi_IN Hindi for India}
  463. verPakistanUrdu = 34; { UR ur_PK Urdu for Pakistan }
  464. verTurkishModified = 35; { tr_TR}
  465. verItalianSwiss = 36; { ST it_CH Italian Swiss}
  466. verInternational = 37; { Z en-ascii English for international use; ASCII chars only }
  467. { 38 is unassigned}
  468. verRomania = 39; { RO ro_RO}
  469. verGreekAncient = 40; { grc Ancient Greek, polytonic orthography }
  470. verLithuania = 41; { LT lt_LT}
  471. verPoland = 42; { PL pl_PL}
  472. verHungary = 43; { MG hu_HU}
  473. verEstonia = 44; { EE et_EE}
  474. verLatvia = 45; { LV lv_LV}
  475. verSami = 46; { se }
  476. verFaroeIsl = 47; { FA fo_FO }
  477. verIran = 48; { PS fa_IR Persian/Farsi}
  478. verRussia = 49; { RS ru_RU Russian}
  479. verIreland = 50; { GA ga_IE Irish Gaelic for Ireland (without dot above) }
  480. verKorea = 51; { KH ko_KR}
  481. verChina = 52; { CH zh_CN Simplified Chinese}
  482. verTaiwan = 53; { TA zh_TW Traditional Chinese}
  483. verThailand = 54; { TH th_TH}
  484. verScriptGeneric = 55; { SS Generic script system (no language or script) }
  485. verCzech = 56; { CZ cs_CZ}
  486. verSlovak = 57; { SL sk_SK}
  487. verEastAsiaGeneric = 58; { FE Generic East Asia system (no language or script) }
  488. verMagyar = 59; { hu_HU Unused; see verHungary}
  489. verBengali = 60; { bn Bangladesh or India}
  490. verBelarus = 61; { BY be_BY}
  491. const
  492. verUkraine = 62; { UA uk_UA}
  493. { 63 is unassigned}
  494. verGreeceAlt = 64; { el_GR unused }
  495. verSerbian = 65; { SR sr_CS }
  496. verSlovenian = 66; { SV sl_SI }
  497. verMacedonian = 67; { MD mk_MK }
  498. verCroatia = 68; { CR hr_HR}
  499. { 69 is unassigned}
  500. verGermanReformed = 70; { de-1996 Reformed orthography (used formerly unassigned 70) }
  501. verBrazil = 71; { BR pt_BR Portuguese for Brazil}
  502. verBulgaria = 72; { BG bg_BG}
  503. verCatalonia = 73; { CA ca_ES Catalan for Spain}
  504. verMultilingual = 74; { ZM mul (no language or script)}
  505. verScottishGaelic = 75; { GD gd}
  506. verManxGaelic = 76; { GV gv Isle of Man}
  507. verBreton = 77; { BZ br}
  508. verNunavut = 78; { IU iu_CA Inuktitut for Canada}
  509. verWelsh = 79; { CU cy}
  510. { 80 is ID for KCHR resource - Canadian CSA}
  511. verIrishGaelicScript = 81; { GS ga-Latg_IE Irish Gaelic for Ireland (using dot above)}
  512. verEngCanada = 82; { V en_CA English for Canada}
  513. verBhutan = 83; { BH dz_BT Dzongkha for Bhutan}
  514. verArmenian = 84; { HY hy_AM}
  515. verGeorgian = 85; { KR ka_GE}
  516. verSpLatinAmerica = 86; { LA es_XL Spanish for Latin America (private ISO 3166 code)}
  517. { 87 is ID for KCHR resource - Spanish ISO}
  518. verTonga = 88; { TS to_TO}
  519. { 89 is ID for KCHR resource - Polish Modified}
  520. { 90 is ID for KCHR resource - Catalan ISO}
  521. verFrenchUniversal = 91; { fr French generic}
  522. verAustria = 92; { AU de_AT German for Austria}
  523. { Y 93 is unused alternate for verSpLatinAmerica}
  524. verGujarati = 94; { gu_IN}
  525. verPunjabi = 95; { pa Pakistan or India}
  526. verIndiaUrdu = 96; { ur_IN Urdu for India}
  527. verVietnam = 97; { vi_VN}
  528. const
  529. verFrBelgium = 98; { BF fr_BE French for Belgium }
  530. verUzbek = 99; { BD uz_UZ }
  531. verSingapore = 100; { SG en_SG (Assume English, not Chinese or Malay) }
  532. verNynorsk = 101; { NY nn_NO Norwegian Nynorsk }
  533. verAfrikaans = 102; { AK af_ZA }
  534. verEsperanto = 103; { eo }
  535. verMarathi = 104; { mr_IN }
  536. verTibetan = 105; { bo }
  537. verNepal = 106; { ne_NP }
  538. verGreenland = 107; { kl }
  539. verIrelandEnglish = 108; { en_IE English for Ireland, with Euro for currency}
  540. {
  541. Other extra resource IDs assigned in the same number space:
  542. 179 is ID for KCHR & itl_ resources - Cornish
  543. 581 is ID for KCHR resource - Irish Gaelic script alternate
  544. 582 is ID for KCHR resource - Ogham
  545. 779 is ID for KCHR resource - Welsh alternate
  546. 1111 is ID for KCHR resource - French numeric
  547. }
  548. {
  549. Obsolete region code names (kept for backward compatibility):
  550. Misspelled or alternate form, ambiguous, misleading, considered pejorative, archaic, etc.
  551. }
  552. const
  553. verFrBelgiumLux = 6; { Incorrect; 6 is Flemish, not French, for Belgium; use verFlemish }
  554. verBelgiumLux = 6; { Use verFlemish}
  555. verArabia = 16; { Use verArabic}
  556. verYugoslavia = 25; { Use verYugoCroatian (same number, now unused), or newer verCroatia}
  557. verBelgiumLuxPoint = 27; { Use verFlemishPoint}
  558. verIndia = 33; { Use verIndiaHindi}
  559. verPakistan = 34; { Use verPakistanUrdu }
  560. verRumania = 39; { Alternate for verRomania }
  561. verGreecePoly = 40; { Use verGreekAncient }
  562. verLapland = 46; { Use verSami }
  563. verFaeroeIsl = 47; { Use verFaroeIsl }
  564. verGenericFE = 58; { Use verEastAsiaGeneric }
  565. verFarEastGeneric = 58; { Use verEastAsiaGeneric}
  566. verByeloRussian = 61; { Alternate for verBelarus }
  567. verUkrania = 62; { Use verUkraine}
  568. verAlternateGr = 64; { Use verGreeceAlt }
  569. verSerbia = 65; { Alternate for verSerbian }
  570. verSlovenia = 66; { Alternate for verSlovenian }
  571. verMacedonia = 67; { Alternate for verMacedonian }
  572. verBrittany = 77; { Alternate for verBreton }
  573. verWales = 79; { Alternate for verWelsh }
  574. verArmenia = 84; { Alternate for verArmenian }
  575. verGeorgia = 85; { Alternate for verGeorgian }
  576. verAustriaGerman = 92; { Use verAustria }
  577. verTibet = 105; { Use verTibetan }
  578. const
  579. minCountry = verUS;
  580. maxCountry = verIrelandEnglish;
  581. const
  582. { Calendar Codes }
  583. calGregorian = 0;
  584. calArabicCivil = 1;
  585. calArabicLunar = 2;
  586. calJapanese = 3;
  587. calJewish = 4;
  588. calCoptic = 5;
  589. calPersian = 6;
  590. const
  591. { Integer Format Codes }
  592. intWestern = 0;
  593. intArabic = 1;
  594. intRoman = 2;
  595. intJapanese = 3;
  596. intEuropean = 4;
  597. intOutputMask = $8000;
  598. const
  599. { CharByte byte types }
  600. smSingleByte = 0;
  601. smFirstByte = -1;
  602. smLastByte = 1;
  603. smMiddleByte = 2;
  604. const
  605. { CharType field masks }
  606. smcTypeMask = $000F;
  607. smcReserved = $00F0;
  608. smcClassMask = $0F00;
  609. smcOrientationMask = $1000; {two-byte script glyph orientation}
  610. smcRightMask = $2000;
  611. smcUpperMask = $4000;
  612. smcDoubleMask = $8000;
  613. const
  614. { Basic CharType character types }
  615. smCharPunct = $0000;
  616. smCharAscii = $0001;
  617. smCharEuro = $0007;
  618. smCharExtAscii = $0007; { More correct synonym for smCharEuro }
  619. { Additional CharType character types for script systems }
  620. smCharKatakana = $0002; {Japanese Katakana}
  621. smCharHiragana = $0003; {Japanese Hiragana}
  622. smCharIdeographic = $0004; {Hanzi, Kanji, Hanja}
  623. smCharTwoByteGreek = $0005; {2-byte Greek in Far East systems}
  624. smCharTwoByteRussian = $0006; {2-byte Cyrillic in Far East systems}
  625. smCharBidirect = $0008; {Arabic/Hebrew}
  626. smCharContextualLR = $0009; {Contextual left-right: Thai, Indic scripts}
  627. smCharNonContextualLR = $000A; {Non-contextual left-right: Cyrillic, Greek}
  628. smCharHangul = $000C; {Korean Hangul}
  629. smCharJamo = $000D; {Korean Jamo}
  630. smCharBopomofo = $000E; {Chinese Bopomofo}
  631. smCharGanaKana = $000F; {Shared for Japanese Hiragana & Katakana}
  632. { old names for some of above, for backward compatibility }
  633. smCharFISKana = $0002; {Katakana}
  634. smCharFISGana = $0003; {Hiragana}
  635. smCharFISIdeo = $0004; {Hanzi, Kanji, Hanja}
  636. const
  637. smCharFISGreek = $0005; {2-byte Greek in Far East systems}
  638. smCharFISRussian = $0006; {2-byte Cyrillic in Far East systems}
  639. { CharType classes for punctuation (smCharPunct) }
  640. smPunctNormal = $0000;
  641. smPunctNumber = $0100;
  642. smPunctSymbol = $0200;
  643. smPunctBlank = $0300; { Additional CharType classes for punctuation in two-byte systems }
  644. smPunctRepeat = $0400; { repeat marker }
  645. smPunctGraphic = $0500; { line graphics }
  646. { CharType Katakana and Hiragana classes for two-byte systems }
  647. smKanaSmall = $0100; {small kana character}
  648. smKanaHardOK = $0200; {can have dakuten}
  649. smKanaSoftOK = $0300; {can have dakuten or han-dakuten}
  650. { CharType Ideographic classes for two-byte systems }
  651. smIdeographicLevel1 = $0000; {level 1 char}
  652. smIdeographicLevel2 = $0100; {level 2 char}
  653. smIdeographicUser = $0200; {user char}
  654. { old names for above, for backward compatibility }
  655. smFISClassLvl1 = $0000; {level 1 char}
  656. smFISClassLvl2 = $0100; {level 2 char}
  657. smFISClassUser = $0200; {user char}
  658. { CharType Jamo classes for Korean systems }
  659. smJamoJaeum = $0000; {simple consonant char}
  660. smJamoBogJaeum = $0100; {complex consonant char}
  661. smJamoMoeum = $0200; {simple vowel char}
  662. smJamoBogMoeum = $0300; {complex vowel char}
  663. const
  664. { CharType glyph orientation for two-byte systems }
  665. smCharHorizontal = $0000; { horizontal character form, or for both }
  666. smCharVertical = $1000; { vertical character form }
  667. { CharType directions }
  668. smCharLeft = $0000;
  669. smCharRight = $2000; { CharType case modifers }
  670. smCharLower = $0000;
  671. smCharUpper = $4000; { CharType character size modifiers (1 or multiple bytes). }
  672. smChar1byte = $0000;
  673. smChar2byte = $8000;
  674. const
  675. { TransliterateText target types for Roman }
  676. smTransAscii = 0; {convert to ASCII}
  677. smTransNative = 1; {convert to font script}
  678. smTransCase = $FE; {convert case for all text}
  679. smTransSystem = $FF; {convert to system script}
  680. { TransliterateText target types for two-byte scripts }
  681. smTransAscii1 = 2; {1-byte Roman}
  682. smTransAscii2 = 3; {2-byte Roman}
  683. smTransKana1 = 4; {1-byte Japanese Katakana}
  684. smTransKana2 = 5; {2-byte Japanese Katakana}
  685. const
  686. smTransGana2 = 7; {2-byte Japanese Hiragana (no 1-byte Hiragana)}
  687. smTransHangul2 = 8; {2-byte Korean Hangul}
  688. smTransJamo2 = 9; {2-byte Korean Jamo}
  689. smTransBopomofo2 = 10; {2-byte Chinese Bopomofo}
  690. { TransliterateText target modifiers }
  691. smTransLower = $4000; {target becomes lowercase}
  692. smTransUpper = $8000; {target becomes uppercase}
  693. { TransliterateText resource format numbers }
  694. smTransRuleBaseFormat = 1; {Rule based trsl resource format }
  695. smTransHangulFormat = 2; {Table based Hangul trsl resource format}
  696. { TransliterateText property flags }
  697. smTransPreDoubleByting = 1; {Convert all text to double byte before transliteration}
  698. smTransPreLowerCasing = 2; {Convert all text to lower case before transliteration}
  699. const
  700. { TransliterateText source mask - general }
  701. smMaskAll = -1; {Convert all text}
  702. { TransliterateText source masks }
  703. smMaskAscii = $00000001; {2^smTransAscii}
  704. smMaskNative = $00000002; {2^smTransNative}
  705. { TransliterateText source masks for two-byte scripts }
  706. smMaskAscii1 = $00000004; {2^smTransAscii1}
  707. smMaskAscii2 = $00000008; {2^smTransAscii2}
  708. smMaskKana1 = $00000010; {2^smTransKana1}
  709. smMaskKana2 = $00000020; {2^smTransKana2}
  710. smMaskGana2 = $00000080; {2^smTransGana2}
  711. smMaskHangul2 = $00000100; {2^smTransHangul2}
  712. smMaskJamo2 = $00000200; {2^smTransJamo2}
  713. smMaskBopomofo2 = $00000400; {2^smTransBopomofo2}
  714. const
  715. { Special script code values for International Utilities }
  716. iuSystemScript = -1; { <obsolete> system script }
  717. iuCurrentScript = -2; { <obsolete> current script (for font of grafPort) }
  718. const
  719. { Negative verbs for KeyScript }
  720. smKeyNextScript = -1; { Switch to next available script }
  721. smKeySysScript = -2; { Switch to the system script }
  722. smKeySwapScript = -3; { Switch to previously-used script }
  723. { New for System 7.0: }
  724. smKeyNextKybd = -4; { Switch to next keyboard in current keyscript }
  725. smKeySwapKybd = -5; { Switch to previously-used keyboard in current keyscript }
  726. smKeyDisableKybds = -6; { Disable keyboards not in system or Roman script }
  727. smKeyEnableKybds = -7; { Re-enable keyboards for all enabled scripts }
  728. smKeyToggleInline = -8; { Toggle inline input for current keyscript }
  729. smKeyToggleDirection = -9; { Toggle default line direction (TESysJust) }
  730. smKeyNextInputMethod = -10; { Switch to next input method in current keyscript }
  731. smKeySwapInputMethod = -11; { Switch to last-used input method in current keyscript }
  732. smKeyDisableKybdSwitch = -12; { Disable switching from the current keyboard }
  733. smKeySetDirLeftRight = -15; { Set default line dir to left-right, align left }
  734. smKeySetDirRightLeft = -16; { Set default line dir to right-left, align right }
  735. smKeyRoman = -17; { Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard }
  736. const
  737. { Force keyboard script switching flag and mask for zero and positive KeyScript verbs }
  738. smKeyForceKeyScriptBit = 7; { Force keyboard script switching flag }
  739. smKeyForceKeyScriptMask = 1 shl smKeyForceKeyScriptBit; { its mask }
  740. const
  741. { Roman script constants }
  742. { The following are here for backward compatibility, but should not be used. }
  743. { This information should be obtained using GetScript. }
  744. romanSysFond = $3FFF; {system font id number}
  745. romanAppFond = 3; {application font id number}
  746. romanFlags = $0007; {roman settings}
  747. { Script Manager font equates. }
  748. smFondStart = $4000; {start from 16K}
  749. smFondEnd = $C000; {past end of range at 48K}
  750. { Miscellaneous font equates. }
  751. smUprHalfCharSet = $80; {first char code in top half of std char set}
  752. const
  753. { Character Set Extensions }
  754. diaeresisUprY = $D9;
  755. fraction = $DA;
  756. intlCurrency = $DB;
  757. leftSingGuillemet = $DC;
  758. rightSingGuillemet = $DD;
  759. fiLigature = $DE;
  760. flLigature = $DF;
  761. dblDagger = $E0;
  762. centeredDot = $E1;
  763. baseSingQuote = $E2;
  764. baseDblQuote = $E3;
  765. perThousand = $E4;
  766. circumflexUprA = $E5;
  767. circumflexUprE = $E6;
  768. acuteUprA = $E7;
  769. diaeresisUprE = $E8;
  770. graveUprE = $E9;
  771. acuteUprI = $EA;
  772. circumflexUprI = $EB;
  773. diaeresisUprI = $EC;
  774. graveUprI = $ED;
  775. acuteUprO = $EE;
  776. circumflexUprO = $EF;
  777. appleLogo = $F0;
  778. graveUprO = $F1;
  779. acuteUprU = $F2;
  780. circumflexUprU = $F3;
  781. graveUprU = $F4;
  782. dotlessLwrI = $F5;
  783. circumflex = $F6;
  784. tilde = $F7;
  785. macron = $F8;
  786. breveMark = $F9;
  787. overDot = $FA;
  788. ringMark = $FB;
  789. cedilla = $FC;
  790. doubleAcute = $FD;
  791. ogonek = $FE;
  792. hachek = $FF;
  793. const
  794. { ScriptTokenType values }
  795. tokenIntl = 4; {the itl resource number of the tokenizer}
  796. tokenEmpty = -1; {used internally as an empty flag}
  797. const
  798. tokenUnknown = 0; {chars that do not match a defined token type}
  799. tokenWhite = 1; {white space}
  800. tokenLeftLit = 2; {literal begin}
  801. tokenRightLit = 3; {literal end}
  802. tokenAlpha = 4; {alphabetic}
  803. tokenNumeric = 5; {numeric}
  804. tokenNewLine = 6; {new line}
  805. tokenLeftComment = 7; {open comment}
  806. tokenRightComment = 8; {close comment}
  807. tokenLiteral = 9; {literal}
  808. tokenEscape = 10; {character escape (e.g. '\' in "\n", "\t")}
  809. tokenAltNum = 11; {alternate number (e.g. $B0-B9 in Arabic,Hebrew)}
  810. tokenRealNum = 12; {real number}
  811. tokenAltReal = 13; {alternate real number}
  812. tokenReserve1 = 14; {reserved}
  813. tokenReserve2 = 15; {reserved}
  814. tokenLeftParen = 16; {open parenthesis}
  815. tokenRightParen = 17; {close parenthesis}
  816. tokenLeftBracket = 18; {open square bracket}
  817. tokenRightBracket = 19; {close square bracket}
  818. const
  819. tokenLeftCurly = 20; {open curly bracket}
  820. tokenRightCurly = 21; {close curly bracket}
  821. tokenLeftEnclose = 22; {open guillemet}
  822. tokenRightEnclose = 23; {close guillemet}
  823. tokenPlus = 24;
  824. tokenMinus = 25;
  825. tokenAsterisk = 26; {times/multiply}
  826. tokenDivide = 27;
  827. tokenPlusMinus = 28; {plus or minus symbol}
  828. tokenSlash = 29;
  829. tokenBackSlash = 30;
  830. tokenLess = 31; {less than symbol}
  831. tokenGreat = 32; {greater than symbol}
  832. tokenEqual = 33;
  833. tokenLessEqual2 = 34; {less than or equal, 2 characters (e.g. <=)}
  834. tokenLessEqual1 = 35; {less than or equal, 1 character}
  835. tokenGreatEqual2 = 36; {greater than or equal, 2 characters (e.g. >=)}
  836. tokenGreatEqual1 = 37; {greater than or equal, 1 character}
  837. token2Equal = 38; {double equal (e.g. ==)}
  838. tokenColonEqual = 39; {colon equal}
  839. const
  840. tokenNotEqual = 40; {not equal, 1 character}
  841. tokenLessGreat = 41; {less/greater, Pascal not equal (e.g. <>)}
  842. tokenExclamEqual = 42; {exclamation equal, C not equal (e.g. !=)}
  843. tokenExclam = 43; {exclamation point}
  844. tokenTilde = 44; {centered tilde}
  845. tokenComma = 45;
  846. tokenPeriod = 46;
  847. tokenLeft2Quote = 47; {open double quote}
  848. tokenRight2Quote = 48; {close double quote}
  849. tokenLeft1Quote = 49; {open single quote}
  850. tokenRight1Quote = 50; {close single quote}
  851. token2Quote = 51; {double quote}
  852. token1Quote = 52; {single quote}
  853. tokenSemicolon = 53;
  854. tokenPercent = 54;
  855. tokenCaret = 55;
  856. tokenUnderline = 56;
  857. tokenAmpersand = 57;
  858. tokenAtSign = 58;
  859. tokenBar = 59; {vertical bar}
  860. const
  861. tokenQuestion = 60;
  862. tokenPi = 61; {lower-case pi}
  863. tokenRoot = 62; {square root symbol}
  864. tokenSigma = 63; {capital sigma}
  865. tokenIntegral = 64; {integral sign}
  866. tokenMicro = 65;
  867. tokenCapPi = 66; {capital pi}
  868. tokenInfinity = 67;
  869. tokenColon = 68;
  870. tokenHash = 69; {e.g. #}
  871. tokenDollar = 70;
  872. tokenNoBreakSpace = 71; {non-breaking space}
  873. tokenFraction = 72;
  874. tokenIntlCurrency = 73;
  875. tokenLeftSingGuillemet = 74;
  876. tokenRightSingGuillemet = 75;
  877. tokenPerThousand = 76;
  878. tokenEllipsis = 77;
  879. tokenCenterDot = 78;
  880. tokenNil = 127;
  881. const
  882. delimPad = -2; { obsolete, misspelled token names kept for backward compatibility }
  883. tokenTilda = 44;
  884. tokenCarat = 55;
  885. const
  886. { Table selectors for GetItlTable }
  887. smWordSelectTable = 0; { get word select break table from 'itl2' }
  888. smWordWrapTable = 1; { get word wrap break table from 'itl2' }
  889. smNumberPartsTable = 2; { get default number parts table from 'itl4' }
  890. smUnTokenTable = 3; { get unToken table from 'itl4' }
  891. smWhiteSpaceList = 4; { get white space list from 'itl4' }
  892. iuWordSelectTable = 0; { <obsolete> get word select break table from 'itl2' }
  893. iuWordWrapTable = 1; { <obsolete> get word wrap break table from 'itl2' }
  894. iuNumberPartsTable = 2; { <obsolete> get default number parts table from 'itl4' }
  895. iuUnTokenTable = 3; { <obsolete> get unToken table from 'itl4' }
  896. iuWhiteSpaceList = 4; { <obsolete> get white space list from 'itl4' }
  897. { end of stuff moved from Packages.h }
  898. const
  899. tokenOK = 0; { TokenResults }
  900. tokenOverflow = 1; { TokenResults }
  901. stringOverflow = 2; { TokenResults }
  902. badDelim = 3; { TokenResults }
  903. badEnding = 4; { TokenResults }
  904. crash = 5; { TokenResults }
  905. type
  906. TokenResults = SInt8;
  907. CharByteTable = packed array [0..255] of char;
  908. { "TokenType" was renamed to "ScriptTokenType" because of a name collisions}
  909. type
  910. ScriptTokenType = SInt16;
  911. {$ifc TARGET_OS_MAC}
  912. TokenType = ScriptTokenType;
  913. {$endc} {TARGET_OS_MAC}
  914. type
  915. DelimType = array [0..1] of ScriptTokenType;
  916. CommentType = array [0..3] of ScriptTokenType;
  917. type
  918. TokenRec = record
  919. theToken: ScriptTokenType;
  920. position: Ptr; {pointer into original source}
  921. length: SIGNEDLONG; {length of text in original source}
  922. stringPosition: StringPtr; {Pascal/C string copy of identifier}
  923. end;
  924. TokenRecPtr = ^TokenRec;
  925. type
  926. TokenBlock = record
  927. source: Ptr; {pointer to stream of characters}
  928. sourceLength: SIGNEDLONG; {length of source stream}
  929. tokenList: Ptr; {pointer to array of tokens}
  930. tokenLength: SIGNEDLONG; {maximum length of TokenList}
  931. tokenCount: SIGNEDLONG; {number tokens generated by tokenizer}
  932. stringList: Ptr; {pointer to stream of identifiers}
  933. stringLength: SIGNEDLONG; {length of string list}
  934. stringCount: SIGNEDLONG; {number of bytes currently used}
  935. doString: Boolean; {make strings & put into StringList}
  936. doAppend: Boolean; {append to TokenList rather than replace}
  937. doAlphanumeric: Boolean; {identifiers may include numeric}
  938. doNest: Boolean; {do comments nest?}
  939. leftDelims: array [0..1] of ScriptTokenType;
  940. rightDelims: array [0..1] of ScriptTokenType;
  941. leftComment: array [0..3] of ScriptTokenType;
  942. rightComment: array [0..3] of ScriptTokenType;
  943. escapeCode: ScriptTokenType; {escape symbol code}
  944. decimalCode: ScriptTokenType;
  945. itlResource: Handle; {handle to itl4 resource of current script}
  946. reserved: array [0..7] of SIGNEDLONG; { must be zero! }
  947. end;
  948. TokenBlockPtr = ^TokenBlock;
  949. { Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. }
  950. const
  951. smNotInstalled = 0; {routine not available in script}
  952. smBadVerb = -1; {Bad verb passed to a routine}
  953. smBadScript = -2; {Bad script code passed to a routine}
  954. { Bits in the smGenFlags long. }
  955. { First (high-order) byte is set from itlc flags byte. }
  956. const
  957. smfShowIcon = 31; {Show icon even if only one script}
  958. smfDualCaret = 30; {Use dual caret for mixed direction text}
  959. smfNameTagEnab = 29; {Reserved for internal use}
  960. smfUseAssocFontInfo = 28; {Use the associated font info for FontMetrics calls}
  961. smfDisableKeyScriptSync = 27; {Disable font and keyboard script synchronization}
  962. { We should define masks, too. }
  963. const
  964. smfDisableKeyScriptSyncMask = 1 shl smfDisableKeyScriptSync; {Disable font and keyboard script synchronization mask}
  965. { GetScriptManagerVariable and SetScriptManagerVariable verbs (deprecated) }
  966. const
  967. smSysScript = 18; {System script}
  968. smKeyScript = 22; {Keyboard script}
  969. smKCHRCache = 38; {Returns pointer to KCHR cache}
  970. smRegionCode = 40; {Returns current region code (verXxx)}
  971. {$ifc not TARGET_CPU_64}
  972. const
  973. smVersion = 0; {Script Manager version number}
  974. smMunged = 2; {Globals change count}
  975. smEnabled = 4; {Count of enabled scripts, incl Roman}
  976. smBidirect = 6; {At least one bidirectional script}
  977. smFontForce = 8; {Force font flag}
  978. smIntlForce = 10; {Force intl flag}
  979. smForced = 12; {Script was forced to system script}
  980. smDefault = 14; {Script was defaulted to Roman script}
  981. smPrint = 16; {Printer action routine}
  982. smLastScript = 20; {Last keyboard script}
  983. smSysRef = 24; {System folder refNum}
  984. smKeyCache = 26; {obsolete}
  985. smKeySwap = 28; {Swapping table handle}
  986. smGenFlags = 30; {General flags long}
  987. smOverride = 32; {Script override flags}
  988. smCharPortion = 34; {Ch vs SpExtra proportion}
  989. smDoubleByte = 36; {Flag for double-byte script installed}
  990. smKeyDisableState = 42; {Returns current keyboard disable state}
  991. {$endc} {not TARGET_CPU_64}
  992. {
  993. * GetScriptManagerVariable() *** DEPRECATED ***
  994. *
  995. * Deprecated:
  996. * The replacement for GetScriptManagerVariable depends on the
  997. * selector used with it. Many of the selectors refer to information
  998. * that is not meaningful on a Unicode system, or refer to details
  999. * of the Script Manager itself; in general there is no replacement
  1000. * functionality for these.
  1001. * Selectors that have meaningful replacements are as follows (these
  1002. * are not direct replacements; they provide analogous but more
  1003. * modern functionality):
  1004. * 1. smSysScript - To obtain a TextEncoding for the legacy Mac OS
  1005. * encoding associated with the user's preferred UI language or with
  1006. * the application's default text encoding, use
  1007. * CFStringGetSystemEncoding or GetApplicationTextEncoding.
  1008. * Sometimes smSysScript is just used to get a script code to pass
  1009. * to GetScriptVariable; in this case the replacements for
  1010. * GetScriptVariable selectors may provide more information.
  1011. * 2. smKeyScript - To obtain the intended language associated with
  1012. * the user's current keyboard input source (plus other languages
  1013. * that can be input using it): Use
  1014. * TISCopyCurrentKeyboardInputSource to get that input source, then
  1015. * pass it to TISGetInputSourceProperty with the
  1016. * kTISPropertyInputSourceLanguages key.
  1017. * 3. smKCHRCache - To obtain the key layout data for the keyboard
  1018. * layout currently in use, use
  1019. * TISCopyCurrentKeyboardLayoutInputSource to get that input source,
  1020. * then pass it to TISGetInputSourceProperty with the
  1021. * kTISPropertyUnicodeKeyLayoutData key (this returns 'uchr' Unicode
  1022. * layout data only; it will not return any data for keyboard
  1023. * layouts that only have 'KCHR' data).
  1024. * 4. smRegionCode - To obtain the locale associated with the user's
  1025. * preferred formats (for dates, times, numbers, etc.) do:
  1026. * CFStringRef curLocaleStringRef = NULL; //
  1027. * localeRef = CFLocaleCopyCurrent(); //
  1028. * if (localeRef) ( //
  1029. * curLocaleStringRef = CFLocaleGetIdentifier(localeRef); //
  1030. * CFRelease(localeRef); //
  1031. * ) //
  1032. * To obtain the user's preferred UI language, do:
  1033. * CFArrayRef langArray = (CFArrayRef)CFPreferencesCopyAppValue(
  1034. * CFSTR("AppleLanguages"), kCFPreferencesCurrentApplication ); //
  1035. *
  1036. * the first entry in langArray indicates the preferred language.
  1037. * For Mac OS X 10.5 there is also a proposed API to return this.
  1038. *
  1039. * Selectors that have no meaningful replacement on a Unicode system
  1040. * include smEnabled, smBidirect, smDoubleByte, etc.
  1041. * Selectors that pertain to internal operation of the Script
  1042. * Manager itself and thus have no meaningful replacement include
  1043. * smVersion, smMunged, smPrint, smSysRef, etc.
  1044. *
  1045. * Summary:
  1046. * Check the value of Script Manager general environment variables.
  1047. *
  1048. * Availability:
  1049. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.5
  1050. * CarbonLib: in CarbonLib 1.0 and later
  1051. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1052. }
  1053. function GetScriptManagerVariable( selector: SInt16 ): SIGNEDLONG; external name '_GetScriptManagerVariable';
  1054. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1055. {
  1056. * SetScriptManagerVariable() *** DEPRECATED ***
  1057. *
  1058. * Deprecated:
  1059. * This is mainly used to set the value of variables that control
  1060. * the internal operation of the Script Manager (selectors
  1061. * smIntlForce, smGenFlags) and therefore there is no modern
  1062. * replacement.
  1063. *
  1064. * Summary:
  1065. * Set the value of (some) Script Manager general environment
  1066. * variables.
  1067. *
  1068. * Availability:
  1069. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.5
  1070. * CarbonLib: in CarbonLib 1.0 and later
  1071. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1072. }
  1073. function SetScriptManagerVariable( selector: SInt16; param: SIGNEDLONG ): OSErr; external name '_SetScriptManagerVariable';
  1074. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1075. {$ifc not TARGET_CPU_64}
  1076. { Values for script redraw flag. }
  1077. const
  1078. smRedrawChar = 0; {Redraw character only}
  1079. smRedrawWord = 1; {Redraw entire word (2-byte systems)}
  1080. smRedrawLine = -1; {Redraw entire line (bidirectional systems)}
  1081. {$endc} {not TARGET_CPU_64}
  1082. { Bits in the smScriptFlags word }
  1083. { (bits above 8 are non-static) }
  1084. const
  1085. smsfIntellCP = 0; {Script has intelligent cut & paste}
  1086. smsfSingByte = 1; {Script has only single bytes}
  1087. smsfNatCase = 2; {Native chars have upper & lower case}
  1088. smsfContext = 3; {Script is contextual}
  1089. smsfNoForceFont = 4; {Script will not force characters}
  1090. smsfB0Digits = 5; {Script has alternate digits at B0-B9}
  1091. smsfAutoInit = 6; {Auto initialize the script}
  1092. smsfUnivExt = 7; {Script is handled by universal extension}
  1093. smsfSynchUnstyledTE = 8; {Script synchronizes for unstyled TE}
  1094. smsfForms = 13; {Uses contextual forms for letters}
  1095. smsfLigatures = 14; {Uses contextual ligatures}
  1096. smsfReverse = 15; {Reverses native text, right-left}
  1097. { GetScriptVariable and SetScriptVariable verbs (deprecated). }
  1098. { Note: Verbs private to script systems are negative, while }
  1099. { those general across script systems are non-negative. }
  1100. {$ifc not TARGET_CPU_64}
  1101. const
  1102. smScriptVersion = 0; {Script software version}
  1103. smScriptMunged = 2; {Script entry changed count}
  1104. smScriptEnabled = 4; {Script enabled flag}
  1105. smScriptRight = 6; {Right to left flag}
  1106. smScriptJust = 8; {Justification flag}
  1107. smScriptRedraw = 10; {Word redraw flag}
  1108. smScriptSysFond = 12; {Preferred system font}
  1109. smScriptAppFond = 14; {Preferred Application font}
  1110. smScriptBundle = 16; {Beginning of itlb verbs}
  1111. smScriptNumber = 16; {Script itl0 id}
  1112. smScriptDate = 18; {Script itl1 id}
  1113. smScriptSort = 20; {Script itl2 id}
  1114. smScriptFlags = 22; {flags word}
  1115. smScriptToken = 24; {Script itl4 id}
  1116. smScriptEncoding = 26; {id of optional itl5, if present}
  1117. smScriptLang = 28; {Current language for script}
  1118. smScriptNumDate = 30; {Script Number/Date formats.}
  1119. smScriptKeys = 32; {Script KCHR id}
  1120. smScriptIcon = 34; {ID # of SICN or kcs#/kcs4/kcs8 suite}
  1121. smScriptPrint = 36; {Script printer action routine}
  1122. smScriptTrap = 38; {Trap entry pointer}
  1123. smScriptCreator = 40; {Script file creator}
  1124. smScriptFile = 42; {Script file name}
  1125. smScriptName = 44; {Script name}
  1126. { There is a hole here for old Kanji private verbs 46-76 }
  1127. smScriptMonoFondSize = 78; {default monospace FOND (hi) & size (lo)}
  1128. smScriptPrefFondSize = 80; {preferred FOND (hi) & size (lo)}
  1129. smScriptSmallFondSize = 82; {default small FOND (hi) & size (lo)}
  1130. smScriptSysFondSize = 84; {default system FOND (hi) & size (lo)}
  1131. smScriptAppFondSize = 86; {default app FOND (hi) & size (lo)}
  1132. smScriptHelpFondSize = 88; {default Help Mgr FOND (hi) & size (lo)}
  1133. smScriptValidStyles = 90; {mask of valid styles for script}
  1134. smScriptAliasStyle = 92; {style (set) to use for aliases}
  1135. {$endc} {not TARGET_CPU_64}
  1136. {$ifc not TARGET_CPU_64}
  1137. { WorldScript private verbs }
  1138. { special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI }
  1139. { move them here to be public }
  1140. const
  1141. smLayoutCache = -309; { HiWrd(param) is # entries, LoWrd is max input length}
  1142. smOldVerbSupport = -311; { param is added to old verbs to map to WSI verb}
  1143. smSetKashidas = -291; { param is ON or OFF, old verb = -36}
  1144. smSetKashProp = -287; { param is kashida proportion, old verb = -32}
  1145. smScriptSysBase = -281; { param is associated font to use w/ system font (old verb = -26)}
  1146. smScriptAppBase = -283; { param is associated font to use w/ app font (old verb = -28)}
  1147. smScriptFntBase = -285; { param is associated font to use w/ all other fonts (old verb = -30)}
  1148. smScriptLigatures = -263; { old verb = -8}
  1149. smScriptNumbers = -267; { old verb = -12}
  1150. {$endc} {not TARGET_CPU_64}
  1151. {$ifc not TARGET_CPU_64}
  1152. {
  1153. * GetScriptVariable() *** DEPRECATED ***
  1154. *
  1155. * Deprecated:
  1156. * The replacement for GetScriptVariable depends on the selector
  1157. * used with it. Many of the selectors refer to information that is
  1158. * not meaningful on a Unicode system, or refer to details of the
  1159. * Script Manager itself; in general there is no replacement
  1160. * functionality for these.
  1161. * Selectors that have meaningful replacements are as follows (these
  1162. * are not direct replacements; they provide analogous but more
  1163. * modern functionality):
  1164. * 1. smScriptLang - This was typically used with the system script
  1165. * to determine the system language. Instead, to obtain the user's
  1166. * preferred UI language, do:
  1167. * CFArrayRef langArray = (CFArrayRef)CFPreferencesCopyAppValue(
  1168. * CFSTR("AppleLanguages"), kCFPreferencesCurrentApplication ); //
  1169. *
  1170. * the first entry in langArray indicates the preferred language.
  1171. * For Mac OS X 10.5 there is also a proposed API to return this.
  1172. *
  1173. * 2. Font selectors smScriptSysFond / smScriptSysFondSize,
  1174. * smScriptAppFond / smScriptAppFondSize, smScriptMonoFondSize,
  1175. * smScriptPrefFondSize, smScriptSmallFondSize, smScriptHelpFondSize
  1176. * - On Mac OS X you generally do not need to worry about setting an
  1177. * appropriate font based on character script to ensure that
  1178. * characters are displayed correctly; Unicode encoding and font
  1179. * fallbacks (to automatically find a font that can display a
  1180. * character) take care of this.
  1181. * However for cases where you do need to do this (such as Carbon
  1182. * applications that handle non-Unicode text), the CoreText function
  1183. * CTFontCreateUIFontForLanguage (available in 10.5 and later)
  1184. * provides a way to get a CTFontRef for a specified language and UI
  1185. * usage.
  1186. * 3. Script resource ID selectors smScriptNumber, smScriptDate,
  1187. * smScriptSort, smScriptToken - These were used in several ways.
  1188. * Sometimes they were used to get a resource ID so specific fields
  1189. * in the resource could be examined (e.g. to determine the
  1190. * appropriate decimal separator or time format). For this usage
  1191. * CFLocaleGetValue can now be used with an appropriate key (e.g.
  1192. * kCFLocaleDecimalSeparator) to get similar information (Much of
  1193. * the information associated with the resource specified by
  1194. * smScriptToken is not relevant for a Unicode system). Another
  1195. * usage was to get a resource ID (or a Handle) to pass to some
  1196. * other system function. For text sorting, this is replaced by the
  1197. * collation functionality in CFString. For formatting of times,
  1198. * dates, and numbers, this is replaced by functionality in
  1199. * CFLocale, CFDateFormatter, CFNumberFormatter.
  1200. * 4. smScriptKeys - To determine an appropriate keyboard input
  1201. * source for a particular language, use
  1202. * TISCopyInputSourceForLanguage.
  1203. * 5. smScriptIcon - To obtain an icon for a particular keyboard
  1204. * input source, use TISGetInputSourceProperty with the
  1205. * kTISPropertyIconRef or kTISPropertyIconImageURL key.
  1206. *
  1207. * Summary:
  1208. * Check the value of a script system's variables.
  1209. *
  1210. * Availability:
  1211. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.5
  1212. * CarbonLib: in CarbonLib 1.0 and later
  1213. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1214. }
  1215. function GetScriptVariable( script: SInt16; selector: SInt16 ): SIGNEDLONG; external name '_GetScriptVariable';
  1216. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1217. {$endc} {not TARGET_CPU_64}
  1218. {$ifc not TARGET_CPU_64}
  1219. {
  1220. * SetScriptVariable() *** DEPRECATED ***
  1221. *
  1222. * Deprecated:
  1223. * The primary (perhaps only) recent usage of SetScriptVariable is
  1224. * to set a specific keyboard layout, as follows:
  1225. * err = SetScriptVariable(aScript, smScriptKeys, aKeyLayoutID);
  1226. * //
  1227. * KeyScript(aScript); //
  1228. * The replacement depends on whether the goal is to set the
  1229. * keyboard layout globally or for a specific TSMDocument.
  1230. * To set it globally, use TISSelectInputSource.
  1231. * To set it for a specific document, use the TSMDocument property
  1232. * kTSMDocumentInputSourceOverridePropertyTag.
  1233. *
  1234. * Summary:
  1235. * Set the value of (some of) a script system's variables.
  1236. *
  1237. * Availability:
  1238. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.5
  1239. * CarbonLib: in CarbonLib 1.0 and later
  1240. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1241. }
  1242. function SetScriptVariable( script: SInt16; selector: SInt16; param: SIGNEDLONG ): OSErr; external name '_SetScriptVariable';
  1243. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1244. {$endc} {not TARGET_CPU_64}
  1245. {$ifc not TARGET_CPU_64}
  1246. {
  1247. * GetSysDirection() *** DEPRECATED ***
  1248. *
  1249. * Deprecated:
  1250. * The preferred replacement is +[NSParagraphStyle
  1251. * defaultWritingDirectionForLanguage:]. If you cannot use that, you
  1252. * may instead call CFLocaleGetLanguageCharacterDirection for the UI
  1253. * language in which the application is running. See discussion.
  1254. *
  1255. * Discussion:
  1256. * Although GetSysDirection ostensibly provided an overall system
  1257. * direction, it was patched by the Language Manager in Classic Mac
  1258. * OS to provide a direction appropriate for the application that
  1259. * was running. This is similar to the desired behavior in Mac OS X,
  1260. * in which an application is normally interested in the text
  1261. * direction associated with the user-interface language in which it
  1262. * is running (e.g. the first language in the array returned by
  1263. * CFBundleCopyPreferredLocalizationsFromArray when given the
  1264. * application's bundle localizations).
  1265. *
  1266. * Calling +[NSParagraphStyle defaultWritingDirectionForLanguage:]
  1267. * is the preferred way to determine this. If that is not possible
  1268. * for your application, then an alternative is to call
  1269. * CFLocaleGetLanguageCharacterDirection for the application's
  1270. * user-interface language (determined as described above).
  1271. *
  1272. * Availability:
  1273. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1274. * CarbonLib: in CarbonLib 1.0 and later
  1275. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1276. }
  1277. function GetSysDirection: SInt16; external name '_GetSysDirection';
  1278. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1279. {
  1280. * SetSysDirection() *** DEPRECATED ***
  1281. *
  1282. * Deprecated:
  1283. * No longer needed on MacOS X.
  1284. *
  1285. * Discussion:
  1286. * This function is obsolete.
  1287. *
  1288. * Availability:
  1289. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1290. * CarbonLib: in CarbonLib 1.0 and later
  1291. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1292. }
  1293. procedure SetSysDirection( value: SInt16 ); external name '_SetSysDirection';
  1294. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1295. {
  1296. * FontScript() *** DEPRECATED ***
  1297. *
  1298. * Deprecated:
  1299. * Use ATSFontFamilyGetEncoding instead.
  1300. *
  1301. * Discussion:
  1302. * This function returns the ScriptCode of the font of the Quickdraw
  1303. * grafPort or - if that font is Roman and the smFontForce flag is
  1304. * true - it returns the system ScriptCode. Both the Quickdraw
  1305. * grafPort and the ScriptCode type are deprecated. Instead, you can
  1306. * obtain the TextEncoding for an ATSFontFamilyRef using the
  1307. * function ATSFontFamilyGetEncoding. To get an ATSFontFamilyRef for
  1308. * a (deprecated) Quickdraw-style FMFontFamily ID, use the
  1309. * deprecated Quickdraw function FMGetATSFontFamilyRefFromFontFamily.
  1310. *
  1311. * Availability:
  1312. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1313. * CarbonLib: in CarbonLib 1.0 and later
  1314. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1315. }
  1316. function FontScript: SInt16; external name '_FontScript';
  1317. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1318. {
  1319. * IntlScript() *** DEPRECATED ***
  1320. *
  1321. * Deprecated:
  1322. * Use ATSFontFamilyGetEncoding instead.
  1323. *
  1324. * Discussion:
  1325. * This function returns the ScriptCode of the font of the Quickdraw
  1326. * grafPort or - if the smIntlForce flag is true - it returns the
  1327. * system ScriptCode. Both the Quickdraw grafPort and the ScriptCode
  1328. * type are deprecated. Instead, you can obtain the TextEncoding for
  1329. * an ATSFontFamilyRef using the function ATSFontFamilyGetEncoding.
  1330. * To get an ATSFontFamilyRef for a (deprecated) Quickdraw-style
  1331. * FMFontFamily ID, use the deprecated Quickdraw function
  1332. * FMGetATSFontFamilyRefFromFontFamily.
  1333. *
  1334. * Availability:
  1335. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1336. * CarbonLib: in CarbonLib 1.0 and later
  1337. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1338. }
  1339. function IntlScript: SInt16; external name '_IntlScript';
  1340. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1341. {
  1342. * FontToScript() *** DEPRECATED ***
  1343. *
  1344. * Deprecated:
  1345. * Use FMGetATSFontFamilyRefFromFontFamily +
  1346. * ATSFontFamilyGetEncoding instead.
  1347. *
  1348. * Discussion:
  1349. * This function returns the ScriptCode associated with a Quickdraw
  1350. * FMFontFamily ID. Both the FMFontFamily type and the ScriptCode
  1351. * type are deprecated. Instead, you can obtain the TextEncoding for
  1352. * an ATSFontFamilyRef using the function ATSFontFamilyGetEncoding.
  1353. * To get an ATSFontFamilyRef for a FMFontFamily ID, use the
  1354. * deprecated Quickdraw function FMGetATSFontFamilyRefFromFontFamily.
  1355. *
  1356. * Availability:
  1357. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1358. * CarbonLib: in CarbonLib 1.0 and later
  1359. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1360. }
  1361. function FontToScript( fontNumber: SInt16 ): SInt16; external name '_FontToScript';
  1362. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1363. {
  1364. * CharacterByteType() *** DEPRECATED ***
  1365. *
  1366. * Deprecated:
  1367. * use the combination of CFString, UCGetCharProperty and
  1368. * CFCharacterSet instead.
  1369. *
  1370. * Discussion:
  1371. * This function is no longer recommended. Please use the
  1372. * combination of CFString, UCGetCharProperty and CFCharacterSet
  1373. * instead.
  1374. *
  1375. * Availability:
  1376. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1377. * CarbonLib: in CarbonLib 1.0 and later
  1378. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1379. }
  1380. function CharacterByteType( textBuf: Ptr; textOffset: SInt16; script: ScriptCode ): SInt16; external name '_CharacterByteType';
  1381. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1382. {
  1383. * CharacterType() *** DEPRECATED ***
  1384. *
  1385. * Deprecated:
  1386. * use the combination of CFString, UCGetCharProperty and
  1387. * CFCharacterSet instead.
  1388. *
  1389. * Discussion:
  1390. * This function is no longer recommended. Please use the
  1391. * combination of CFString, UCGetCharProperty and CFCharacterSet
  1392. * instead.
  1393. *
  1394. * Availability:
  1395. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1396. * CarbonLib: in CarbonLib 1.0 and later
  1397. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1398. }
  1399. function CharacterType( textBuf: Ptr; textOffset: SInt16; script: ScriptCode ): SInt16; external name '_CharacterType';
  1400. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1401. {
  1402. * TransliterateText() *** DEPRECATED ***
  1403. *
  1404. * Deprecated:
  1405. * use CFStringTransform instead.
  1406. *
  1407. * Discussion:
  1408. * This function is no longer recommended. Please use
  1409. * CFStringTransform instead.
  1410. *
  1411. * Availability:
  1412. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1413. * CarbonLib: in CarbonLib 1.0 and later
  1414. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1415. }
  1416. function TransliterateText( srcHandle: Handle; dstHandle: Handle; target: SInt16; srcMask: SIGNEDLONG; script: ScriptCode ): OSErr; external name '_TransliterateText';
  1417. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1418. {
  1419. * FillParseTable() *** DEPRECATED ***
  1420. *
  1421. * Deprecated:
  1422. * use the combination of CFString, UCGetCharProperty and
  1423. * CFCharacterSet instead.
  1424. *
  1425. * Discussion:
  1426. * This function is no longer recommended. Please use the
  1427. * combination of CFString, UCGetCharProperty and CFCharacterSet
  1428. * instead.
  1429. *
  1430. * Availability:
  1431. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1432. * CarbonLib: in CarbonLib 1.0 and later
  1433. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1434. }
  1435. function FillParseTable( var table: CharByteTable; script: ScriptCode ): Boolean; external name '_FillParseTable';
  1436. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1437. {
  1438. * GetIntlResource() *** DEPRECATED ***
  1439. *
  1440. * Deprecated:
  1441. * Depending on the information that GetIntlResource was being
  1442. * called to obtain, it can be replaced by the use of
  1443. * CFLocaleCopyCurrent to get an appropriate CFLocaleRef followed by
  1444. * one of the following:
  1445. *
  1446. * - CFLocaleGetValue with keys such as kCFLocaleUsesMetricSystem,
  1447. * kCFLocaleDecimalSeparator, kCFLocaleCurrencySymbol.
  1448. *
  1449. * - CFDateFormatterCreate to get an appropriate CFDateFormatterRef,
  1450. * followed by CFDateFormatterCopyProperty with keys such as
  1451. * kCFDateFormatterMonthSymbols, kCFDateFormatterWeekdaySymbols,
  1452. * kCFDateFormatterAMSymbol.
  1453. *
  1454. * - CFNumberFormatterCreate to get an appropriate
  1455. * CFNumberFormatterRef, followed by CFNumberFormatterCopyProperty
  1456. * with keys such as kCFNumberFormatterCurrencyDecimalSeparator,
  1457. * kCFNumberFormatterMinusSign, kCFNumberFormatterPercentSymbol,
  1458. * kCFNumberFormatterNegativePrefix.
  1459. *
  1460. * Discussion:
  1461. * GetIntlResource was used to get a handle to the specified
  1462. * international resource type (e.g. 'itl0', 'itl1', 'itl2, 'itl4').
  1463. * Typically the resource handle was then used to obtain
  1464. * locale-specific information, or was passed to a function that
  1465. * performed - for example - string comparison. GetIntlResource is
  1466. * no longer recommended; please use the replacements described in
  1467. * the "deprecated" section.
  1468. *
  1469. * Availability:
  1470. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1471. * CarbonLib: in CarbonLib 1.0 and later
  1472. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1473. }
  1474. function GetIntlResource( theID: SInt16 ): Handle; external name '_GetIntlResource';
  1475. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1476. {
  1477. * ClearIntlResourceCache() *** DEPRECATED ***
  1478. *
  1479. * Deprecated:
  1480. * No longer needed on MacOS X.
  1481. *
  1482. * Discussion:
  1483. * This function is obsolete.
  1484. *
  1485. * Availability:
  1486. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1487. * CarbonLib: in CarbonLib 1.0 and later
  1488. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1489. }
  1490. procedure ClearIntlResourceCache; external name '_ClearIntlResourceCache';
  1491. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1492. {
  1493. * GetIntlResourceTable() *** DEPRECATED ***
  1494. *
  1495. * Deprecated:
  1496. * No longer needed on MacOS X.
  1497. *
  1498. * Discussion:
  1499. * This function is obsolete.
  1500. *
  1501. * Availability:
  1502. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1503. * CarbonLib: in CarbonLib 1.0 and later
  1504. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1505. }
  1506. procedure GetIntlResourceTable( script: ScriptCode; tableCode: SInt16; var itlHandle: Handle; var offset: SIGNEDLONG; var length: SIGNEDLONG ); external name '_GetIntlResourceTable';
  1507. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1508. {$endc} {not TARGET_CPU_64}
  1509. {
  1510. * GetScriptUtilityAddress()
  1511. *
  1512. * Availability:
  1513. * Mac OS X: not available
  1514. * CarbonLib: not available
  1515. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1516. }
  1517. {
  1518. * SetScriptUtilityAddress()
  1519. *
  1520. * Availability:
  1521. * Mac OS X: not available
  1522. * CarbonLib: not available
  1523. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1524. }
  1525. {
  1526. * GetScriptQDPatchAddress()
  1527. *
  1528. * Availability:
  1529. * Mac OS X: not available
  1530. * CarbonLib: not available
  1531. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1532. }
  1533. {
  1534. * SetScriptQDPatchAddress()
  1535. *
  1536. * Availability:
  1537. * Mac OS X: not available
  1538. * CarbonLib: not available
  1539. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1540. }
  1541. {
  1542. * SetIntlResource()
  1543. *
  1544. * Availability:
  1545. * Mac OS X: not available
  1546. * CarbonLib: not available
  1547. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1548. }
  1549. {
  1550. * CharByte()
  1551. *
  1552. * Availability:
  1553. * Mac OS X: not available
  1554. * CarbonLib: not available
  1555. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1556. }
  1557. {
  1558. * CharType()
  1559. *
  1560. * Availability:
  1561. * Mac OS X: not available
  1562. * CarbonLib: not available
  1563. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1564. }
  1565. {
  1566. * Transliterate()
  1567. *
  1568. * Availability:
  1569. * Mac OS X: not available
  1570. * CarbonLib: not available
  1571. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1572. }
  1573. {
  1574. * ParseTable()
  1575. *
  1576. * Availability:
  1577. * Mac OS X: not available
  1578. * CarbonLib: not available
  1579. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1580. }
  1581. {$ifc not TARGET_CPU_64}
  1582. {
  1583. * IntlTokenize() *** DEPRECATED ***
  1584. *
  1585. * Deprecated:
  1586. * No longer needed on MacOS X.
  1587. *
  1588. * Discussion:
  1589. * This function is obsolete.
  1590. *
  1591. * Availability:
  1592. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1593. * CarbonLib: in CarbonLib 1.0 and later
  1594. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1595. }
  1596. function IntlTokenize( tokenParam: TokenBlockPtr ): TokenResults; external name '_IntlTokenize';
  1597. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1598. {$endc} {not TARGET_CPU_64}
  1599. {$endc} {TARGET_OS_MAC}
  1600. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1601. end.
  1602. {$endc} {not MACOSALLINCLUDE}