Annotation of kernel/bsd/dev/ppc/EventSrcPCKeyboard.h, revision 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:  * EventSrcPCKeyboard.h - PC Keyboard EventSrc subclass definition
        !            28:  *
        !            29:  * HISTORY
        !            30:  * 28 Aug 1992    Joe Pasqua
        !            31:  *      Created. 
        !            32:  */
        !            33: 
        !            34: #ifdef DRIVER_PRIVATE
        !            35: 
        !            36: #import        <bsd/dev/evsio.h>
        !            37: #import <driverkit/IOEventSource.h>
        !            38: #import <driverkit/KeyMap.h>
        !            39: #import        <bsd/dev/ppc/PPCKeyboard.h>
        !            40: #import        <bsd/dev/ppc/PCKeyboardDefs.h>
        !            41: 
        !            42: 
        !            43: /* Default key repeat parameters */
        !            44: #define EV_DEFAULTINITIALREPEAT 500000000ULL    // 1/2 sec in nanoseconds
        !            45: #define EV_DEFAULTKEYREPEAT     125000000ULL    // 1/8 sec in nanoseconds
        !            46: #define EV_MINKEYREPEAT         16700000ULL     // 1/60 sec
        !            47: 
        !            48: @interface EventSrcPCKeyboard : IOEventSource <KeyMapDelegate, PCKeyboardImported>
        !            49: {
        !            50: @private
        !            51:     id         deviceLock;             // Lock for all device access
        !            52:     id         keyMap;                 // KeyMap instance
        !            53:     id         kbdDevice;              // The underlying keyboard object
        !            54:     BOOL       ownDevice;              // YES if we own kbdDevice
        !            55: 
        !            56:     // The following fields decribe the state of the keyboard
        !            57:     kbdBitVector keyState;             // bit vector of key state
        !            58:     unsigned   eventFlags;             // Current eventFlags
        !            59:     unsigned   deviceDependentFlags;   // The device dependent flag bits
        !            60:     BOOL       alphaLock;              // YES means alpha lock is on
        !            61:     BOOL       charKeyActive;          // YES means char gen. key active
        !            62: 
        !            63:     // The following fields are used in performing key repeats
        !            64:     BOOL       isRepeat;               // YES means we're generating repeat
        !            65:     int                codeToRepeat;           // What we are repeating
        !            66:     BOOL       calloutPending;         // YES means we've sched. a callout
        !            67:     ns_time_t  lastEventTime;          // Time last event was dispatched
        !            68:     ns_time_t  downRepeatTime;         // Time when we should next repeat
        !            69:     ns_time_t  keyRepeat;              // Delay between key repeats
        !            70:     ns_time_t  initialKeyRepeat;       // Delay before initial key repeat
        !            71: }
        !            72: 
        !            73: // Methods we are overriding from superclass chain
        !            74: + probe;               // Our factory method
        !            75: - init;
        !            76: - free;
        !            77: - (IOReturn)getIntValues               : (unsigned *)parameterArray
        !            78:                           forParameter : (IOParameterName)parameterName
        !            79:                                  count : (unsigned *)count;    // in/out
        !            80: 
        !            81: - (IOReturn)getCharValues              : (unsigned char *)parameterArray
        !            82:                           forParameter : (IOParameterName)parameterName
        !            83:                                  count : (unsigned *)count;    // in/out
        !            84:                        
        !            85: - (IOReturn)setIntValues               : (unsigned *)parameterArray
        !            86:                           forParameter : (IOParameterName)parameterName
        !            87:                                  count : (unsigned)count;
        !            88: 
        !            89: - (IOReturn)setCharValues              : (unsigned char *)parameterArray
        !            90:                           forParameter : (IOParameterName)parameterName
        !            91:                                  count : (unsigned)count;
        !            92: 
        !            93: @end
        !            94: 
        !            95: #endif /* DRIVER_PRIVATE */

unix.superglobalmegacorp.com

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