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