home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / include / mouse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  4.0 KB  |  145 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident "@(#)mouse.h    1.2" 
  12. #ident "$Header: $"
  13.  
  14. /*
  15.  *    Copyright (C) 1997 The Santa Cruz Operation, Inc.
  16.  *        All Rights Reserved.
  17.  *
  18.  *    The information in this file is provided for the exclusive use of
  19.  *    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  20.  *    right to use, modify, and incorporate this code into other products
  21.  *    for purposes authorized by the license agreement provided they include
  22.  *    this notice and the associated copyright notice with any such product.
  23.  *    The information in this file is provided "AS IS" without warranty.
  24.  */
  25.  
  26. /*
  27.  * Header file for Event API library routines.
  28.  */
  29.  
  30. /* The event queue device  */
  31. #ifndef    _LIBEVENT_H
  32. #define    _LIBEVENT_H
  33.  
  34. #pragma comment(exestr, "xpg4plus @(#)mouse.h    1.2")
  35.  
  36. #pragma    pack(4)
  37.  
  38. #include <sys/event.h>
  39. #define    EVENT_QUEUE    "/dev/event"
  40.  
  41. /* The number of the event line discipline  */
  42. #define    EVENT_LD    2
  43.  
  44. /* For strings. Device keys are short; device names are long  */
  45. #define    SHORT    20
  46. #define    LONG    40
  47.  
  48. /* for reporting device characteristics  */
  49. struct devinfo {
  50.     short    handle;        /* not used by application  */
  51. #if __cplusplus
  52.     short    __class;    /* class is not nice for C++!!  */
  53. #else
  54.     short    class;
  55. #endif /* __cplusplus  */
  56.     char    *type;
  57.     char    name[LONG];
  58.     char    key[SHORT];
  59.     short    buttons;
  60. };
  61.  
  62. /*
  63.  * Function prototypes
  64.  */
  65.  
  66. #if __cplusplus
  67. extern "C" {
  68. #endif /* __cplusplus  */
  69.  
  70. extern int    ev_init(void);
  71. extern int    ev_initf(int);
  72. extern int    ev_open(dmask_t *);
  73. extern int    ev_close(void);
  74. extern struct devinfo * ev_getdev(dmask_t, struct devinfo *);
  75. extern int    ev_gindev(struct devinfo *, char);
  76. extern int    ev_flush(void);
  77. extern EVENT *    ev_read(void);
  78. extern int    ev_block(void);
  79. extern int    ev_pop(void);
  80. extern int    ev_getemask(emask_t *);
  81. extern int    ev_setemask(emask_t);
  82. extern int    ev_suspend(void);
  83. extern int    ev_resume(void);
  84. extern int    ev_count(void);
  85.  
  86. #if __cplusplus
  87. };
  88. #endif /* __cplusplus  */
  89.  
  90. /* Max #devices a term can have  */
  91. #define    MAXDEVS    4    
  92.  
  93. #define    EVTERM    "/usr/lib/event/ttys"
  94. #define    EVDEV    "/usr/lib/event/devices"
  95.  
  96. /* Arguments to ev_gindev()  */
  97. #define    EXCLUDE        1
  98. #define    INCLUDE        2
  99.  
  100. /* Device Classes  */
  101. #define    C_ABS        "ABS"
  102. #define C_REL        "REL"
  103. #define    C_STRING    "STRING"
  104. #define    C_OTHER        "OTHER"
  105.  
  106. /* Values for device mask  */
  107. #define    D_OTHER        0x0001
  108. #define    D_BUTTON    0x0002
  109. #define    D_STRING    0x0004
  110. #define    D_ABS        0x0008
  111. #define    D_REL        0x0010
  112.  
  113. /* Device Type Names  */
  114. #define    NAM_KEYBOARD    "KEYBOARD"    /* the keyboard  */
  115. #define    NAM_MSSSER    "MSS_SERMOUSE"    /* mouse sys serial  */
  116. #define    NAM_LT0SER    "LT0_SERMOUSE"    /* logitech serial mode 0  */
  117. #define    NAM_LT1SER    "LT1_SERMOUSE"    /* logitech serial mode 1  */
  118. #define    NAM_LT2SER    "LT2_SERMOUSE"    /* logitech serial mode 2  */
  119. #define    NAM_LT3SER    "LT3_SERMOUSE"    /* logitech serial mode 3  */
  120. #define    NAM_LT4SER    "LT4_SERMOUSE"    /* logitech serial mode 4  */
  121. #define    NAM_LT5SER    "LT5_SERMOUSE"    /* logitech serial mode 5  */
  122. #define    NAM_LT6SER    "LT6_SERMOUSE"    /* logitech serial mode 6  */
  123. #define    NAM_MCSSER    "MCS_SERMOUSE"    /* microsoft serial  */
  124. #define    NAM_BUSMOUSE    "BUSMOUSE"    /* Busmice all look alike!  */
  125.                     /* Even microsoft InPort!  */
  126.  
  127. /* Device Types  */
  128. #define    T_KEYBOARD    0x00
  129. #define    T_MSS_SERIAL    0x01
  130. #define    T_LT0_SERIAL    0x02
  131. #define    T_LT1_SERIAL    0x03
  132. #define    T_LT2_SERIAL    0x04
  133. #define    T_LT3_SERIAL    0x05
  134. #define    T_LT4_SERIAL    0x06
  135. #define    T_LT5_SERIAL    0x07
  136. #define    T_LT6_SERIAL    0x08
  137. #define    T_MCS_SERIAL    0x09
  138. #define    T_BUSMOUSE    0x0a    /* Busmice and InPort mice look alike  */
  139. #define    T_UNKNOWN    0xff
  140.  
  141. #pragma    pack()
  142.  
  143. #endif    /* _LIBEVENT_H */
  144. #ident "$Header: $"
  145.