Package Name: qdoffscreen
with Interfaces.C; use Interfaces.C;
with Types; use Types;
with Quickdraw; use Quickdraw;
package QDOffscreen is
--
-- File: QDOffscreen.h
--
-- Contains: QuickDraw Offscreen GWorld Interfaces.
--
-- Version: Technology: System 7.5
-- Package: Universal Interfaces 2.0 in ÒMPW LatestÓ on ETO #17
--
-- Copyright: © 1984-1995 by Apple Computer, Inc.
-- All rights reserved.
--
subtype GWorldFlags is unsigned_long;
subtype GWorldPtr is CGrafPtr;
pixPurgeBit : constant := 0;
noNewDeviceBit : constant := 1;
useTempMemBit : constant := 2;
keepLocalBit : constant := 3;
pixelsPurgeableBit : constant := 6;
pixelsLockedBit : constant := 7;
mapPixBit : constant := 16;
newDepthBit : constant := 17;
alignPixBit : constant := 18;
newRowBytesBit : constant := 19;
reallocPixBit : constant := 20;
clipPixBit : constant := 28;
stretchPixBit : constant := 29;
ditherPixBit : constant := 30;
gwFlagErrBit : constant := 31;
pixPurge : constant := 1 * (2**(pixPurgeBit));
noNewDevice : constant := 1 * (2**(noNewDeviceBit));
useTempMem : constant := 1 * (2**(useTempMemBit));
keepLocal : constant := 1 * (2**(keepLocalBit));
pixelsPurgeable : constant := 1 * (2**(pixelsPurgeableBit));
pixelsLocked : constant := 1 * (2**(pixelsLockedBit));
mapPix : constant := 1 * (2**(mapPixBit));
newDepth : constant := 1 * (2**(newDepthBit));
alignPix : constant := 1 * (2**(alignPixBit));
newRowBytes : constant := 1 * (2**(newRowBytesBit));
reallocPix : constant := 1 * (2**(reallocPixBit));
clipPix : constant := 1 * (2**(clipPixBit));
stretchPix : constant := 1 * (2**(stretchPixBit));
ditherPix : constant := 1 * (2**(ditherPixBit));
gwFlagErr : constant := 1 * (2**(gwFlagErrBit));
function NewGWorld
(offscreenGWorld : access GWorldPtr;
PixelDepth : in Short_Integer;
boundsRect : access Rect;
cTable : in CTabHandle;
aGDevice : in GDHandle;
flags : in GWorldFlags)
return QDErr;
pragma Import (C, NewGWorld, "NewGWorld", "NewGWorld");
function LockPixels
(pm : in PixMapHandle)
return Boolean;
pragma Import (C, LockPixels, "LockPixels", "LockPixels");
procedure UnlockPixels
(pm : in PixMapHandle);
pragma Import (C, UnlockPixels, "UnlockPixels", "UnlockPixels");
function UpdateGWorld
(offscreenGWorld : access GWorldPtr;
pixelDepth : in Short_Integer;
boundsRect : access Rect;
cTable : in CTabHandle;
aGDevice : in GDHandle;
flags : in GWorldFlags)
return GWorldFlags;
pragma Import (C, UpdateGWorld, "UpdateGWorld", "UpdateGWorld");
procedure DisposeGWorld
(offscreenGWorld : in GWorldPtr);
pragma Import (C, DisposeGWorld, "DisposeGWorld", "DisposeGWorld");
procedure GetGWorld
(port : access CGrafPtr;
gdh : access GDHandle);
pragma Import (C, GetGWorld, "GetGWorld", "GetGWorld");
procedure SetGWorld
(port : in CGrafPtr;
gdh : in GDHandle);
pragma Import (C, SetGWorld, "SetGWorld", "SetGWorld");
procedure CTabChanged
(ctab : in CTabHandle);
pragma Import (C, CTabChanged, "CTabChanged", "CTabChanged");
procedure PixPatChanged
(ppat : in PixPatHandle);
pragma Import (C, PixPatChanged, "PixPatChanged", "PixPatChanged");
procedure PortChanged
(port : in GrafPtr);
pragma Import (C, PortChanged, "PortChanged", "PortChanged");
procedure GDeviceChanged
(gdh : in GDHandle);
pragma Import (C, GDeviceChanged, "GDeviceChanged", "GDeviceChanged");
procedure AllowPurgePixels
(pm : in PixMapHandle);
pragma Import (C, AllowPurgePixels, "AllowPurgePixels", "AllowPurgePixels");
procedure NoPurgePixels
(pm : in PixMapHandle);
pragma Import (C, NoPurgePixels, "NoPurgePixels", "NoPurgePixels");
function GetPixelsState
(pm : in PixMapHandle)
return GWorldFlags;
pragma Import (C, GetPixelsState, "GetPixelsState", "GetPixelsState");
procedure SetPixelsState
(pm : in PixMapHandle;
state : in GWorldFlags);
pragma Import (C, SetPixelsState, "SetPixelsState", "SetPixelsState");
function GetPixBaseAddr
(pm : in PixMapHandle)
return Ptr;
pragma Import (C, GetPixBaseAddr, "GetPixBaseAddr", "GetPixBaseAddr");
function NewScreenBuffer
(globalRect : access Rect;
purgeable : in Boolean;
gdh : access GDHandle;
offscreenPixMap : access PixMapHandle)
return QDErr;
pragma Import (C, NewScreenBuffer, "NewScreenBuffer", "NewScreenBuffer");
procedure DisposeScreenBuffer
(offscreenPixMap : in PixMapHandle);
pragma Import (C, DisposeScreenBuffer, "DisposeScreenBuffer", "DisposeScreenBuffer");
function GetGWorldDevice
(offscreenGWorld : in GWorldPtr)
return GDHandle;
pragma Import (C, GetGWorldDevice, "GetGWorldDevice", "GetGWorldDevice");
function QDDone
(port : in GrafPtr)
return Boolean;
pragma Import (C, QDDone, "QDDone", "QDDone");
function OffscreenVersion
return Long_Integer;
pragma Import (C, OffscreenVersion, "OffscreenVersion", "OffscreenVersion");
function NewTempScreenBuffer
(globalRect : access Rect;
purgeable : in Boolean;
gdh : access GDHandle;
offscreenPixMap : access PixMapHandle)
return QDErr;
pragma Import (C, NewTempScreenBuffer, "NewTempScreenBuffer", "NewTempScreenBuffer");
function PixMap32Bit
(pmHandle : in PixMapHandle)
return Boolean;
pragma Import (C, PixMap32Bit, "PixMap32Bit", "PixMap32Bit");
function GetGWorldPixMap
(offscreenGWorld : in GWorldPtr)
return PixMapHandle;
pragma Import (C, GetGWorldPixMap, "GetGWorldPixMap", "GetGWorldPixMap");
end QDOffscreen;