Annotation of kernel/bsd/dev/evsio.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /*     Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved. 
                     26:  *
                     27:  * evsio.h - Get/Set parameter calls for Event Status Driver.
                     28:  *
                     29:  *     CAUTION: Developers should stick to the API exported in
                     30:  *             <drivers/event_status_driver.h> to guarantee
                     31:  *             binary compatability of their applications in future
                     32:  *             releases.
                     33:  *
                     34:  * HISTORY
                     35:  * 22 May 1992    Mike Paquette at NeXT
                     36:  *      Created. 
                     37:  */
                     38: #ifndef _DEV_EVSIO_
                     39: #define _DEV_EVSIO_
                     40: 
                     41: #import <bsd/dev/ev_types.h>     /* Public type definitions. */
                     42: #import <bsd/dev/event.h>        /* Public type definitions. */
                     43: #import <kernserv/clock_timer.h>       /* For ns_time_t */
                     44: 
                     45: /*
                     46:  * Identify this driver as one that uses the new driverkit and messaging API
                     47:  */
                     48: #ifndef _NeXT_MACH_EVENT_DRIVER_
                     49: #define _NeXT_MACH_EVENT_DRIVER_       (1)
                     50: #endif /* _NeXT_MACH_EVENT_DRIVER_ */
                     51: 
                     52: /*
                     53:  * Time values, as ns_time_t quantities, are passed in packed as
                     54:  * integer arrays.  The following union is provided
                     55:  * to assist with packing and unpacking.
                     56:  */
                     57: typedef union
                     58: {
                     59:     ns_time_t  tval;
                     60:     unsigned   itval[(sizeof(ns_time_t)+sizeof(unsigned)-1)/sizeof(unsigned)];
                     61: } _NX_packed_time_t;
                     62: #define EVS_PACKED_TIME_SIZE   (sizeof (_NX_packed_time_t) / sizeof (int))
                     63: 
                     64: #define EVS_PREFIX     "Evs_"  /* All EVS calls start with this string */
                     65: /* WaitCursor-related ioctls */
                     66: 
                     67: #define EVSIOSWT "Evs_SetWaitThreshold"
                     68: #define EVSIOSWT_SIZE  EVS_PACKED_TIME_SIZE
                     69: 
                     70: #define EVSIOSWS "Evs_SetWaitSustain"
                     71: #define EVSIOSWS_SIZE  EVS_PACKED_TIME_SIZE
                     72: 
                     73: #define EVSIOSWFI "Evs_SetWaitFrameInterval"
                     74: #define EVSIOSWFI_SIZE EVS_PACKED_TIME_SIZE
                     75: 
                     76: #define EVSIOCWINFO    "Evs_CurrentWaitCursorInfo"
                     77: #define EVSIOCWINFO_THRESH     0
                     78: #define EVSIOCWINFO_SUSTAIN    (EVSIOCWINFO_THRESH + EVS_PACKED_TIME_SIZE)
                     79: #define EVSIOCWINFO_FINTERVAL  (EVSIOCWINFO_SUSTAIN + EVS_PACKED_TIME_SIZE)
                     80: #define EVSIOCWINFO_SIZE       (EVSIOCWINFO_FINTERVAL + EVS_PACKED_TIME_SIZE)
                     81: 
                     82: 
                     83: /* Device control ioctls. Levels specified may be in the range 0 - 64. */
                     84: 
                     85: #define EVSIOSB          "Evs_SetBrightness"
                     86: #define EVSIOSB_SIZE   1
                     87: 
                     88: #define EVSIOSA          "Evs_SetAttenuation"
                     89: #define EVIOSA_SIZE    1
                     90: 
                     91: #define EVSIOSADB "Evs_SetAutoDimBrightness"
                     92: #define EVSIOSADB_SIZE 1
                     93: 
                     94: #define EVSIO_DCTLINFO "Evs_DeviceControlInfo"
                     95: typedef enum {
                     96:        EVSIO_DCTLINFO_BRIGHT,
                     97:        EVSIO_DCTLINFO_ATTEN,
                     98:        EVSIO_DCTLINFO_AUTODIMBRIGHT
                     99: } evsio_DCTLINFOIndices;
                    100: #define EVSIO_DCTLINFO_SIZE    (EVSIO_DCTLINFO_AUTODIMBRIGHT + 1)
                    101: 
                    102: /*
                    103:  * Device status request
                    104:  */
                    105: #define        EVSIOINFO  NX_EVS_DEVICE_INFO
                    106: 
                    107: 
                    108: /* Keyboard-related ioctls - implemented within Event Sources */
                    109: 
                    110: #define EVSIOSKR  "Evs_SetKeyRepeat"
                    111: #define EVSIOSKR_SIZE  EVS_PACKED_TIME_SIZE
                    112: 
                    113: #define EVSIOSIKR "Evs_SetInitialKeyRepeat"
                    114: #define EVSIOSIKR_SIZE EVS_PACKED_TIME_SIZE
                    115: 
                    116: #define EVSIORKBD "Evs_ResetKeyboard"
                    117: #define EVSIORKBD_SIZE 1
                    118: 
                    119: #define EVSIOCKR  "Evs_CurrentKeyRepeat"
                    120: #define        EVSIOCKR_INITIAL        0
                    121: #define        EVSIOCKR_BETWEEN        (EVSIOCKR_INITIAL + EVS_PACKED_TIME_SIZE)
                    122: #define EVSIOCKR_SIZE          (EVSIOCKR_BETWEEN + EVS_PACKED_TIME_SIZE)
                    123: 
                    124: #define        EVSIOCKML "Evs_CurrentKeyMappingLength"
                    125: #define EVSIOCKML_SIZE 1
                    126: 
                    127: /* For GetIntValues. Length is EVK_NUNITS from KeyMap.h */
                    128: #define        EVSIOGKEYS "Evs_CurrentKeyState"
                    129: 
                    130: /* The following two tokens are for use with the get/set character routines. */
                    131: #define EVSIOSKM  "Evs_SetKeyMapping"
                    132: #define EVSIOSKM_SIZE  4096
                    133: 
                    134: #define        EVSIOCKM  "Evs_CurrentKeyMapping"
                    135: #define EVSIOCKM_SIZE  4096
                    136: 
                    137: /* Mouse-related ioctls - implemented within Event Sources */
                    138: 
                    139: #define        EVSIOSMS  "Evs_SetMouseScaling"
                    140: #define        EVSIOSMS_NSCALINGS      0
                    141:        /* The data consists of NX_MAXMOUSESCALINGS threshold/factor pairs. */
                    142: #define        EVSIOSMS_DATA           (EVSIOSMS_NSCALINGS + 1)
                    143: #define        EVSIOSMS_SIZE           (EVSIOSMS_DATA + (2 * NX_MAXMOUSESCALINGS))
                    144: 
                    145: #define        EVSIOCMS  "Evs_CurrentMouseScaling"
                    146: #define        EVSIOCMS_NSCALINGS      0
                    147:        /* The data consists of NX_MAXMOUSESCALINGS threshold/factor pairs. */
                    148: #define        EVSIOCMS_DATA           (EVSIOCMS_NSCALINGS + 1)
                    149: #define        EVSIOCMS_SIZE           (EVSIOCMS_DATA + (2 * NX_MAXMOUSESCALINGS))
                    150: 
                    151: #define EVSIOSMH  "Evs_SetMouseHandedness"
                    152: #define EVSIOSMH_SIZE  1               // value from NXMouseButton enum
                    153: 
                    154: #define EVSIOCMH  "Evs_CurrentMouseHandedness"
                    155: #define EVSIOCMH_SIZE  1
                    156: 
                    157: 
                    158: /* Generic pointer device controls, implemented by the Event Driver. */
                    159: #define        EVSIOSCT  "Evs_SetClickTime"
                    160: #define EVSIOSCT_SIZE  EVS_PACKED_TIME_SIZE
                    161: 
                    162: #define        EVSIOSCS  "Evs_SetClickSpace"
                    163: typedef enum {
                    164:        EVSIOSCS_X,
                    165:        EVSIOSCS_Y
                    166: } evsioEVSIOSCSIndices;
                    167: #define EVSIOSCS_SIZE  (EVSIOSCS_Y + 1)
                    168: 
                    169: #define EVSIOSADT "Evs_SetAutoDimTime"
                    170: #define EVSIOSADT_SIZE EVS_PACKED_TIME_SIZE
                    171: 
                    172: #define EVSIOSADS "Evs_SetAutoDimState"
                    173: #define EVSIOSADS_SIZE 1
                    174: 
                    175: #define EVSIORMS  "Evs_ResetMouse"
                    176: #define EVSIORMS_SIZE  1
                    177: 
                    178: #define        EVSIOCCT  "Evs_CurrentClickTime"
                    179: #define EVSIOCCT_SIZE  EVS_PACKED_TIME_SIZE
                    180: 
                    181: #define EVSIOCADT "Evs_CurrentAutoDimTime"
                    182: #define EVSIOCADT_SIZE EVS_PACKED_TIME_SIZE
                    183: 
                    184: #define EVSIOGDADT "Evs_GetDeltaAutoDimTime"
                    185: #define EVSIOGDADT_SIZE        EVS_PACKED_TIME_SIZE
                    186: 
                    187: #define EVSIOIDLE "Evs_GetIdleTime"
                    188: #define EVSIOIDLE_SIZE EVS_PACKED_TIME_SIZE
                    189: 
                    190: #define        EVSIOCCS  "Evs_CurrentClickSpace"
                    191: typedef enum {
                    192:        EVSIOCCS_X,
                    193:        EVSIOCCS_Y
                    194: } evsioEVSIOCCSIndices;
                    195: #define EVSIOCCS_SIZE  (EVSIOCCS_Y + 1)
                    196: 
                    197: #define EVSIOCADS "Evs_AutoDimmed"
                    198: #define EVSIOCADS_SIZE 1
                    199: 
                    200: #endif /* _DEV_EVSIO_ */
                    201: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.