home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- #ident "@(#)mouse.h 1.2"
- #ident "$Header: $"
-
- /*
- * Copyright (C) 1997 The Santa Cruz Operation, Inc.
- * All Rights Reserved.
- *
- * The information in this file is provided for the exclusive use of
- * the licensees of The Santa Cruz Operation, Inc. Such users have the
- * right to use, modify, and incorporate this code into other products
- * for purposes authorized by the license agreement provided they include
- * this notice and the associated copyright notice with any such product.
- * The information in this file is provided "AS IS" without warranty.
- */
-
- /*
- * Header file for Event API library routines.
- */
-
- /* The event queue device */
- #ifndef _LIBEVENT_H
- #define _LIBEVENT_H
-
- #pragma comment(exestr, "xpg4plus @(#)mouse.h 1.2")
-
- #pragma pack(4)
-
- #include <sys/event.h>
- #define EVENT_QUEUE "/dev/event"
-
- /* The number of the event line discipline */
- #define EVENT_LD 2
-
- /* For strings. Device keys are short; device names are long */
- #define SHORT 20
- #define LONG 40
-
- /* for reporting device characteristics */
- struct devinfo {
- short handle; /* not used by application */
- #if __cplusplus
- short __class; /* class is not nice for C++!! */
- #else
- short class;
- #endif /* __cplusplus */
- char *type;
- char name[LONG];
- char key[SHORT];
- short buttons;
- };
-
- /*
- * Function prototypes
- */
-
- #if __cplusplus
- extern "C" {
- #endif /* __cplusplus */
-
- extern int ev_init(void);
- extern int ev_initf(int);
- extern int ev_open(dmask_t *);
- extern int ev_close(void);
- extern struct devinfo * ev_getdev(dmask_t, struct devinfo *);
- extern int ev_gindev(struct devinfo *, char);
- extern int ev_flush(void);
- extern EVENT * ev_read(void);
- extern int ev_block(void);
- extern int ev_pop(void);
- extern int ev_getemask(emask_t *);
- extern int ev_setemask(emask_t);
- extern int ev_suspend(void);
- extern int ev_resume(void);
- extern int ev_count(void);
-
- #if __cplusplus
- };
- #endif /* __cplusplus */
-
- /* Max #devices a term can have */
- #define MAXDEVS 4
-
- #define EVTERM "/usr/lib/event/ttys"
- #define EVDEV "/usr/lib/event/devices"
-
- /* Arguments to ev_gindev() */
- #define EXCLUDE 1
- #define INCLUDE 2
-
- /* Device Classes */
- #define C_ABS "ABS"
- #define C_REL "REL"
- #define C_STRING "STRING"
- #define C_OTHER "OTHER"
-
- /* Values for device mask */
- #define D_OTHER 0x0001
- #define D_BUTTON 0x0002
- #define D_STRING 0x0004
- #define D_ABS 0x0008
- #define D_REL 0x0010
-
- /* Device Type Names */
- #define NAM_KEYBOARD "KEYBOARD" /* the keyboard */
- #define NAM_MSSSER "MSS_SERMOUSE" /* mouse sys serial */
- #define NAM_LT0SER "LT0_SERMOUSE" /* logitech serial mode 0 */
- #define NAM_LT1SER "LT1_SERMOUSE" /* logitech serial mode 1 */
- #define NAM_LT2SER "LT2_SERMOUSE" /* logitech serial mode 2 */
- #define NAM_LT3SER "LT3_SERMOUSE" /* logitech serial mode 3 */
- #define NAM_LT4SER "LT4_SERMOUSE" /* logitech serial mode 4 */
- #define NAM_LT5SER "LT5_SERMOUSE" /* logitech serial mode 5 */
- #define NAM_LT6SER "LT6_SERMOUSE" /* logitech serial mode 6 */
- #define NAM_MCSSER "MCS_SERMOUSE" /* microsoft serial */
- #define NAM_BUSMOUSE "BUSMOUSE" /* Busmice all look alike! */
- /* Even microsoft InPort! */
-
- /* Device Types */
- #define T_KEYBOARD 0x00
- #define T_MSS_SERIAL 0x01
- #define T_LT0_SERIAL 0x02
- #define T_LT1_SERIAL 0x03
- #define T_LT2_SERIAL 0x04
- #define T_LT3_SERIAL 0x05
- #define T_LT4_SERIAL 0x06
- #define T_LT5_SERIAL 0x07
- #define T_LT6_SERIAL 0x08
- #define T_MCS_SERIAL 0x09
- #define T_BUSMOUSE 0x0a /* Busmice and InPort mice look alike */
- #define T_UNKNOWN 0xff
-
- #pragma pack()
-
- #endif /* _LIBEVENT_H */
- #ident "$Header: $"
-