home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / VKBD.H < prev    next >
C/C++ Source or Header  |  1999-03-15  |  5KB  |  185 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. /* NOINC */
  14. #if __IBMC__ || __IBMCPP__
  15.    #pragma info( none )
  16.       #ifndef __CHKHDR__
  17.          #pragma info( none )
  18.       #endif
  19.    #pragma info( restore )
  20. #endif
  21. /* INC */
  22.  
  23.  
  24.  
  25. #ifndef __VKBD__
  26. #define __VKBD__
  27.  
  28.  
  29. #ifndef INCL_NONE               /* include everything by default */
  30. #define INCL_VKBD
  31. #endif
  32.  
  33. #ifdef  INCL_VKBD
  34. #define INCL_VKBDSYSREQ
  35. #define INCL_VKBDINTERFACES
  36. #endif
  37.  
  38.  
  39.  
  40. #ifdef  INCL_VKBDSYSREQ
  41.  
  42. /***    VKBD constants
  43.  */
  44.  
  45. #define VKBD_NAME               "VKBD$"
  46.  
  47. /* VKBD functions for use by PMVDMP
  48.  */
  49. #ifdef  INCL_NLSSHLD
  50.  
  51. #define NIP_PMINPUTMETHOD   0x0000  // Current Input method is of PM
  52. #define NIP_FSINPUTMETHOD   0x0001  // Current Input method is of FS
  53. #define NIP_PS55            0x0000  // PS/55 BIOS : bit 2-1 : 0 0
  54. #define NIP_PS2             0x0002  // PS/2  BIOS :           0 1
  55.                                     // PS/55 GALE :(reserved) 1 0
  56.                                     // Reserved   :           1 1
  57. #endif  //INCL_NLSSHLD
  58.  
  59. #define VKBDSYSREQ_SETACCESS    1   /* Obtain exclusive access for VDM    */
  60. #define VKBDSYSREQ_SETFOCUS     2   /* Notify VDM is gaining/losing focus */
  61. #define VKBDSYSREQ_POSTSCAN     3   /* Send scan code (typed)             */
  62. #define VKBDSYSREQ_POSTCHAR     4   /* Send character code (pasted)       */
  63. #define VKBDSYSREQ_MONREGIST    5   // Register Monitor into VKBD
  64. #define VKBDSYSREQ_MONDEREGIST  6   // Deregister Monitor from VKBD
  65. #define VKBDSYSREQ_MONREAD      7   // Read key-stroke
  66. #define VKBDSYSREQ_MONWRITE     8   // Write key-stroke
  67. #define VKBDSYSREQ_SETSHIFT     9   // Set Keyboard shift status
  68. #define VKBDSYSREQ_GETSHIFT    10   // Get Keyboard shift status
  69. #define VKBDSYSREQ_REGWVDM     11   // Register PMFEP into VKBD
  70. #define VKBDSYSREQ_DEREGWVDM   12   // Deregister PMFEP from VKBD
  71. #define VKBDSYSREQ_READWVDM    13   // Read key-stroke
  72. #define VKBDSYSREQ_WRITEWVDM   14   // Write key-stroke
  73. #define VKBDSYSREQ_MAX         14
  74.  
  75.  
  76. /***    VKBD data types
  77.  */
  78.  
  79. typedef struct keypkt_s {           /* kp (for VKBDSYSREQ_POSTSCAN/CHAR) */
  80.     UCHAR       kp_Scan;            /* scan code                         */
  81.     UCHAR       kp_Char;            /* translated char                   */
  82.     USHORT      kp_fsState;         /* shift states                      */
  83.     USHORT      kp_fsDDFlags;       /* translated flags                  */
  84.     USHORT      kp_fsKey;           /* key flags                         */
  85. } KEYPKT;
  86. typedef KEYPKT *PKEYPKT;
  87. typedef PKEYPKT *PPKEYPKT;
  88.  
  89. typedef struct shiftpkt_s {         /* sp (for VKBDSYSREQ_SETFOCUS)            */
  90.     USHORT      fSetFocus;          /* TRUE to set focus, FALSE to clear focus */
  91.     USHORT      fsShift;            /* PM shift states during set focus        */
  92.                                     /*   undefined during clear focus          */
  93. } SHIFTPKT;
  94. typedef SHIFTPKT *PSHIFTPKT;
  95. typedef PSHIFTPKT *PPSHIFTPKT;
  96.  
  97. #define VKBDEVENT_CREATE        0
  98. #define VKBDEVENT_TERM          1
  99.  
  100. #define VKBDEVENT_KEY           2
  101. #define VKBDEVENT_SHIFT         3
  102. #define VKBDEVENT_DOS_SHIFT     4
  103.  
  104. #define VKBDEVENT_CHG_ENV       5
  105.  
  106. #define VKBD_KKC_DOS            0x0000
  107. #define VKBD_KKC_SHARED         0x0001
  108.  
  109. #define VKBD_VDMIMFEP_MODE      0x0000
  110. #define VKBD_VDMPMFEP_MODE      0x0002
  111.  
  112. #define VKBD_REG_VDMIMFEP       0x0001
  113. #define VKBD_REG_VDMPMFEP       0x0002
  114.  
  115. #define VKBD_US_BIOS_MODE       0x8000
  116. #define VKBD_JP_BIOS_DOSV       0x0002    /* 1 means Environment is DOSV */
  117.  
  118. #define VKBD_ENV_TO_FULLSCREEN  0
  119. #define VKBD_ENV_TO_WINDOWED    1
  120.  
  121. typedef struct vkevent_s {          /* ve (for DBCS SystemReq)  */
  122.         USHORT  ve_event_id;
  123.         SGID    ve_sgid;
  124.         UCHAR   ve_monitor_flag;
  125.         UCHAR   ve_r_scancode;
  126.         UCHAR   ve_charcode;
  127.         UCHAR   ve_scancode;
  128.         UCHAR   ve_nlsstate;
  129.         UCHAR   ve_nlsshift;
  130.         USHORT  ve_shift;
  131.         ULONG   ve_timestamp;
  132.         USHORT  ve_DDFlags;
  133. } VKEVENT;
  134.  
  135. typedef VKEVENT *PVKEVENT;
  136.  
  137. #ifdef  DOSK
  138. #define DBCS_INPUT_METHOD_LIST  "DOS_FEP\0"
  139. #else
  140. #define DBCS_INPUT_METHOD_LIST  "OS2_FS_FEP\0DOS_FEP\0"
  141. #endif  //DOSK
  142.  
  143.  
  144. #endif /* INCL_VKBDSYSREQ */
  145.  
  146.  
  147.  
  148. /***    VKBD function prototypes
  149.  */
  150.  
  151. #ifdef  INCL_VKBDINTERFACES
  152.  
  153. typedef INT (* HOOKENTRY PFNSCRNP)(VOID);
  154.  
  155. VOID VDHENTRY VDHRegisterScreenProc(PFNSCRNP);
  156. USHORT VDHENTRY VDHQueryKeyShift(HVDM);
  157.  
  158. /* VPL Idle detection services */
  159. VOID VDHENTRY VDHWakeIdle(HVDM);
  160. VOID VDHENTRY VDHReportPeek(ULONG);
  161. VOID VDHENTRY VDHNotIdle(VOID);
  162. BOOL * VDHENTRY VDHGetBusyFlagPtr(void);
  163.  
  164. /* requests for SVC access to VPL polling services */
  165. #define VPL_NAME "VPL_IDLE"
  166. #define VDHVPL_BUSY_ADDR 0         /* provide V86 busy byte address */
  167. #define VDHVPL_WAIT      1         /* make VDM sleep                */
  168. #define VDHVPL_NOIDLE    2         /* Turn idle detection off       */
  169. #define VDHVPL_WAKE      3         /* Report busy activity          */
  170.  
  171. #endif
  172.  
  173. #endif /* __VKBD__ */
  174.  
  175.  
  176. /* NOINC */
  177. #if __IBMC__ || __IBMCPP__
  178.    #pragma info( none )
  179.       #ifndef __CHKHDR__
  180.          #pragma info( restore )
  181.       #endif
  182.    #pragma info( restore )
  183. #endif
  184. /* INC */
  185.