home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-19  |  36.7 KB  |  911 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        Script.h
  3.  
  4.      Contains:    Script Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SCRIPT__
  21. #define __SCRIPT__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <QuickdrawText.h>                                    */
  34.  
  35. #ifndef __INTLRESOURCES__
  36. #include <IntlResources.h>
  37. #endif
  38.  
  39. #ifndef __EVENTS__
  40. #include <Events.h>
  41. #endif
  42. /*    #include <OSUtils.h>                                        */
  43. /*        #include <Memory.h>                                        */
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. #if PRAGMA_ALIGN_SUPPORTED
  50. #pragma options align=mac68k
  51. #endif
  52.  
  53. #if PRAGMA_IMPORT_SUPPORTED
  54. #pragma import on
  55. #endif
  56.  
  57.  
  58. enum {
  59. /* Script System constants */
  60.     smSystemScript                = -1,                            /*designates system script.*/
  61.     smCurrentScript                = -2,                            /*designates current font script.*/
  62.     smAllScripts                = -3,                            /*designates any script    */
  63.     smRoman                        = 0,                            /*Roman*/
  64.     smJapanese                    = 1,                            /*Japanese*/
  65.     smTradChinese                = 2,                            /*Traditional Chinese*/
  66.     smKorean                    = 3,                            /*Korean*/
  67.     smArabic                    = 4,                            /*Arabic*/
  68.     smHebrew                    = 5,                            /*Hebrew*/
  69.     smGreek                        = 6,                            /*Greek*/
  70.     smCyrillic                    = 7,                            /*Cyrillic*/
  71.     smRSymbol                    = 8,                            /*Right-left symbol*/
  72.     smDevanagari                = 9,                            /*Devanagari*/
  73.     smGurmukhi                    = 10,                            /*Gurmukhi*/
  74.     smGujarati                    = 11,                            /*Gujarati*/
  75.     smOriya                        = 12,                            /*Oriya*/
  76.     smBengali                    = 13,                            /*Bengali*/
  77.     smTamil                        = 14,                            /*Tamil*/
  78.     smTelugu                    = 15,                            /*Telugu*/
  79.     smKannada                    = 16,                            /*Kannada/Kanarese*/
  80.     smMalayalam                    = 17                            /*Malayalam*/
  81. };
  82.  
  83. enum {
  84.     smSinhalese                    = 18,                            /*Sinhalese*/
  85.     smBurmese                    = 19,                            /*Burmese*/
  86.     smKhmer                        = 20,                            /*Khmer/Cambodian*/
  87.     smThai                        = 21,                            /*Thai*/
  88.     smLaotian                    = 22,                            /*Laotian*/
  89.     smGeorgian                    = 23,                            /*Georgian*/
  90.     smArmenian                    = 24,                            /*Armenian*/
  91.     smSimpChinese                = 25,                            /*Simplified Chinese*/
  92.     smTibetan                    = 26,                            /*Tibetan*/
  93.     smMongolian                    = 27,                            /*Mongolian*/
  94.     smGeez                        = 28,                            /*Geez/Ethiopic*/
  95.     smEthiopic                    = 28,                            /*Synonym for smGeez*/
  96.     smEastEurRoman                = 29,                            /*Synonym for smSlavic*/
  97.     smVietnamese                = 30,                            /*Vietnamese*/
  98.     smExtArabic                    = 31,                            /*extended Arabic*/
  99.     smUninterp                    = 32,                            /*uninterpreted symbols, e.g. palette symbols*/
  100.     smKlingon                    = 32,                            /*Klingon*/
  101. /*Obsolete names for script systems (kept for backward compatibility)*/
  102.     smChinese                    = 2,                            /*(use smTradChinese or smSimpChinese)*/
  103.     smRussian                    = 7,                            /*(old name for smCyrillic)*/
  104. /* smMaldivian = 25;         (no more smMaldivian!)*/
  105.     smAmharic                    = 28,                            /*(old name for smGeez)*/
  106.     smSlavic                    = 29                            /*(old name for smEastEurRoman)*/
  107. };
  108.  
  109. enum {
  110.     smSindhi                    = 31,                            /*(old name for smExtArabic)*/
  111. /* Language Codes */
  112.     langEnglish                    = 0,                            /* smRoman script */
  113.     langFrench                    = 1,                            /* smRoman script */
  114.     langGerman                    = 2,                            /* smRoman script */
  115.     langItalian                    = 3,                            /* smRoman script */
  116.     langDutch                    = 4,                            /* smRoman script */
  117.     langSwedish                    = 5,                            /* smRoman script */
  118.     langSpanish                    = 6,                            /* smRoman script */
  119.     langDanish                    = 7,                            /* smRoman script */
  120.     langPortuguese                = 8,                            /* smRoman script */
  121.     langNorwegian                = 9,                            /* smRoman script */
  122.     langHebrew                    = 10,                            /* smHebrew script */
  123.     langJapanese                = 11,                            /* smJapanese script */
  124.     langArabic                    = 12,                            /* smArabic script */
  125.     langFinnish                    = 13,                            /* smRoman script */
  126.     langGreek                    = 14,                            /* smGreek script */
  127.     langIcelandic                = 15,                            /* extended Roman script */
  128.     langMaltese                    = 16,                            /* extended Roman script */
  129.     langTurkish                    = 17,                            /* extended Roman script */
  130.     langCroatian                = 18,                            /* Serbo-Croatian in extended Roman script */
  131.     langTradChinese                = 19                            /* Chinese in traditional characters */
  132. };
  133.  
  134. enum {
  135.     langUrdu                    = 20,                            /* smArabic script */
  136.     langHindi                    = 21,                            /* smDevanagari script */
  137.     langThai                    = 22,                            /* smThai script */
  138.     langKorean                    = 23,                            /* smKorean script */
  139.     langLithuanian                = 24,                            /* smEastEurRoman script */
  140.     langPolish                    = 25,                            /* smEastEurRoman script */
  141.     langHungarian                = 26,                            /* smEastEurRoman script */
  142.     langEstonian                = 27,                            /* smEastEurRoman script */
  143.     langLettish                    = 28,                            /* smEastEurRoman script */
  144.     langLatvian                    = 28,                            /* Synonym for langLettish */
  145.     langSaamisk                    = 29,                            /* ext. Roman script, lang. of the Sami/Lapp people of Scand. */
  146.     langLappish                    = 29,                            /* Synonym for langSaamisk */
  147.     langFaeroese                = 30,                            /* smRoman script */
  148.     langFarsi                    = 31,                            /* smArabic script */
  149.     langPersian                    = 31,                            /* Synonym for langFarsi */
  150.     langRussian                    = 32,                            /* smCyrillic script */
  151.     langSimpChinese                = 33,                            /* Chinese in simplified characters */
  152.     langFlemish                    = 34,                            /* smRoman script */
  153.     langIrish                    = 35,                            /* smRoman script */
  154.     langAlbanian                = 36                            /* smRoman script */
  155. };
  156.  
  157. enum {
  158.     langRomanian                = 37,                            /* smEastEurRoman script */
  159.     langCzech                    = 38,                            /* smEastEurRoman script */
  160.     langSlovak                    = 39,                            /* smEastEurRoman script */
  161.     langSlovenian                = 40,                            /* smEastEurRoman script */
  162.     langYiddish                    = 41,                            /* smHebrew script */
  163.     langSerbian                    = 42,                            /* Serbo-Croatian in smCyrillic script */
  164.     langMacedonian                = 43,                            /* smCyrillic script */
  165.     langBulgarian                = 44,                            /* smCyrillic script */
  166.     langUkrainian                = 45,                            /* smCyrillic script */
  167.     langByelorussian            = 46,                            /* smCyrillic script */
  168.     langUzbek                    = 47,                            /* smCyrillic script */
  169.     langKazakh                    = 48,                            /* smCyrillic script */
  170.     langAzerbaijani                = 49,                            /* Azerbaijani in smCyrillic script (USSR) */
  171.     langAzerbaijanAr            = 50,                            /* Azerbaijani in smArabic script (Iran) */
  172.     langArmenian                = 51,                            /* smArmenian script */
  173.     langGeorgian                = 52,                            /* smGeorgian script */
  174.     langMoldavian                = 53,                            /* smCyrillic script */
  175.     langKirghiz                    = 54,                            /* smCyrillic script */
  176.     langTajiki                    = 55,                            /* smCyrillic script */
  177.     langTurkmen                    = 56                            /* smCyrillic script */
  178. };
  179.  
  180. enum {
  181.     langMongolian                = 57,                            /* Mongolian in smMongolian script */
  182.     langMongolianCyr            = 58,                            /* Mongolian in smCyrillic script */
  183.     langPashto                    = 59,                            /* smArabic script */
  184.     langKurdish                    = 60,                            /* smArabic script */
  185.     langKashmiri                = 61,                            /* smArabic script */
  186.     langSindhi                    = 62,                            /* smExtArabic script */
  187.     langTibetan                    = 63,                            /* smTibetan script */
  188.     langNepali                    = 64,                            /* smDevanagari script */
  189.     langSanskrit                = 65,                            /* smDevanagari script */
  190.     langMarathi                    = 66,                            /* smDevanagari script */
  191.     langBengali                    = 67,                            /* smBengali script */
  192.     langAssamese                = 68,                            /* smBengali script */
  193.     langGujarati                = 69,                            /* smGujarati script */
  194.     langPunjabi                    = 70,                            /* smGurmukhi script */
  195.     langOriya                    = 71,                            /* smOriya script */
  196.     langMalayalam                = 72,                            /* smMalayalam script */
  197.     langKannada                    = 73,                            /* smKannada script */
  198.     langTamil                    = 74,                            /* smTamil script */
  199.     langTelugu                    = 75,                            /* smTelugu script */
  200.     langSinhalese                = 76                            /* smSinhalese script */
  201. };
  202.  
  203. enum {
  204.     langBurmese                    = 77,                            /* smBurmese script */
  205.     langKhmer                    = 78,                            /* smKhmer script */
  206.     langLao                        = 79,                            /* smLaotian script */
  207.     langVietnamese                = 80,                            /* smVietnamese script */
  208.     langIndonesian                = 81,                            /* smRoman script */
  209.     langTagalog                    = 82,                            /* smRoman script */
  210.     langMalayRoman                = 83,                            /* Malay in smRoman script */
  211.     langMalayArabic                = 84,                            /* Malay in smArabic script */
  212.     langAmharic                    = 85,                            /* smEthiopic script */
  213.     langTigrinya                = 86,                            /* smEthiopic script */
  214.     langGalla                    = 87,                            /* smEthiopic script */
  215.     langOromo                    = 87,                            /* Synonym for langGalla */
  216.     langSomali                    = 88,                            /* smRoman script */
  217.     langSwahili                    = 89,                            /* smRoman script */
  218.     langRuanda                    = 90,                            /* smRoman script */
  219.     langRundi                    = 91,                            /* smRoman script */
  220.     langChewa                    = 92,                            /* smRoman script */
  221.     langMalagasy                = 93,                            /* smRoman script */
  222.     langEsperanto                = 94,                            /* extended Roman script */
  223.     langWelsh                    = 128                            /* smRoman script */
  224. };
  225.  
  226. enum {
  227.     langBasque                    = 129,                            /* smRoman script */
  228.     langCatalan                    = 130,                            /* smRoman script */
  229.     langLatin                    = 131,                            /* smRoman script */
  230.     langQuechua                    = 132,                            /* smRoman script */
  231.     langGuarani                    = 133,                            /* smRoman script */
  232.     langAymara                    = 134,                            /* smRoman script */
  233.     langTatar                    = 135,                            /* smCyrillic script */
  234.     langUighur                    = 136,                            /* smArabic script */
  235.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script */
  236.     langJavaneseRom                = 138,                            /* Javanese in smRoman script */
  237.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script */
  238. /* Obsolete names, kept for backward compatibility */
  239.     langPortugese                = 8,                            /* old misspelled version, kept for compatibility */
  240.     langMalta                    = 16,                            /* old misspelled version, kept for compatibility */
  241.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.) */
  242.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese) */
  243.     langLapponian                = 29                            /* Synonym for langSaamisk, not correct name */
  244. };
  245.  
  246. enum {
  247. /* Regional version codes */
  248.     verUS                        = 0,
  249.     verFrance                    = 1,
  250.     verBritain                    = 2,
  251.     verGermany                    = 3,
  252.     verItaly                    = 4,
  253.     verNetherlands                = 5,
  254.     verFrBelgiumLux                = 6,                            /* French for Belgium & Luxembourg */
  255.     verSweden                    = 7,
  256.     verSpain                    = 8,
  257.     verDenmark                    = 9,
  258.     verPortugal                    = 10,
  259.     verFrCanada                    = 11,
  260.     verNorway                    = 12
  261. };
  262.  
  263. enum {
  264.     verIsrael                    = 13,
  265.     verJapan                    = 14,
  266.     verAustralia                = 15,
  267.     verArabic                    = 16,                            /* synonym for verArabia */
  268.     verFinland                    = 17,
  269.     verFrSwiss                    = 18,                            /* French Swiss */
  270.     verGrSwiss                    = 19,                            /* German Swiss */
  271.     verGreece                    = 20,
  272.     verIceland                    = 21,
  273.     verMalta                    = 22,
  274.     verCyprus                    = 23,
  275.     verTurkey                    = 24,
  276.     verYugoCroatian                = 25,                            /* Croatian system for Yugoslavia */
  277.     verNetherlandsComma            = 26,
  278.     verBelgiumLuxPoint            = 27,
  279.     verCanadaComma                = 28,
  280.     verCanadaPoint                = 29,
  281.     vervariantPortugal            = 30,
  282.     vervariantNorway            = 31,
  283.     vervariantDenmark            = 32,
  284.     verIndiaHindi                = 33,                            /* Hindi system for India */
  285.     verPakistan                    = 34,
  286.     verTurkishModified            = 35,
  287.     verGreekAncient                = 40,
  288.     verLithuania                = 41,
  289.     verPoland                    = 42,
  290.     verHungary                    = 43,
  291.     verEstonia                    = 44,
  292.     verLatvia                    = 45
  293. };
  294.  
  295. enum {
  296.     verLapland                    = 46,
  297.     verFaeroeIsl                = 47,
  298.     verIran                        = 48,
  299.     verRussia                    = 49,
  300.     verIreland                    = 50,                            /* English-language version for Ireland */
  301.     verKorea                    = 51,
  302.     verChina                    = 52,
  303.     verTaiwan                    = 53,
  304.     verThailand                    = 54,
  305.     verCzech                    = 56,
  306.     verSlovak                    = 57,
  307.     verGenericFE                = 58,
  308.     verMagyar                    = 59,
  309.     verBengali                    = 60,
  310.     verByeloRussian                = 61,
  311.     verUkrania                    = 62,
  312.     verItalianSwiss                = 63,
  313.     verAlternateGr                = 64
  314. };
  315.  
  316. enum {
  317.     minCountry                    = verUS,
  318.     maxCountry                    = verAlternateGr                /* changed from verThailand when additional enums added */
  319. };
  320.  
  321. /* Obsolete region code names, kept for backward compatibility */
  322. enum {
  323.     verBelgiumLux                = 6,                            /* (use verFrBelgiumLux instead, less ambiguous) */
  324.     verArabia                    = 16,
  325.     verYugoslavia                = 25,                            /* (use verYugoCroatian instead, less ambiguous) */
  326.     verIndia                    = 33,                            /* (use verIndiaHindi instead, less ambiguous) */
  327. /* Calendar Codes */
  328.     calGregorian                = 0,
  329.     calArabicCivil                = 1,
  330.     calArabicLunar                = 2,
  331.     calJapanese                    = 3,
  332.     calJewish                    = 4,
  333.     calCoptic                    = 5,
  334.     calPersian                    = 6,
  335. /* Integer Format Codes */
  336.     intWestern                    = 0,
  337.     intArabic                    = 1,
  338.     intRoman                    = 2,
  339.     intJapanese                    = 3,
  340.     intEuropean                    = 4,
  341.     intOutputMask                = 0x8000,
  342. /* CharByte byte types */
  343.     smSingleByte                = 0,
  344.     smFirstByte                    = -1,
  345.     smLastByte                    = 1,
  346.     smMiddleByte                = 2,
  347. /* CharType field masks */
  348.     smcTypeMask                    = 0x000F,
  349.     smcReserved                    = 0x00F0
  350. };
  351.  
  352. enum {
  353.     smcClassMask                = 0x0F00,
  354.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  355.     smcRightMask                = 0x2000,
  356.     smcUpperMask                = 0x4000,
  357.     smcDoubleMask                = 0x8000,
  358. /* Basic CharType character types */
  359.     smCharPunct                    = 0x0000,
  360.     smCharAscii                    = 0x0001,
  361.     smCharEuro                    = 0x0007,
  362.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  363. /* Additional CharType character types for script systems */
  364.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  365.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  366.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  367.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  368.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  369.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  370.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  371.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  372.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  373.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  374.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  375. /* old names for some of above, for backward compatibility */
  376.     smCharFISKana                = 0x0002,                        /*Katakana*/
  377.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  378.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  379. };
  380.  
  381. enum {
  382.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  383.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  384. /* CharType classes for punctuation (smCharPunct) */
  385.     smPunctNormal                = 0x0000,
  386.     smPunctNumber                = 0x0100,
  387.     smPunctSymbol                = 0x0200,
  388.     smPunctBlank                = 0x0300,
  389. /* Additional CharType classes for punctuation in two-byte systems */
  390.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  391.     smPunctGraphic                = 0x0500,                        /* line graphics */
  392. /* CharType Katakana and Hiragana classes for two-byte systems */
  393.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  394.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  395.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  396. /* CharType Ideographic classes for two-byte systems */
  397.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  398.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  399.     smIdeographicUser            = 0x0200,                        /*user char*/
  400. /* old names for above, for backward compatibility */
  401.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  402.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  403.     smFISClassUser                = 0x0200,                        /*user char*/
  404. /* CharType Jamo classes for Korean systems */
  405.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  406.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  407.     smJamoMoeum                    = 0x0200                        /*simple vowel char*/
  408. };
  409.  
  410. enum {
  411.     smJamoBogMoeum                = 0x0300,                        /*complex vowel char*/
  412. /* CharType glyph orientation for two-byte systems */
  413.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  414.     smCharVertical                = 0x1000,                        /* vertical character form */
  415. /* CharType directions */
  416.     smCharLeft                    = 0x0000,
  417.     smCharRight                    = 0x2000,
  418. /* CharType case modifers */
  419.     smCharLower                    = 0x0000,
  420.     smCharUpper                    = 0x4000,
  421. /* CharType character size modifiers (1 or multiple bytes). */
  422.     smChar1byte                    = 0x0000,
  423.     smChar2byte                    = 0x8000,
  424. /* TransliterateText target types for Roman */
  425.     smTransAscii                = 0,                            /*convert to ASCII*/
  426.     smTransNative                = 1,                            /*convert to font script*/
  427.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  428.     smTransSystem                = 0xFF,                            /*convert to system script*/
  429. /* TransliterateText target types for two-byte scripts */
  430.     smTransAscii1                = 2,                            /*1-byte Roman*/
  431.     smTransAscii2                = 3,                            /*2-byte Roman*/
  432.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  433.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  434. };
  435.  
  436. enum {
  437.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  438.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  439.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  440.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  441. /* TransliterateText target modifiers */
  442.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  443.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  444. /* TransliterateText resource format numbers */
  445.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  446.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  447. /* TransliterateText property flags */
  448.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  449.     smTransPreLowerCasing        = 2,                            /*Convert all text to lower case before transliteration*/
  450. /* TransliterateText source mask - general */
  451.     smMaskAll                    = 0xFFFFFFFFL,                    /*Convert all text*/
  452. /* TransliterateText source masks */
  453.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  454.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  455. /* TransliterateText source masks for two-byte scripts */
  456.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  457.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  458.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  459.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  460.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  461.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  462.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  463.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  464. };
  465.  
  466. enum {
  467. /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  468.     smNotInstalled                = 0,                            /*routine not available in script*/
  469.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  470.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  471. };
  472.  
  473. enum {
  474. /* Values for script redraw flag. */
  475.     smRedrawChar                = 0,                            /*Redraw character only*/
  476.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  477.     smRedrawLine                = -1,                            /*Redraw entire line (bidirectional systems)*/
  478. /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  479.     smVersion                    = 0,                            /*Script Manager version number*/
  480.     smMunged                    = 2,                            /*Globals change count*/
  481.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  482.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  483.     smFontForce                    = 8,                            /*Force font flag*/
  484.     smIntlForce                    = 10,                            /*Force intl flag*/
  485.     smForced                    = 12,                            /*Script was forced to system script*/
  486.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  487.     smPrint                        = 16,                            /*Printer action routine*/
  488.     smSysScript                    = 18,                            /*System script*/
  489.     smLastScript                = 20,                            /*Last keyboard script*/
  490.     smKeyScript                    = 22,                            /*Keyboard script*/
  491.     smSysRef                    = 24,                            /*System folder refNum*/
  492.     smKeyCache                    = 26,                            /*obsolete*/
  493.     smKeySwap                    = 28,                            /*Swapping table handle*/
  494.     smGenFlags                    = 30,                            /*General flags long*/
  495.     smOverride                    = 32                            /*Script override flags*/
  496. };
  497.  
  498. enum {
  499.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  500. /* New for System 7.0: */
  501.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  502.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  503.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  504.     smKeyDisableState            = 42,                            /*Returns current keyboard disable state*/
  505. /* GetScriptVariable and SetScriptVariable verbs.
  506. Note: Verbs private to script systems are negative, while
  507. those general across script systems are non-negative. */
  508.     smScriptVersion                = 0,                            /*Script software version*/
  509.     smScriptMunged                = 2,                            /*Script entry changed count*/
  510.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  511.     smScriptRight                = 6,                            /*Right to left flag*/
  512.     smScriptJust                = 8,                            /*Justification flag*/
  513.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  514.     smScriptSysFond                = 12,                            /*Preferred system font*/
  515.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  516.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  517.     smScriptNumber                = 16,                            /*Script itl0 id*/
  518.     smScriptDate                = 18,                            /*Script itl1 id*/
  519.     smScriptSort                = 20,                            /*Script itl2 id*/
  520.     smScriptFlags                = 22,                            /*flags word*/
  521.     smScriptToken                = 24,                            /*Script itl4 id*/
  522.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  523.     smScriptLang                = 28                            /*Current language for script*/
  524. };
  525.  
  526. enum {
  527.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  528.     smScriptKeys                = 32,                            /*Script KCHR id*/
  529.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  530.     smScriptPrint                = 36,                            /*Script printer action routine*/
  531.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  532.     smScriptCreator                = 40,                            /*Script file creator*/
  533.     smScriptFile                = 42,                            /*Script file name*/
  534.     smScriptName                = 44,                            /*Script name*/
  535. /* There is a hole here for old Kanji private verbs 46-76 
  536.  
  537.  New for System 7.0: */
  538.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  539.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  540.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  541.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  542.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  543.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  544.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  545.     smScriptAliasStyle            = 92,                            /*style (set) to use for aliases*/
  546. /* Special script code values for International Utilities */
  547.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  548.     iuCurrentScript                = -2,                            /* <obsolete>  current script (for font of grafPort) */
  549. /* Negative verbs for KeyScript */
  550.     smKeyNextScript                = -1,                            /* Switch to next available script */
  551.     smKeySysScript                = -2,                            /* Switch to the system script */
  552.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  553. /* New for System 7.0: */
  554.     smKeyNextKybd                = -4                            /* Switch to next keyboard in current keyscript */
  555. };
  556.  
  557. enum {
  558.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  559.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  560.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  561.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  562.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  563.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  564.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  565.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  566.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  567.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  568.     smKeyRoman                    = -17,                            /* Set keyscript to Roman. Does nothing if Roman-only
  569.                                         system, unlike KeyScript(smRoman) which forces
  570.                                         an update to current default Roman keyboard */
  571. /* Bits in the smScriptFlags word
  572. (bits above 8 are non-static) */
  573.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  574.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  575.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  576.     smsfContext                    = 3,                            /*Script is contextual*/
  577.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  578.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  579.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  580.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  581.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  582.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  583.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  584.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  585. /* Bits in the smGenFlags long.
  586. First (high-order) byte is set from itlc flags byte. */
  587.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  588.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  589.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  590.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  591. };
  592.  
  593. enum {
  594. /* Roman script constants 
  595.  The following are here for backward compatibility, but should not be used. 
  596.  This information should be obtained using GetScript. */
  597.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  598.     romanAppFond                = 3,                            /*application font id number*/
  599.     romanFlags                    = 0x0007,                        /*roman settings*/
  600. /* Script Manager font equates. */
  601.     smFondStart                    = 0x4000,                        /*start from 16K*/
  602.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  603. /* Miscellaneous font equates. */
  604.     smUprHalfCharSet            = 0x80,                            /*first char code in top half of std char set*/
  605. /* Character Set Extensions */
  606.     diaeresisUprY                = 0xD9,
  607.     fraction                    = 0xDA,
  608.     intlCurrency                = 0xDB,
  609.     leftSingGuillemet            = 0xDC,
  610.     rightSingGuillemet            = 0xDD,
  611.     fiLigature                    = 0xDE,
  612.     flLigature                    = 0xDF,
  613.     dblDagger                    = 0xE0,
  614.     centeredDot                    = 0xE1,
  615.     baseSingQuote                = 0xE2,
  616.     baseDblQuote                = 0xE3,
  617.     perThousand                    = 0xE4,
  618.     circumflexUprA                = 0xE5
  619. };
  620.  
  621. enum {
  622.     circumflexUprE                = 0xE6,
  623.     acuteUprA                    = 0xE7,
  624.     diaeresisUprE                = 0xE8,
  625.     graveUprE                    = 0xE9,
  626.     acuteUprI                    = 0xEA,
  627.     circumflexUprI                = 0xEB,
  628.     diaeresisUprI                = 0xEC,
  629.     graveUprI                    = 0xED,
  630.     acuteUprO                    = 0xEE,
  631.     circumflexUprO                = 0xEF,
  632.     appleLogo                    = 0xF0,
  633.     graveUprO                    = 0xF1,
  634.     acuteUprU                    = 0xF2,
  635.     circumflexUprU                = 0xF3,
  636.     graveUprU                    = 0xF4,
  637.     dotlessLwrI                    = 0xF5,
  638.     circumflex                    = 0xF6,
  639.     tilde                        = 0xF7,
  640.     macron                        = 0xF8,
  641.     breveMark                    = 0xF9
  642. };
  643.  
  644. enum {
  645.     overDot                        = 0xFA,
  646.     ringMark                    = 0xFB,
  647.     cedilla                        = 0xFC,
  648.     doubleAcute                    = 0xFD,
  649.     ogonek                        = 0xFE,
  650.     hachek                        = 0xFF,
  651. /* TokenType values */
  652.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  653.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  654. };
  655.  
  656. enum {
  657.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  658.     tokenWhite                    = 1,                            /*white space*/
  659.     tokenLeftLit                = 2,                            /*literal begin*/
  660.     tokenRightLit                = 3,                            /*literal end*/
  661.     tokenAlpha                    = 4,                            /*alphabetic*/
  662.     tokenNumeric                = 5,                            /*numeric*/
  663.     tokenNewLine                = 6,                            /*new line*/
  664.     tokenLeftComment            = 7,                            /*open comment*/
  665.     tokenRightComment            = 8,                            /*close comment*/
  666.     tokenLiteral                = 9,                            /*literal*/
  667.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  668.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  669.     tokenRealNum                = 12,                            /*real number*/
  670.     tokenAltReal                = 13,                            /*alternate real number*/
  671.     tokenReserve1                = 14,                            /*reserved*/
  672.     tokenReserve2                = 15,                            /*reserved*/
  673.     tokenLeftParen                = 16,                            /*open parenthesis*/
  674.     tokenRightParen                = 17,                            /*close parenthesis*/
  675.     tokenLeftBracket            = 18,                            /*open square bracket*/
  676.     tokenRightBracket            = 19                            /*close square bracket*/
  677. };
  678.  
  679. enum {
  680.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  681.     tokenRightCurly                = 21,                            /*close curly bracket*/
  682.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  683.     tokenRightEnclose            = 23,                            /*close guillemet*/
  684.     tokenPlus                    = 24,
  685.     tokenMinus                    = 25,
  686.     tokenAsterisk                = 26,                            /*times/multiply*/
  687.     tokenDivide                    = 27,
  688.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  689.     tokenSlash                    = 29,
  690.     tokenBackSlash                = 30,
  691.     tokenLess                    = 31,                            /*less than symbol*/
  692.     tokenGreat                    = 32,                            /*greater than symbol*/
  693.     tokenEqual                    = 33,
  694.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  695.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  696.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  697.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  698.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  699.     tokenColonEqual                = 39                            /*colon equal*/
  700. };
  701.  
  702. enum {
  703.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  704.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  705.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  706.     tokenExclam                    = 43,                            /*exclamation point*/
  707.     tokenTilde                    = 44,                            /*centered tilde*/
  708.     tokenComma                    = 45,
  709.     tokenPeriod                    = 46,
  710.     tokenLeft2Quote                = 47,                            /*open double quote*/
  711.     tokenRight2Quote            = 48,                            /*close double quote*/
  712.     tokenLeft1Quote                = 49,                            /*open single quote*/
  713.     tokenRight1Quote            = 50,                            /*close single quote*/
  714.     token2Quote                    = 51,                            /*double quote*/
  715.     token1Quote                    = 52,                            /*single quote*/
  716.     tokenSemicolon                = 53,
  717.     tokenPercent                = 54,
  718.     tokenCaret                    = 55,
  719.     tokenUnderline                = 56,
  720.     tokenAmpersand                = 57,
  721.     tokenAtSign                    = 58,
  722.     tokenBar                    = 59                            /*vertical bar*/
  723. };
  724.  
  725. enum {
  726.     tokenQuestion                = 60,
  727.     tokenPi                        = 61,                            /*lower-case pi*/
  728.     tokenRoot                    = 62,                            /*square root symbol*/
  729.     tokenSigma                    = 63,                            /*capital sigma*/
  730.     tokenIntegral                = 64,                            /*integral sign*/
  731.     tokenMicro                    = 65,
  732.     tokenCapPi                    = 66,                            /*capital pi*/
  733.     tokenInfinity                = 67,
  734.     tokenColon                    = 68,
  735.     tokenHash                    = 69,                            /*e.g. #*/
  736.     tokenDollar                    = 70,
  737.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  738.     tokenFraction                = 72,
  739.     tokenIntlCurrency            = 73,
  740.     tokenLeftSingGuillemet        = 74,
  741.     tokenRightSingGuillemet        = 75,
  742.     tokenPerThousand            = 76,
  743.     tokenEllipsis                = 77,
  744.     tokenCenterDot                = 78,
  745.     tokenNil                    = 127
  746. };
  747.  
  748. enum {
  749.     delimPad                    = -2,
  750. /* obsolete, misspelled token names kept for backward compatibility */
  751.     tokenTilda                    = 44,
  752.     tokenCarat                    = 55
  753. };
  754.  
  755. enum {
  756. /* Table selectors for GetItlTable */
  757.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  758.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  759.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  760.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  761.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  762.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  763.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  764.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  765.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  766.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  767. };
  768.  
  769. /* end of stuff moved from Packages.h */
  770. enum {
  771.     tokenOK,                                                    /* TokenResults */
  772.     tokenOverflow,                                                /* TokenResults */
  773.     stringOverflow,                                                /* TokenResults */
  774.     badDelim,                                                    /* TokenResults */
  775.     badEnding,                                                    /* TokenResults */
  776.     crash                                                        /* TokenResults */
  777. };
  778.  
  779. typedef SInt8 TokenResults;
  780.  
  781. typedef char CharByteTable[256];
  782.  
  783. typedef short TokenType;
  784.  
  785. typedef TokenType DelimType[2];
  786.  
  787. typedef TokenType CommentType[4];
  788.  
  789. struct TokenRec {
  790.     TokenType                        theToken;
  791.     Ptr                                position;                    /*pointer into original source*/
  792.     long                            length;                        /*length of text in original source*/
  793.     StringPtr                        stringPosition;                /*Pascal/C string copy of identifier*/
  794. };
  795. typedef struct TokenRec TokenRec;
  796.  
  797. typedef TokenRec *TokenRecPtr;
  798.  
  799. struct TokenBlock {
  800.     Ptr                                source;                        /*pointer to stream of characters*/
  801.     long                            sourceLength;                /*length of source stream*/
  802.     Ptr                                tokenList;                    /*pointer to array of tokens*/
  803.     long                            tokenLength;                /*maximum length of TokenList*/
  804.     long                            tokenCount;                    /*number tokens generated by tokenizer*/
  805.     Ptr                                stringList;                    /*pointer to stream of identifiers*/
  806.     long                            stringLength;                /*length of string list*/
  807.     long                            stringCount;                /*number of bytes currently used*/
  808.     Boolean                            doString;                    /*make strings & put into StringList*/
  809.     Boolean                            doAppend;                    /*append to TokenList rather than replace*/
  810.     Boolean                            doAlphanumeric;                /*identifiers may include numeric*/
  811.     Boolean                            doNest;                        /*do comments nest?*/
  812.     TokenType                        leftDelims[2];
  813.     TokenType                        rightDelims[2];
  814.     TokenType                        leftComment[4];
  815.     TokenType                        rightComment[4];
  816.     TokenType                        escapeCode;                    /*escape symbol code*/
  817.     TokenType                        decimalCode;
  818.     Handle                            itlResource;                /*handle to itl4 resource of current script*/
  819.     long                            reserved[8];                /*must be zero!*/
  820. };
  821. typedef struct TokenBlock TokenBlock;
  822.  
  823. typedef TokenBlock *TokenBlockPtr;
  824.  
  825. extern pascal short GetSysDirection( void )
  826.     TWOWORDINLINE( 0x3EB8, 0x0BAC ); /* MOVE.w $0BAC,(SP) */
  827. extern pascal void SetSysDirection( short value )
  828.     TWOWORDINLINE( 0x31DF, 0x0BAC ); /* MOVE.w (SP)+,$0BAC */
  829. extern pascal short FontScript(void)
  830.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  831. extern pascal short IntlScript(void)
  832.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  833. extern pascal void KeyScript(short code)
  834.  FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  835. extern pascal short CharByte(Ptr textBuf, short textOffset)
  836.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  837. extern pascal short CharType(Ptr textBuf, short textOffset)
  838.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  839. extern pascal Boolean IsCmdChar(const EventRecord *event, short test)
  840.  FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  841. extern pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
  842.  FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  843. extern pascal Boolean ParseTable(CharByteTable table)
  844.  FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  845. extern pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  846.  FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  847. extern pascal short FontToScript(short fontNumber)
  848.  FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  849. extern pascal long GetScriptManagerVariable(short selector)
  850.  FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  851. extern pascal OSErr SetScriptManagerVariable(short selector, long param)
  852.  FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  853. extern pascal long GetScriptVariable(short script, short selector)
  854.  FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  855. extern pascal OSErr SetScriptVariable(short script, short selector, long param)
  856.  FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  857. /*  New for 7.1  */
  858. extern pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
  859.  FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  860. extern pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
  861.  FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  862. extern pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
  863.  FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  864. extern pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
  865.  FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  866. extern pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
  867.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  868. extern pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
  869.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  870. extern pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
  871.  FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  872. extern pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
  873.  FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  874. /* Moved from Packages.h */
  875. extern pascal Handle GetIntlResource(short theID)
  876.  THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  877. extern pascal void SetIntlResource(short refNum, short theID, Handle intlHandle)
  878.  THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  879. extern pascal void ClearIntlResourceCache(void)
  880.  THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  881. extern pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Handle *itlHandle, long *offset, long *length)
  882.  THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  883. #if OLDROUTINENAMES
  884. #define SetSysJust(newJust) SetSysDirection(newJust)
  885. #define GetSysJust() GetSysDirection()
  886. #define Font2Script(fontNumber) FontToScript(fontNumber)
  887. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  888. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  889. #define GetScript(script, selector) GetScriptVariable(script, selector)
  890. #define SetScript(script, selector, param) SetScriptVariable(script, selector, param)
  891. #define IUGetIntl(theID) GetIntlResource(theID)
  892. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  893. #define IUClearCache() ClearIntlResourceCache()
  894. #define IUGetItlTable(script, tableCode, itlHandle, offset, length)  \
  895.     GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  896. #endif
  897.  
  898. #if PRAGMA_IMPORT_SUPPORTED
  899. #pragma import off
  900. #endif
  901.  
  902. #if PRAGMA_ALIGN_SUPPORTED
  903. #pragma options align=reset
  904. #endif
  905.  
  906. #ifdef __cplusplus
  907. }
  908. #endif
  909.  
  910. #endif /* __SCRIPT__ */
  911.