home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- ev_types.h
- Data types for the events status driver.
- This file contains public API.
- mpaque 11Oct91
-
- Copyright 1991 NeXT Computer, Inc.
-
- Modified:
-
- ******************************************************************************/
-
- #ifndef _DEV_EV_TYPES_
- #define _DEV_EV_TYPES_
-
- /* Maximum length of SetMouseScaling arrays */
- #define NX_MAXMOUSESCALINGS 20
-
- ty('f struct evsioKeymapping /* Match old struct names in kernel */
- {
- int size;
- char *mapping;
- } NXKeyMapping;
-
- typedef struct evsioMouseScaling /* Match old struct names in kernel */
- {
- int numScaleLevels;
- short scaleThresholds[NX_MAXMOUSESCALINGS];
- short scaleFactors[NX_MAXMOUSESCALINGS];
- } NXMouseScaling;
-
- typedef enum {
- NX_OneButton,
- NX_LeftButton,
- NX_RightButton
- } NXMouseButton;
-
-
- /*
- * NXEventSystemInfo() information structures. These are designed to
- * allow for expansion.
- *
- * The current implementation of NXEventSystemInfo() uses an ioctl call.
- * THIS WILL CHANGE.
- */
-
- /*
- * Generic query max size and typedefs.
- *
- * The maximum size is selected to support anticipated future extensions
- * of request flavors. Certain flavors planned for future releases may
- * require roughtly 800 ints to represent. We allow a little extra, in
- * case further growth is needed.
- */
- typedef int *NXEventSystemInfoType;
- #define NX_EVS_INFO_MAX (1024) /* Max array size */
- typedef int NXEventSystemInfoData[NX_EVS_INFO_MAX];
-
- /* Event System Devices query */
- #define NX_EVS_DEVICE_MAX 16
-
- /* Interface types */
- #define NX_EVS_DEVICE_INTERFACE_OTHER 0
- #define NX_EVS_DEVICE_INTERFACE_NeXT 1
- #define NX_EVS_DEVICE_INTERFACE_ADB 2
-
- /* Device types */
- #define NX_EVS_DEVICE_TYPE_OTHER 0
- #define NX_EVS_DEVICE_TYPE_KEYBOARD 1
- #define NX_EVS_DEVICE_TYPE_MOUSE 2
- #define NX_EVS_DEVICE_TYPE_TABLET 3
-
- typedef struct {
- int interface; /* NeXT, ADB, other */
- int interface_addr; /* Device address on the interface */
- int dev_type; /* Keyboard, mouse, tablet, other */
- int id; /* manufacturer's device handler ID */
- } NXEventSystemDevice;
-
- typedef struct {
- NXEventSystemDevice dev[NX_EVS_DEVICE_MAX];
- } NXEventSystemDeviceList;
-
- #define NX_EVS_DEVICE_INFO 1
- #define NX_EVS_DEVICE_INFO_COUNT \
- (sizeof (NXEventSystemDeviceList) / sizeof (int))
-
-
- #endif /* _DEV_EV_TYPES_ */
-