home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / H / VKBD.H < prev    next >
C/C++ Source or Header  |  1995-08-30  |  3KB  |  107 lines

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