home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / dev / ev_types.h < prev    next >
Text File  |  1992-07-29  |  2KB  |  90 lines

  1. /******************************************************************************
  2.     ev_types.h
  3.     Data types for the events status driver.
  4.     This file contains public API.
  5.     mpaque 11Oct91
  6.     
  7.     Copyright 1991 NeXT Computer, Inc.
  8.     
  9.     Modified:
  10.     
  11. ******************************************************************************/
  12.  
  13. #ifndef _DEV_EV_TYPES_
  14. #define _DEV_EV_TYPES_
  15.  
  16. /* Maximum length of SetMouseScaling arrays */
  17. #define NX_MAXMOUSESCALINGS 20
  18.  
  19. ty('f struct evsioKeymapping        /* Match old struct names in kernel */
  20. {
  21.     int size;
  22.     char *mapping;
  23. } NXKeyMapping;
  24.  
  25. typedef struct evsioMouseScaling    /* Match old struct names in kernel */
  26. {
  27.     int numScaleLevels;
  28.     short scaleThresholds[NX_MAXMOUSESCALINGS];
  29.     short scaleFactors[NX_MAXMOUSESCALINGS];
  30. } NXMouseScaling;
  31.  
  32. typedef enum {
  33.     NX_OneButton,
  34.     NX_LeftButton,
  35.     NX_RightButton
  36. } NXMouseButton;
  37.  
  38.  
  39. /*
  40.  * NXEventSystemInfo() information structures.  These are designed to
  41.  * allow for expansion.
  42.  *
  43.  * The current implementation of NXEventSystemInfo() uses an ioctl call.
  44.  * THIS WILL CHANGE.
  45.  */
  46.  
  47. /*
  48.  * Generic query max size and typedefs.
  49.  *
  50.  *    The maximum size is selected to support anticipated future extensions
  51.  *    of request flavors.  Certain flavors planned for future releases may 
  52.  *    require roughtly 800 ints to represent.  We allow a little extra, in
  53.  *    case further growth is needed.
  54.  */
  55. typedef int *NXEventSystemInfoType;
  56. #define NX_EVS_INFO_MAX        (1024)    /* Max array size */
  57. typedef int NXEventSystemInfoData[NX_EVS_INFO_MAX];
  58.  
  59. /* Event System Devices query */
  60. #define NX_EVS_DEVICE_MAX    16
  61.  
  62.     /* Interface types */
  63. #define NX_EVS_DEVICE_INTERFACE_OTHER    0
  64. #define NX_EVS_DEVICE_INTERFACE_NeXT    1
  65. #define NX_EVS_DEVICE_INTERFACE_ADB    2
  66.  
  67.     /* Device types */
  68. #define NX_EVS_DEVICE_TYPE_OTHER    0
  69. #define NX_EVS_DEVICE_TYPE_KEYBOARD    1
  70. #define NX_EVS_DEVICE_TYPE_MOUSE    2
  71. #define NX_EVS_DEVICE_TYPE_TABLET    3
  72.  
  73. typedef struct {
  74.     int    interface;    /* NeXT, ADB, other */
  75.     int    interface_addr;    /* Device address on the interface */
  76.     int    dev_type;    /* Keyboard, mouse, tablet, other */
  77.     int    id;        /* manufacturer's device handler ID */
  78. } NXEventSystemDevice;
  79.  
  80. typedef struct {
  81.     NXEventSystemDevice    dev[NX_EVS_DEVICE_MAX];
  82. } NXEventSystemDeviceList;
  83.  
  84. #define NX_EVS_DEVICE_INFO        1
  85. #define NX_EVS_DEVICE_INFO_COUNT \
  86.     (sizeof (NXEventSystemDeviceList) / sizeof (int))
  87.  
  88.  
  89. #endif /* _DEV_EV_TYPES_ */
  90.