home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  36.7 KB  |  910 lines  |  [TEXT/MPS ]

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