Annotation of XNU/iokit/IOKit/hidsystem/ev_private.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /******************************************************************************
                     23: 
                     24:     ev_private.h
                     25:     Internal defs for the events driver.  The contents of this module
                     26:     may need to be tweaked slightly from one architecture to the next.
                     27:     22 May 1992        Mike Paquette at NeXT Computers, Inc.
                     28:     
                     29:     Copyright 1992 NeXT, Inc.
                     30:     
                     31:     Modified:
                     32:     
                     33: 
                     34: ******************************************************************************/
                     35: 
                     36: #ifndef _DEV_EV_PRIVATE_H
                     37: #define _DEV_EV_PRIVATE_H
                     38: 
                     39: #include <IOKit/hidsystem/IOLLEvent.h>
                     40: 
                     41: /* Initial cursor position */
                     42: #define INIT_CURSOR_X          16
                     43: #define INIT_CURSOR_Y          16
                     44: 
                     45: /* Default mouse click time and motion constants */
                     46: #define        EV_DCLICKTIME   500000000       /* Default nanoseconds for a double-click */
                     47: #define        EV_DCLICKSPACE  3               /* Default pixel threshold for double-clicks */
                     48: 
                     49: /* Default Wait Cursor Timing Constants (in nanoseconds) */
                     50: #define DefaultWCSustain       300000000       /* 0.3 seconds */       
                     51: #define DefaultWCFrameRate     75000000        /* 13.3 frames/second */
                     52: #define DefaultWCThreshold     1200000000ULL   /* 1.2 seconds */
                     53: 
                     54: #define EV_STD_CURSOR  0
                     55: #define EV_WAITCURSOR  1
                     56: #define EV_WAITCURSOR_1        2
                     57: #define EV_WAITCURSOR_2        3
                     58: #define EV_MAXCURSOR   (EV_WAITCURSOR_2)
                     59: 
                     60: /* Default dim time is 5 minutes, nanoseconds */
                     61: #define DAUTODIMPERIOD (1000ULL*1000ULL*1000ULL*60*5)
                     62: /* Default dim level is one-fourth */
                     63: #define DDIMBRIGHTNESS (EV_SCREEN_MAX_BRIGHTNESS/4)
                     64: 
                     65: 
                     66: /* Where event numbers start */
                     67: #define INITEVENTNUM 13
                     68: #define        NULLEVENTNUM 0          /* The event number that never was */
                     69: 
                     70: #define MOVEDEVENTMASK \
                     71:        (NX_MOUSEMOVEDMASK | NX_LMOUSEDRAGGEDMASK | NX_RMOUSEDRAGGEDMASK )
                     72: #define COALESCEEVENTMASK \
                     73:        (MOVEDEVENTMASK | NX_MOUSEEXITEDMASK)
                     74: #define MOUSEEVENTMASK \
                     75:        (NX_LMOUSEDOWNMASK|NX_RMOUSEDOWNMASK|NX_LMOUSEUPMASK|NX_RMOUSEUPMASK)
                     76: #define PRESSUREEVENTMASK \
                     77:        (NX_LMOUSEDOWNMASK|NX_LMOUSEUPMASK|NX_MOUSEMOVEDMASK|NX_LMOUSEDRAGGEDMASK)
                     78: 
                     79: /* Flags which can modify meaning of special volume/brightness keys */
                     80: #define SPECIALKEYS_MODIFIER_MASK \
                     81:                        (NX_COMMANDMASK|NX_ALTERNATEMASK|NX_CONTROLMASK)
                     82: 
                     83: /* Bits in evg->eventFlags owned by keyboard devices */
                     84: #define KEYBOARD_FLAGSMASK \
                     85:         (NX_ALPHASHIFTMASK | NX_SHIFTMASK | NX_CONTROLMASK | NX_ALTERNATEMASK \
                     86:         | NX_COMMANDMASK | NX_NUMERICPADMASK | NX_HELPMASK)
                     87: //                                                         | NX_NEXTCTLKEYMASK \
                     88: //      | NX_NEXTLSHIFTKEYMASK | NX_NEXTRSHIFTKEYMASK | NX_NEXTLCMDKEYMASK \
                     89: //      | NX_NEXTRCMDKEYMASK | NX_NEXTLALTKEYMASK | NX_NEXTRALTKEYMASK)
                     90: 
                     91: /* Some non-zero token to or with screen number */
                     92: #define SCREENTOKEN 256
                     93: 
                     94: /* A macro to report if the event queue is not empty */
                     95: #define EventsInQueue() \
                     96:     (eventsOpen && (((EvGlobals*)evg)->LLEHead != ((EvGlobals*)evg)->LLETail))
                     97: 
                     98: struct _eventMsg {
                     99:     mach_msg_header_t h;
                    100: #ifdef mach3xxx                        // this is not needed anymore?
                    101:     msg_type_t        t;
                    102: #endif
                    103: };
                    104: 
                    105: /******************************************************************************
                    106:     EvScreen
                    107:     This structure is used by the ev driver.
                    108:     It holds information about a single screen: how much private shmem it owns,
                    109:     where its private shmem region starts, its global bounds and four procedure
                    110:     vectors. This structure is allocated by the ev driver and is filled in
                    111:     when a driver calls ev_register_screen().
                    112: ******************************************************************************/
                    113: 
                    114: typedef volatile struct _evScreen {
                    115:     IOGraphicsDevice * instance;/* Driver instance owning this screen. */
                    116: //  void *shmemPtr;            /* Ptr to private shmem (if non-zero size) */
                    117: //  int shmemSize;             /* Size of private shmem */
                    118:     Bounds * bounds;           /* Screen's bounds in device coordinates */
                    119: } EvScreen;
                    120: 
                    121: /*
                    122:  *     We maintain a queue of EventSrc instances attached to the Event
                    123:  *     Driver.  These sources are dynamically checked in with the Event
                    124:  *     Driver.  When the driver is closed (as on Window Server exit) we
                    125:  *     post a relinquishOwnership:client message to the drivers.
                    126:  */
                    127: typedef struct {
                    128:        IOHIDevice *    eventSrc;
                    129: } eventSrcInfo;
                    130: 
                    131: typedef struct {
                    132:        eventSrcInfo            info;
                    133:        queue_chain_t           link;
                    134: } attachedEventSrc;
                    135: 
                    136: // No-op XPR stuff
                    137: #define xpr_ev_cursor(x, a, b, c, d, e)
                    138: #define xpr_ev_post(x, a, b, c, d, e)
                    139: 
                    140: #endif /* !_DEV_EV_PRIVATE_H */
                    141: 

unix.superglobalmegacorp.com

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