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