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