home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / VKBD.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  3KB  |  104 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. /* VKBD functions for use by PMVDMP
  47.  */
  48. #define VKBDSYSREQ_SETACCESS    1   // Obtain exclusive access for VDM
  49. #define VKBDSYSREQ_SETFOCUS     2   // Notify VDM is gaining/losing focus
  50. #define VKBDSYSREQ_POSTSCAN     3   // Send scan code (typed)
  51. #define VKBDSYSREQ_POSTCHAR     4   // Send character code (pasted)
  52. #define VKBDSYSREQ_MAX          4
  53.  
  54.  
  55. /***    VKBD data types
  56.  */
  57.  
  58. typedef struct keypkt_s {           /* kp (for VKBDSYSREQ_POSTSCAN/CHAR) */
  59.     UCHAR       kp_Scan;            // scan code
  60.     UCHAR       kp_Char;            // translated char
  61.     USHORT      kp_fsState;         // shift states
  62.     USHORT      kp_fsDDFlags;       // translated flags
  63.     USHORT      kp_fsKey;           // key flags
  64. } KEYPKT;
  65. typedef KEYPKT *PKEYPKT;
  66. typedef PKEYPKT *PPKEYPKT;
  67.  
  68. typedef struct shiftpkt_s {         /* sp (for VKBDSYSREQ_SETFOCUS) */
  69.     USHORT      fSetFocus;          // TRUE to set focus, FALSE to clear focus
  70.     USHORT      fsShift;            // PM shift states during set focus
  71.                                     //   undefined during clear focus
  72. } SHIFTPKT;
  73. typedef SHIFTPKT *PSHIFTPKT;
  74. typedef PSHIFTPKT *PPSHIFTPKT;
  75.  
  76. #endif //INCL_VKBDSYSREQ
  77.  
  78.  
  79.  
  80. /***    VKBD function prototypes
  81.  */
  82.  
  83. #ifdef INCL_VKBDINTERFACES
  84.  
  85. typedef (PASCAL *PFNSCRNP)(VOID);
  86.  
  87. VOID VDHENTRY VDHRegisterScreenProc(PFNSCRNP);
  88. USHORT VDHENTRY VDHQueryKeyShift(HVDM);
  89.  
  90. // VPL Idle detection services
  91. VOID VDHENTRY VDHWakeIdle(HVDM);
  92. VOID VDHENTRY VDHReportPeek(ULONG);
  93. VOID VDHENTRY VDHNotIdle(VOID);
  94. BOOL * VDHENTRY VDHGetBusyFlagPtr(void);
  95.  
  96. // requests for SVC access to VPL polling services
  97. #define VPL_NAME "VPL_IDLE"
  98. #define VDHVPL_BUSY_ADDR 0         // provide V86 busy byte address
  99. #define VDHVPL_WAIT      1         // make VDM sleep
  100. #define VDHVPL_NOIDLE    2         // Turn idle detection off
  101. #define VDHVPL_WAKE      3         // Report busy activity
  102.  
  103. #endif
  104.