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