home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / OS2NLS.H < prev    next >
C/C++ Source or Header  |  1997-08-17  |  13KB  |  371 lines

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