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