home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / IBMH / OS2NLS.H < prev    next >
Text File  |  1995-04-14  |  13KB  |  359 lines

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