home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddrivers.zip / VDD / VKBD.H < prev    next >
C/C++ Source or Header  |  1993-01-08  |  2KB  |  83 lines

  1. /***    VKBD.H
  2.  *
  3.  *    For include file hierarchy, see MVDM.H
  4.  *
  5.  */
  6.  
  7.  
  8. #ifndef INCL_NONE        /*  include everything by default */
  9. #define INCL_VKBD
  10. #endif
  11.  
  12. #ifdef    INCL_VKBD
  13. #define INCL_VKBDSYSREQ
  14. #define INCL_VKBDINTERFACES
  15. #endif
  16.  
  17.  
  18.  
  19. #ifdef    INCL_VKBDSYSREQ
  20.  
  21. /***    VKBD constants
  22.  */
  23.  
  24. #define VKBD_NAME        "VKBD$"
  25.  
  26. /* VKBD functions for use by PMVDMP
  27.  */
  28. #define VKBDSYSREQ_SETACCESS    1   /*  Obtain exclusive access for VDM */
  29. #define VKBDSYSREQ_SETFOCUS    2   /*  Notify VDM is gaining/losing focus */
  30. #define VKBDSYSREQ_POSTSCAN    3   /*  Send scan code (typed) */
  31. #define VKBDSYSREQ_POSTCHAR    4   /*  Send character code (pasted) */
  32. #define VKBDSYSREQ_MAX        4
  33.  
  34.  
  35. /***    VKBD data types
  36.  */
  37.  
  38. typedef struct keypkt_s {        /* kp (for VKBDSYSREQ_POSTSCAN/CHAR) */
  39.     UCHAR    kp_Scan;        /*  scan code */
  40.     UCHAR    kp_Char;        /*  translated char */
  41.     USHORT    kp_fsState;        /*  shift states */
  42.     USHORT    kp_fsDDFlags;        /*  translated flags */
  43.     USHORT    kp_fsKey;        /*  key flags */
  44. } KEYPKT;
  45. typedef KEYPKT *PKEYPKT;
  46. typedef PKEYPKT *PPKEYPKT;
  47.  
  48. typedef struct shiftpkt_s {        /* sp (for VKBDSYSREQ_SETFOCUS) */
  49.     USHORT    fSetFocus;        /*  TRUE to set focus, FALSE to clear focus */
  50.     USHORT    fsShift;        /*  PM shift states during set focus */
  51.                     /*    undefined during clear focus */
  52. } SHIFTPKT;
  53. typedef SHIFTPKT *PSHIFTPKT;
  54. typedef PSHIFTPKT *PPSHIFTPKT;
  55.  
  56. #endif /* INCL_VKBDSYSREQ */
  57.  
  58.  
  59.  
  60. /***    VKBD function prototypes
  61.  */
  62.  
  63. #ifdef INCL_VKBDINTERFACES
  64.  
  65. typedef (*PASCAL PFNSCRNP)(VOID);
  66.  
  67. VOID VDHENTRY VDHRegisterScreenProc(PFNSCRNP);
  68. USHORT VDHENTRY VDHQueryKeyShift(HVDM);
  69.  
  70. /*  VPL Idle detection services */
  71. VOID VDHENTRY VDHWakeIdle(HVDM);
  72. VOID VDHENTRY VDHReportPeek(ULONG);
  73. VOID VDHENTRY VDHNotIdle(VOID);
  74.  
  75. /*  requests for SVC access to VPL polling services */
  76. #define VPL_NAME "VPL_IDLE"
  77. #define VDHVPL_BUSY_ADDR 0       /*  provide V86 busy byte address */
  78. #define VDHVPL_WAIT     1       /*  make VDM sleep */
  79. #define VDHVPL_NOIDLE     2       /*  Turn idle detection off */
  80. #define VDHVPL_WAKE     3       /*  Report busy activity */
  81.  
  82. #endif
  83.