|
|
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: * Copyright (c) 1997 Apple Computer, Inc. ! 24: * ! 25: * ! 26: * HISTORY ! 27: * ! 28: */ ! 29: ! 30: ! 31: #ifndef _IOKIT_IOFRAMEBUFFERUSERCLIENT_H ! 32: #define _IOKIT_IOFRAMEBUFFERUSERCLIENT_H ! 33: ! 34: #include <IOKit/IOUserClient.h> ! 35: #include <IOKit/graphics/IOFramebuffer.h> ! 36: #include <IOKit/pci/IOAGPDevice.h> ! 37: ! 38: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! 39: ! 40: class IOFramebufferUserClient : public IOUserClient ! 41: { ! 42: OSDeclareDefaultStructors(IOFramebufferUserClient) ! 43: ! 44: private: ! 45: ! 46: IOFramebuffer * owner; ! 47: ! 48: IOExternalMethod externals[ 17 ]; ! 49: ! 50: mach_port_t WSnotificationPort; // how we tell window server of power changes ! 51: void * notificationMsg; // Msg to be sent to Window Server. ! 52: ! 53: unsigned long current_power_state; // current power state of frame buffer ! 54: ! 55: ! 56: public: ! 57: // IOUserClient methods ! 58: virtual IOReturn clientClose( void ); ! 59: ! 60: virtual IOService * getService( void ); ! 61: ! 62: virtual IOReturn clientMemoryForType( UInt32 type, ! 63: IOOptionBits * options, IOMemoryDescriptor ** memory ); ! 64: ! 65: virtual IOExternalMethod * getExternalMethodForIndex( UInt32 index ); ! 66: ! 67: virtual IOReturn registerNotificationPort( mach_port_t, UInt32, UInt32 ); ! 68: virtual IOReturn getNotificationSemaphore( UInt32 interruptType, ! 69: semaphore_t * semaphore ); ! 70: ! 71: // others ! 72: ! 73: static IOFramebufferUserClient * withTask( task_t owningTask ); ! 74: ! 75: virtual bool start( IOService * provider ); ! 76: ! 77: virtual IOReturn acknowledgeNotification(void); ! 78: ! 79: virtual IOReturn powerStateWillChangeTo(IOPMPowerFlags, unsigned long, IOService* ); ! 80: ! 81: virtual IOReturn powerStateDidChangeTo(IOPMPowerFlags, unsigned long, IOService* ); ! 82: ! 83: }; ! 84: ! 85: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! 86: ! 87: class IOGraphicsEngineClient : public IOUserClient ! 88: { ! 89: OSDeclareDefaultStructors(IOGraphicsEngineClient) ! 90: ! 91: private: ! 92: ! 93: IOFramebuffer * owner; ! 94: task_t owningTask; ! 95: IOAGPDevice * agpDev; ! 96: bool haveAGP; ! 97: OSArray * descriptors; ! 98: ! 99: IOExternalMethod externals[ 4 ]; ! 100: ! 101: public: ! 102: // IOUserClient methods ! 103: virtual IOReturn clientClose( void ); ! 104: virtual void free(); ! 105: ! 106: virtual IOService * getService( void ); ! 107: ! 108: virtual IOReturn clientMemoryForType( UInt32 type, ! 109: IOOptionBits * options, IOMemoryDescriptor ** memory ); ! 110: ! 111: virtual IOExternalMethod * getExternalMethodForIndex( UInt32 index ); ! 112: ! 113: // others ! 114: ! 115: static IOGraphicsEngineClient * withTask( task_t owningTask ); ! 116: virtual bool start( IOService * provider ); ! 117: ! 118: virtual IOReturn addUserRange( vm_address_t start, vm_size_t length, ! 119: UInt32 aperture, IOPhysicalAddress * phys ); ! 120: ! 121: virtual IOReturn createAGPSpace( IOOptionBits options, ! 122: IOPhysicalLength length, ! 123: IOPhysicalAddress * address, ! 124: IOPhysicalLength * lengthOut ); ! 125: ! 126: virtual IOReturn commitAGPMemory( vm_address_t start, ! 127: vm_size_t length, IOOptionBits options, ! 128: void ** ref, IOByteCount * offset ); ! 129: ! 130: virtual IOReturn releaseAGPMemory( void * ref ); ! 131: ! 132: }; ! 133: ! 134: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! 135: ! 136: class IOFramebufferSharedUserClient : public IOUserClient ! 137: { ! 138: OSDeclareDefaultStructors(IOFramebufferSharedUserClient) ! 139: ! 140: private: ! 141: ! 142: IOFramebuffer * owner; ! 143: ! 144: IOExternalMethod externals[ 0 ]; ! 145: ! 146: public: ! 147: virtual void free(); ! 148: virtual void release() const; ! 149: ! 150: // IOUserClient methods ! 151: virtual IOReturn clientClose( void ); ! 152: ! 153: virtual IOService * getService( void ); ! 154: ! 155: virtual IOReturn clientMemoryForType( UInt32 type, ! 156: IOOptionBits * options, IOMemoryDescriptor ** memory ); ! 157: ! 158: virtual IOReturn getNotificationSemaphore( UInt32 notification_type, ! 159: semaphore_t * semaphore ); ! 160: ! 161: virtual IOExternalMethod * getExternalMethodForIndex( UInt32 index ); ! 162: ! 163: // others ! 164: static IOFramebufferSharedUserClient * withTask( task_t owningTask ); ! 165: virtual bool start( IOService * provider ); ! 166: ! 167: }; ! 168: ! 169: ! 170: #endif /* ! _IOKIT_IOFRAMEBUFFERUSERCLIENT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.