Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT Displays;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __DISPLAYS__}
{$SETC __DISPLAYS__ := 1}
{$I+}
{$SETC DisplaysIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __CONDITIONALMACROS__}
{$I ConditionalMacros.p}
{$ENDC}
{$IFC UNDEFINED __COMPONENTS__}
{$I Components.p}
{$ENDC}
{ Types.p }
{ MixedMode.p }
{$IFC UNDEFINED __SKIP_DISPLAY_INCLUDES__ }
{$IFC UNDEFINED __APPLEEVENTS__}
{$I AppleEvents.p}
{$ENDC}
{ Errors.p }
{ Memory.p }
{ OSUtils.p }
{ Events.p }
{ Quickdraw.p }
{ QuickdrawText.p }
{ EPPC.p }
{ PPCToolbox.p }
{ AppleTalk.p }
{ Processes.p }
{ Files.p }
{ Notification.p }
{$IFC UNDEFINED __WINDOWS__}
{$I Windows.p}
{$ENDC}
{ Controls.p }
{ Menus.p }
{$ENDC}
{$PUSH}
{$ALIGN MAC68K}
{$LibExport+}
CONST
{ AppleEvents Core Suite }
kAESystemConfigNotice = 'cnfg';
{ Core Suite types }
kAEDisplayNotice = 'dspl';
kAEDisplaySummary = 'dsum';
keyDMConfigVersion = 'dmcv';
keyDMConfigFlags = 'dmcf';
keyDMConfigReserved = 'dmcr';
keyDisplayID = 'dmid';
keyDisplayComponent = 'dmdc';
keyDisplayDevice = 'dmdd';
keyDisplayFlags = 'dmdf';
keyDisplayMode = 'dmdm';
keyDisplayModeReserved = 'dmmr';
keyDisplayReserved = 'dmdr';
keyDisplayMirroredId = 'dmmi';
keyDeviceFlags = 'dddf';
keyDeviceDepthMode = 'dddm';
keyDeviceRect = 'dddr';
keyPixMapRect = 'dpdr';
keyPixMapHResolution = 'dphr';
keyPixMapVResolution = 'dpvr';
keyPixMapPixelType = 'dppt';
keyPixMapPixelSize = 'dpps';
keyPixMapCmpCount = 'dpcc';
keyPixMapCmpSize = 'dpcs';
keyPixMapAlignment = 'dppa';
keyPixMapResReserved = 'dprr';
keyPixMapReserved = 'dppr';
keyPixMapColorTableSeed = 'dpct';
keySummaryMenubar = 'dsmb';
keySummaryChanges = 'dsch';
keyDisplayOldConfig = 'dold';
keyDisplayNewConfig = 'dnew';
dmOnlyActiveDisplays = true;
dmAllDisplays = false;
{ Switch Flags }
kNoSwitchConfirmBit = 0; { Flag indicating that there is no need to confirm a switch to this mode }
kDepthNotAvailableBit = 1; { Current depth not available in new mode }
kShowModeBit = 3; { Show this mode even though it requires a confirm. }
kModeNotResizeBit = 4; { Do not use this mode to resize display (for cards that mode drives a different connector). }
{ Summary Change Flags (sticky bits indicating an operation was performed)
For example, moving a display then moving it back will still set the kMovedDisplayBit.
}
kBeginEndConfigureBit = 0;
kMovedDisplayBit = 1;
kSetMainDisplayBit = 2;
kSetDisplayModeBit = 3;
kAddDisplayBit = 4;
kRemoveDisplayBit = 5;
kNewDisplayBit = 6;
kDisposeDisplayBit = 7;
kEnabledDisplayBit = 8;
kDisabledDisplayBit = 9;
kMirrorDisplayBit = 10;
kUnMirrorDisplayBit = 11;
{ Notification Messages for extended call back routines }
kDMNotifyInstalled = 1; { At install time }
kDMNotifyEvent = 2; { Post change time }
kDMNotifyRemoved = 3; { At remove time }
kDMNotifyPrep = 4; { Pre change time }
kDMNotifyExtendEvent = 5; { Allow registrees to extend apple event before it is sent }
kDMNotifyDependents = 6; { Minor notification check without full update }
{ Notification Flags }
kExtendedNotificationProc = 0+(1 * (2**(16)));
{ Selectors for tablecloths }
kTableclothInit = 0;
kTableclothDraw = 1;
kTableclothAnimate = 2;
kTableclothAnimateContinue = 3;
kTableclothClose = 4;
TYPE
TableclothMessagesType = INTEGER;
{ types for notifyType }
CONST
kFullNotify = 0; { This is the appleevent whole nine yards notify }
kFullDependencyNotify = 1; { Only sends to those who want to know about interrelated functionality (used for updating UI) }
{ DisplayID/DeviceID constants }
kDummyDeviceID = $0FF; { This is the ID of the dummy display, used when the last “real” display is disabled.}
kInvalidDisplayID = $000; { This is the invalid ID}
kFirstDisplayID = $100;
{ bits for panelListFlags }
kAllowDuplicatesBit = 0;
{ Constants for fidelity checks }
kNoFidelity = 0;
kMinimumFidelity = 1;
kDefaultFidelity = 500; { I'm just picking a number for Apple default panels and engines}
kDefaultManufacturorFidelity = 1000; { I'm just picking a number for Manufacturor's panels and engines (overrides apple defaults)}
kAnyPanelType = 0; { Pass to DMNewEngineList for list of all panels (as opposed to specific types)}
kAnyEngineType = 0; { Pass to DMNewEngineList for list of all engines}
kAnyDeviceType = 0; { Pass to DMNewDeviceList for list of all devices}
kAnyPortType = 0; { Pass to DMNewDevicePortList for list of all devices}
{ portListFlags for DM_NewDevicePortList }
{ Should offline devices be put into the port list (such as dummy display) }
kPLIncludeOfflineDevicesBit = 0;
TYPE
DMFidelityType = LONGINT;
DisplayIDType = LONGINT;
DMListType = Ptr;
DMListIndexType = LONGINT;
DMListEntryRec = RECORD
itemID: DisplayIDType; { DisplayID Manager}
itemComponent: Component; { Component Manager}
itemDescription: ComponentDescription; { We can always construct this if we use something beyond the compontent mgr.}
itemClass: ResType; { Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)}
itemFidelity: DMFidelityType; { How good is this item for the specified search?}
itemFlags: LONGINT; { Set to 0 (future expansion)}
itemReserved: ResType; { What kind of code does the itemReference point to (right now - kPanelEntryTypeComponentMgr only)}
itemFuture: LONGINT; { Set to 0 (future expansion - probably an alternate code style)}
END;
DMListEntryPtr = ^DMListEntryRec;
DependentNotifyRec = RECORD
notifyType: ResType; { What type was the engine that made the change (may be zero)}
notifyClass: ResType; { What class was the change (eg geometry, color etc)}
displayID: DisplayIDType; { Which device was touched (kInvalidDisplayID -> all or none)}
notifyComponent: ComponentInstance; { What engine did it (may be 0)?}
notifyVersion: LONGINT; { Set to 0 (future expansion)}
notifyFlags: LONGINT; { Set to 0 (future expansion)}
notifyReserved: LONGINT; { Set to 0 (future expansion)}
notifyFuture: LONGINT; { Set to 0 (future expansion)}
FUNCTION DMNewPanelList(displayID: DisplayIDType; panelType: ResType; minimumFidelity: DMFidelityType; panelListFlags: LONGINT; reserved: LONGINT; VAR thePanelCount: DMListIndexType; VAR thePanelList: DMListType): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0027, $ABEB;
{$ENDC}
FUNCTION DMNewEngineList(displayID: DisplayIDType; engineType: ResType; minimumFidelity: DMFidelityType; engineListFlags: LONGINT; reserved: LONGINT; VAR engineCount: DMListIndexType; VAR engineList: DMListType): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0028, $ABEB;
{$ENDC}
FUNCTION DMNewDeviceList(deviceType: ResType; deviceListFlags: LONGINT; reserved: LONGINT; VAR deviceCount: DMListIndexType; VAR deviceList: DMListType): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0029, $ABEB;
{$ENDC}
FUNCTION DMNewDevicePortList(subType: ResType; portListFlags: LONGINT; reserved: LONGINT; VAR devicePortCount: DMListIndexType; VAR theDevicePortList: DMListType): OSErr;
FUNCTION DMDisposeList(panelList: DMListType): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $002C, $ABEB;
{$ENDC}
FUNCTION DMGetNameByDisplayID(displayID: DisplayIDType; VAR name: Str255): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $042D, $ABEB;
{$ENDC}
FUNCTION DMNewDisplayIDByPortComponent(thePortComponent: Component; portKind: ResType; reserved: LONGINT; VAR newID: DisplayIDType): OSErr;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $082E, $ABEB;
{$ENDC}
FUNCTION DMGetPortComponentByPortID(thePortID: DisplayIDType; VAR thePortComponent: Component; VAR theDesciption: ComponentDescription; VAR thePortKind: ResType): OSErr;