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