home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / H_DBCS / VKBD.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  8KB  |  177 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)vkbd.h     6.6 92/02/14";*/
  14. /***    VKBD.H
  15.  *
  16.  *      SCCSID = @(#)vkbd.h     6.6 92/02/14
  17.  *
  18.  *      MVDM Virtual Keyboard Exported Definitions
  19.  *
  20.  *      For include file hierarchy, see MVDM.H
  21.  *
  22.  *
  23.  *      MODIFICATION HISTORY
  24.  *      10/11/88        Created.
  25.  */
  26.  
  27.  
  28. #ifndef INCL_NONE               // include everything by default
  29. #define INCL_VKBD
  30. #endif
  31.  
  32. #ifdef  INCL_VKBD
  33. #define INCL_VKBDSYSREQ
  34. #define INCL_VKBDINTERFACES
  35. #endif
  36.  
  37.  
  38.  
  39. #ifdef  INCL_VKBDSYSREQ
  40.  
  41. /***    VKBD constants
  42.  */
  43.  
  44. #define VKBD_NAME               "VKBD$"
  45.  
  46.  
  47. /***    VKBD constants for PMVDMP                                      //ss0007
  48.  */                                                                    //ss0007
  49. #ifdef  INCL_NLSSHLD                                                   //ss0007
  50.                                                                        //ss0007
  51. #define NIP_PMINPUTMETHOD   0x0000  // Current Input method is of PM   //ss0008
  52. #define NIP_FSINPUTMETHOD   0x0001  // Current Input method is of FS   //ss0008
  53. #define NIP_PS55            0x0000  // PS/55 BIOS : bit 2-1 : 0 0      //ss0008
  54. #define NIP_PS2             0x0002  // PS/2  BIOS :           0 1      //ss0008
  55.                                     // PS/55 GALE :(reserved) 1 0      //ss0008
  56.                                     // Reserved   :           1 1      //ss0008
  57. #endif  //INCL_NLSSHLD                                                 //ss0007
  58.  
  59. /* VKBD functions for use by PMVDMP
  60.  */
  61. #define VKBDSYSREQ_SETACCESS    1   // Obtain exclusive access for VDM
  62. #define VKBDSYSREQ_SETFOCUS     2   // Notify VDM is gaining/losing focus
  63. #define VKBDSYSREQ_POSTSCAN     3   // Send scan code (typed)
  64. #define VKBDSYSREQ_POSTCHAR     4   // Send character code (pasted)
  65. #define VKBDSYSREQ_MONREGIST    5   // Register Monitor into VKBD               //ss0001
  66. #define VKBDSYSREQ_MONDEREGIST  6   // Deregister Monitor from VKBD             //ss0001
  67. #define VKBDSYSREQ_MONREAD      7   // Read key-stroke                          //ss0001
  68. #define VKBDSYSREQ_MONWRITE     8   // Write key-stroke                         //ss0001
  69. #define VKBDSYSREQ_SETSHIFT     9   // Set Keyboard shift status                //ss0001
  70. #define VKBDSYSREQ_GETSHIFT    10   // Get Keyboard shift status                //ss0001
  71. #define VKBDSYSREQ_REGWVDM     11   // Register PMFEP into VKBD                 //ss0006
  72. #define VKBDSYSREQ_DEREGWVDM   12   // Deregister PMFEP from VKBD               //ss0006
  73. #define VKBDSYSREQ_READWVDM    13   // Read key-stroke                          //ss0006
  74. #define VKBDSYSREQ_WRITEWVDM   14   // Write key-stroke                         //ss0006
  75. #define VKBDSYSREQ_MAX         14                                               //ss0006
  76.  
  77.  
  78. /***    VKBD data types
  79.  */
  80.  
  81. typedef struct keypkt_s {           /* kp (for VKBDSYSREQ_POSTSCAN/CHAR) */
  82.     UCHAR       kp_Scan;            // scan code
  83.     UCHAR       kp_Char;            // translated char
  84.     USHORT      kp_fsState;         // shift states
  85.     USHORT      kp_fsDDFlags;       // translated flags
  86.     USHORT      kp_fsKey;           // key flags
  87. } KEYPKT;
  88. typedef KEYPKT *PKEYPKT;
  89. typedef PKEYPKT *PPKEYPKT;
  90.  
  91. typedef struct shiftpkt_s {         /* sp (for VKBDSYSREQ_SETFOCUS) */
  92.     USHORT      fSetFocus;          // TRUE to set focus, FALSE to clear focus
  93.     USHORT      fsShift;            // PM shift states during set focus
  94.                                     //   undefined during clear focus
  95. } SHIFTPKT;
  96. typedef SHIFTPKT *PSHIFTPKT;
  97. typedef PSHIFTPKT *PPSHIFTPKT;
  98.  
  99. #define VKBDEVENT_CREATE        0                                      //ss0001
  100. #define VKBDEVENT_TERM          1                                      //ss0001
  101.  
  102. #define VKBDEVENT_KEY           2                                      //ss0001
  103. #define VKBDEVENT_SHIFT         3                                      //ss0001
  104. #define VKBDEVENT_DOS_SHIFT     4                                      //ss0002
  105.  
  106. #define VKBDEVENT_CHG_ENV       5                                      //ss0012
  107.  
  108. #define VKBD_KKC_DOS            0x0000                                 //ss0012
  109. #define VKBD_KKC_SHARED         0x0001                                 //ss0012
  110.  
  111. #define VKBD_VDMIMFEP_MODE      0x0000                                 //ss0012
  112. #define VKBD_VDMPMFEP_MODE      0x0002                                 //ss0012
  113.  
  114. #define VKBD_REG_VDMIMFEP       0x0001                                 //ss0006
  115. #define VKBD_REG_VDMPMFEP       0x0002                                 //ss0006
  116.  
  117. #define VKBD_US_BIOS_MODE       0x8000                                 //ss0020
  118. #define VKBD_JP_BIOS_DOSV       0x0002    /* 1 means Environment is DOSV */     //ss0020
  119.  
  120. #define VKBD_ENV_TO_FULLSCREEN  0                                      //ss0012
  121. #define VKBD_ENV_TO_WINDOWED    1                                      //ss0012
  122.  
  123. typedef struct vkevent_s {          /* ve (for DBCS SystemReq)  */     //ss0001
  124.         USHORT  ve_event_id;                                           //ss0001
  125.         SGID    ve_sgid;                                               //ss0001
  126.         UCHAR   ve_monitor_flag;                                       //ss0001
  127.         UCHAR   ve_r_scancode;                                         //ss0001
  128.         UCHAR   ve_charcode;                                           //ss0001
  129.         UCHAR   ve_scancode;                                           //ss0001
  130.         UCHAR   ve_nlsstate;                                           //ss0001
  131.         UCHAR   ve_nlsshift;                                           //ss0001
  132.         USHORT  ve_shift;                                              //ss0001
  133.         ULONG   ve_timestamp;                                          //ss0001
  134.         USHORT  ve_DDFlags;                                            //ss0001
  135. } VKEVENT;                                                             //ss0001
  136.  
  137. typedef VKEVENT *PVKEVENT;                                             //ss0001
  138.  
  139. //ss0010    Property Entry Name
  140. //ss0031 #define DBCS_INPUT_METHOD_LIST  "FS Input Method in Windowed DOS\0PM Input Method in Windowed DOS\0Using DOS KKC Device Driver\0"
  141. #define DBCS_INPUT_METHOD_LIST  "OS2_FS_FEP\0PM_FEP\0DOS_FEP\0"                 //ss0031
  142.  
  143. //ss0014 Following definitions are moved to PROPNAME.H                          //ss0014
  144. //#define SINGLE_INPUT_METHOD     "FS Input Method in Windowed DOS"             //ss0010
  145. //#define DUAL_INPUT_METHODS      "PM Input Method in Windowed DOS"             //ss0010
  146. //#define DOS_KKC_MODE            "Using DOS KKC Device Driver"                 //ss0010
  147. //ss0010
  148.  
  149. #endif //INCL_VKBDSYSREQ
  150.  
  151.  
  152.  
  153. /***    VKBD function prototypes
  154.  */
  155.  
  156. #ifdef INCL_VKBDINTERFACES
  157.  
  158. typedef (PASCAL *PFNSCRNP)(VOID);
  159.  
  160. VOID VDHENTRY VDHRegisterScreenProc(PFNSCRNP);
  161. USHORT VDHENTRY VDHQueryKeyShift(HVDM);
  162.  
  163. // VPL Idle detection services
  164. VOID VDHENTRY VDHWakeIdle(HVDM);
  165. VOID VDHENTRY VDHReportPeek(ULONG);
  166. VOID VDHENTRY VDHNotIdle(VOID);
  167. BOOL * VDHENTRY VDHGetBusyFlagPtr(void);
  168.  
  169. // requests for SVC access to VPL polling services
  170. #define VPL_NAME "VPL_IDLE"
  171. #define VDHVPL_BUSY_ADDR 0         // provide V86 busy byte address
  172. #define VDHVPL_WAIT      1         // make VDM sleep
  173. #define VDHVPL_NOIDLE    2         // Turn idle detection off
  174. #define VDHVPL_WAKE      3         // Report busy activity
  175.  
  176. #endif
  177.