Script.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:77k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Script.h
  3.  
  4.      Contains:   Script Manager interfaces
  5.  
  6.      Version:    Technology: Mac OS 8
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1986-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __SCRIPT__
  18. #define __SCRIPT__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __QUICKDRAW__
  23. #include "Quickdraw.h"
  24. #endif
  25. #ifndef __INTLRESOURCES__
  26. #include "IntlResources.h"
  27. #endif
  28. #ifndef __EVENTS__
  29. #include "Events.h"
  30. #endif
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47. /* Meta script codes:*/
  48. enum {
  49.     smSystemScript              = -1,                           /* designates system script.*/
  50.     smCurrentScript             = -2,                           /* designates current font script.*/
  51.     smAllScripts                = -3                            /* designates any script*/
  52. };
  53. /*
  54.    Script codes:
  55.    These specify a Mac OS encoding that is related to a FOND ID range.
  56.    Some of the encodings have several variants (e.g. for different localized systems)
  57.     which all share the same script code.
  58.    Not all of these script codes are currently supported by Apple software.
  59.    Notes:
  60.    - Script code 0 (smRoman) is also used (instead of smGreek) for the Greek encoding
  61.      in the Greek localized system.
  62.    - Script code 28 (smEthiopic) is also used for the Inuit encoding in the Inuktitut
  63.      system.
  64. */
  65. enum {
  66.     smRoman                     = 0,
  67.     smJapanese                  = 1,
  68.     smTradChinese               = 2,                            /* Traditional Chinese*/
  69.     smKorean                    = 3,
  70.     smArabic                    = 4,
  71.     smHebrew                    = 5,
  72.     smGreek                     = 6,
  73.     smCyrillic                  = 7,
  74.     smRSymbol                   = 8,                            /* Right-left symbol*/
  75.     smDevanagari                = 9,
  76.     smGurmukhi                  = 10,
  77.     smGujarati                  = 11,
  78.     smOriya                     = 12,
  79.     smBengali                   = 13,
  80.     smTamil                     = 14,
  81.     smTelugu                    = 15,
  82.     smKannada                   = 16,                           /* Kannada/Kanarese*/
  83.     smMalayalam                 = 17,
  84.     smSinhalese                 = 18,
  85.     smBurmese                   = 19,
  86.     smKhmer                     = 20,                           /* Khmer/Cambodian*/
  87.     smThai                      = 21,
  88.     smLao                       = 22,
  89.     smGeorgian                  = 23,
  90.     smArmenian                  = 24,
  91.     smSimpChinese               = 25,                           /* Simplified Chinese*/
  92.     smTibetan                   = 26,
  93.     smMongolian                 = 27,
  94.     smEthiopic                  = 28,
  95.     smGeez                      = 28,                           /* Synonym for smEthiopic*/
  96.     smCentralEuroRoman          = 29,                           /* For Czech, Slovak, Polish, Hungarian, Baltic langs*/
  97.     smVietnamese                = 30,
  98.     smExtArabic                 = 31,                           /* extended Arabic*/
  99.     smUninterp                  = 32                            /* uninterpreted symbols, e.g. palette symbols*/
  100. };
  101. /* Extended script code for full Unicode input*/
  102. enum {
  103.     smUnicodeScript             = 0x7E
  104. };
  105. /* Obsolete script code names (kept for backward compatibility):*/
  106. enum {
  107.     smChinese                   = 2,                            /* (Use smTradChinese or smSimpChinese)*/
  108.     smRussian                   = 7,                            /* Use smCyrillic*/
  109.                                                                 /* smMaldivian = 25: deleted, no code for Maldivian*/
  110.     smLaotian                   = 22,                           /* Use smLao                                     */
  111.     smAmharic                   = 28,                           /* Use smEthiopic or smGeez*/
  112.     smSlavic                    = 29,                           /* Use smCentralEuroRoman*/
  113.     smEastEurRoman              = 29,                           /* Use smCentralEuroRoman*/
  114.     smSindhi                    = 31,                           /* Use smExtArabic*/
  115.     smKlingon                   = 32
  116. };
  117. /*
  118.    Language codes:
  119.    These specify a language implemented using a particular Mac OS encoding.
  120.    Not all of these language codes are currently supported by Apple software.
  121. */
  122. enum {
  123.     langEnglish                 = 0,                            /* smRoman script*/
  124.     langFrench                  = 1,                            /* smRoman script*/
  125.     langGerman                  = 2,                            /* smRoman script*/
  126.     langItalian                 = 3,                            /* smRoman script*/
  127.     langDutch                   = 4,                            /* smRoman script*/
  128.     langSwedish                 = 5,                            /* smRoman script*/
  129.     langSpanish                 = 6,                            /* smRoman script*/
  130.     langDanish                  = 7,                            /* smRoman script*/
  131.     langPortuguese              = 8,                            /* smRoman script*/
  132.     langNorwegian               = 9,                            /* smRoman script*/
  133.     langHebrew                  = 10,                           /* smHebrew script*/
  134.     langJapanese                = 11,                           /* smJapanese script*/
  135.     langArabic                  = 12,                           /* smArabic script*/
  136.     langFinnish                 = 13,                           /* smRoman script*/
  137.     langGreek                   = 14,                           /* Greek script using smRoman script code*/
  138.     langIcelandic               = 15,                           /* modified smRoman/Icelandic script*/
  139.     langMaltese                 = 16,                           /* Roman script*/
  140.     langTurkish                 = 17,                           /* modified smRoman/Turkish script*/
  141.     langCroatian                = 18,                           /* modified smRoman/Croatian script*/
  142.     langTradChinese             = 19,                           /* Chinese (Mandarin) in traditional characters*/
  143.     langUrdu                    = 20,                           /* smArabic script*/
  144.     langHindi                   = 21,                           /* smDevanagari script*/
  145.     langThai                    = 22,                           /* smThai script*/
  146.     langKorean                  = 23                            /* smKorean script*/
  147. };
  148. enum {
  149.     langLithuanian              = 24,                           /* smCentralEuroRoman script*/
  150.     langPolish                  = 25,                           /* smCentralEuroRoman script*/
  151.     langHungarian               = 26,                           /* smCentralEuroRoman script*/
  152.     langEstonian                = 27,                           /* smCentralEuroRoman script*/
  153.     langLatvian                 = 28,                           /* smCentralEuroRoman script*/
  154.     langSami                    = 29,                           /* language of the Sami people of N. Scandinavia             */
  155.     langFaroese                 = 30,                           /* modified smRoman/Icelandic script                      */
  156.     langFarsi                   = 31,                           /* modified smArabic/Farsi script*/
  157.     langPersian                 = 31,                           /* Synonym for langFarsi*/
  158.     langRussian                 = 32,                           /* smCyrillic script*/
  159.     langSimpChinese             = 33,                           /* Chinese (Mandarin) in simplified characters*/
  160.     langFlemish                 = 34,                           /* smRoman script*/
  161.     langIrishGaelic             = 35,                           /* smRoman or modified smRoman/Celtic script (without dot above)   */
  162.     langAlbanian                = 36,                           /* smRoman script*/
  163.     langRomanian                = 37,                           /* modified smRoman/Romanian script*/
  164.     langCzech                   = 38,                           /* smCentralEuroRoman script*/
  165.     langSlovak                  = 39,                           /* smCentralEuroRoman script*/
  166.     langSlovenian               = 40,                           /* modified smRoman/Croatian script*/
  167.     langYiddish                 = 41,                           /* smHebrew script*/
  168.     langSerbian                 = 42,                           /* smCyrillic script*/
  169.     langMacedonian              = 43,                           /* smCyrillic script*/
  170.     langBulgarian               = 44,                           /* smCyrillic script*/
  171.     langUkrainian               = 45,                           /* modified smCyrillic/Ukrainian script*/
  172.     langByelorussian            = 46,                           /* smCyrillic script*/
  173.     langBelorussian             = 46                            /* Synonym for langByelorussian                          */
  174. };
  175. enum {
  176.     langUzbek                   = 47,                           /* Cyrillic script*/
  177.     langKazakh                  = 48,                           /* Cyrillic script*/
  178.     langAzerbaijani             = 49,                           /* Azerbaijani in Cyrillic script*/
  179.     langAzerbaijanAr            = 50,                           /* Azerbaijani in Arabic script*/
  180.     langArmenian                = 51,                           /* smArmenian script*/
  181.     langGeorgian                = 52,                           /* smGeorgian script*/
  182.     langMoldavian               = 53,                           /* smCyrillic script*/
  183.     langKirghiz                 = 54,                           /* Cyrillic script*/
  184.     langTajiki                  = 55,                           /* Cyrillic script*/
  185.     langTurkmen                 = 56,                           /* Cyrillic script*/
  186.     langMongolian               = 57,                           /* Mongolian in smMongolian script*/
  187.     langMongolianCyr            = 58,                           /* Mongolian in Cyrillic script*/
  188.     langPashto                  = 59,                           /* Arabic script*/
  189.     langKurdish                 = 60,                           /* smArabic script*/
  190.     langKashmiri                = 61,                           /* Arabic script*/
  191.     langSindhi                  = 62,                           /* Arabic script*/
  192.     langTibetan                 = 63,                           /* smTibetan script*/
  193.     langNepali                  = 64,                           /* smDevanagari script*/
  194.     langSanskrit                = 65,                           /* smDevanagari script*/
  195.     langMarathi                 = 66,                           /* smDevanagari script*/
  196.     langBengali                 = 67,                           /* smBengali script*/
  197.     langAssamese                = 68,                           /* smBengali script*/
  198.     langGujarati                = 69,                           /* smGujarati script*/
  199.     langPunjabi                 = 70                            /* smGurmukhi script*/
  200. };
  201. enum {
  202.     langOriya                   = 71,                           /* smOriya script*/
  203.     langMalayalam               = 72,                           /* smMalayalam script*/
  204.     langKannada                 = 73,                           /* smKannada script*/
  205.     langTamil                   = 74,                           /* smTamil script*/
  206.     langTelugu                  = 75,                           /* smTelugu script*/
  207.     langSinhalese               = 76,                           /* smSinhalese script*/
  208.     langBurmese                 = 77,                           /* smBurmese script*/
  209.     langKhmer                   = 78,                           /* smKhmer script*/
  210.     langLao                     = 79,                           /* smLao script*/
  211.     langVietnamese              = 80,                           /* smVietnamese script*/
  212.     langIndonesian              = 81,                           /* smRoman script*/
  213.     langTagalog                 = 82,                           /* Roman script*/
  214.     langMalayRoman              = 83,                           /* Malay in smRoman script*/
  215.     langMalayArabic             = 84,                           /* Malay in Arabic script*/
  216.     langAmharic                 = 85,                           /* smEthiopic script*/
  217.     langTigrinya                = 86,                           /* smEthiopic script*/
  218.     langOromo                   = 87,                           /* smEthiopic script*/
  219.     langSomali                  = 88,                           /* smRoman script*/
  220.     langSwahili                 = 89,                           /* smRoman script*/
  221.     langKinyarwanda             = 90,                           /* smRoman script*/
  222.     langRuanda                  = 90,                           /* synonym for langKinyarwanda*/
  223.     langRundi                   = 91,                           /* smRoman script*/
  224.     langNyanja                  = 92,                           /* smRoman script*/
  225.     langChewa                   = 92,                           /* synonym for langNyanja*/
  226.     langMalagasy                = 93,                           /* smRoman script*/
  227.     langEsperanto               = 94                            /* Roman script*/
  228. };
  229. enum {
  230.     langWelsh                   = 128,                          /* modified smRoman/Celtic script*/
  231.     langBasque                  = 129,                          /* smRoman script*/
  232.     langCatalan                 = 130,                          /* smRoman script*/
  233.     langLatin                   = 131,                          /* smRoman script*/
  234.     langQuechua                 = 132,                          /* smRoman script*/
  235.     langGuarani                 = 133,                          /* smRoman script*/
  236.     langAymara                  = 134,                          /* smRoman script*/
  237.     langTatar                   = 135,                          /* Cyrillic script*/
  238.     langUighur                  = 136,                          /* Arabic script*/
  239.     langDzongkha                = 137,                          /* (lang of Bhutan) smTibetan script*/
  240.     langJavaneseRom             = 138,                          /* Javanese in smRoman script*/
  241.     langSundaneseRom            = 139,                          /* Sundanese in smRoman script*/
  242.     langGalician                = 140,                          /* smRoman script*/
  243.     langAfrikaans               = 141                           /* smRoman script                                   */
  244. };
  245. enum {
  246.     langBreton                  = 142,                          /* smRoman or modified smRoman/Celtic script                 */
  247.     langInuktitut               = 143,                          /* Inuit script using smEthiopic script code                 */
  248.     langScottishGaelic          = 144,                          /* smRoman or modified smRoman/Celtic script                 */
  249.     langManxGaelic              = 145,                          /* smRoman or modified smRoman/Celtic script                 */
  250.     langIrishGaelicScript       = 146,                          /* modified smRoman/Gaelic script (using dot above)               */
  251.     langTongan                  = 147,                          /* smRoman script                                   */
  252.     langGreekPoly               = 148,                          /* smGreek script                                   */
  253.     langGreenlandic             = 149                           /* smRoman script                                   */
  254. };
  255. enum {
  256.     langUnspecified             = 32767                         /* Special code for use in resources (such as 'itlm')           */
  257. };
  258. /*
  259.    Obsolete language code names (kept for backward compatibility):
  260.    Misspelled, ambiguous, misleading, considered pejorative, archaic, etc.
  261. */
  262. enum {
  263.     langPortugese               = 8,                            /* Use langPortuguese*/
  264.     langMalta                   = 16,                           /* Use langMaltese*/
  265.     langYugoslavian             = 18,                           /* (use langCroatian, langSerbian, etc.)*/
  266.     langChinese                 = 19,                           /* (use langTradChinese or langSimpChinese)*/
  267.     langLettish                 = 28,                           /* Use langLatvian                                     */
  268.     langLapponian               = 29,                           /* Use langSami*/
  269.     langLappish                 = 29,                           /* Use langSami*/
  270.     langSaamisk                 = 29,                           /* Use langSami                                    */
  271.     langFaeroese                = 30,                           /* Use langFaroese                                     */
  272.     langIrish                   = 35,                           /* Use langIrishGaelic                                  */
  273.     langGalla                   = 87,                           /* Use langOromo                                 */
  274.     langAfricaans               = 141                           /* Use langAfrikaans                                */
  275. };
  276. /*
  277.    Region codes:
  278.    These typically specify a combination of a language code and a particular region.
  279.    Some of these numeric values are reserved just for extra resource IDs associated
  280.    with certain regions; these are not actual region codes, and are noted in the comments.
  281.    Not all of the region codes are currently supported by Apple software.
  282.    When relevant, the following list also provides:
  283.    - The Apple part number (P/N) code for software localized for the specified region.
  284.    - The two-letter ISO language and country codes (from ISO 639 and ISO 3166). The
  285.      language code (lowercase) is first, then '_', then the country code (uppercase).
  286. */
  287. enum {
  288.                                                                 /* P/N    ISO    codes  comments*/
  289.     verUS                       = 0,                            /*       en_US*/
  290.     verFrance                   = 1,                            /* F  fr_FR*/
  291.     verBritain                  = 2,                            /* B  en_GB*/
  292.     verGermany                  = 3,                            /* D  de_DE*/
  293.     verItaly                    = 4,                            /* T  it_IT*/
  294.     verNetherlands              = 5,                            /* N  nl_NL*/
  295.     verFlemish                  = 6,                            /* FN nl_BE     Flemish (Dutch) for Belgium                 */
  296.     verSweden                   = 7,                            /* S  sv_SE*/
  297.     verSpain                    = 8,                            /* E  es_ES       Spanish for Spain*/
  298.     verDenmark                  = 9,                            /* DK da_DK*/
  299.     verPortugal                 = 10,                           /* PO pt_PT     Portuguese for Portugal*/
  300.     verFrCanada                 = 11,                           /* C  fr_CA       French for Canada*/
  301.     verNorway                   = 12,                           /* H  no_NO       Bokm.l*/
  302.     verIsrael                   = 13,                           /* HB iw_IL     Hebrew*/
  303.     verJapan                    = 14,                           /* J  ja_JP*/
  304.     verAustralia                = 15,                           /* X  en_AU       English for Australia*/
  305.     verArabic                   = 16,                           /* AB ar       Arabic for N Africa, Arabian peninsula, Levant*/
  306.     verFinland                  = 17,                           /* K  fi_FI*/
  307.     verFrSwiss                  = 18,                           /* SF fr_CH     French Swiss*/
  308.     verGrSwiss                  = 19,                           /* SD de_CH     German Swiss*/
  309.     verGreece                   = 20,                           /* GR el_GR     Monotonic Greek (modern)*/
  310.     verIceland                  = 21,                           /* IS is_IS*/
  311.     verMalta                    = 22,                           /* MA mt_MT*/
  312.     verCyprus                   = 23,                           /* CY   _CY     Greek or Turkish language? Checking...*/
  313.     verTurkey                   = 24,                           /* TU tr_TR*/
  314.     verYugoCroatian             = 25                            /* YU          Croatian for Yugoslavia; now use verCroatia (68)*/
  315. };
  316. enum {
  317.     verNetherlandsComma         = 26,                           /*              ID for KCHR resource - Dutch*/
  318.     verBelgiumLuxPoint          = 27,                           /*              ID for KCHR resource - Belgium*/
  319.     verCanadaComma              = 28,                           /*              ID for KCHR resource - Canadian ISO*/
  320.     verCanadaPoint              = 29,                           /*              ID for KCHR resource - Canadian; now unused*/
  321.     vervariantPortugal          = 30,                           /*              ID for resource; now unused*/
  322.     vervariantNorway            = 31,                           /*              ID for resource; now unused*/
  323.     vervariantDenmark           = 32                            /*              ID for KCHR resource - Danish Mac Plus*/
  324. };
  325. enum {
  326.     verIndiaHindi               = 33,                           /*       hi_IN     Hindi for India*/
  327.     verPakistanUrdu             = 34,                           /* UR ur_PK     Urdu for Pakistan                        */
  328.     verTurkishModified          = 35,
  329.     verItalianSwiss             = 36,                           /* ST it_CH     Italian Swiss*/
  330.     verInternational            = 37,                           /* Z  en      English for international use               */
  331.                                                                 /*              38 is unassigned*/
  332.     verRomania                  = 39,                           /* RO ro_RO*/
  333.     verGreecePoly               = 40,                           /*              Polytonic Greek (classical)                   */
  334.     verLithuania                = 41,                           /* LT lt_LT*/
  335.     verPoland                   = 42,                           /* PL pl_PL*/
  336.     verHungary                  = 43,                           /* MG hu_HU*/
  337.     verEstonia                  = 44,                           /* EE et_EE*/
  338.     verLatvia                   = 45,                           /* LV lv_LV*/
  339.     verSami                     = 46,                           /*       se                                        */
  340.     verFaroeIsl                 = 47,                           /* FA fo_FO                                    */
  341.     verIran                     = 48,                           /* PS fa_IR     Persian/Farsi*/
  342.     verRussia                   = 49,                           /* RS ru_RU     Russian*/
  343.     verIreland                  = 50,                           /* GA ga_IE     Irish Gaelic for Ireland (without dot above)     */
  344.     verKorea                    = 51,                           /* KH ko_KR*/
  345.     verChina                    = 52,                           /* CH zh_CN     Simplified Chinese*/
  346.     verTaiwan                   = 53,                           /* TA zh_TW     Traditional Chinese*/
  347.     verThailand                 = 54,                           /* TH th_TH*/
  348.     verScriptGeneric            = 55,                           /* SS          Generic script system (no language or script)       */
  349.     verCzech                    = 56,                           /* CZ cs_CZ*/
  350.     verSlovak                   = 57,                           /* SL sk_SK*/
  351.     verFarEastGeneric           = 58,                           /* FE          Generic Far East system (no language or script)   */
  352.     verMagyar                   = 59,                           /*              Unused; see verHungary*/
  353.     verBengali                  = 60,                           /*       bn         Bangladesh or India*/
  354.     verByeloRussian             = 61                            /* BY be_BY*/
  355. };
  356. enum {
  357.     verUkraine                  = 62,                           /* UA uk_UA*/
  358.                                                                 /*              63 is unassigned*/
  359.     verGreeceAlt                = 64,                           /*              unused                              */
  360.     verSerbian                  = 65,                           /* SR sr_YU, sh_YU                                  */
  361.     verSlovenian                = 66,                           /* SV sl_SI                                    */
  362.     verMacedonian               = 67,                           /* MD mk_MK                                    */
  363.     verCroatia                  = 68,                           /* CR hr_HR, sh_HR*/
  364.                                                                 /*              69 is unassigned*/
  365.                                                                 /*              70 is unassigned*/
  366.     verBrazil                   = 71,                           /* BR pt_BR     Portuguese for Brazil*/
  367.     verBulgaria                 = 72,                           /* BG bg_BG*/
  368.     verCatalonia                = 73,                           /* CA ca_ES     Catalan for Spain*/
  369.     verMultilingual             = 74,                           /* ZM          (no language or script)*/
  370.     verScottishGaelic           = 75,                           /* GD gd*/
  371.     verManxGaelic               = 76,                           /* GV gv       Isle of Man*/
  372.     verBreton                   = 77,                           /* BZ br*/
  373.     verNunavut                  = 78,                           /* IU iu_CA     Inuktitut for Canada*/
  374.     verWelsh                    = 79,                           /* CU cy*/
  375.                                                                 /*              80 is ID for KCHR resource - Canadian CSA*/
  376.     verIrishGaelicScript        = 81,                           /* GS ga_IE     Irish Gaelic for Ireland (using dot above)*/
  377.     verEngCanada                = 82,                           /* V  en_CA       English for Canada*/
  378.     verBhutan                   = 83,                           /* BH dz_BT     Dzongkha for Bhutan*/
  379.     verArmenian                 = 84,                           /* HY hy_AM*/
  380.     verGeorgian                 = 85,                           /* KR ka_GE*/
  381.     verSpLatinAmerica           = 86,                           /* LA es       Spanish for Latin America*/
  382.                                                                 /*              87 is ID for KCHR resource - Spanish ISO*/
  383.     verTonga                    = 88,                           /* TS to_TO*/
  384.                                                                 /*              89 is ID for KCHR resource - Polish Modified*/
  385.                                                                 /*              90 is ID for KCHR resource - Catalan ISO*/
  386.     verFrenchUniversal          = 91,                           /*       fr         French generic*/
  387.     verAustria                  = 92,                           /* AU de_AT     German for Austria*/
  388.                                                                 /* Y          93 is unused alternate for verSpLatinAmerica*/
  389.     verGujarati                 = 94,                           /*       gu_IN*/
  390.     verPunjabi                  = 95,                           /*       pa         Pakistan or India*/
  391.     verIndiaUrdu                = 96,                           /*       ur_IN     Urdu for India*/
  392.     verVietnam                  = 97                            /*       vi_VN*/
  393. };
  394. enum {
  395.     verFrBelgium                = 98,                           /* BF fr_BE     French for Belgium                       */
  396.     verUzbek                    = 99,                           /* BD uz_UZ                                    */
  397.     verSingapore                = 100,                          /* SG                                         */
  398.     verNynorsk                  = 101,                          /* NY   _NO     Norwegian Nynorsk                        */
  399.     verAfrikaans                = 102,                          /* AK af_ZA                                    */
  400.     verEsperanto                = 103,                          /*       eo                                        */
  401.     verMarathi                  = 104,                          /*       mr_IN                                      */
  402.     verTibetan                  = 105,                          /*       bo                                        */
  403.     verNepal                    = 106,                          /*       ne_NP                                      */
  404.     verGreenland                = 107                           /*       kl                                        */
  405. };
  406. /*
  407.    Other extra resource IDs assigned in the same number space:
  408.     179 is ID for KCHR & itl_ resources - Cornish
  409.     581 is ID for KCHR resource - Irish Gaelic script alternate
  410.     582 is ID for KCHR resource - Ogham
  411.     779 is ID for KCHR resource - Welsh alternate
  412.    1111 is ID for KCHR resource - French numeric
  413. */
  414. /*
  415.    Obsolete region code names (kept for backward compatibility):
  416.    Misspelled or alternate form, ambiguous, misleading, considered pejorative, archaic, etc.
  417. */
  418. enum {
  419.     verFrBelgiumLux             = 6,                            /* Incorrect; 6 is Flemish, not French, for Belgium; use verFlemish     */
  420.     verBelgiumLux               = 6,                            /* Use verFlemish*/
  421.     verArabia                   = 16,                           /* Use verArabic*/
  422.     verYugoslavia               = 25,                           /* Use verYugoCroatian (same number, now unused), or newer verCroatia*/
  423.     verIndia                    = 33,                           /* Use verIndiaHindi*/
  424.     verPakistan                 = 34,                           /* Use verPakistanUrdu                                  */
  425.     verRumania                  = 39,                           /* Alternate for verRomania                              */
  426.     verGreekAncient             = 40,                           /* Use verGreecePoly                                */
  427.     verLapland                  = 46,                           /* Use verSami                                       */
  428.     verFaeroeIsl                = 47,                           /* Use verFaroeIsl                                     */
  429.     verGenericFE                = 58,                           /* Use verFarEastGeneric                              */
  430.     verBelarus                  = 61,                           /* Alternate for verByelorussian                       */
  431.     verUkrania                  = 62,                           /* Use verUkraine*/
  432.     verAlternateGr              = 64,                           /* Use verGreeceAlt                                   */
  433.     verSerbia                   = 65,                           /* Alternate for verSerbian                              */
  434.     verSlovenia                 = 66,                           /* Alternate for verSlovenian                            */
  435.     verMacedonia                = 67,                           /* Alternate for verMacedonian                             */
  436.     verBrittany                 = 77,                           /* Alternate for verBreton                              */
  437.     verWales                    = 79,                           /* Alternate for verWelsh                              */
  438.     verArmenia                  = 84,                           /* Alternate for verArmenian                           */
  439.     verGeorgia                  = 85,                           /* Alternate for verGeorgian                           */
  440.     verAustriaGerman            = 92,                           /* Use verAustria                                   */
  441.     verTibet                    = 105                           /* Use verTibetan                                   */
  442. };
  443. enum {
  444.     minCountry                  = verUS,
  445.     maxCountry                  = verGreenland
  446. };
  447. enum {
  448.                                                                 /* Calendar Codes */
  449.     calGregorian                = 0,
  450.     calArabicCivil              = 1,
  451.     calArabicLunar              = 2,
  452.     calJapanese                 = 3,
  453.     calJewish                   = 4,
  454.     calCoptic                   = 5,
  455.     calPersian                  = 6
  456. };
  457. enum {
  458.                                                                 /* Integer Format Codes */
  459.     intWestern                  = 0,
  460.     intArabic                   = 1,
  461.     intRoman                    = 2,
  462.     intJapanese                 = 3,
  463.     intEuropean                 = 4,
  464.     intOutputMask               = 0x8000
  465. };
  466. enum {
  467.                                                                 /* CharByte byte types */
  468.     smSingleByte                = 0,
  469.     smFirstByte                 = -1,
  470.     smLastByte                  = 1,
  471.     smMiddleByte                = 2
  472. };
  473. enum {
  474.                                                                 /* CharType field masks */
  475.     smcTypeMask                 = 0x000F,
  476.     smcReserved                 = 0x00F0,
  477.     smcClassMask                = 0x0F00,
  478.     smcOrientationMask          = 0x1000,                       /*two-byte script glyph orientation*/
  479.     smcRightMask                = 0x2000,
  480.     smcUpperMask                = 0x4000,
  481.     smcDoubleMask               = 0x8000
  482. };
  483. enum {
  484.                                                                 /* Basic CharType character types */
  485.     smCharPunct                 = 0x0000,
  486.     smCharAscii                 = 0x0001,
  487.     smCharEuro                  = 0x0007,
  488.     smCharExtAscii              = 0x0007,                       /* More correct synonym for smCharEuro */
  489.                                                                 /* Additional CharType character types for script systems */
  490.     smCharKatakana              = 0x0002,                       /*Japanese Katakana*/
  491.     smCharHiragana              = 0x0003,                       /*Japanese Hiragana*/
  492.     smCharIdeographic           = 0x0004,                       /*Hanzi, Kanji, Hanja*/
  493.     smCharTwoByteGreek          = 0x0005,                       /*2-byte Greek in Far East systems*/
  494.     smCharTwoByteRussian        = 0x0006,                       /*2-byte Cyrillic in Far East systems*/
  495.     smCharBidirect              = 0x0008,                       /*Arabic/Hebrew*/
  496.     smCharContextualLR          = 0x0009,                       /*Contextual left-right: Thai, Indic scripts*/
  497.     smCharNonContextualLR       = 0x000A,                       /*Non-contextual left-right: Cyrillic, Greek*/
  498.     smCharHangul                = 0x000C,                       /*Korean Hangul*/
  499.     smCharJamo                  = 0x000D,                       /*Korean Jamo*/
  500.     smCharBopomofo              = 0x000E,                       /*Chinese Bopomofo*/
  501.     smCharGanaKana              = 0x000F,                       /*Shared for Japanese Hiragana & Katakana*/
  502.                                                                 /* old names for some of above, for backward compatibility */
  503.     smCharFISKana               = 0x0002,                       /*Katakana*/
  504.     smCharFISGana               = 0x0003,                       /*Hiragana*/
  505.     smCharFISIdeo               = 0x0004                        /*Hanzi, Kanji, Hanja*/
  506. };
  507. enum {
  508.     smCharFISGreek              = 0x0005,                       /*2-byte Greek in Far East systems*/
  509.     smCharFISRussian            = 0x0006,                       /*2-byte Cyrillic in Far East systems*/
  510.                                                                 /* CharType classes for punctuation (smCharPunct) */
  511.     smPunctNormal               = 0x0000,
  512.     smPunctNumber               = 0x0100,
  513.     smPunctSymbol               = 0x0200,
  514.     smPunctBlank                = 0x0300,                       /* Additional CharType classes for punctuation in two-byte systems */
  515.     smPunctRepeat               = 0x0400,                       /* repeat marker */
  516.     smPunctGraphic              = 0x0500,                       /* line graphics */
  517.                                                                 /* CharType Katakana and Hiragana classes for two-byte systems */
  518.     smKanaSmall                 = 0x0100,                       /*small kana character*/
  519.     smKanaHardOK                = 0x0200,                       /*can have dakuten*/
  520.     smKanaSoftOK                = 0x0300,                       /*can have dakuten or han-dakuten*/
  521.                                                                 /* CharType Ideographic classes for two-byte systems */
  522.     smIdeographicLevel1         = 0x0000,                       /*level 1 char*/
  523.     smIdeographicLevel2         = 0x0100,                       /*level 2 char*/
  524.     smIdeographicUser           = 0x0200,                       /*user char*/
  525.                                                                 /* old names for above, for backward compatibility */
  526.     smFISClassLvl1              = 0x0000,                       /*level 1 char*/
  527.     smFISClassLvl2              = 0x0100,                       /*level 2 char*/
  528.     smFISClassUser              = 0x0200,                       /*user char*/
  529.                                                                 /* CharType Jamo classes for Korean systems */
  530.     smJamoJaeum                 = 0x0000,                       /*simple consonant char*/
  531.     smJamoBogJaeum              = 0x0100,                       /*complex consonant char*/
  532.     smJamoMoeum                 = 0x0200,                       /*simple vowel char*/
  533.     smJamoBogMoeum              = 0x0300                        /*complex vowel char*/
  534. };
  535. enum {
  536.                                                                 /* CharType glyph orientation for two-byte systems */
  537.     smCharHorizontal            = 0x0000,                       /* horizontal character form, or for both */
  538.     smCharVertical              = 0x1000,                       /* vertical character form */
  539.                                                                 /* CharType directions */
  540.     smCharLeft                  = 0x0000,
  541.     smCharRight                 = 0x2000,                       /* CharType case modifers */
  542.     smCharLower                 = 0x0000,
  543.     smCharUpper                 = 0x4000,                       /* CharType character size modifiers (1 or multiple bytes). */
  544.     smChar1byte                 = 0x0000,
  545.     smChar2byte                 = 0x8000
  546. };
  547. enum {
  548.                                                                 /* TransliterateText target types for Roman */
  549.     smTransAscii                = 0,                            /*convert to ASCII*/
  550.     smTransNative               = 1,                            /*convert to font script*/
  551.     smTransCase                 = 0xFE,                         /*convert case for all text*/
  552.     smTransSystem               = 0xFF,                         /*convert to system script*/
  553.                                                                 /* TransliterateText target types for two-byte scripts */
  554.     smTransAscii1               = 2,                            /*1-byte Roman*/
  555.     smTransAscii2               = 3,                            /*2-byte Roman*/
  556.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  557.     smTransKana2                = 5                             /*2-byte Japanese Katakana*/
  558. };
  559. enum {
  560.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  561.     smTransHangul2              = 8,                            /*2-byte Korean Hangul*/
  562.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  563.     smTransBopomofo2            = 10,                           /*2-byte Chinese Bopomofo*/
  564.                                                                 /* TransliterateText target modifiers */
  565.     smTransLower                = 0x4000,                       /*target becomes lowercase*/
  566.     smTransUpper                = 0x8000,                       /*target becomes uppercase*/
  567.                                                                 /* TransliterateText resource format numbers */
  568.     smTransRuleBaseFormat       = 1,                            /*Rule based trsl resource format */
  569.     smTransHangulFormat         = 2,                            /*Table based Hangul trsl resource format*/
  570.                                                                 /* TransliterateText property flags */
  571.     smTransPreDoubleByting      = 1,                            /*Convert all text to double byte before transliteration*/
  572.     smTransPreLowerCasing       = 2                             /*Convert all text to lower case before transliteration*/
  573. };
  574. enum {
  575.                                                                 /* TransliterateText source mask - general */
  576.     smMaskAll                   = (long)0xFFFFFFFF,             /*Convert all text*/
  577.                                                                 /* TransliterateText source masks */
  578.     smMaskAscii                 = 0x00000001,                   /*2^smTransAscii*/
  579.     smMaskNative                = 0x00000002,                   /*2^smTransNative*/
  580.                                                                 /* TransliterateText source masks for two-byte scripts */
  581.     smMaskAscii1                = 0x00000004,                   /*2^smTransAscii1*/
  582.     smMaskAscii2                = 0x00000008,                   /*2^smTransAscii2*/
  583.     smMaskKana1                 = 0x00000010,                   /*2^smTransKana1*/
  584.     smMaskKana2                 = 0x00000020,                   /*2^smTransKana2*/
  585.     smMaskGana2                 = 0x00000080,                   /*2^smTransGana2*/
  586.     smMaskHangul2               = 0x00000100,                   /*2^smTransHangul2*/
  587.     smMaskJamo2                 = 0x00000200,                   /*2^smTransJamo2*/
  588.     smMaskBopomofo2             = 0x00000400                    /*2^smTransBopomofo2*/
  589. };
  590. enum {
  591.                                                                 /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  592.     smNotInstalled              = 0,                            /*routine not available in script*/
  593.     smBadVerb                   = -1,                           /*Bad verb passed to a routine*/
  594.     smBadScript                 = -2                            /*Bad script code passed to a routine*/
  595. };
  596. enum {
  597.                                                                 /* Values for script redraw flag. */
  598.     smRedrawChar                = 0,                            /*Redraw character only*/
  599.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  600.     smRedrawLine                = -1                            /*Redraw entire line (bidirectional systems)*/
  601. };
  602. enum {
  603.                                                                 /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  604.     smVersion                   = 0,                            /*Script Manager version number*/
  605.     smMunged                    = 2,                            /*Globals change count*/
  606.     smEnabled                   = 4,                            /*Count of enabled scripts, incl Roman*/
  607.     smBidirect                  = 6,                            /*At least one bidirectional script*/
  608.     smFontForce                 = 8,                            /*Force font flag*/
  609.     smIntlForce                 = 10,                           /*Force intl flag*/
  610.     smForced                    = 12,                           /*Script was forced to system script*/
  611.     smDefault                   = 14,                           /*Script was defaulted to Roman script*/
  612.     smPrint                     = 16,                           /*Printer action routine*/
  613.     smSysScript                 = 18,                           /*System script*/
  614.     smLastScript                = 20,                           /*Last keyboard script*/
  615.     smKeyScript                 = 22,                           /*Keyboard script*/
  616.     smSysRef                    = 24,                           /*System folder refNum*/
  617.     smKeyCache                  = 26,                           /*obsolete*/
  618.     smKeySwap                   = 28,                           /*Swapping table handle*/
  619.     smGenFlags                  = 30,                           /*General flags long*/
  620.     smOverride                  = 32,                           /*Script override flags*/
  621.     smCharPortion               = 34,                           /*Ch vs SpExtra proportion*/
  622.                                                                 /* New for System 7.0: */
  623.     smDoubleByte                = 36,                           /*Flag for double-byte script installed*/
  624.     smKCHRCache                 = 38,                           /*Returns pointer to KCHR cache*/
  625.     smRegionCode                = 40,                           /*Returns current region code (verXxx)*/
  626.     smKeyDisableState           = 42                            /*Returns current keyboard disable state*/
  627. };
  628. enum {
  629.                                                                 /* GetScriptVariable and SetScriptVariable verbs. */
  630.                                                                 /* Note: Verbs private to script systems are negative, while */
  631.                                                                 /* those general across script systems are non-negative. */
  632.     smScriptVersion             = 0,                            /*Script software version*/
  633.     smScriptMunged              = 2,                            /*Script entry changed count*/
  634.     smScriptEnabled             = 4,                            /*Script enabled flag*/
  635.     smScriptRight               = 6,                            /*Right to left flag*/
  636.     smScriptJust                = 8,                            /*Justification flag*/
  637.     smScriptRedraw              = 10,                           /*Word redraw flag*/
  638.     smScriptSysFond             = 12,                           /*Preferred system font*/
  639.     smScriptAppFond             = 14,                           /*Preferred Application font*/
  640.     smScriptBundle              = 16,                           /*Beginning of itlb verbs*/
  641.     smScriptNumber              = 16,                           /*Script itl0 id*/
  642.     smScriptDate                = 18,                           /*Script itl1 id*/
  643.     smScriptSort                = 20,                           /*Script itl2 id*/
  644.     smScriptFlags               = 22,                           /*flags word*/
  645.     smScriptToken               = 24,                           /*Script itl4 id*/
  646.     smScriptEncoding            = 26,                           /*id of optional itl5, if present*/
  647.     smScriptLang                = 28                            /*Current language for script*/
  648. };
  649. enum {
  650.     smScriptNumDate             = 30,                           /*Script Number/Date formats.*/
  651.     smScriptKeys                = 32,                           /*Script KCHR id*/
  652.     smScriptIcon                = 34,                           /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  653.     smScriptPrint               = 36,                           /*Script printer action routine*/
  654.     smScriptTrap                = 38,                           /*Trap entry pointer*/
  655.     smScriptCreator             = 40,                           /*Script file creator*/
  656.     smScriptFile                = 42,                           /*Script file name*/
  657.     smScriptName                = 44,                           /*Script name*/
  658.                                                                 /* There is a hole here for old Kanji private verbs 46-76 */
  659.                                                                 /* New for System 7.0: */
  660.     smScriptMonoFondSize        = 78,                           /*default monospace FOND (hi) & size (lo)*/
  661.     smScriptPrefFondSize        = 80,                           /*preferred FOND (hi) & size (lo)*/
  662.     smScriptSmallFondSize       = 82,                           /*default small FOND (hi) & size (lo)*/
  663.     smScriptSysFondSize         = 84,                           /*default system FOND (hi) & size (lo)*/
  664.     smScriptAppFondSize         = 86,                           /*default app FOND (hi) & size (lo)*/
  665.     smScriptHelpFondSize        = 88,                           /*default Help Mgr FOND (hi) & size (lo)*/
  666.     smScriptValidStyles         = 90,                           /*mask of valid styles for script*/
  667.     smScriptAliasStyle          = 92                            /*style (set) to use for aliases*/
  668. };
  669. /* special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI */
  670. /* move them here to be public */
  671. enum {
  672.                                                                 /* WorldScript private verbs */
  673.     smLayoutCache               = -309,                         /* HiWrd(param) is # entries, LoWrd is max input length*/
  674.     smOldVerbSupport            = -311,                         /* param is added to old verbs to map to WSI verb*/
  675.     smSetKashidas               = -291,                         /* param is ON or OFF, old verb = -36*/
  676.     smSetKashProp               = -287,                         /* param is kashida proportion, old verb = -32*/
  677.     smScriptSysBase             = -281,                         /* param is associated font to use w/ system font (old verb = -26)*/
  678.     smScriptAppBase             = -283,                         /* param is associated font to use w/ app font (old verb = -28)*/
  679.     smScriptFntBase             = -285,                         /* param is associated font to use w/ all other fonts (old verb = -30)*/
  680.     smScriptLigatures           = -263,                         /* old verb = -8*/
  681.     smScriptNumbers             = -267                          /* old verb = -12*/
  682. };
  683. enum {
  684.                                                                 /* Special script code values for International Utilities */
  685.     iuSystemScript              = -1,                           /* <obsolete>  system script */
  686.     iuCurrentScript             = -2                            /* <obsolete>  current script (for font of grafPort) */
  687. };
  688. enum {
  689.                                                                 /* Negative verbs for KeyScript */
  690.     smKeyNextScript             = -1,                           /* Switch to next available script */
  691.     smKeySysScript              = -2,                           /* Switch to the system script */
  692.     smKeySwapScript             = -3,                           /* Switch to previously-used script */
  693.                                                                 /* New for System 7.0: */
  694.     smKeyNextKybd               = -4,                           /* Switch to next keyboard in current keyscript */
  695.     smKeySwapKybd               = -5,                           /* Switch to previously-used keyboard in current keyscript */
  696.     smKeyDisableKybds           = -6,                           /* Disable keyboards not in system or Roman script */
  697.     smKeyEnableKybds            = -7,                           /* Re-enable keyboards for all enabled scripts */
  698.     smKeyToggleInline           = -8,                           /* Toggle inline input for current keyscript */
  699.     smKeyToggleDirection        = -9,                           /* Toggle default line direction (TESysJust) */
  700.     smKeyNextInputMethod        = -10,                          /* Switch to next input method in current keyscript */
  701.     smKeySwapInputMethod        = -11,                          /* Switch to last-used input method in current keyscript */
  702.     smKeyDisableKybdSwitch      = -12,                          /* Disable switching from the current keyboard */
  703.     smKeySetDirLeftRight        = -15,                          /* Set default line dir to left-right, align left */
  704.     smKeySetDirRightLeft        = -16,                          /* Set default line dir to right-left, align right */
  705.     smKeyRoman                  = -17                           /* Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard */
  706. };
  707. /* Optional font and keyboard script synchronization */
  708. enum {
  709.                                                                 /* One more flag in the smGenFlags long. */
  710.     smfDisableKeyScriptSync     = 27                            /*Disable font and keyboard script synchronization*/
  711. };
  712. enum {
  713.                                                                 /* We should define masks, too. */
  714.     smfDisableKeyScriptSyncMask = 1L << smfDisableKeyScriptSync /*Disable font and keyboard script synchronization mask*/
  715. };
  716. enum {
  717.                                                                 /* Force keyboard script switching flag and mask for zero and positive KeyScript verbs */
  718.     smKeyForceKeyScriptBit      = 7,                            /* Force keyboard script switching flag */
  719.     smKeyForceKeyScriptMask     = 1 << smKeyForceKeyScriptBit   /* its mask */
  720. };
  721. enum {
  722.                                                                 /* Bits in the smScriptFlags word */
  723.                                                                 /*  (bits above 8 are non-static) */
  724.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  725.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  726.     smsfNatCase                 = 2,                            /*Native chars have upper & lower case*/
  727.     smsfContext                 = 3,                            /*Script is contextual*/
  728.     smsfNoForceFont             = 4,                            /*Script will not force characters*/
  729.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  730.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  731.     smsfUnivExt                 = 7,                            /*Script is handled by universal extension*/
  732.     smsfSynchUnstyledTE         = 8,                            /*Script synchronizes for unstyled TE*/
  733.     smsfForms                   = 13,                           /*Uses contextual forms for letters*/
  734.     smsfLigatures               = 14,                           /*Uses contextual ligatures*/
  735.     smsfReverse                 = 15,                           /*Reverses native text, right-left*/
  736.                                                                 /* Bits in the smGenFlags long. */
  737.                                                                 /* First (high-order) byte is set from itlc flags byte. */
  738.     smfShowIcon                 = 31,                           /*Show icon even if only one script*/
  739.     smfDualCaret                = 30,                           /*Use dual caret for mixed direction text*/
  740.     smfNameTagEnab              = 29,                           /*Reserved for internal use*/
  741.     smfUseAssocFontInfo         = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  742. };
  743. enum {
  744.                                                                 /* Roman script constants */
  745.                                                                 /* The following are here for backward compatibility, but should not be used. */
  746.                                                                 /* This information should be obtained using GetScript. */
  747.     romanSysFond                = 0x3FFF,                       /*system font id number*/
  748.     romanAppFond                = 3,                            /*application font id number*/
  749.     romanFlags                  = 0x0007,                       /*roman settings*/
  750.                                                                 /* Script Manager font equates. */
  751.     smFondStart                 = 0x4000,                       /*start from 16K*/
  752.     smFondEnd                   = 0xC000,                       /*past end of range at 48K*/
  753.                                                                 /* Miscellaneous font equates. */
  754.     smUprHalfCharSet            = 0x80                          /*first char code in top half of std char set*/
  755. };
  756. enum {
  757.                                                                 /* Character Set Extensions */
  758.     diaeresisUprY               = 0xD9,
  759.     fraction                    = 0xDA,
  760.     intlCurrency                = 0xDB,
  761.     leftSingGuillemet           = 0xDC,
  762.     rightSingGuillemet          = 0xDD,
  763.     fiLigature                  = 0xDE,
  764.     flLigature                  = 0xDF,
  765.     dblDagger                   = 0xE0,
  766.     centeredDot                 = 0xE1,
  767.     baseSingQuote               = 0xE2,
  768.     baseDblQuote                = 0xE3,
  769.     perThousand                 = 0xE4,
  770.     circumflexUprA              = 0xE5,
  771.     circumflexUprE              = 0xE6,
  772.     acuteUprA                   = 0xE7,
  773.     diaeresisUprE               = 0xE8,
  774.     graveUprE                   = 0xE9,
  775.     acuteUprI                   = 0xEA,
  776.     circumflexUprI              = 0xEB,
  777.     diaeresisUprI               = 0xEC,
  778.     graveUprI                   = 0xED,
  779.     acuteUprO                   = 0xEE,
  780.     circumflexUprO              = 0xEF,
  781.     appleLogo                   = 0xF0,
  782.     graveUprO                   = 0xF1,
  783.     acuteUprU                   = 0xF2,
  784.     circumflexUprU              = 0xF3,
  785.     graveUprU                   = 0xF4,
  786.     dotlessLwrI                 = 0xF5,
  787.     circumflex                  = 0xF6,
  788.     tilde                       = 0xF7,
  789.     macron                      = 0xF8,
  790.     breveMark                   = 0xF9,
  791.     overDot                     = 0xFA,
  792.     ringMark                    = 0xFB,
  793.     cedilla                     = 0xFC,
  794.     doubleAcute                 = 0xFD,
  795.     ogonek                      = 0xFE,
  796.     hachek                      = 0xFF
  797. };
  798. enum {
  799.                                                                 /* ScriptTokenType values */
  800.     tokenIntl                   = 4,                            /*the itl resource number of the tokenizer*/
  801.     tokenEmpty                  = -1                            /*used internally as an empty flag*/
  802. };
  803. enum {
  804.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  805.     tokenWhite                  = 1,                            /*white space*/
  806.     tokenLeftLit                = 2,                            /*literal begin*/
  807.     tokenRightLit               = 3,                            /*literal end*/
  808.     tokenAlpha                  = 4,                            /*alphabetic*/
  809.     tokenNumeric                = 5,                            /*numeric*/
  810.     tokenNewLine                = 6,                            /*new line*/
  811.     tokenLeftComment            = 7,                            /*open comment*/
  812.     tokenRightComment           = 8,                            /*close comment*/
  813.     tokenLiteral                = 9,                            /*literal*/
  814.     tokenEscape                 = 10,                           /*character escape (e.g. '' in "n", "t")*/
  815.     tokenAltNum                 = 11,                           /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  816.     tokenRealNum                = 12,                           /*real number*/
  817.     tokenAltReal                = 13,                           /*alternate real number*/
  818.     tokenReserve1               = 14,                           /*reserved*/
  819.     tokenReserve2               = 15,                           /*reserved*/
  820.     tokenLeftParen              = 16,                           /*open parenthesis*/
  821.     tokenRightParen             = 17,                           /*close parenthesis*/
  822.     tokenLeftBracket            = 18,                           /*open square bracket*/
  823.     tokenRightBracket           = 19                            /*close square bracket*/
  824. };
  825. enum {
  826.     tokenLeftCurly              = 20,                           /*open curly bracket*/
  827.     tokenRightCurly             = 21,                           /*close curly bracket*/
  828.     tokenLeftEnclose            = 22,                           /*open guillemet*/
  829.     tokenRightEnclose           = 23,                           /*close guillemet*/
  830.     tokenPlus                   = 24,
  831.     tokenMinus                  = 25,
  832.     tokenAsterisk               = 26,                           /*times/multiply*/
  833.     tokenDivide                 = 27,
  834.     tokenPlusMinus              = 28,                           /*plus or minus symbol*/
  835.     tokenSlash                  = 29,
  836.     tokenBackSlash              = 30,
  837.     tokenLess                   = 31,                           /*less than symbol*/
  838.     tokenGreat                  = 32,                           /*greater than symbol*/
  839.     tokenEqual                  = 33,
  840.     tokenLessEqual2             = 34,                           /*less than or equal, 2 characters (e.g. <=)*/
  841.     tokenLessEqual1             = 35,                           /*less than or equal, 1 character*/
  842.     tokenGreatEqual2            = 36,                           /*greater than or equal, 2 characters (e.g. >=)*/
  843.     tokenGreatEqual1            = 37,                           /*greater than or equal, 1 character*/
  844.     token2Equal                 = 38,                           /*double equal (e.g. ==)*/
  845.     tokenColonEqual             = 39                            /*colon equal*/
  846. };
  847. enum {
  848.     tokenNotEqual               = 40,                           /*not equal, 1 character*/
  849.     tokenLessGreat              = 41,                           /*less/greater, Pascal not equal (e.g. <>)*/
  850.     tokenExclamEqual            = 42,                           /*exclamation equal, C not equal (e.g. !=)*/
  851.     tokenExclam                 = 43,                           /*exclamation point*/
  852.     tokenTilde                  = 44,                           /*centered tilde*/
  853.     tokenComma                  = 45,
  854.     tokenPeriod                 = 46,
  855.     tokenLeft2Quote             = 47,                           /*open double quote*/
  856.     tokenRight2Quote            = 48,                           /*close double quote*/
  857.     tokenLeft1Quote             = 49,                           /*open single quote*/
  858.     tokenRight1Quote            = 50,                           /*close single quote*/
  859.     token2Quote                 = 51,                           /*double quote*/
  860.     token1Quote                 = 52,                           /*single quote*/
  861.     tokenSemicolon              = 53,
  862.     tokenPercent                = 54,
  863.     tokenCaret                  = 55,
  864.     tokenUnderline              = 56,
  865.     tokenAmpersand              = 57,
  866.     tokenAtSign                 = 58,
  867.     tokenBar                    = 59                            /*vertical bar*/
  868. };
  869. enum {
  870.     tokenQuestion               = 60,
  871.     tokenPi                     = 61,                           /*lower-case pi*/
  872.     tokenRoot                   = 62,                           /*square root symbol*/
  873.     tokenSigma                  = 63,                           /*capital sigma*/
  874.     tokenIntegral               = 64,                           /*integral sign*/
  875.     tokenMicro                  = 65,
  876.     tokenCapPi                  = 66,                           /*capital pi*/
  877.     tokenInfinity               = 67,
  878.     tokenColon                  = 68,
  879.     tokenHash                   = 69,                           /*e.g. #*/
  880.     tokenDollar                 = 70,
  881.     tokenNoBreakSpace           = 71,                           /*non-breaking space*/
  882.     tokenFraction               = 72,
  883.     tokenIntlCurrency           = 73,
  884.     tokenLeftSingGuillemet      = 74,
  885.     tokenRightSingGuillemet     = 75,
  886.     tokenPerThousand            = 76,
  887.     tokenEllipsis               = 77,
  888.     tokenCenterDot              = 78,
  889.     tokenNil                    = 127
  890. };
  891. enum {
  892.     delimPad                    = -2,                           /* obsolete, misspelled token names kept for backward compatibility */
  893.     tokenTilda                  = 44,
  894.     tokenCarat                  = 55
  895. };
  896. enum {
  897.                                                                 /* Table selectors for GetItlTable */
  898.     smWordSelectTable           = 0,                            /* get word select break table from 'itl2' */
  899.     smWordWrapTable             = 1,                            /* get word wrap break table from 'itl2' */
  900.     smNumberPartsTable          = 2,                            /* get default number parts table from 'itl4' */
  901.     smUnTokenTable              = 3,                            /* get unToken table from 'itl4' */
  902.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  903.     iuWordSelectTable           = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  904.     iuWordWrapTable             = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  905.     iuNumberPartsTable          = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  906.     iuUnTokenTable              = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  907.     iuWhiteSpaceList            = 4                             /* <obsolete>  get white space list from 'itl4' */
  908. };
  909. /* end of stuff moved from Packages.h */
  910. enum {
  911.     tokenOK                     = 0,                            /* TokenResults */
  912.     tokenOverflow               = 1,                            /* TokenResults */
  913.     stringOverflow              = 2,                            /* TokenResults */
  914.     badDelim                    = 3,                            /* TokenResults */
  915.     badEnding                   = 4,                            /* TokenResults */
  916.     crash                       = 5                             /* TokenResults */
  917. };
  918. typedef SInt8                           TokenResults;
  919. typedef char                            CharByteTable[256];
  920. /* "TokenType" was renamed to "ScriptTokenType" because of a name collision in QuickTime 3.0 on other OS's*/
  921. typedef short                           ScriptTokenType;
  922. #if TARGET_OS_MAC
  923. typedef ScriptTokenType                 TokenType;
  924. #endif  /* TARGET_OS_MAC */
  925. typedef ScriptTokenType                 DelimType[2];
  926. typedef ScriptTokenType                 CommentType[4];
  927. struct TokenRec {
  928.     ScriptTokenType                 theToken;
  929.     Ptr                             position;                   /*pointer into original source*/
  930.     long                            length;                     /*length of text in original source*/
  931.     StringPtr                       stringPosition;             /*Pascal/C string copy of identifier*/
  932. };
  933. typedef struct TokenRec                 TokenRec;
  934. typedef TokenRec *                      TokenRecPtr;
  935. struct TokenBlock {
  936.     Ptr                             source;                     /*pointer to stream of characters*/
  937.     long                            sourceLength;               /*length of source stream*/
  938.     Ptr                             tokenList;                  /*pointer to array of tokens*/
  939.     long                            tokenLength;                /*maximum length of TokenList*/
  940.     long                            tokenCount;                 /*number tokens generated by tokenizer*/
  941.     Ptr                             stringList;                 /*pointer to stream of identifiers*/
  942.     long                            stringLength;               /*length of string list*/
  943.     long                            stringCount;                /*number of bytes currently used*/
  944.     Boolean                         doString;                   /*make strings & put into StringList*/
  945.     Boolean                         doAppend;                   /*append to TokenList rather than replace*/
  946.     Boolean                         doAlphanumeric;             /*identifiers may include numeric*/
  947.     Boolean                         doNest;                     /*do comments nest?*/
  948.     ScriptTokenType                 leftDelims[2];
  949.     ScriptTokenType                 rightDelims[2];
  950.     ScriptTokenType                 leftComment[4];
  951.     ScriptTokenType                 rightComment[4];
  952.     ScriptTokenType                 escapeCode;                 /*escape symbol code*/
  953.     ScriptTokenType                 decimalCode;
  954.     Handle                          itlResource;                /*handle to itl4 resource of current script*/
  955.     long                            reserved[8];                /*must be zero!*/
  956. };
  957. typedef struct TokenBlock               TokenBlock;
  958. typedef TokenBlock *                    TokenBlockPtr;
  959. EXTERN_API( short )
  960. GetSysDirection                 (void)                                                      TWOWORDINLINE(0x3EB8, 0x0BAC);
  961. EXTERN_API( void )
  962. SetSysDirection                 (short                  value)                              TWOWORDINLINE(0x31DF, 0x0BAC);
  963. EXTERN_API( short )
  964. FontScript                      (void)                                                      FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  965. EXTERN_API( short )
  966. IntlScript                      (void)                                                      FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  967. EXTERN_API( void )
  968. KeyScript                       (short                  code)                               FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  969. EXTERN_API( Boolean )
  970. IsCmdChar                       (const EventRecord *    event,
  971.                                  short                  test)                               FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  972. EXTERN_API( short )
  973. FontToScript                    (short                  fontNumber)                         FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  974. EXTERN_API( long )
  975. GetScriptManagerVariable        (short                  selector)                           FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  976. EXTERN_API( OSErr )
  977. SetScriptManagerVariable        (short                  selector,
  978.                                  long                   param)                              FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  979. EXTERN_API( long )
  980. GetScriptVariable               (short                  script,
  981.                                  short                  selector)                           FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  982. EXTERN_API( OSErr )
  983. SetScriptVariable               (short                  script,
  984.                                  short                  selector,
  985.                                  long                   param)                              FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  986. EXTERN_API( short )
  987. CharacterByteType               (Ptr                    textBuf,
  988.                                  short                  textOffset,
  989.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  990. EXTERN_API( short )
  991. CharacterType                   (Ptr                    textBuf,
  992.                                  short                  textOffset,
  993.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  994. EXTERN_API( OSErr )
  995. TransliterateText               (Handle                 srcHandle,
  996.                                  Handle                 dstHandle,
  997.                                  short                  target,
  998.                                  long                   srcMask,
  999.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  1000. EXTERN_API( Boolean )
  1001. FillParseTable                  (CharByteTable          table,
  1002.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  1003. EXTERN_API( Handle )
  1004. GetIntlResource                 (short                  theID)                              THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  1005. EXTERN_API( void )
  1006. ClearIntlResourceCache          (void)                                                      THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  1007. EXTERN_API( void )
  1008. GetIntlResourceTable            (ScriptCode             script,
  1009.                                  short                  tableCode,
  1010.                                  Handle *               itlHandle,
  1011.                                  long *                 offset,
  1012.                                  long *                 length)                             THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  1013. #if CALL_NOT_IN_CARBON
  1014. #if CALL_NOT_IN_CARBON
  1015. EXTERN_API( UniversalProcPtr )
  1016. GetScriptUtilityAddress         (short                  selector,
  1017.                                  Boolean                Before,
  1018.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  1019. EXTERN_API( void )
  1020. SetScriptUtilityAddress         (short                  selector,
  1021.                                  Boolean                Before,
  1022.                                  UniversalProcPtr       routineAddr,
  1023.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  1024. EXTERN_API( UniversalProcPtr )
  1025. GetScriptQDPatchAddress         (short                  trapNum,
  1026.                                  Boolean                Before,
  1027.                                  Boolean                forPrinting,
  1028.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  1029. EXTERN_API( void )
  1030. SetScriptQDPatchAddress         (short                  trapNum,
  1031.                                  Boolean                Before,
  1032.                                  Boolean                forPrinting,
  1033.                                  UniversalProcPtr       routineAddr,
  1034.                                  ScriptCode             script)                             FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  1035. EXTERN_API( void )
  1036. SetIntlResource                 (short                  refNum,
  1037.                                  short                  theID,
  1038.                                  Handle                 intlHandle)                         THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  1039. EXTERN_API( short )
  1040. CharByte                        (Ptr                    textBuf,
  1041.                                  short                  textOffset)                         FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  1042. EXTERN_API( short )
  1043. CharType                        (Ptr                    textBuf,
  1044.                                  short                  textOffset)                         FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  1045. EXTERN_API( OSErr )
  1046. Transliterate                   (Handle                 srcHandle,
  1047.                                  Handle                 dstHandle,
  1048.                                  short                  target,
  1049.                                  long                   srcMask)                            FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  1050. EXTERN_API( Boolean )
  1051. ParseTable                      (CharByteTable          table)                              FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  1052. #endif  /* CALL_NOT_IN_CARBON */
  1053. #endif  /* CALL_NOT_IN_CARBON */
  1054. EXTERN_API( TokenResults )
  1055. IntlTokenize                    (TokenBlockPtr          tokenParam)                         FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  1056. #if OLDROUTINENAMES
  1057. #define SetSysJust(newJust) SetSysDirection(newJust)
  1058. #define GetSysJust() GetSysDirection()
  1059. #define Font2Script(fontNumber) FontToScript(fontNumber)
  1060. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  1061. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  1062. #define GetScript(script, verb) GetScriptVariable(script, verb)
  1063. #define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
  1064. #define IUGetIntl(theID) GetIntlResource(theID) 
  1065. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  1066. #define IUClearCache() ClearIntlResourceCache()
  1067. #define IUGetItlTable(script, tableCode, itlHandle, offset, length) 
  1068.          GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  1069. #endif  /* OLDROUTINENAMES */
  1070. #if PRAGMA_STRUCT_ALIGN
  1071.     #pragma options align=reset
  1072. #elif PRAGMA_STRUCT_PACKPUSH
  1073.     #pragma pack(pop)
  1074. #elif PRAGMA_STRUCT_PACK
  1075.     #pragma pack()
  1076. #endif
  1077. #ifdef PRAGMA_IMPORT_OFF
  1078. #pragma import off
  1079. #elif PRAGMA_IMPORT
  1080. #pragma import reset
  1081. #endif
  1082. #ifdef __cplusplus
  1083. }
  1084. #endif
  1085. #endif /* __SCRIPT__ */