home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / PEN / PENTKT / PENBASE / INC / PENIDC.H < prev    next >
Text File  |  1995-04-14  |  10KB  |  170 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*************************************************************************/
  13. /*                                                                       */
  14. /*                                                                       */
  15. /*************************************************************************/
  16. /******************* START OF SPECIFICATIONS *****************************/
  17. /*                                                                       */
  18. /*  SOURCE FILE NAME: PENIDC.H                                           */
  19. /*                                                                       */
  20. /*  DESCRIPTIVE NAME: Pen driver IDC interface                           */
  21. /*                                                                       */
  22. /*                                                                       */
  23. /*  STATUS:  Version 1.0                                                 */
  24. /*                                                                       */
  25. /*  NOTES:                                                               */
  26. /*                                                                       */
  27. /*  ENTRY POINTS:                                                        */
  28. /*      See public statements                                            */
  29. /*  EXTERNAL REFERENCES:                                                 */
  30. /*      See extrn statements                                             */
  31. /*                                                                       */
  32. /******************* END  OF  SPECIFICATIONS *****************************/
  33. /**********************************************************************/
  34. /* General Equates */
  35.  
  36. #define PEN_DDS_LEV_MAJOR  0       /* level of this specification */
  37. #define PEN_DDS_LEV_MINOR  3       /* level of this specification */
  38.  
  39. /* DevHlp_RegisterDevicClase Values */
  40.  
  41. #define DEVCLASS_INPUT  2         /* Device Class for Register Device Class*/
  42.  
  43. /* defines for DCFlags */
  44. #define REG_EXT_IF      0x0001    /* Supports extended interface */
  45. #define REG_AUX         0x8000    /* Keyboard AUX port used      */
  46.  
  47. /*/********************************************************************/
  48. /* Pen Driver IDC Fucntions */
  49.  
  50. /* These functions are provided by the Pen Driver at the RegisterDeviceClass */
  51. /* driver entry point.                                                       */
  52.  
  53. /* calls by unit */
  54.  
  55. #define QUERY_CAPIBILITIES 1   /* request unit capabilities                     */
  56.                                /*   bl = unit                                   */
  57.                                /*   es: di = area to copy capabilities packet   */
  58.                                /*            first word has size of copy buffer */
  59.                                /* successfull return                            */
  60.                                /*   nc, ax = 0, packet copied                   */
  61.                                /* error return                                  */
  62.                                /*   cy, ax == error code                        */
  63.  
  64. #define QUERY_DEV_CONFIG  2    /* Query optional device configuration           */
  65.                                /*   bl = unit                                   */
  66.                                /*   es: di = target DevData packet address      */
  67.  
  68. #define START_LOGICAL_DEVICE 3 /* Start Logical Device                          */
  69.                                /*   bl = unit                                   */
  70.                                /*   es: di = SINFO packet                       */
  71.                                /* successfull return                            */
  72.                                /*   nc, ax = 0, registration accepted           */
  73.                                /* error return                                  */
  74.                                /*   cy, ax == error code                        */
  75.  
  76. /* 4 and 5 are reserved for future 'by unit' calls */
  77.  
  78. /* global calls to driver */
  79.  
  80. #define READ_ENABLE       6    /* enable reporting of events                 */
  81.                                /* pass   cx: dx style capabilites to drvier  */
  82.                                /* return cx: dx style request to services    */
  83. #define READ_DISABLE      7    /* disable reporting of events                */
  84. #define ENABLE_DEVICE     8    /* enable the device to interrupt             */
  85. #define DISABLE_DEVICE    9    /* disable the device from interrupting       */
  86. #define ACTIVITY_CALLBACK 10   /* System activity callback. Called as        */
  87.                                /* result of REQUEST_CALLBACK                 */
  88. #define VIDEO_MODE_CHANGE 11   /* Video Mode change                          */
  89.                                /*   es: di = VINFO packet                    */
  90.  
  91. /* style capabilities for READ_ENABLE  CX register is reserved, must be zero */
  92.  
  93. /* style capabilities for READ_ENABLE  DX register */
  94. #define STYLE_NOTIFY_VMCHANGE 0x0001 /* report VM_CHANGE */
  95.                               /* on= DON'T report, reset to receive events */
  96.  
  97. /* error codes */
  98.  
  99. #define DRV_ERR_GEN_ERROR   1  /* general error                              */
  100. #define DRV_ERR_NOT_FOUND   2  /* unit number not found                      */
  101. #define DRV_ERR_BUFF_TRUNC  3  /* registration packet truncated, buffer small*/
  102. #define DRV_ERR_LEVEL       4  /* level mismatch                             */
  103. #define DRV_ERR_NOT_ALLOWED 5  /* request not allowed at this time           */
  104. #define DRV_ERR_NO_FUNC     6  /* function not supported                     */
  105.  
  106. /* This packet is passed on READ_ENABLE. The packet and service routine is */
  107. /* valid only during the READ_ENABLE call. */
  108.  
  109. typedef struct _SINFO        {    /* sinfo */                               */
  110.   USHORT length;                  /* total length of packet                 */
  111.   UCHAR  eif_major;               /* major level (PEN_EI_LEV_MAJOR)         */
  112.   UCHAR  eif_minor;               /* minor level (PEN_EI_LEV_MINOR)         */
  113.   UCHAR  idc_major;               /* major level (PEN_DDS_LEV_MAJOR)        */
  114.   UCHAR  idc_minor;               /* minor level (PEN_DDS_LEV_MINOR)        */
  115.   USHORT service_ds;              /* data segment to load for service routine */
  116.   ULONG  service_rtn;             /* 16:16 address for service routine      */
  117.  
  118. } SINFO;
  119.  
  120. /* This packet is passed on VIDEO_MODE_CHANGE. */
  121.  
  122. typedef struct _VINFO        {    /* vinfo */
  123.   UCHAR  Mtype;               /* video mode type              */
  124.   UCHAR  Color;               /* number of colors             */
  125.   USHORT TCol_res;            /* text colomn resolution       */
  126.   USHORT TRow_res;            /* text row resolution          */
  127.   USHORT GCol_res;            /* graphics colomn resolution   */
  128.   USHORT GRow_res;            /* graphics row resolution      */
  129. } VINFO;
  130.  
  131. /* defines for vinfo.Mtype */
  132. #define MTYPE_GRAPHICS  0x0002    /*Graphics mode*/
  133.  
  134. /* Device Data Strucutue is returned by locator devices on QUERY_DEV_CONFIG. */
  135. /* The other devices do not have device configuration data to return. */
  136.  
  137. typedef struct _DevData  {        /* DevData */
  138.   USHORT CfgDataLen;              /* length of data          */
  139.   UCHAR  NumMics;                 /* number mickeys/cm       */
  140.   UCHAR  NumButt;                 /* number of buttons       */
  141.   UCHAR  IRQ;                     /* IRQ level               */
  142.   UCHAR  MouseType;               /* mouse type attached     */
  143.   UCHAR  ComPortNum;              /* com port number         */
  144.   USHORT ComPortAddr;             /* com port address        */
  145. } DevData;
  146.  
  147. /*********************************************************************/
  148. /* Device Service IDC Fucntions                                      */
  149. /*                                                                   */
  150. /* These functions are provided at the device service entry point.   */
  151.  
  152. #define REGISTER_DEVICE       1       /* report event                         */
  153.                                       /* es: di = capibilities packet         */
  154. #define REPORT_EVENT          2       /* report event                         */
  155.                                       /* es: di = event packet                */
  156. #define UPDATE_CAPS           3       /* update registration packet           */
  157.                                       /* es: di = capbilities packet          */
  158. #define QUERY_ACTIVITY        4       /* query user input activity            */
  159.                                       /* returns     dx = low word count      */
  160.                                       /*             cx = high word count     */
  161.                                       /*            edx = dword count         */
  162. #define REQUEST_CALLBACK      5       /* request callback for system activity */
  163.                                       /* cl = driver device id                */
  164. #define CANCEL_CALLBACK       6       /* cancel  callback for system activity */
  165.                                       /* cl = driver device id                */
  166. #define SUPPRESS_STROKE       7       /* suppress stroke                      */
  167.                                       /* cl = driver device id                */
  168. #define DISABLE_SUPPORT       8       /* disable driver                       */
  169.                                       /* cl = driver device id                */
  170.