home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / OS2NLS.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  15KB  |  440 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: OS2NLS.H
  15. *
  16. * OS/2 Presentation Manager DBCS include file
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * The definitions in this file are for use on Double Byte Character Set
  22. * (DBCS) versions of OS/2 only. They may not be used on SBCS versions.
  23. *
  24. * This is included from PMWIN.H when INCL_NLS symbol is defined
  25. *
  26. * ===========================================================================
  27. *
  28. * Comments at the end of each typedef line give the name tags used in
  29. * the assembler include version of this file.
  30. *
  31. * The assembler include version of this file excludes lines between NOINC
  32. * and INC comments.
  33. *
  34. #ifndef __IBMC__
  35.    * The public version of this file (as shipped with the OS/2 Toolkit
  36.    * product) excludes all non 32-bit material marked in this file
  37.    * as well as any areas specifically marked with __IBMC__ conditional
  38.    * sections - including this paragraph. The H2IBMH rexx command file
  39.    * removes these sections.
  40. #endif
  41. \***************************************************************************/
  42.  
  43. #ifdef __IBMC__
  44.    #pragma checkout( suspend )
  45.       #ifndef __CHKHDR__
  46.          #pragma checkout( suspend )
  47.       #endif
  48.    #pragma checkout( resume )
  49. #endif
  50.  
  51. #ifndef INCL_32         /* If neither INCL_32 or INCL_16 set already */
  52.    #ifndef INCL_16      /* find out from compiler if 32-bit or not.  */
  53.       #ifdef M_I386
  54.          #define INCL_32 /* Compiling for 32-bit */
  55.       #else
  56.          #define INCL_16 /* Compiling for 16-bit */
  57.       #endif
  58.    #endif
  59. #endif
  60.  
  61. /* NOINC */
  62. #ifndef __OS2NLS__
  63. /* INC */
  64. #define __OS2NLS__
  65.  
  66. /* resource ID offset for bi-lingual system resources (menu & string) */
  67.  
  68. #define RID_DBE_OFFSET          0x1000
  69. #define STR_DBE_OFFSET          0x1000
  70.  
  71.  
  72. /* definition of Virtual key values for DBCS */
  73.  
  74. #define VK_DBE_FIRST            0x80 /* VK_DBCSFIRST */
  75. #define VK_DBE_LAST             0xff /* VK_DBCSLAST  */
  76.  
  77. #define VK_DBE_IMEFIRST         0xA0 /* VK_DBE_FIRST + 0x20 */
  78. #define VK_DBE_IMELAST          0xFF /* VK_DBE_LAST */
  79.  
  80. /* OEM keyboard support including PS/2 keyboard */
  81.  
  82. #define VK_DBE_OEMFIRST         0xC0
  83. #define VK_DBE_OEMLAST          0xCF
  84.  
  85. /* for codepage 932 */
  86.  
  87. #define VK_DBE_ALPHANUMERIC     0x80 /* VK_DBE_FIRST + 0x00 */
  88. #define VK_DBE_KATAKANA         0x81 /* VK_DBE_FIRST + 0x01 */
  89. #define VK_DBE_HIRAGANA         0x82 /* VK_DBE_FIRST + 0x02 */
  90. #define VK_DBE_SBCSCHAR         0x83 /* VK_DBE_FIRST + 0x03 */
  91. #define VK_DBE_DBCSCHAR         0x84 /* VK_DBE_FIRST + 0x04 */
  92. #define VK_DBE_SBCSDBCSCHAR     0x85 /* VK_DBE_FIRST + 0x05 */
  93. #define VK_DBE_ROMAN            0x86 /* VK_DBE_FIRST + 0x06 */
  94.  
  95. /* for codepage 934 */
  96.  
  97. #define VK_DBE_HANJA            0x87 /* VK_DBE_FIRST + 0x07 */
  98. #define VK_DBE_HANGEUL          0x88 /* VK_DBE_FIRST + 0x08 */
  99. #define VK_DBE_JAMO             0x89 /* VK_DBE_FIRST + 0x09 */
  100.  
  101. /* for codepage 936 */
  102.  
  103. #define VK_DBE_HANZI            0x8A /* VK_DBE_FIRST + 0x0A */
  104.  
  105. /* for codepage 938 */
  106.  
  107. #define VK_DBE_TSANGJYE         0x8C /* VK_DBE_FIRST + 0x0C */
  108. #define VK_DBE_PHONETIC         0x8D /* VK_DBE_FIRST + 0x0D */
  109.  
  110. #define VK_DBE_KANJI            0xa0 /* VK_DBE_IMEFIRST + 0x00 */
  111. #define VK_DBE_IMEACTIVATE      0xa0 /* VK_DBE_IMEFIRST + 0x00 */
  112. #define VK_DBE_CONV             0xa1 /* VK_DBE_IMEFIRST + 0x01 */
  113. #define VK_DBE_NOCONV           0xa2 /* VK_DBE_IMEFIRST + 0x02 */
  114. #define VK_DBE_TANGO            0xa3 /* VK_DBE_IMEFIRST + 0x03 */
  115. #define VK_DBE_WORDREGISTER     0xa3 /* VK_DBE_IMEFIRST + 0x03 */
  116. #define VK_DBE_IMEDIALOG        0xa4 /* VK_DBE_IMEFIRST + 0x04 */
  117. #define VK_DBE_IME_MBSELECTED   0xa5 /* VK_DBE_IMEFIRST + 0x05 */
  118. #define VK_DBE_IME_LBSELECTED   0xa6 /* VK_DBE_IMEFIRST + 0x06 */
  119. #define VK_DBE_CODEINPUT        0xa7 /* VK_DBE_IMEFIRST + 0x07 */
  120. #define VK_DBE_ALLCANDIDATE     0xa8 /* VK_DBE_IMEFIRST + 0x08 */
  121. #define VK_DBE_PREVCANDIDATE    0xa9 /* VK_DBE_IMEFIRST + 0x09 */
  122. #define VK_DBE_IMEDEACTIVATE    0xaa /* VK_DBE_IMEFIRST + 0x0a */
  123. #define VK_DBE_IME_WORDREGISTED 0xab /* VK_DBE_IMEFIRST + 0x0b */
  124. #define VK_DBE_IMECONTROL       0xac /* VK_DBE_IMEFIRST + 0x0c */
  125. #define VK_DBE_IME_FREEPS       0xad /* VK_DBE_IMEFIRST + 0x0d */
  126. #define VK_DBE_IMEMODEEXIT      0xae /* VK_DBE_IMEFIRST + 0x0e */
  127.  
  128. /* Window Class definitoin for DBCS (migration) */
  129.  
  130. #define WC_DBE_APPSTAT          ((PSZ)0xffff0010L) /* WC_APPSTAT */
  131. #define WC_DBE_KBDSTAT          ((PSZ)0xffff0011L) /* WC_KBDSTAT */
  132. #define WC_DBE_PECIC            ((PSZ)0xffff0012L) /* WC_PECIC   */
  133.  
  134. /* Double byte character set messages */
  135.  
  136. #define WM_DBE_SETAPPLSTAT      0x00b6
  137. #define WM_DBE_KKCPARAMS        0x00bc
  138.  
  139. /* DBCS unique statndsrd Frame Create Flag (migration) */
  140.  
  141. #define FCF_DBE_STATAREA        0x80000000L /* FCF_DBE_APPSTAT */
  142.  
  143. /* WM_SETWINDOWPARAM ctldata of DBCS status area */
  144.  
  145. #ifdef INCL_32
  146. typedef struct _KEYSTSDATA {        /* keysts */
  147.     ULONG       wpmctlflag;
  148.     ULONG       textlength;
  149.     PSZ         pTextString;
  150.     PSZ         pAttrString;
  151.     PSZ         pRomanString;
  152. } KEYSTSDATA;
  153. #else
  154. typedef struct _KEYSTSDATA {        /* keysts */
  155.     USHORT      wpmctlflag;
  156.     USHORT      textlength;
  157.     PSZ         lpTextString;
  158.     PSZ         lpAttrString;
  159.     PSZ         lpRomanString;
  160. } KEYSTSDATA;
  161. #endif
  162. typedef KEYSTSDATA FAR *PKEYSTSDATA;
  163.  
  164. #ifdef INCL_32
  165. typedef struct _WPMCTLPARAMS {      /* wpmctlprm - old definition */
  166.     ULONG       wpmctlflag;
  167.     ULONG       textlength;
  168.     PSZ         pTextString;
  169.     PSZ         pAttrString;
  170. } WPMCTLPARAMS;
  171. #else
  172. typedef struct _WPMCTLPARAMS {      /* wpmctlprm - old definition */
  173.     USHORT      wpmctlflag;
  174.     USHORT      textlength;
  175.     PSZ         lpTextString;
  176.     PSZ         lpAttrString;
  177. } WPMCTLPARAMS;
  178. #endif
  179. typedef WPMCTLPARAMS FAR *PWPMCTLPARAMS;
  180.  
  181. /* wpmctlflag value definition */
  182.  
  183. #define DBE_KSF_ALPHANUMERIC       0x0001
  184. #define DBE_KSF_KATAKANA           0x0002
  185. #define DBE_KSF_HIRAGANA           0x0004
  186. #define DBE_KSF_CAPS               0x0008
  187. #define DBE_KSF_ROMAN              0x0010
  188. #define DBE_KSF_HANKAKU            0x0020
  189. #define DBE_KSF_ZENKAKU            0x0040
  190. #define DBE_KSF_SBCS               DBE_KSF_HANKAKU
  191. #define DBE_KSF_DBCS               DBE_KSF_ZENKAKU
  192. #define DBE_KSF_UPPER              0x0080
  193. #define DBE_KSF_LOWER              0x0100
  194. #define DBE_KSF_TEXT               0x0200
  195. #define DBE_KSF_NOROMAN            0x0400
  196. #define DBE_KSF_DISABLEONTHESPOT   0x0800
  197. #define DBE_KSF_ROMANTEXT          0x1000
  198.  
  199. /* For Code Page 934(Korea) wpmctlflag value definition  */
  200.  
  201. #define DBE_KSF_JAMO               0x0002
  202. #define DBE_KSF_HANGEUL            0x0004
  203.  
  204. /* For Code Page 938(Taiwan) wpmctlflag value definition  */
  205.  
  206. #define DBE_KSF_PHONETIC           0x0002
  207. #define DBE_KSF_TSANGJYE           0x0004
  208.  
  209. /* WM_SETWINDOWPARAM ctldata of Pecic control */
  210.  
  211. #ifdef INCL_32
  212. typedef struct _PECICDATA {      /* pecicdata */
  213.     ULONG       wpmctlflag;
  214.     ULONG       textlength;
  215.     PSZ         pTextString;
  216.     PSZ         pAttrString;
  217.     ULONG       CursorPos;
  218.     ULONG       CursorAttr;
  219. } PECICDATA;
  220. #else
  221. typedef struct _PECICDATA {      /* pecicdata */
  222.     USHORT      wpmctlflag;
  223.     USHORT      textlength;
  224.     PSZ         lpTextString;
  225.     PSZ         lpAttrString;
  226.     USHORT      CursorPos;
  227.     USHORT      CursorAttr;
  228. } PECICDATA;
  229. #endif
  230. typedef PECICDATA FAR *PPECICDATA;
  231.  
  232. /* wndparams definition of WM_DBE_APPLSTAT */
  233.  
  234. #define DBE_WPM_APPLSTAT_VISIBILITY   0x0004
  235.  
  236. /* ctldata of DBE_WPM_APPLSTAT_VISIBLITY */
  237.  
  238. #define DBE_AS_APPLTOP          0x0001
  239. #define DBE_AS_KBDTOP           0x0002
  240. #define DBE_AS_PECICTOP         0x0004
  241. #define DBE_AS_APPLBOTTOM       0x0008
  242.  
  243. /** WM_DBE_KKCPARAMS definition **/
  244. /* mp1(lpkkcparams) */
  245.  
  246. #ifdef INCL_32
  247. typedef struct _KKCPARAMS {      /* kkcparams */
  248.     ULONG       lenKKCParams;
  249.     ULONG       fRequest;
  250.     ULONG       fKKCParams;
  251.     PVOID       pKKCData;
  252.     ULONG       Reserved;
  253. } KKCPARAMS;
  254. typedef KKCPARAMS *PKKCPARAMS;
  255. #else
  256. typedef struct _KKCPARAMS {      /* kkcparams */
  257.     USHORT      lenKKCParams;
  258.     USHORT      fRequest;
  259.     USHORT      fKKCParams;
  260.     PVOID       lpKKCData;
  261.     ULONG       Reserved;
  262. } KKCPARAMS;
  263. typedef KKCPARAMS FAR *LPKKCPARAMS;
  264. #endif
  265.  
  266. /* fRequest */
  267. #define DBE_KKCPARAMS_SET           0x0001
  268. #define DBE_KKCPARAMS_QUERY         0x0002
  269.  
  270. /* fKKCParams */
  271. #define DBE_KKCPARAMS_PHYSICALATTRIBUTE  0x0001
  272. #define DBE_KKCPARAMS_PECICCURSORPOS     0x0002
  273.  
  274. #pragma pack(1) /* force structure alignment packing */
  275.  
  276. /* Level format for ColorLookUpTable */
  277. typedef struct _LEVEL { /* Level */
  278.     UCHAR       attri1;                         /** 1st Attribute         **/
  279.     UCHAR       attri2;                         /** 2nd Attribute         **/
  280. } LEVEL;
  281. typedef LEVEL FAR *PLEVEL;
  282.  
  283. #pragma pack()  /* restore packing to default */
  284.  
  285. /* Color Look Up Table format */
  286. #ifdef INCL_32
  287. typedef struct _COLORLOOKUPTBL { /* ColorLookUpTable */
  288.     ULONG       nAttr;                          /** number of Attribute   **/
  289.     LEVEL       PhysicalLevel[32];              /** struct of Levels      **/
  290. } COLORLOOKUPTBL;
  291. typedef COLORLOOKUPTBL *PCOLORLOOKUPTBL;
  292. #else
  293. typedef struct _COLORLOOKUPTBL { /* ColorLookUpTable */
  294.     USHORT      nAttr;                          /** number of Attribute   **/
  295.     LEVEL       PhysicalLevel[32];              /** struct of Levels      **/
  296. } COLORLOOKUPTBL;
  297. typedef COLORLOOKUPTBL FAR *LPCOLORLOOKUPTBL;
  298. #endif
  299.  
  300. /** WinDBCSIMEControl() Definition & Prototype **/
  301.  
  302. /* type */
  303. #define DBE_IMCTL_QUERY         0x0001
  304. #define DBE_IMCTL_SET           0x0002
  305.  
  306. #ifdef INCL_32
  307. typedef struct _IMEMODE {       /* imemode */
  308.     ULONG  lenIMEMODE;
  309.     ULONG  fIMEMode;
  310.     ULONG  hIME;                /* query mode only valid */
  311.     ULONG  hModIME;             /* query mode only valid */
  312. } IMEMODE;
  313. #else
  314. typedef struct _IMEMODE {       /* imemode */
  315.     USHORT lenIMEMODE;
  316.     USHORT fIMEMode;
  317.     USHORT hIME;                /* query mode only valid */
  318.     USHORT hModIME;             /* query mode only valid */
  319. } IMEMODE;
  320. #endif
  321. typedef IMEMODE FAR *PIMEMODE;
  322.  
  323. /* definition of fIMEMode */
  324. #define DBE_IMCTL_IMEENABLE      0x0001
  325. #define DBE_IMCTL_IMEDISABLE     0x0002
  326. #define DBE_IMCTL_IMEMODE        0x0004
  327. #define DBE_IMCTL_NOTIMEMODE     0x0008
  328. #define DBE_IMCTL_INHERIT_PFRAME 0x0100
  329. #define DBE_IMCTL_INTERIMREQUEST 0x8000
  330.  
  331. #ifdef INCL_32
  332. ULONG APIENTRY WinDBCSIMEControl( HAB hab,
  333.                                   HWND hwndFrame,
  334.                                   ULONG ulType,
  335.                                   PIMEMODE pIMEMode );
  336. #else
  337. ULONG APIENTRY WinDBCSIMEControl( HAB hab,
  338.                                   HWND hwndFrame,
  339.                                   USHORT usType,
  340.                                   PIMEMODE pIMEMode );
  341. #endif /* INCL_32 */
  342.  
  343.  
  344. /** WinDBCSModeControl() Definition & Prototype **/
  345.  
  346. /* WinDBCSModeControl parameters definitions */
  347. /* type */
  348. #define DBE_MCTL_QUERY          0x0001
  349. #define DBE_MCTL_SET            0x0002
  350.  
  351. /* arg */
  352. #define DBE_MCTL_INPUTMODEREQUEST 0x0001
  353. #define DBE_MCTL_JAPANREQ       0x0001   /* migration */
  354.  
  355. /* parm - MCTL_JAPAN */
  356. #define DBE_MCTL_ALPHANUMERIC   0x0001
  357. #define DBE_MCTL_KATAKANA       0x0002
  358. #define DBE_MCTL_HIRAGANA       0x0004
  359. #define DBE_MCTL_SBCSCHAR       0x0008
  360. #define DBE_MCTL_DBCSCHAR       0x0010
  361. #define DBE_MCTL_ROMAN          0x0020
  362. #define DBE_MCTL_NOROMAN        0x0040
  363.  
  364. #define DBE_MCTL_KKCREQ         0x1000
  365. #define DBE_MCTL_CP932REQ       0x0001
  366. #define DBE_MCTL_KKCENABLE      0x1000
  367. #define DBE_MCTL_KKCDISABLE     0x2000
  368. #define DBE_MCTL_HANKAKU        0x0008
  369. #define DBE_MCTL_ZENKAKU        0x0010
  370.  
  371. /* parm - MCTL_KOREA */
  372. #define DBE_MCTL_JAMO           0x0002
  373. #define DBE_MCTL_HANGEUL        0x0004
  374. #define DBE_MCTL_INTERIMREQUEST 0x0080
  375.  
  376. /* parm - MCTL_TCHINESE */
  377. #define DBE_MCTL_PHONETIC       0x0002
  378. #define DBE_MCTL_TSANGJYE       0x0004
  379.  
  380. /* for MDI support */
  381. #define DBE_MCTL_INHERIT_PFRAME 0x0100
  382.  
  383. #ifdef INCL_32
  384. ULONG APIENTRY WinDBCSModeControl(HAB hab,
  385.                                   HWND hwndFrame,
  386.                                   ULONG ulType,
  387.                                   ULONG ulArg,
  388.                                   PULONG pparm);
  389. #else
  390. ULONG APIENTRY WinDBCSModeControl(HAB hab,
  391.                                   HWND hwndFrame,
  392.                                   USHORT usType,
  393.                                   USHORT usArg,
  394.                                   PUSHORT pparm);
  395. #endif /* INCL_32 */
  396.  
  397. /* Font Driver Description structure  */
  398.  
  399. typedef struct _FD_DESC {  /* fd_desc */
  400.     ULONG  flType;
  401.     CHAR   str64Desc[64];
  402. } FD_DESC ;
  403. typedef FD_DESC  FAR *PFD_DESC;
  404.  
  405. /* Font Driver functions */
  406.  
  407. BOOL    APIENTRY WinDBCSLoadFontDriver(HAB hab,
  408.                                        PSZ psz);
  409.  
  410. BOOL    APIENTRY WinDBCSUnloadFontDriver(HAB hab,
  411.                                          PSZ psz);
  412.  
  413. BOOL    APIENTRY WinDBCSQueryFDDescription(HAB hab,
  414.                                            PSZ psz,
  415.                                            PFD_DESC pfd_desc);
  416.  
  417. /* fd_type definition */
  418.  
  419. #define DBE_FD_DESC_SYSTEM      0x0001
  420. #define DBE_FD_DESC_PUBLIC      0x0002
  421. #define DBE_FD_DESC_PRIVATE     0x0004
  422.  
  423. /* System menu item number ID in MENUITEM for DBCS unique function */
  424. #define SC_DBE_IME                 0x8018
  425. #define SC_DBE_IMESEPARATOR        0x8019
  426.  
  427. /* NOINC */
  428. #endif /* __OS2NLS__ */
  429. /* INC */
  430.  
  431. #ifdef __IBMC__
  432.    #pragma checkout( suspend )
  433.       #ifndef __CHKHDR__
  434.          #pragma checkout( resume )
  435.       #endif
  436.    #pragma checkout( resume )
  437. #endif
  438.  
  439. /**************************** end of file **********************************/
  440.