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

多媒体编程

开发平台:

Visual C++

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