JPEGView/Headers/JPEGViewTypes.h

1 line
7.5 KiB
C
Raw Normal View History

/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __JPEGVIEWTYPES__ #define __JPEGVIEWTYPES__ #include <Files.h> #include <ImageCompression.h> #include <Palettes.h> #include <QDOffscreen.h> #include <QuickDraw.h> #include <Types.h> #include <Windows.h> #include "MarchingAnts.h" typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned long ulong; typedef struct ImageItem ImageItem, *ImagePtr, **ImageHandle; //=================================================================================== // NestedProgress: structure for holding data necessary to do nested progress // procedures. //=================================================================================== typedef struct NestedProgress { ICMProgressProcRecord prog; short level; Fixed begin, end; char aborted; } NestedProgress, *NestedProgressPtr, **NestedProgressHandle; //=================================================================================== // JVPortParams: structure for holding drawing parameters that describe a port. //=================================================================================== typedef struct JVPortParams { CGrafPtr port; // pointer to the port to draw in Rect outer; // bounds of the image, in dest. coordinates Boolean dither; // flag: true to dither when drawing } JVPortParams; //=================================================================================== // JVDrawParams: structs for holding the drawing parameters for a particular drawing // operation, both onscreen and offscreen. //=================================================================================== typedef struct JVDrawParams { struct JVDrawParams **next; // handle to the next in the list Rect bounds; // full-size bounds of image CGrafPtr dummy; // dummy GrafPort for drawing into JVPortParams on; // on-screen drawing parameters JVPortParams off; // off-screen drawing parameters JVPortParams extra; // extra off-screen drawing parameters Boolean quantize; // quantizing flag: true to fill the histogram short quality; // drawing quality to be used Handle privateData; // private data for the plug-in NestedProgress progress; // nested progress procedure record short endprogress; // scan line where we stop drawing progress RgnHandle newupdates; // handle to new updates in the onscreen port PixMapPtr src; // pointer to the source pixmap for DeviceCopy Rect srcrect; // source bounds for DeviceCopy Rect dstrect; // destination bounds for DeviceCopy Rect drawProgressRect; // rectangle used by drawing progress Ptr oldbits; // pointer to the old StdBits routine for FixBits CQDProcs *oldprocs; // pointer to the old set of CQDProcs for FixBits } JVDrawParams, *JVDrawParamsPtr, **JVDrawParamsHandle; typedef Boolean (*idImagePtr)(uchar *theData, long theSize, short refNum, FSSpec *theSpec); typedef OSErr (*OpenImagePtr)(ImageHandle theImage); typedef OSErr (*DrawImagePtr)(Handle theHandle, JVDrawParamsHandle theParams); typedef OSErr (*LoadImagePtr)(short theFile, ImageHandle theImage); typedef OSErr (*SaveImagePtr)(FSSpec *theSpec, Handle theHandle, GWorldPtr thePreview, Rect *theRect, Handle privates); typedef OSErr (*FixImagePtr)(ImageHandle theImage, Handle *finalData, Boolean palette); typedef OSErr (*CloneImagePtr)(ImageHandle origImage, ImageHandle newImage); typedef OSErr (*CloseImagePtr)(ImageHandle theImage); typedef pascal void (*StdBitsProcPtr)(PixMap *, Rect *, Rect *, short, RgnHandle); /* * sMonitorItem = linked list item describing a graphics device * */ typedef struct MonitorItem { struct MonitorItem **next; // pointer to the next monitor RgnHandle gray; // this monitor's contribution to the GrayRgn RgnHandle screen; // the full screen area of this moni