#ifndef __IONDRVLIBRARIES__
#define __IONDRVLIBRARIES__
#include <libkern/OSByteOrder.h>
#include <libkern/OSAtomic.h>
#include <IOKit/ndrvsupport/IOMacOSTypes.h>
#include <IOKit/graphics/IOGraphicsTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
enum {
nrLockedErr = -2536,
nrNotEnoughMemoryErr = -2537,
nrInvalidNodeErr = -2538,
nrNotFoundErr = -2539,
nrNotCreatedErr = -2540,
nrNameErr = -2541,
nrNotSlotDeviceErr = -2542,
nrDataTruncatedErr = -2543,
nrPowerErr = -2544,
nrPowerSwitchAbortErr = -2545,
nrTypeMismatchErr = -2546,
nrNotModifiedErr = -2547,
nrOverrunErr = -2548,
nrResultCodeBase = -2549,
nrPathNotFound = -2550,
nrPathBufferTooSmall = -2551,
nrInvalidEntryIterationOp = -2552,
nrPropertyAlreadyExists = -2553,
nrIterationDone = -2554,
nrExitedIteratorScope = -2555,
nrTransactionAborted = -2556,
gestaltUndefSelectorErr = -5551
};
enum {
kNVRAMProperty = 0x00000020, };
#ifndef _IOKIT_IOSERVICE_H
typedef struct IOService IOService;
#endif
IOReturn _IONDRVLibrariesInitialize( IOService * provider );
IOReturn _IONDRVLibrariesFinalize( IOService * provider );
#ifndef kAAPLRegEntryIDKey
#define kAAPLRegEntryIDKey "AAPL,RegEntryID"
#endif
typedef void * RegPropertyValue;
typedef UInt32 RegPropertyValueSize;
enum {
kRegCStrMaxEntryNameLength = 47
};
typedef char RegCStrEntryName;
typedef char * RegCStrEntryNamePtr;
typedef char RegCStrEntryNameBuf[48];
typedef char RegCStrPathName;
typedef UInt32 RegPathNameSize;
enum {
kRegPathNameSeparator = ':',
kRegEntryNameTerminator = 0x00,
kRegPathNameTerminator = 0x00
};
enum {
kRegMaximumPropertyNameLength = 31,
kRegPropertyNameTerminator = 0x00
};
typedef char RegPropertyNameBuf[32];
typedef char RegPropertyName;
typedef char * RegPropertyNamePtr;
enum {
kRegMaxPropertyNameLength = kRegMaximumPropertyNameLength
};
typedef UInt32 RegIterationOp;
typedef RegIterationOp RegEntryIterationOp;
enum {
kRegIterRoot = 0x00000002,
kRegIterParents = 0x00000003,
kRegIterChildren = 0x00000004,
kRegIterSubTrees = 0x00000005,
kRegIterDescendants = 0x00000005,
kRegIterSibling = 0x00000006,
kRegIterContinue = 0x00000001
};
typedef UInt32 RegModifiers;
typedef RegModifiers RegEntryModifiers;
typedef RegModifiers RegPropertyModifiers;
enum {
kRegNoModifiers = 0x00000000,
kRegUniversalModifierMask = 0x0000FFFF,
kRegNameSpaceModifierMask = 0x00FF0000,
kRegModifierMask = (RegModifiers)0xFF000000
};
enum {
kRegPropertyValueIsSavedToNVRAM = 0x00000020,
kRegPropertyValueIsSavedToDisk = 0x00000040
};
typedef size_t Size;
#ifndef _IOKIT_IOREGISTRYENTRY_H
typedef struct IORegistryIterator IORegistryIterator;
typedef struct OSIterator OSIterator;
#endif
typedef IORegistryIterator * RegEntryIter;
typedef OSIterator * RegPropertyIter;
OSStatus RegistryEntryIDCopy( const RegEntryID * entryID, RegEntryID * to );
OSStatus RegistryEntryIDInit( RegEntryID * entryID );
Boolean RegistryEntryIDCompare( const RegEntryID * id1, const RegEntryID * id2);
OSStatus RegistryPropertyGetSize(
const RegEntryID * entryID,
const RegPropertyName * propertyName,
RegPropertyValueSize * propertySize);
OSStatus RegistryPropertyGet(
const RegEntryID * entryID,
const RegPropertyName * propertyName,
void * propertyValue,
RegPropertyValueSize * propertySize);
OSStatus RegistryPropertyCreate(
const RegEntryID * entryID,
const RegPropertyName * propertyName,
const void * propertyValue,
RegPropertyValueSize propertySize);
OSStatus RegistryPropertyDelete(
const RegEntryID * entryID,
const RegPropertyName * propertyName);
OSStatus RegistryPropertySet(
const RegEntryID * entryID,
const RegPropertyName * propertyName,
const void * propertyValue,
RegPropertyValueSize propertySize);
OSStatus RegistryPropertyGetMod(
const RegEntryID * entry,
const RegPropertyName * name,
RegPropertyModifiers * modifiers);
OSStatus RegistryPropertySetMod(
const RegEntryID * entry,
const RegPropertyName * name,
RegPropertyModifiers modifiers);
OSStatus RegistryPropertyIterateCreate(
const RegEntryID * entry,
RegPropertyIter * cookie);
OSStatus RegistryPropertyIterateDispose( RegPropertyIter * cookie);
OSStatus RegistryPropertyIterate(
RegPropertyIter * cookie,
RegPropertyName * foundProperty,
Boolean * done);
OSStatus RegistryEntryIterateCreate( RegEntryIter * cookie);
OSStatus RegistryEntryIterateDispose( RegEntryIter * cookie);
OSStatus RegistryEntryIterate( RegEntryIter * cookie,
RegEntryIterationOp relationship,
RegEntryID * foundEntry,
Boolean * done);
OSStatus RegistryCStrEntryToName( const RegEntryID * entryID,
RegEntryID * parentEntry,
RegCStrEntryName * nameComponent,
Boolean * done );
OSStatus RegistryCStrEntryLookup( const RegEntryID * parentEntry,
const RegCStrPathName * path,
RegEntryID * newEntry);
OSStatus RegistryEntryIDDispose(RegEntryID * entryID);
enum {
paramErr = -50,
noHardwareErr = -200,
notEnoughHardwareErr = -201,
userCanceledErr = -128,
qErr = -1,
vTypErr = -2,
corErr = -3,
unimpErr = -4,
SlpTypeErr = -5,
seNoDB = -8,
controlErr = -17,
statusErr = -18,
readErr = -19,
writErr = -20,
badUnitErr = -21,
unitEmptyErr = -22,
openErr = -23,
closErr = -24,
dRemovErr = -25,
dInstErr = -26,
badCksmErr = -69,
};
enum {
durationMicrosecond = -1,
durationMillisecond = 1,
durationSecond = 1000,
durationMinute = 60000,
durationHour = 3600000,
durationDay = 86400000,
durationNoWait = 0,
durationForever = 0x7FFFFFFF
};
#ifndef NULL
#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
#define NULL ((void *) 0)
#else
#define NULL 0L
#endif
#endif
#ifndef nil
#define nil NULL
#endif
typedef ResType VSLGestaltType;
enum {
clutType = 0,
fixedType = 1,
directType = 2,
RGBDirect = 16
};
typedef UInt32 * UInt32Ptr;
typedef struct IOHardwareCursorDescriptor HardwareCursorDescriptorRec;
typedef HardwareCursorDescriptorRec * HardwareCursorDescriptorPtr;
typedef struct IOHardwareCursorInfo HardwareCursorInfoRec;
typedef HardwareCursorInfoRec * HardwareCursorInfoPtr;
typedef ResType InterruptServiceType;
typedef struct _VSLService * InterruptServiceIDType;
typedef InterruptServiceIDType * InterruptServiceIDPtr;
enum {
kVBLInterruptServiceType = 'vbl ',
kHBLInterruptServiceType = 'hbl ',
kFrameInterruptServiceType = 'fram',
kConnectInterruptServiceType = 'dci ',
kFBConnectInterruptServiceType = kConnectInterruptServiceType,
kFBChangedInterruptServiceType = 'chng',
kFBOfflineInterruptServiceType = 'remv',
kFBOnlineInterruptServiceType = 'add '
};
enum {
kVSLClamshellStateGestaltType = 'clam',
};
OSStatus
VSLGestalt( VSLGestaltType selector, UInt32 * response );
OSErr
VSLNewInterruptService(
RegEntryID * serviceDevice,
InterruptServiceType serviceType,
InterruptServiceIDPtr serviceID);
OSErr
VSLDisposeInterruptService(InterruptServiceIDType serviceID);
OSErr
VSLDoInterruptService(InterruptServiceIDType serviceID);
Boolean
VSLPrepareCursorForHardwareCursor(
void * cursorRef,
IOHardwareCursorDescriptor * hardwareDescriptor,
IOHardwareCursorInfo * hwCursorInfo);
enum {
developStage = 0x20,
alphaStage = 0x40,
betaStage = 0x60,
finalStage = 0x80
};
typedef struct OpaqueIOCommandID* IOCommandID;
typedef UInt32 IOCommandKind;
typedef UInt32 IOCommandCode;
#ifdef __cplusplus
}
#endif
#endif