home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / winnls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  31.5 KB  |  736 lines

  1. /**************************************************************************
  2. *                                                                         *
  3. * winnls.h -- NLS procedure declarations, constant definitions and macros *
  4. *                                                                         *
  5. * Copyright (c) 1991-1995, Microsoft Corp. All rights reserved.           *
  6. *                                                                         *
  7. **************************************************************************/
  8.  
  9.  
  10. #ifndef _WINNLS_
  11. #define _WINNLS_
  12.  
  13. // @CESYSGEN IF COREDLL_CORELOC
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. #ifndef NONLS
  20.  
  21. /***************************************************************************\
  22. * Constants
  23. *
  24. * Define all constants for the NLS component here.
  25. \***************************************************************************/
  26.  
  27. /*
  28.  *  String Length Maximums.
  29.  */
  30. #define MAX_LEADBYTES        12             /* 5 ranges, 2 bytes ea., 0 term. */
  31. #define MAX_DEFAULTCHAR      2              /* single or double byte */
  32.  
  33. /*
  34.  *  MBCS and Unicode Translation Flags.
  35.  */
  36. #define MB_PRECOMPOSED       0x00000001     /* use precomposed chars */
  37. #define MB_COMPOSITE         0x00000002     /* use composite chars */
  38. #define MB_USEGLYPHCHARS     0x00000004     /* use glyph chars, not ctrl chars */
  39. #define MB_ERR_INVALID_CHARS 0x00000008     /* error for invalid chars */
  40.  
  41. #define WC_DEFAULTCHECK      0x00000100     /* check for default char */
  42. #define WC_COMPOSITECHECK    0x00000200     /* convert composite to precomposed */
  43. #define WC_DISCARDNS         0x00000010     /* discard non-spacing chars */
  44. #define WC_SEPCHARS          0x00000020     /* generate separate chars */
  45. #define WC_DEFAULTCHAR       0x00000040     /* replace w/ default char */
  46.  
  47. /*
  48.  *  Character Type Flags.
  49.  */
  50. #define CT_CTYPE1            0x00000001     /* ctype 1 information */
  51. #define CT_CTYPE2            0x00000002     /* ctype 2 information */
  52. #define CT_CTYPE3            0x00000004     /* ctype 3 information */
  53.  
  54. /*
  55.  *  CType 1 Flag Bits.
  56.  */
  57. #define C1_UPPER             0x0001         /* upper case */
  58. #define C1_LOWER             0x0002         /* lower case */
  59. #define C1_DIGIT             0x0004         /* decimal digits */
  60. #define C1_SPACE             0x0008         /* spacing characters */
  61. #define C1_PUNCT             0x0010         /* punctuation characters */
  62. #define C1_CNTRL             0x0020         /* control characters */
  63. #define C1_BLANK             0x0040         /* blank characters */
  64. #define C1_XDIGIT            0x0080         /* other digits */
  65. #define C1_ALPHA             0x0100         /* any linguistic character */
  66.  
  67. /*
  68.  *  CType 2 Flag Bits.
  69.  */
  70. #define C2_LEFTTORIGHT       0x0001         /* left to right */
  71. #define C2_RIGHTTOLEFT       0x0002         /* right to left */
  72.  
  73. #define C2_EUROPENUMBER      0x0003         /* European number, digit */
  74. #define C2_EUROPESEPARATOR   0x0004         /* European numeric separator */
  75. #define C2_EUROPETERMINATOR  0x0005         /* European numeric terminator */
  76. #define C2_ARABICNUMBER      0x0006         /* Arabic number */
  77. #define C2_COMMONSEPARATOR   0x0007         /* common numeric separator */
  78.  
  79. #define C2_BLOCKSEPARATOR    0x0008         /* block separator */
  80. #define C2_SEGMENTSEPARATOR  0x0009         /* segment separator */
  81. #define C2_WHITESPACE        0x000A         /* white space */
  82. #define C2_OTHERNEUTRAL      0x000B         /* other neutrals */
  83.  
  84. #define C2_NOTAPPLICABLE     0x0000         /* no implicit directionality */
  85.  
  86. /*
  87.  *  CType 3 Flag Bits.
  88.  */
  89. #define C3_NONSPACING        0x0001         /* nonspacing character */
  90. #define C3_DIACRITIC         0x0002         /* diacritic mark */
  91. #define C3_VOWELMARK         0x0004         /* vowel mark */
  92. #define C3_SYMBOL            0x0008         /* symbols */
  93.  
  94. #define C3_KATAKANA          0x0010         /* katakana character */
  95. #define C3_HIRAGANA          0x0020         /* hiragana character */
  96. #define C3_HALFWIDTH         0x0040         /* half width character */
  97. #define C3_FULLWIDTH         0x0080         /* full width character */
  98. #define C3_IDEOGRAPH         0x0100         /* ideographic character */
  99. #define C3_KASHIDA           0x0200         /* Arabic kashida character */
  100. #define C3_LEXICAL           0x0400         /* lexical character */
  101.  
  102. #define C3_ALPHA             0x8000         /* any linguistic char (C1_ALPHA) */
  103.  
  104. #define C3_NOTAPPLICABLE     0x0000         /* ctype 3 is not applicable */
  105.  
  106. /*
  107.  *  String Flags.
  108.  */
  109. #define NORM_IGNORECASE         0x00000001  /* ignore case */
  110. #define NORM_IGNORENONSPACE     0x00000002  /* ignore nonspacing chars */
  111. #define NORM_IGNORESYMBOLS      0x00000004  /* ignore symbols */
  112.  
  113. #define NORM_IGNOREKANATYPE     0x00010000  /* ignore kanatype */
  114. #define NORM_IGNOREWIDTH        0x00020000  /* ignore width */
  115.  
  116. /*
  117.  *  Locale Independent Mapping Flags.
  118.  */
  119. #define MAP_FOLDCZONE           0x00000010  /* fold compatibility zone chars */
  120. #define MAP_PRECOMPOSED         0x00000020  /* convert to precomposed chars */
  121. #define MAP_COMPOSITE           0x00000040  /* convert to composite chars */
  122. #define MAP_FOLDDIGITS          0x00000080  /* all digits to ASCII 0-9 */
  123.  
  124. /*
  125.  *  Locale Dependent Mapping Flags.
  126.  */
  127. #define LCMAP_LOWERCASE         0x00000100  /* lower case letters */
  128. #define LCMAP_UPPERCASE         0x00000200  /* upper case letters */
  129. #define LCMAP_SORTKEY           0x00000400  /* WC sort key (normalize) */
  130. #define LCMAP_BYTEREV           0x00000800  /* byte reversal */
  131.  
  132. #define LCMAP_HIRAGANA          0x00100000  /* map katakana to hiragana */
  133. #define LCMAP_KATAKANA          0x00200000  /* map hiragana to katakana */
  134. #define LCMAP_HALFWIDTH         0x00400000  /* map double byte to single byte */
  135. #define LCMAP_FULLWIDTH         0x00800000  /* map single byte to double byte */
  136.  
  137. /*
  138.  *  Locale Enumeration Flags.
  139.  */
  140. #define LCID_INSTALLED          0x00000001  /* installed locale ids */
  141. #define LCID_SUPPORTED          0x00000002  /* supported locale ids */
  142.  
  143. /*
  144.  *  Code Page Enumeration Flags.
  145.  */
  146. #define CP_INSTALLED            0x00000001  /* installed code page ids */
  147. #define CP_SUPPORTED            0x00000002  /* supported code page ids */
  148.  
  149. /*
  150.  *  Sorting Flags.
  151.  *
  152.  *    WORD Sort:    culturally correct sort
  153.  *                  hyphen and apostrophe are special cased
  154.  *                  example: "coop" and "co-op" will sort together in a list
  155.  *
  156.  *                        co_op     <-------  underscore (symbol)
  157.  *                        coat
  158.  *                        comb
  159.  *                        coop
  160.  *                        co-op     <-------  hyphen (punctuation)
  161.  *                        cork
  162.  *                        went
  163.  *                        were
  164.  *                        we're     <-------  apostrophe (punctuation)
  165.  *
  166.  *
  167.  *    STRING Sort:  hyphen and apostrophe will sort with all other symbols
  168.  *
  169.  *                        co-op     <-------  hyphen (punctuation)
  170.  *                        co_op     <-------  underscore (symbol)
  171.  *                        coat
  172.  *                        comb
  173.  *                        coop
  174.  *                        cork
  175.  *                        we're     <-------  apostrophe (punctuation)
  176.  *                        went
  177.  *                        were
  178.  */
  179. #define SORT_STRINGSORT         0x00001000  /* use string sort method */
  180.  
  181. /*
  182.  *  Code Page Default Values.
  183.  */
  184. #define CP_ACP               0              /* default to ANSI code page */
  185. #define CP_OEMCP             1              /* default to OEM  code page */
  186. #define CP_MACCP             2              /* default to MAC  code page */
  187.  
  188. /*
  189.  *  Country Codes.
  190.  */
  191. #define CTRY_DEFAULT                     0
  192.  
  193. #define CTRY_AUSTRALIA                   61      /* Australia */
  194. #define CTRY_AUSTRIA                     43      /* Austria */
  195. #define CTRY_BELGIUM                     32      /* Belgium */
  196. #define CTRY_BRAZIL                      55      /* Brazil */
  197. #define CTRY_BULGARIA                    359     /* Bulgaria */
  198. #define CTRY_CANADA                      2       /* Canada */
  199. #define CTRY_CROATIA                     385     /* Croatia */
  200. #define CTRY_CZECH                       42      /* Czech Republic */
  201. #define CTRY_DENMARK                     45      /* Denmark */
  202. #define CTRY_FINLAND                     358     /* Finland */
  203. #define CTRY_FRANCE                      33      /* France */
  204. #define CTRY_GERMANY                     49      /* Germany */
  205. #define CTRY_GREECE                      30      /* Greece */
  206. #define CTRY_HONG_KONG                   852     /* Hong Kong */
  207. #define CTRY_HUNGARY                     36      /* Hungary */
  208. #define CTRY_ICELAND                     354     /* Iceland */
  209. #define CTRY_IRELAND                     353     /* Ireland */
  210. #define CTRY_ITALY                       39      /* Italy */
  211. #define CTRY_JAPAN                       81      /* Japan */
  212. #define CTRY_MEXICO                      52      /* Mexico */
  213. #define CTRY_NETHERLANDS                 31      /* Netherlands */
  214. #define CTRY_NEW_ZEALAND                 64      /* New Zealand */
  215. #define CTRY_NORWAY                      47      /* Norway */
  216. #define CTRY_POLAND                      48      /* Poland */
  217. #define CTRY_PORTUGAL                    351     /* Portugal */
  218. #define CTRY_PRCHINA                     86      /* Peoples' Republic of China */
  219. #define CTRY_ROMANIA                     40      /* Romania */
  220. #define CTRY_RUSSIA                      7       /* Russia */
  221. #define CTRY_SINGAPORE                   65      /* Singapore */
  222. #define CTRY_SLOVAK                      42      /* Slovak Republic */
  223. #define CTRY_SLOVENIA                    386     /* Slovenia */
  224. #define CTRY_SOUTH_KOREA                 82      /* South Korea */
  225. #define CTRY_SPAIN                       34      /* Spain */
  226. #define CTRY_SWEDEN                      46      /* Sweden */
  227. #define CTRY_SWITZERLAND                 41      /* Switzerland */
  228. #define CTRY_TAIWAN                      886     /* Taiwan */
  229. #define CTRY_TURKEY                      90      /* Turkey */
  230. #define CTRY_UNITED_KINGDOM              44      /* United Kingdom */
  231. #define CTRY_UNITED_STATES               1       /* United States */
  232.  
  233. /*
  234.  *  Locale Types.
  235.  *
  236.  *  These types are used for the GetLocaleInfoW NLS API routine.
  237.  *
  238.  *  LOCALE_NOUSEROVERRIDE is also used in GetTimeFormatW and GetDateFormatW.
  239.  *
  240.  *  LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need to do 
  241.  *  string translation.
  242.  */
  243. #define LOCALE_NOUSEROVERRIDE       0x80000000   /* do not use user overrides */
  244. #define LOCALE_USE_CP_ACP           0x40000000   /* use the system ACP */
  245.  
  246. #define LOCALE_ILANGUAGE            0x00000001   /* language id */
  247. #define LOCALE_SLANGUAGE            0x00000002   /* localized name of language */
  248. #define LOCALE_SENGLANGUAGE         0x00001001   /* English name of language */
  249. #define LOCALE_SABBREVLANGNAME      0x00000003   /* abbreviated language name */
  250. #define LOCALE_SNATIVELANGNAME      0x00000004   /* native name of language */
  251. #define LOCALE_ICOUNTRY             0x00000005   /* country code */
  252. #define LOCALE_SCOUNTRY             0x00000006   /* localized name of country */
  253. #define LOCALE_SENGCOUNTRY          0x00001002   /* English name of country */
  254. #define LOCALE_SABBREVCTRYNAME      0x00000007   /* abbreviated country name */
  255. #define LOCALE_SNATIVECTRYNAME      0x00000008   /* native name of country */
  256. #define LOCALE_IDEFAULTLANGUAGE     0x00000009   /* default language id */
  257. #define LOCALE_IDEFAULTCOUNTRY      0x0000000A   /* default country code */
  258. #define LOCALE_IDEFAULTCODEPAGE     0x0000000B   /* default oem code page */
  259. #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004   /* default ansi code page */
  260.  
  261. #define LOCALE_SLIST                0x0000000C   /* list item separator */
  262. #define LOCALE_IMEASURE             0x0000000D   /* 0 = metric, 1 = US */
  263.  
  264. #define LOCALE_SDECIMAL             0x0000000E   /* decimal separator */
  265. #define LOCALE_STHOUSAND            0x0000000F   /* thousand separator */
  266. #define LOCALE_SGROUPING            0x00000010   /* digit grouping */
  267. #define LOCALE_IDIGITS              0x00000011   /* number of fractional digits */
  268. #define LOCALE_ILZERO               0x00000012   /* leading zeros for decimal */
  269. #define LOCALE_INEGNUMBER           0x00001010   /* negative number mode */
  270. #define LOCALE_SNATIVEDIGITS        0x00000013   /* native ascii 0-9 */
  271.  
  272. #define LOCALE_SCURRENCY            0x00000014   /* local monetary symbol */
  273. #define LOCALE_SINTLSYMBOL          0x00000015   /* intl monetary symbol */
  274. #define LOCALE_SMONDECIMALSEP       0x00000016   /* monetary decimal separator */
  275. #define LOCALE_SMONTHOUSANDSEP      0x00000017   /* monetary thousand separator */
  276. #define LOCALE_SMONGROUPING         0x00000018   /* monetary grouping */
  277. #define LOCALE_ICURRDIGITS          0x00000019   /* # local monetary digits */
  278. #define LOCALE_IINTLCURRDIGITS      0x0000001A   /* # intl monetary digits */
  279. #define LOCALE_ICURRENCY            0x0000001B   /* positive currency mode */
  280. #define LOCALE_INEGCURR             0x0000001C   /* negative currency mode */
  281.  
  282. #define LOCALE_SDATE                0x0000001D   /* date separator */
  283. #define LOCALE_STIME                0x0000001E   /* time separator */
  284. #define LOCALE_SSHORTDATE           0x0000001F   /* short date format string */
  285. #define LOCALE_SLONGDATE            0x00000020   /* long date format string */
  286. #define LOCALE_SYEARMONTH           0x00001020   /* year/month date format string */
  287. #define LOCALE_STIMEFORMAT          0x00001003   /* time format string */
  288. #define LOCALE_IDATE                0x00000021   /* short date format ordering */
  289. #define LOCALE_ILDATE               0x00000022   /* long date format ordering */
  290. #define LOCALE_ITIME                0x00000023   /* time format specifier */
  291. #define LOCALE_ITIMEMARKPOSN        0x00001005   /* time marker position */
  292. #define LOCALE_ICENTURY             0x00000024   /* century format specifier (short date) */
  293. #define LOCALE_ITLZERO              0x00000025   /* leading zeros in time field */
  294. #define LOCALE_IDAYLZERO            0x00000026   /* leading zeros in day field (short date) */
  295. #define LOCALE_IMONLZERO            0x00000027   /* leading zeros in month field (short date) */
  296. #define LOCALE_S1159                0x00000028   /* AM designator */
  297. #define LOCALE_S2359                0x00000029   /* PM designator */
  298.  
  299. #define LOCALE_ICALENDARTYPE        0x00001009   /* type of calendar specifier */
  300. #define LOCALE_IOPTIONALCALENDAR    0x0000100B   /* additional calendar types specifier */
  301. #define LOCALE_IFIRSTDAYOFWEEK      0x0000100C   /* first day of week specifier */
  302. #define LOCALE_IFIRSTWEEKOFYEAR     0x0000100D   /* first week of year specifier */
  303.  
  304. #define LOCALE_SDAYNAME1            0x0000002A   /* long name for Monday */
  305. #define LOCALE_SDAYNAME2            0x0000002B   /* long name for Tuesday */
  306. #define LOCALE_SDAYNAME3            0x0000002C   /* long name for Wednesday */
  307. #define LOCALE_SDAYNAME4            0x0000002D   /* long name for Thursday */
  308. #define LOCALE_SDAYNAME5            0x0000002E   /* long name for Friday */
  309. #define LOCALE_SDAYNAME6            0x0000002F   /* long name for Saturday */
  310. #define LOCALE_SDAYNAME7            0x00000030   /* long name for Sunday */
  311. #define LOCALE_SABBREVDAYNAME1      0x00000031   /* abbreviated name for Monday */
  312. #define LOCALE_SABBREVDAYNAME2      0x00000032   /* abbreviated name for Tuesday */
  313. #define LOCALE_SABBREVDAYNAME3      0x00000033   /* abbreviated name for Wednesday */
  314. #define LOCALE_SABBREVDAYNAME4      0x00000034   /* abbreviated name for Thursday */
  315. #define LOCALE_SABBREVDAYNAME5      0x00000035   /* abbreviated name for Friday */
  316. #define LOCALE_SABBREVDAYNAME6      0x00000036   /* abbreviated name for Saturday */
  317. #define LOCALE_SABBREVDAYNAME7      0x00000037   /* abbreviated name for Sunday */
  318. #define LOCALE_SMONTHNAME1          0x00000038   /* long name for January */
  319. #define LOCALE_SMONTHNAME2          0x00000039   /* long name for February */
  320. #define LOCALE_SMONTHNAME3          0x0000003A   /* long name for March */
  321. #define LOCALE_SMONTHNAME4          0x0000003B   /* long name for April */
  322. #define LOCALE_SMONTHNAME5          0x0000003C   /* long name for May */
  323. #define LOCALE_SMONTHNAME6          0x0000003D   /* long name for June */
  324. #define LOCALE_SMONTHNAME7          0x0000003E   /* long name for July */
  325. #define LOCALE_SMONTHNAME8          0x0000003F   /* long name for August */
  326. #define LOCALE_SMONTHNAME9          0x00000040   /* long name for September */
  327. #define LOCALE_SMONTHNAME10         0x00000041   /* long name for October */
  328. #define LOCALE_SMONTHNAME11         0x00000042   /* long name for November */
  329. #define LOCALE_SMONTHNAME12         0x00000043   /* long name for December */
  330. #define LOCALE_SMONTHNAME13         0x0000100E   /* long name for 13th month (if exists) */
  331. #define LOCALE_SABBREVMONTHNAME1    0x00000044   /* abbreviated name for January */
  332. #define LOCALE_SABBREVMONTHNAME2    0x00000045   /* abbreviated name for February */
  333. #define LOCALE_SABBREVMONTHNAME3    0x00000046   /* abbreviated name for March */
  334. #define LOCALE_SABBREVMONTHNAME4    0x00000047   /* abbreviated name for April */
  335. #define LOCALE_SABBREVMONTHNAME5    0x00000048   /* abbreviated name for May */
  336. #define LOCALE_SABBREVMONTHNAME6    0x00000049   /* abbreviated name for June */
  337. #define LOCALE_SABBREVMONTHNAME7    0x0000004A   /* abbreviated name for July */
  338. #define LOCALE_SABBREVMONTHNAME8    0x0000004B   /* abbreviated name for August */
  339. #define LOCALE_SABBREVMONTHNAME9    0x0000004C   /* abbreviated name for September */
  340. #define LOCALE_SABBREVMONTHNAME10   0x0000004D   /* abbreviated name for October */
  341. #define LOCALE_SABBREVMONTHNAME11   0x0000004E   /* abbreviated name for November */
  342. #define LOCALE_SABBREVMONTHNAME12   0x0000004F   /* abbreviated name for December */
  343. #define LOCALE_SABBREVMONTHNAME13   0x0000100F   /* abbreviated name for 13th month (if exists) */
  344.  
  345. #define LOCALE_SPOSITIVESIGN        0x00000050   /* positive sign */
  346. #define LOCALE_SNEGATIVESIGN        0x00000051   /* negative sign */
  347. #define LOCALE_IPOSSIGNPOSN         0x00000052   /* positive sign position */
  348. #define LOCALE_INEGSIGNPOSN         0x00000053   /* negative sign position */
  349. #define LOCALE_IPOSSYMPRECEDES      0x00000054   /* mon sym precedes pos amt */
  350. #define LOCALE_IPOSSEPBYSPACE       0x00000055   /* mon sym sep by space from pos amt */
  351. #define LOCALE_INEGSYMPRECEDES      0x00000056   /* mon sym precedes neg amt */
  352. #define LOCALE_INEGSEPBYSPACE       0x00000057   /* mon sym sep by space from neg amt */
  353.  
  354. #if(WINVER >= 0x0400)
  355. #define LOCALE_FONTSIGNATURE       0x00000058   /* font signature */
  356. #endif /* WINVER >= 0x0400 */
  357.  
  358. /*
  359.  *  Time Flags for GetTimeFormatW.
  360.  */
  361. #define TIME_NOMINUTESORSECONDS    0x00000001  /* do not use minutes or seconds */
  362. #define TIME_NOSECONDS             0x00000002  /* do not use seconds */
  363. #define TIME_NOTIMEMARKER          0x00000004  /* do not use time marker */
  364. #define TIME_FORCE24HOURFORMAT     0x00000008  /* always use 24 hour format */
  365.  
  366. /*
  367.  *  Date Flags for GetDateFormatW.
  368.  */
  369. #define DATE_SHORTDATE             0x00000001  /* use short date picture */
  370. #define DATE_LONGDATE              0x00000002  /* use long date picture */
  371. #define DATE_USE_ALT_CALENDAR      0x00000004  /* use alternate calendar (if any) */
  372.  
  373. /*
  374.  *  Calendar Types.
  375.  *
  376.  *  These types are used for the GetALTCalendarInfoW NLS API routine.
  377.  */
  378. #define CAL_ICALINTVALUE           0x00000001   /* calendar type */
  379. #define CAL_SCALNAME               0x00000002   /* native name of calendar */
  380. #define CAL_IYEAROFFSETRANGE       0x00000003   /* starting years of eras */
  381. #define CAL_SERASTRING             0x00000004   /* era name for IYearOffsetRanges */
  382. #define CAL_SSHORTDATE             0x00000005   /* short date format string */
  383. #define CAL_SLONGDATE              0x00000006   /* long date format string */
  384. #define CAL_SDAYNAME1              0x00000007   /* native name for Monday */
  385. #define CAL_SDAYNAME2              0x00000008   /* native name for Tuesday */
  386. #define CAL_SDAYNAME3              0x00000009   /* native name for Wednesday */
  387. #define CAL_SDAYNAME4              0x0000000a   /* native name for Thursday */
  388. #define CAL_SDAYNAME5              0x0000000b   /* native name for Friday */
  389. #define CAL_SDAYNAME6              0x0000000c   /* native name for Saturday */
  390. #define CAL_SDAYNAME7              0x0000000d   /* native name for Sunday */
  391. #define CAL_SABBREVDAYNAME1        0x0000000e   /* abbreviated name for Monday */
  392. #define CAL_SABBREVDAYNAME2        0x0000000f   /* abbreviated name for Tuesday */
  393. #define CAL_SABBREVDAYNAME3        0x00000010   /* abbreviated name for Wednesday */
  394. #define CAL_SABBREVDAYNAME4        0x00000011   /* abbreviated name for Thursday */
  395. #define CAL_SABBREVDAYNAME5        0x00000012   /* abbreviated name for Friday */
  396. #define CAL_SABBREVDAYNAME6        0x00000013   /* abbreviated name for Saturday */
  397. #define CAL_SABBREVDAYNAME7        0x00000014   /* abbreviated name for Sunday */
  398. #define CAL_SMONTHNAME1            0x00000015   /* native name for January */
  399. #define CAL_SMONTHNAME2            0x00000016   /* native name for February */
  400. #define CAL_SMONTHNAME3            0x00000017   /* native name for March */
  401. #define CAL_SMONTHNAME4            0x00000018   /* native name for April */
  402. #define CAL_SMONTHNAME5            0x00000019   /* native name for May */
  403. #define CAL_SMONTHNAME6            0x0000001a   /* native name for June */
  404. #define CAL_SMONTHNAME7            0x0000001b   /* native name for July */
  405. #define CAL_SMONTHNAME8            0x0000001c   /* native name for August */
  406. #define CAL_SMONTHNAME9            0x0000001d   /* native name for September */
  407. #define CAL_SMONTHNAME10           0x0000001e   /* native name for October */
  408. #define CAL_SMONTHNAME11           0x0000001f   /* native name for November */
  409. #define CAL_SMONTHNAME12           0x00000020   /* native name for December */
  410. #define CAL_SMONTHNAME13           0x00000021   /* native name for 13th month (if any) */
  411. #define CAL_SABBREVMONTHNAME1      0x00000022   /* abbreviated name for January */
  412. #define CAL_SABBREVMONTHNAME2      0x00000023   /* abbreviated name for February */
  413. #define CAL_SABBREVMONTHNAME3      0x00000024   /* abbreviated name for March */
  414. #define CAL_SABBREVMONTHNAME4      0x00000025   /* abbreviated name for April */
  415. #define CAL_SABBREVMONTHNAME5      0x00000026   /* abbreviated name for May */
  416. #define CAL_SABBREVMONTHNAME6      0x00000027   /* abbreviated name for June */
  417. #define CAL_SABBREVMONTHNAME7      0x00000028   /* abbreviated name for July */
  418. #define CAL_SABBREVMONTHNAME8      0x00000029   /* abbreviated name for August */
  419. #define CAL_SABBREVMONTHNAME9      0x0000002a   /* abbreviated name for September */
  420. #define CAL_SABBREVMONTHNAME10     0x0000002b   /* abbreviated name for October */
  421. #define CAL_SABBREVMONTHNAME11     0x0000002c   /* abbreviated name for November */
  422. #define CAL_SABBREVMONTHNAME12     0x0000002d   /* abbreviated name for December */
  423. #define CAL_SABBREVMONTHNAME13     0x0000002e   /* abbreviated name for 13th month (if any) */
  424.  
  425. /*
  426.  *  Calendar Enumeration Value.
  427.  */
  428. #define ENUM_ALL_CALENDARS         0xffffffff   /* enumerate all calendars */
  429.  
  430. /*
  431.  *  Calendar ID Values.
  432.  */
  433. #define CAL_GREGORIAN        1         /* Gregorian (localized) calendar */
  434. #define CAL_GREGORIAN_US     2         /* Gregorian (U.S.) calendar */
  435. #define CAL_JAPAN            3         /* Japanese Emperor Era calendar */
  436. #define CAL_TAIWAN           4         /* Republic of China Era calendar */
  437. #define CAL_KOREA            5         /* Korean Tangun Era calendar */
  438. #define CAL_HIRJI             6           /* Hirji (Arabic Lunar) calendar */
  439. #define CAL_THAI             7           /* Thai calendar */
  440. #define CAL_HEBREW             8           /* Hebrew calendar */
  441.  
  442. /***************************************************************************\
  443. * Typedefs
  444. *
  445. * Define all types for the NLS component here.
  446. \***************************************************************************/
  447.  
  448. /*
  449.  *  Locale type constant.
  450.  */
  451. typedef DWORD LCTYPE;
  452.  
  453. /*
  454.  *  Calendar type constant.
  455.  */
  456. typedef DWORD CALTYPE;
  457.  
  458. /*
  459.  *  Calendar ID.
  460.  */
  461. typedef DWORD CALID;
  462.  
  463. /*
  464.  *  CP Info.
  465.  */
  466.  
  467. typedef struct _cpinfo {
  468.     UINT    MaxCharSize;                    /* max length (bytes) of a char */
  469.     BYTE    DefaultChar[MAX_DEFAULTCHAR];   /* default character */
  470.     BYTE    LeadByte[MAX_LEADBYTES];        /* lead byte ranges */
  471. } CPINFO, *LPCPINFO;
  472.  
  473. /*
  474.  *  Number format.
  475.  */
  476.  
  477. typedef struct _numberfmtW {
  478.     UINT    NumDigits;                 /* number of decimal digits */
  479.     UINT    LeadingZero;               /* if leading zero in decimal fields */
  480.     UINT    Grouping;                  /* group size left of decimal */
  481.     LPWSTR  lpDecimalSep;              /* ptr to decimal separator string */
  482.     LPWSTR  lpThousandSep;             /* ptr to thousand separator string */
  483.     UINT    NegativeOrder;             /* negative number ordering */
  484. } NUMBERFMTW, *LPNUMBERFMTW;
  485.  
  486. typedef NUMBERFMTW NUMBERFMT;
  487. typedef LPNUMBERFMTW LPNUMBERFMT;
  488.  
  489. /*
  490.  *  Currency format.
  491.  */
  492.  
  493. typedef struct _currencyfmtW {
  494.     UINT    NumDigits;                 /* number of decimal digits */
  495.     UINT    LeadingZero;               /* if leading zero in decimal fields */
  496.     UINT    Grouping;                  /* group size left of decimal */
  497.     LPWSTR  lpDecimalSep;              /* ptr to decimal separator string */
  498.     LPWSTR  lpThousandSep;             /* ptr to thousand separator string */
  499.     UINT    NegativeOrder;             /* negative currency ordering */
  500.     UINT    PositiveOrder;             /* positive currency ordering */
  501.     LPWSTR  lpCurrencySymbol;          /* ptr to currency symbol string */
  502. } CURRENCYFMTW, *LPCURRENCYFMTW;
  503.  
  504. typedef CURRENCYFMTW CURRENCYFMT;
  505. typedef LPCURRENCYFMTW LPCURRENCYFMT;
  506.  
  507. /*
  508.  *  Enumeration function constants.
  509.  */
  510.  
  511. #ifdef STRICT
  512.  
  513. typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
  514. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
  515. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
  516. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
  517. typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
  518.  
  519. #else /* !STRICT */
  520.  
  521. typedef FARPROC LOCALE_ENUMPROCW;
  522. typedef FARPROC CODEPAGE_ENUMPROCW;
  523. typedef FARPROC DATEFMT_ENUMPROCW;
  524. typedef FARPROC TIMEFMT_ENUMPROCW;
  525. typedef FARPROC CALINFO_ENUMPROCW;
  526.  
  527. #endif /* !STRICT */
  528.  
  529. #define LOCALE_ENUMPROC    LOCALE_ENUMPROCW
  530. #define CODEPAGE_ENUMPROC  CODEPAGE_ENUMPROCW
  531. #define DATEFMT_ENUMPROC   DATEFMT_ENUMPROCW
  532. #define TIMEFMT_ENUMPROC   TIMEFMT_ENUMPROCW
  533. #define CALINFO_ENUMPROC   CALINFO_ENUMPROCW
  534.  
  535. /***************************************************************************\
  536. * Function Prototypes
  537. *
  538. * Only prototypes for the NLS APIs should go here.
  539. \***************************************************************************/
  540.  
  541. /*
  542.  *  Code Page Dependent APIs.
  543.  */
  544.  
  545. BOOL WINAPI IsValidCodePage(UINT CodePage);
  546.  
  547. UINT WINAPI GetACP(void);
  548.  
  549. UINT WINAPI GetOEMCP(void);
  550.  
  551. BOOL WINAPI GetCPInfo(UINT CodePage, LPCPINFO lpCPInfo);
  552.  
  553. BOOL WINAPI IsDBCSLeadByte(BYTE TestChar);
  554.  
  555. BOOL WINAPI IsDBCSLeadByteEx(UINT CodePage, BYTE TestChar);
  556.  
  557. int WINAPI MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
  558.     int cchMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
  559.  
  560. int WINAPI WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
  561.     int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCSTR lpDefaultChar,
  562.     LPBOOL lpUsedDefaultChar);
  563.  
  564. #define CSTR_LESS_THAN 1
  565. #define CSTR_EQUAL 2
  566. #define CSTR_GREATER_THAN 3
  567.  
  568. int WINAPI CompareStringW(LCID Locale, DWORD dwCmpFlags, LPCWSTR lpString1,
  569.     int cchCount1, LPCWSTR lpString2, int cchCount2);
  570.  
  571. #ifdef UNICODE
  572. #define CompareString  CompareStringW
  573. #else
  574. #define CompareString  CompareStringA
  575. #endif
  576.  
  577. int WINAPI LCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr,
  578.     int cchSrc, LPWSTR lpDestStr, int cchDest);
  579.  
  580. #ifdef UNICODE
  581. #define LCMapString  LCMapStringW
  582. #else
  583. #define LCMapString  LCMapStringA
  584. #endif
  585.  
  586. int WINAPI GetLocaleInfoW(LCID Locale, LCTYPE LCType, LPWSTR lpLCData, int cchData);
  587.  
  588. #ifdef UNICODE
  589. #define GetLocaleInfo  GetLocaleInfoW
  590. #else
  591. #define GetLocaleInfo  GetLocaleInfoA
  592. #endif
  593.  
  594. BOOL WINAPI SetLocaleInfoW(LCID Locale, LCTYPE LCType, LPCWSTR lpLCData);
  595.  
  596. #ifdef UNICODE
  597. #define SetLocaleInfo  SetLocaleInfoW
  598. #else
  599. #define SetLocaleInfo  SetLocaleInfoA
  600. #endif
  601.  
  602. int WINAPI GetTimeFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpTime,
  603.     LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime);
  604.  
  605. #ifdef UNICODE
  606. #define GetTimeFormat  GetTimeFormatW
  607. #else
  608. #define GetTimeFormat  GetTimeFormatA
  609. #endif
  610.  
  611. int WINAPI GetDateFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate,
  612.     LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate);
  613.  
  614. #ifdef UNICODE
  615. #define GetDateFormat  GetDateFormatW
  616. #else
  617. #define GetDateFormat  GetDateFormatA
  618. #endif
  619.  
  620. int WINAPI GetNumberFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue,
  621.     const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
  622.  
  623. #ifdef UNICODE
  624. #define GetNumberFormat  GetNumberFormatW
  625. #else
  626. #define GetNumberFormat  GetNumberFormatA
  627. #endif
  628.  
  629. int WINAPI GetCurrencyFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue,
  630.     const CURRENCYFMTW *lpFormat, LPWSTR  lpCurrencyStr, int cchCurrency);
  631.  
  632. #ifdef UNICODE
  633. #define GetCurrencyFormat  GetCurrencyFormatW
  634. #else
  635. #define GetCurrencyFormat  GetCurrencyFormatA
  636. #endif
  637.  
  638. BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW lpCalInfoEnumProc,
  639.     LCID Locale, CALID Calendar, CALTYPE CalType);
  640.  
  641. #ifdef UNICODE
  642. #define EnumCalendarInfo  EnumCalendarInfoW
  643. #else
  644. #define EnumCalendarInfo  EnumCalendarInfoA
  645. #endif
  646.  
  647. BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
  648.     LCID Locale, DWORD dwFlags);
  649.  
  650. #ifdef UNICODE
  651. #define EnumTimeFormats  EnumTimeFormatsW
  652. #else
  653. #define EnumTimeFormats  EnumTimeFormatsA
  654. #endif
  655.  
  656. BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW lpDateFmtEnumProc,
  657.     LCID Locale, DWORD dwFlags);
  658.  
  659. #ifdef UNICODE
  660. #define EnumDateFormats  EnumDateFormatsW
  661. #else
  662. #define EnumDateFormats  EnumDateFormatsA
  663. #endif
  664.  
  665. BOOL WINAPI IsValidLocale(LCID Locale, DWORD dwFlags);
  666.  
  667. LCID WINAPI ConvertDefaultLocale(LCID Locale);
  668.  
  669. LANGID WINAPI GetSystemDefaultLangID(void);
  670.  
  671. LANGID WINAPI GetUserDefaultLangID(void);
  672.  
  673. LCID WINAPI GetSystemDefaultLCID(void);
  674.  
  675. LCID WINAPI GetUserDefaultLCID(void);
  676.  
  677. /*
  678.  *  Locale Independent APIs.
  679.  */
  680.  
  681. BOOL WINAPI GetStringTypeW(DWORD dwInfoType, LPCWSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
  682.  
  683. #ifdef UNICODE
  684. #define GetStringType GetStringTypeW
  685. #else
  686. #define GetStringType GetStringTypeA
  687. #endif
  688.  
  689. BOOL WINAPI GetStringTypeExW(LCID Locale, DWORD dwInfoType, LPCWSTR lpSrcStr,
  690.     int cchSrc, LPWORD lpCharType);
  691.  
  692. #ifdef UNICODE
  693. #define GetStringTypeEx  GetStringTypeExW
  694. #else
  695. #define GetStringTypeEx  GetStringTypeExA
  696. #endif
  697.  
  698. int WINAPI FoldStringW(DWORD dwMapFlags, LPCWSTR lpSrcStr,  int cchSrc, LPWSTR lpDestStr, int cchDest);
  699.  
  700. #ifdef UNICODE
  701. #define FoldString  FoldStringW
  702. #else
  703. #define FoldString  FoldStringA
  704. #endif
  705.  
  706. BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpLocaleEnumProc, DWORD dwFlags);
  707.  
  708. #ifdef UNICODE
  709. #define EnumSystemLocales  EnumSystemLocalesW
  710. #else
  711. #define EnumSystemLocales  EnumSystemLocalesA
  712. #endif
  713.  
  714. BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags);
  715.  
  716. #ifdef UNICODE
  717. #define EnumSystemCodePages  EnumSystemCodePagesW
  718. #else
  719. #define EnumSystemCodePages  EnumSystemCodePagesA
  720. #endif
  721.  
  722. BOOL SetSystemDefaultLCID(LCID Locale);
  723. BOOL SetOEMCP(UINT oemcp);
  724. BOOL SetACP(UINT acp);
  725.  
  726. #endif   // NONLS
  727.  
  728. #ifdef __cplusplus
  729. }
  730. #endif
  731.  
  732. // @CESYSGEN ENDIF
  733.  
  734. #endif   // _WINNLS_
  735.  
  736.