JPEGView 3.3 for Macintosh

These are the sources for the final official release of JPEGView for the
Mac, back in 1994.
This commit is contained in:
Aaron Giles 2015-02-05 00:18:10 -08:00
parent 919cdb57aa
commit 92bdb55672
327 changed files with 298 additions and 0 deletions

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __APPLEEVENTUTILS__ #define __APPLEEVENTUTILS__ /* * sObjectToken = generic token for all our AE object accessors */ typedef struct ObjectToken { short count; DescType objclass, property; Ptr object[1]; } ObjectToken, *ObjectTokenPtr, **ObjectTokenHandle; void AppleEventInit(void); pascal OSErr HandleUnsupportedEvent(AppleEvent *theEvent, AppleEvent *reply, long refCon); OSErr AENewEvent(AppleEvent *theEvent, AEEventClass theClass, AEEventID theID); OSErr AEMakeIntlDesc(StringPtr theString, AEDesc *theDesc); OSErr AEMakeBeginningILoc(AEDesc *theDesc, Boolean floating); OSErr AECreateHandleDesc(DescType theType, Handle theHandle, AEDesc *theDesc); OSErr AEAddAlias(AppleEvent *theEvent, AEKeyword theKey, FSSpec *theSpec); OSErr AEAddAliasList(AppleEvent *theEvent, AEKeyword theKey, FSSpec *theSpec, short count); OSErr AEExtractObject(AppleEvent *theEvent, AEKeyword theKey, AEDesc *theToken); OSErr AEExtractInsertionLoc(AppleEvent *theEvent, AEKeyword theKey, WindowPtr *theWindow); OSErr AEExtractGeneric(AppleEvent *theEvent, AEKeyword theKey, DescType theType, Size theSize, void *theData); OSErr AEExtractTypeList(AppleEvent *theEvent, AEKeyword theKey, DescType ***theData); OSErr AEExtractPString(AppleEvent *theEvent, AEKeyword theKey, uchar *theString); pascal OSErr AECoerceIntlToChar(DescType fromType, Ptr theData, Size theSize, DescType toType, long refCon, AEDesc *result); pascal OSErr AECoerceRectToList(DescType fromType, Ptr theData, Size theSize, DescType toType, long refCon, AEDesc *result); pascal OSErr AECoerceListToRect(AEDesc *theAEDesc, DescType toType, long refCon, AEDesc *result); pascal OSErr AECoerceRealToFixed(DescType fromType, Ptr theData, Size theSize, DescType toType, long refCon, AEDesc *result); pascal OSErr AECoerceFixedToReal(DescType fromType, Ptr theData, Size theSize, DescType toType, long refCon, AEDesc *result); pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleep, RgnHandle *mouseRgn); #define AEBegin() gInAppleEvent = true #define AEEnd() gInAppleEvent = false #define AEAddBoolean(evt, key, data) AEPutParamPtr(evt, key, typeBoolean, (void *)data, sizeof(Boolean)) #define AEAddShort(evt, key, data) AEPutParamPtr(evt, key, typeShortInteger, (void *)data, sizeof(short)) #define AEAddLong(evt, key, data) AEPutParamPtr(evt, key, typeLongInteger, (void *)data, sizeof(long)) #define AEAddFixed(evt, key, data) AEPutParamPtr(evt, key, typeFixed, (void *)data, sizeof(long)) #define AEAddType(evt, key, data) AEPutParamPtr(evt, key, typeType, (void *)data, sizeof(DescType)) #define AEAddEnumerated(evt, key, data) AEPutParamPtr(evt, key, typeEnumerated, (void *)data, sizeof(DescType)) #define AEAddQDRectangle(evt, key, data) AEPutParamPtr(evt, key, typeQDRectangle, (void *)data, sizeof(Rect)) #define AEExtractAlias(event, key, ptr) AEExtractGeneric(event, key, typeFSS, sizeof(FSSpec), ptr) #define AEExtractBoolean(event, key, ptr) AEExtractGeneric(event, key, typeBoolean, sizeof(Boolean), ptr) #define AEExtractShort(event, key, ptr) AEExtractGeneric(event, key, typeShortInteger, sizeof(short), ptr) #define AEExtractLong(event, key, ptr) AEExtractGeneric(event, key, typeLongInteger, sizeof(long), ptr) #define AEExtractFixed(event, key, ptr) AEExtractGeneric(event, key, typeFixed, sizeof(Fixed), ptr) #define AEExtractType(event, key, ptr) AEExtractGeneric(event, key, typeType, sizeof(DescType), ptr) #define AEExtractEnumerated(event, key, ptr) AEExtractGeneric(event, key, typeEnumerated, sizeof(DescType), ptr) #define AEExtractQDRectangle(event, key, ptr) AEExtractGeneric(event, key, typeQDRectangle, sizeof(Rect), ptr) #endif

1
Headers/AppleMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __APPLEMENU__ #define __APPLEMENU__ void HandleAppleChoice(short theItem); void OpenAbout(void); void OpenAboutHelp(void); void HandleAboutHelpEvent(short theItem); WindowPtr GetAboutHelpWindow(void); #endif

1
Headers/BMP.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __BMP__ #define __BMP__ extern Boolean idBMP(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenBMP(ImageHandle theImage); extern OSErr DrawBMP(Handle theHandle, JVDrawParamsHandle theParams); extern OSErr CloneBMP(ImageHandle origImage, ImageHandle newImage); extern OSErr CloseBMP(ImageHandle theImage); #endif

1
Headers/Bottlenecks.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __JV_DRAWING_H__ #define __JV_DRAWING_H__ extern OSErr DrawingInit(void); extern JVDrawParamsHandle NewDrawParams(Rect *bounds, short quality, Boolean quantize, NestedProgressPtr progress, Handle privateData); extern void SetUpDrawPort(JVDrawParamsHandle theParams, short whichPort, CGrafPtr thePort, Rect *srcRect, Rect *dstRect, Boolean dither); extern OSErr PreflightDrawing(JVDrawParamsHandle theParams); extern OSErr PostflightDrawing(JVDrawParamsHandle theParams); extern OSErr FixBits(CGrafPtr thePort, Boolean on); extern void CallProperBitsProc(BitMap *src, Rect *srcRect, Rect *dstRect, short mode, RgnHandle mask); extern void CallProperTextProc(short count, Ptr textAddr, Point numer, Point denom); extern void CallProperLineProc(Point newPt); extern void CallProperRectProc(GrafVerb verb, Rect *r); extern void CallProperRRectProc(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight); extern void CallProperOvalProc(GrafVerb verb, Rect *r); extern void CallProperArcProc(GrafVerb verb, Rect *r, short startAngle, short arcAngle); extern void CallProperPolyProc(GrafVerb verb, PolyHandle poly); extern void CallProperRgnProc(GrafVerb verb, RgnHandle rgn); extern void CallProperPixProc(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags); enum { kOnscreenPort = 0, kOffscreenPort1, kOffscreenPort2 }; #endif

1
Headers/ColorsMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __COLORSMENU__ #define __COLORSMENU__ void HandleColorChoice(short theItem); void HandleQualityChoice(short theItem); #define SystemPalette(depth) ((depth < 8) ? gColorPalette[depth] : gColorPalette[8]) #define GreyPalette(depth) ((depth < 8) ? gGreyPalette[depth] : gGreyPalette[8]) #endif

1
Headers/ColorsWindow.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __COLORSWINDOW__ #define __COLORSWINDOW__ OSErr OpenColors(void); void CloseColors(void); WindowPtr GetColorsWindow(void); void DrawColorsWindow(void); void DoColorsHelp(Point mouseLoc); #endif

1
Headers/CommentsWindow.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __COMMENTSWINDOW__ #define __COMMENTSWINDOW__ OSErr OpenComments(void); void CloseComments(void); void NudgeComments(Rect *oldRect); WindowPtr GetCommentsWindow(void); void DrawCommentsWindow(void); void UpdateCommentsWindow(void); void DoCommentsHelp(Point mouseLoc); extern void HandleCommentsClick(EventRecord *theEvent); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __COMPRESSEDRESOURCE__ #define __COMPRESSEDRESOURCE__ Handle GetCompResource(OSType theType, short theID); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __COREEVENTHANDLERS__ #define __COREEVENTHANDLERS__ pascal OSErr HandleClone(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleClose(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleCountElements(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleCreateElement(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleDelete(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleDoObjectsExist(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleGetData(AppleEvent *theEvent, AppleEvent *reply, long refCon); OSErr DoGetData(DescType theType, ObjectTokenHandle theToken, short index, DescType typeWanted, AEDesc *theData); pascal OSErr HandleGetDataSize(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleMove(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleSave(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandleSetData(AppleEvent *theEvent, AppleEvent *reply, long refCon); OSErr DoSetData(DescType theType, ObjectTokenHandle theToken, short index, AEDesc *theData); #endif

1
Headers/CustomCopyBits.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CUSTOMCOPYBITS__ #define __CUSTOMCOPYBITS__ extern void DoCustomCopy(PixMap *src, PixMap *dst, Rect *srcRect, Rect *dstRect, Boolean fast, short depth); #endif

1
Headers/DialogUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __DIALOGUTILS__ #define __DIALOGUTILS__ enum { kIndefProgress = 0x7d8d9dadL, kModalProgress = 0x7d8d9daeL }; extern short HandleDialogLetterKey(DialogPtr theDialog, char theChar); extern short HandleDialogCancelKey(DialogPtr theDialog); extern short HandleDialogOKKey(DialogPtr theDialog); extern Boolean IsDialogWindow(WindowPtr theWindow); extern void UpdateParamText(StringPtr string1, StringPtr string2, StringPtr string3, StringPtr string4); extern pascal void PopUpMenuBox(DialogPtr theDialog, short theItem); Point CenterWindow(WindowPtr theWindow); void GetMouseGDRect(Rect *theRect); void MouseCenterRect(Rect *theRect); short CenterAlert(short id); short CenterDialog(short id); Point CenterDialogWhere(short id); pascal Boolean GenericFilter(DialogPtr theDialog, EventRecord *theEvent, short *itemHit); pascal void OutlineOK(DialogPtr theDialog, short theItem); pascal void LineItem(DialogPtr theDialog, short theItem); void SetItemHandle(DialogPtr theDialog, short theItem, Handle newHandle); void DisableDControl(DialogPtr theDialog, short theItem); void EnableDControl(DialogPtr theDialog, short theItem); void SetDCtlValue(DialogPtr theDialog, short theItem, short theValue); short GetDCtlValue(DialogPtr theDialog, short theItem); void SetDIText(DialogPtr theDialog, short theItem, Str255 theText); void GetDIText(DialogPtr theDialog, short theItem, Str255 theText); void UpdateDialogItem(DialogPtr theDialog, short theItem); #endif

1
Headers/EditMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __EDITMENU__ #define __EDITMENU__ void HandleEditChoice(short theItem); void DoSelectScreen(ImageHandle theImage); extern void SelRectToCropRect(ImageHandle theImage, Rect *newRect); #endif

1
Headers/EventHandlers.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __EVENTHANDLERS__ #define __EVENTHANDLERS__ extern void MainEventLoop(void); extern void DispatchMainEvent(EventRecord *theEvent, Boolean isDialogEvent); extern void HandleNullEvent(void); extern void DispatchBalloonHelp(void); extern void EnsureFrontmost(void); extern void HandleMouseDownDialog(EventRecord *theEvent); extern void HandleMouseDownEvent(EventRecord *theEvent); extern void HandleMenuClick(EventRecord *theEvent); extern void HandleContentClick(EventRecord *theEvent, WindowPtr theWindow); extern void HandleDragClick(EventRecord *theEvent, WindowPtr theWindow); extern void HandleCloseClick(EventRecord *theEvent, WindowPtr theWindow); extern void HandleGrowClick(EventRecord *theEvent, WindowPtr theWindow); extern void HandleZoomClick(EventRecord *theEvent, short thePart, WindowPtr theWindow); extern void HandleKeyDownDialog(EventRecord *theEvent); extern void HandleKeyDownEvent(EventRecord *theEvent); extern void HandleActivateDialog(EventRecord *theEvent); extern void HandleActivateEvent(EventRecord *theEvent); extern void HandleUpdateDialog(EventRecord *theEvent); extern void HandleUpdateEvent(EventRecord *theEvent); extern void HandleOSEvent(EventRecord *theEvent); extern void HandleDiskEvent(EventRecord *theEvent); extern void DispatchDialogEvent(DialogPtr theDialog, short theItem); extern void MyInvalMenuBar(void); #endif

1
Headers/EventUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __EVENTUTILS__ #define __EVENTUTILS__ extern void UpdateCursor(RgnHandle theRgn); extern Boolean TrackSelRect(Point theAnchor, ImageHandle theImage); extern Boolean TrackDragRect(Point theAnchor, ImageHandle theImage); extern Boolean TrackGrowWindow(Point thePoint, ImageHandle theImage, Boolean constrain, Rect *newRect); #endif

1
Headers/FileMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __FILEMENU__ #define __FILEMENU__ void HandleFileChoice(short theItem); void DoOpenDialog(void); pascal Boolean OpenSaveModalFilter(DialogPtr theDialog, EventRecord *theEvent, short *itemHit, void *yourDataPtr); pascal Boolean OpenFileFilter(CInfoPBPtr pb, Boolean *dummy); pascal short OpenDialogHook(short item, DialogPtr theDialog, long dummy); void ScanDirFiles(void); void DoSaveDialog(void); void UpdateSaveButtons(DialogPtr theDialog); pascal short SaveDialogHook(short item, DialogPtr theDialog, long dummy); extern Boolean ValidType(OSType theType); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __FLOATINGWINDOWS__ #define __FLOATINGWINDOWS__ #include <Windows.h> #include <Dialogs.h> // Activate/deactivate floating windows & frontmost window extern void FWActivate(void); extern void FWDeactivate(void); // Show/hide all the floating windows extern void FWHideFloatingWindows(void); extern void FWShowFloatingWindows(void); // Create new floating windows extern WindowPtr FWGetNewFloatingWindow(short resID, Ptr wStorage, WindowPtr behind); extern WindowPtr FWNewFloatingWindow(Ptr wStorage, Rect *rBounds, Str255 title, Boolean visFlag, short wDefProcID, WindowPtr behind, Boolean goAwayFlag, long refCon); // Determine if a window is floating extern Boolean FWIsFloating(WindowPtr theWindow); // Window locating routines extern WindowPtr FWBottomDialog(void); extern WindowPtr FWBottomFloatingWindow(void); extern WindowPtr FWBottomWindow(void); extern WindowPtr FWTopDialog(void); extern WindowPtr FWTopFloatingWindow(void); extern WindowPtr FWTopWindow(void); // Alert function substitutes extern short FWAlert(short alertID, ModalFilterUPP filterProc); extern short FWCautionAlert(short alertID, ModalFilterUPP filterProc); extern short FWNoteAlert(short alertID, ModalFilterUPP filterProc); extern short FWStopAlert(short alertID, ModalFilterUPP filterProc); // Dialog Manager substitutes extern void FWCloseDialog(DialogPtr theDialog); extern void FWDisposeDialog(DialogPtr theDialog); extern Boolean FWDialogSelect(EventRecord *theEvent, DialogPtr *whichDlog, short *itemHit); extern Boolean FWIsDialogEvent(EventRecord *theEvent); extern DialogPtr FWGetNewDialog(short dlgRsrcID, Ptr dStorage, WindowPtr behind); extern DialogPtr FWNewCDialog(Ptr dStorage, Rect *wRect, Str255 title, Boolean visFlag, short wDefProcID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle itemList); extern DialogPtr FWNewDialog(Ptr dStorage, Rect *wRect, Str255 title, Boolean visFlag, short wDefProcID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle itemList); // Window manager substitutes extern void FWCloseWindow(WindowPtr theWindow); extern void FWDisposeWindow(WindowPtr theWindow); extern void FWDragWindow(WindowPtr theWindow, Point startPoint, Rect *limitRect); extern WindowPtr FWFrontWindow(void); extern WindowPtr FWGetNewCWindow(short resID, Ptr wStorage, WindowPtr behind); extern WindowPtr FWGetNewWindow(short resID, Ptr wStorage, WindowPtr behind); extern void FWHideWindow(WindowPtr theWindow); extern void FWMoveWindow(WindowPtr theWindow, short hGlobal, short vGlobal, Boolean front); extern WindowPtr FWNewCWindow(Ptr wStorage, Rect *rBounds, Str255 title, Boolean visFlag, short wDefProcID, WindowPtr behind, Boolean goAwayFlag, long refCon); extern WindowPtr FWNewWindow(Ptr wStorage, Rect *rBounds, Str255 title, Boolean visFlag, short wDefProcID, WindowPtr behind, Boolean goAwayFlag, long refCon); extern void FWSelectWindow(WindowPtr theWindow); extern void FWShowWindow(WindowPtr theWindow); // Window manager interfaces extern WindowPtr GetFirstWindow(void); extern WindowPtr NextWindow(WindowPtr theWindow); extern short WindowKind(WindowPtr theWindow); extern Boolean WindowVisible(WindowPtr theWindow); extern Boolean WindowHilited(WindowPtr theWindow); extern RgnHandle GetStrucRgn(WindowPtr theWindow); extern RgnHandle GetContRgn(WindowPtr theWindow); extern Boolean HasGoAway(WindowPtr theWindow); extern void SetWindowKind(WindowPtr theWindow, short theKind); extern void SetNextWindow(WindowPtr theWindow, WindowPtr nextWindow); extern void SetFirstWindow(WindowPtr theWindow); // Floating window constants enum { floatingWindowKind = 'fl' }; #endif

1
Headers/GIF.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __GIF__ #define __GIF__ extern Boolean idGIF(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenGIF(ImageHandle theImage); extern OSErr DrawGIF(Handle theHandle, JVDrawParamsHandle theParams); #endif

1
Headers/GeneralMenus.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __GENERALMENUS__ #define __GENERALMENUS__ void MenuBarInit(void); extern long MakeMenuSelection(short menu, short item); extern void HandleMenuChoice(long theChoice); void SaveMenuArea(void); void RestoreMenuArea(void); void DisableMenus(void); void EnableMenus(void); void AdjustMenus(void); void AdjustFile(short var); void AdjustEdit(short var); Boolean CanSelectScreen(void); void AdjustView(short var); void AdjustColor(short var); void AdjustWindow(short var); void AddWindowItem(ImageHandle theImage); void DeleteWindowItem(ImageHandle theImage); #define MenuEnable(menu, item, enabled) \ if (enabled) EnableItem(menu, item);\ else DisableItem(menu, item) #define SetMBarHeight(ht) (*(short *)MBarHeight = (ht)) #endif

1
Headers/HelpMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __HELPMENU__ #define __HELPMENU__ extern void HandleHelpGrow(Point where); void HandleHelpChoice(short theItem); OSErr OpenHelp(void); void CloseHelp(void); WindowPtr GetHelpWindow(void); void HandleHelpClick(Point where); Boolean HandleHelpKey(uchar theChar, uchar theKey); void HandleHelpActivate(Boolean nowActive); void GetHelpText(short theSect); void ResizeHelp(Rect *newRect); void UpdateHelp(void); void UpdateHelpScroll(short oldValue, short newValue); pascal void HelpScrollAction(ControlHandle theControl, short thePart); void DoHelpHelp(Point globalPt); #endif

1
Headers/ImageUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __IMAGEUTILS__ #define __IMAGEUTILS__ #include "MonitorUtils.h" enum { ifSelected = 0x00000001L, // if ==> image->flags constants ifSelVisible = 0x00000002L, ifCropped = 0x00000004L, ifBanded = 0x00000008L, ifCorrupt = 0x00000010L, ifAborted = 0x00000020L, ifFull = 0x00000040L, ifDithered = 0x00000080L, ifNeedsWhiteBG = 0x00000100L, ifNoOnscreenProg = 0x00000200L, ifGWOrigSize = 0x00000400L, ifScreenSize = 0x00000800L, ifFilename = 0x00001000L, ifIsAboutBox = 0x00002000L, ifCommentsClosed = 0x00004000L, ifGWTempMem = 0x00008000L, ifNeedToRedraw = 0x00010000L }; extern void DeferImageUpdate(ImageHandle theImage); extern OSErr UpdateImage(ImageHandle theImage); extern void HandleImageActivate(ImageHandle theImage, Boolean nowActive); extern void HandleImageClick(ImageHandle theImage, EventRecord *theEvent); ImageHandle NewImage(void); void DisposeImage(ImageHandle theImage); ImageHandle CopyImage(ImageHandle srcImage); ImageHandle LastImage(void); ImageHandle PreviousImage(ImageHandle theImage); Boolean AnotherFull(ImageHandle theImage); ImageHandle FindImage(WindowPtr theWindow); void UpdateImages(MonitorHandle theMonitor); void SetUpOnscreenPort(JVDrawParamsHandle theParams, ImageHandle theImage); void SetUpOffscreenPort(JVDrawParamsHandle theParams, ImageHandle theImage); OSErr DrawImage(ImageHandle theImage, short bitsFlags, NestedProgressPtr progProc); OSErr DrawImageGWorld(ImageHandle theImage, short bitsFlags, NestedProgressPtr progProc); OSErr DrawImageFull(ImageHandle theImage, short bitsFlags, NestedProgressPtr progProc); void DrawFullBorder(ImageHandle theImage); void DrawFileName(ImageHandle theImage); Boolean MakeImageGWorld(ImageHandle theImage, Boolean quantizing); void KillGWorld(ImageHandle theImage); CTabHandle GetGWorldColors(ImageHandle theImage, short gwDepth); void DoImageHelp(WindowPtr theWindow, Point globalPt); #define FrontImage() FindImage(FWFrontWindow()) #define WinTitle(image) (*((WindowPeek)(*(image))->window)->titleHandle) #define FileName(image) ((*(image))->file.name) #define Cropped(image) (((*image)->flags & ifCropped) != 0) #define Banded(image) (((*image)->flags & ifBanded) != 0) #define Full(image) (((*image)->flags & ifFull) != 0) #define Dithered(image) (((*image)->flags & ifDithered) != 0) #define Corrupt(image) (((*image)->flags & ifCorrupt) != 0) #define NeedsWhiteBG(image) (((*image)->flags & ifNeedsWhiteBG) != 0) #define NoOnscreenProg(image) (((*image)->flags & ifNoOnscreenProg) != 0) #define GWOrigSize(image) (((*image)->flags & ifGWOrigSize) != 0) #define ScreenSize(image) (((*image)->flags & ifScreenSize) != 0) #define ShowFilename(image) (((*image)->flags & ifFilename) != 0) #define Aborted(image) (((*image)->flags & ifAborted) != 0) #define IsAboutBox(image) (((*image)->flags & ifIsAboutBox) != 0) #define CommentsClosed(image) (((*image)->flags & ifCommentsClosed) != 0) #define GWTempMem(image) (((*image)->flags & ifGWTempMem) != 0) #define NeedToRedraw(image) (((*image)->flags & ifNeedToRedraw) != 0) #endif

1
Headers/JPEG.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __JPEG__ #define __JPEG__ #include <Files.h> #include <ImageCompression.h> #include <QDOffscreen.h> #include <QuickDraw.h> #include <Types.h> #include "JPEGViewTypes.h" extern Boolean VerifyJPEGData(uchar *theData, long theSize); extern Boolean idJPEG(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenJPEG(ImageHandle theImage); extern OSErr DrawJPEG(Handle theHandle, JVDrawParamsHandle theParams); extern OSErr FixJPEG(ImageHandle theImage, Handle *finalData, Boolean palette); extern OSErr SaveJPEG(FSSpec *theSpec, Handle theHandle, GWorldPtr thePreview, Rect *theRect, Handle privates); extern void ExtractComments(Ptr theJPEG, long origLen, Handle *theComments); extern Handle UnwrapJPEG(Handle srcHandle); extern Handle WrapJPEG(Handle srcHandle, short depth); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __JPEGNOQUICKTIME__ #define __JPEGNOQUICKTIME__ #include <Types.h> #include "JPEGViewTypes.h" extern OSErr DrawJPEGNoQuickTime(Handle theHandle, JVDrawParamsHandle theParams); #endif

1
Headers/JPEGView.h Normal file

File diff suppressed because one or more lines are too long

BIN
Headers/JPEGView.h.o Normal file

Binary file not shown.

1
Headers/JPEGView.r.h Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __JPEGVIEWEVENTHANDLERS__ #define __JPEGVIEWEVENTHANDLERS__ extern pascal OSErr HandleQuantize(AppleEvent *theEvent, AppleEvent *reply, long refCon); extern pascal OSErr HandleSlideShow(AppleEvent *theEvent, AppleEvent *reply, long refCon); extern pascal OSErr HandleCopy(AppleEvent *theEvent, AppleEvent *reply, long refCon); extern OSErr DoCopy(void); extern OSErr GetSelectedPICT(ImageHandle theImage, PicHandle *thePicture); extern OSErr DoSlideShow(void); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __GLOBALS__ #define __GLOBALS__ #include <Dialogs.h> #include <ImageCompression.h> #include <Menus.h> #include <Palettes.h> #include <Printing.h> #include <QDOffscreen.h> #include <QuickDraw.h> #include <Retrace.h> #include "JPEGViewTypes.h" #include "Preferences.h" #include "SlideShow.h" extern AEIdleUPP gAEIdleProc; extern ICMProgressUPP gGenericProgress, gSlideProgress, gDrawProgress; extern UserItemUPP gOutlineOK, gPopUpMenuBox, gLineItem; extern ModalFilterUPP gGenericFilter; extern ModalFilterYDUPP gOpenSaveModalFilter; #if defined(powerc) || defined(__powerc) extern QDGlobals qd; #endif extern NMRec gTheNotification; extern THPrint gPrintRecord; extern Boolean gInAppleEvent, gInBackground, gDone, gMenuVisible, gMenuEnabled, gCommentsOpen, gGetAbout, gHidden, gScreenSaver, gSlideFolderValid, gFoundOSL, gDragMgrPresent, gHelpFound; extern PrefsData gThePrefs; extern SlideOptionsHandle gSlideOptions; extern SlideOptions gDefaultSlideOptions; extern OSType gImageType[kFileFormats]; extern ImageFormatPtr gFormat[kFileFormats]; extern ImageFormat gPICTFormat; extern RGBColor gBlack, gWhite, gFGrey; extern ImageHandle gImageRoot, gDrawing; extern MonitorHandle gMainMonitor; extern MenuHandle gAppleMenu; extern CursHandle gCross, gHand, gSize; extern PaletteHandle gColorPalette[], gGreyPalette[]; extern DialogRecord *gPortPool; extern GWorldPtr gGenericGWorld, gPreviewGWorld, gIconGWorld; extern CodecInfo gJPEGInfo; extern PrefsData gOldPrefs; extern StringPtr gString[kNumStrings], gNullString; extern NestedProgress gDummyProg; extern Point gScreenSaverPoint; extern Handle gIconSuite; extern long gQTVersion, gBadWindowID, gMemSlop; extern short gMenuHeight, gTitleBarHeight, gIntError, gPendingButton, gHelpItem; extern short *gErrTable; extern uchar *gScaleTable, gThousandsSep, gDecimal, gListSep; extern char gSlideShow; #endif

1
Headers/JPEGViewPlugIn.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/JPEGViewTypes.h Normal file

File diff suppressed because one or more lines are too long

BIN
Headers/MW.Header.68k Normal file

Binary file not shown.

BIN
Headers/MW.Header.PPC Normal file

Binary file not shown.

1
Headers/MarchingAnts.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/MemoryUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __MEMORYUTILS__ #define __MEMORYUTILS__ CGrafPtr AllocatePort(void); void DeallocatePort(CGrafPtr thePort); Handle CheckedNewHandle(Size theSize, Boolean canForce); Handle AnyNewHandle(Size theSize); void ClearMem(Ptr thePtr, register Size theSize); long GWorldSize(GWorldPtr theGWorld); long EstGWorldSize(Rect *bounds, short depth); Boolean IsMemAvailable(long request); Boolean MakeMemAvailable(long request); long GetMem(void); pascal long GrowZone(Size cbNeeded); #define AllocateWindow() (WindowPtr)AllocatePort() #define DeallocateWindow(theWindow) DeallocatePort((CGrafPtr)theWindow) #define AllocateDialog() (DialogPtr)AllocatePort() #define DeallocateDialog(theDialog) DeallocatePort((CGrafPtr)theDialog) #endif

1
Headers/MercutioAPI.h Normal file
View File

@ -0,0 +1 @@
#ifndef __MERCUTIOAPI__ #define __MERCUTIOAPI__ pascal long PowerMenuKey(long theMessage, short theModifiers, MenuHandle hMenu); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __MISCELLANEOUSUTILS__ #define __MISCELLANEOUSUTILS__ Boolean CheckAbort(JVDrawParamsHandle theParams); void StartTimer(void); long StopTimer(void); char *DirName(long dirID, short vRefNum, char *s); OSErr GetDirectoryID(FSSpec *theSpec, long *theID); OSErr GetFullPath(FSSpec *theSpec, Handle *thePath); void ForceFolderUpdate(long dirID, short vRefNum); void AddString(StringPtr theString, StringPtr theAddition); void AddCString(StringPtr theString, char *theAddition, int length); void AddNumber(StringPtr theString, long theNum); void StuffNumber(StringPtr theString, short theItem, long theNum); void StuffNumber0(StringPtr theString, short theItem, long theNum, short theLength); void StuffDepth(StringPtr theString, short theItem, short theDepth); void StuffString(StringPtr theString, short theItem, StringPtr addString); Point GlobalMouse(void); #define abs(val) (((val) < 0) ? -(val) : (val)) #define AddChar(item, c) item[++item[0]] = c #endif

1
Headers/MonitorUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __MONITORUTILS__ #define __MONITORUTILS__ void MonitorInit(void); pascal void AddDevice(short depth, short deviceFlags, GDHandle targetDevice, MonitorHandle *theMonitor); MonitorHandle NewMonitor(GDHandle theDevice); MonitorHandle MonitorChanged(void); void SetUpDevices(void); void ResetDevices(void); void ResetColors(void); void FullScreen(MonitorHandle theMonitor); void NormalScreen(MonitorHandle theMonitor); void NudgeWindoids(void); void UnhideMenuBar(void); void RehideMenuBar(void); WindowPtr FrontWindowRgn(RgnHandle theRgn); RgnHandle GetMenuRgn(void); void GetActiveRect(MonitorHandle theMonitor, Rect *theRect); void GetMinMaxMonitor(ImageHandle theImage); MonitorHandle GetDeepMonitor(Boolean pickColor); MonitorHandle GetBigMonitor(Boolean pickColor); MonitorHandle GetImageMonitor(ImageHandle theImage); MonitorHandle GetMostDevice(Rect *theRect); #define PixMapDepth(pm) ((*(pm))->pixelSize) #define MonitorDepth(mon) PixMapDepth((*(*mon)->device)->gdPMap) #define IsColorDevice(device) TestDeviceAttribute(device, gdDevType) #endif

1
Headers/PICT.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __PICT__ #define __PICT__ Boolean idPICT(uchar *theData, long theSize, short refNum, FSSpec *theSpec); OSErr OpenPICT(ImageHandle theImage); void GetImageInfo(ImageHandle theImage); OSErr DrawPICT(Handle theHandle, JVDrawParamsHandle theParams); pascal OSErr DrawPICTProgress(short theMessage, Fixed thePercent, ImageHandle theImage); OSErr LoadPICT(short theFile, ImageHandle theImage); OSErr SavePICT(FSSpec *theSpec, Handle theHandle, GWorldPtr thePreview, Rect *theRect, Handle privates); OSErr FixPICT(ImageHandle theImage, Handle *finalData, Boolean palette); Handle AddColors(Handle theHandle, ImageHandle theImage); Handle CropPICT(Handle theHandle, ImageHandle theImage); OSErr AddPICTPreview(FSSpec *theFile, GWorldPtr thePreview, Rect *theRect); #endif

1
Headers/PNTG.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __PNTG__ #define __PNTG__ extern Boolean idPNTG(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenPNTG(ImageHandle theImage); extern OSErr DrawPNTG(Handle theHandle, JVDrawParamsHandle theParams); #endif

1
Headers/Preferences.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __PREFERENCES__ #define __PREFERENCES__ /* * sPrefsData = structure containing all the preferences information [PrefsData] */ #if defined(powerc) || defined(__powerc) #pragma options align=mac68k #endif typedef struct PrefsData { short versionID; // version ID for identifying files short prefsSize; // size of the prefs structure short openScreen; // initial monitor for images Boolean pickColor; // choose color over B&W screens? short openFull; // open images full screen? Boolean expandSmall; // expand small images? Boolean onlyOne; // display only one image at a time? short imageQuality; // display quality for images Boolean updateBack; // background updates? short autoQuant; // quantize images automatically, if appropriate? Boolean ditherQuant; // dither quantized images Boolean imagePalette; // use image palette when available? Boolean restoreColors; // restore colors on last close? short useBitmaps; // use offscreen bitmaps? Boolean origSize; // maintain original-size bitmaps? Boolean noUncomp; // use bitmaps for uncompressed images? Boolean autoFix; // automatically fix file types? Boolean changeCreator; // change creator as well? short saveQuant; // save quantized palettes? Boolean savePICT; // save as PICT by default? Boolean savePrev; // save previews? Boolean compressPrev; // compress previews? Boolean makeIcons; // create custom icons? short iconStyle; // custom icon style short startWith; // startup action Boolean autoComments; // automatically display comments window? short backgroundTime; // amount of time for apps in the background Boolean useQuickTime; // flag: true to use QuickTime for JPEG decompression //-------------------------------------- short helpSection; // last section in the help short prefsSection; // last section in the preferences Boolean statsZoomed; // whether the stats was zoomed last short reminderCount; // count of statistics updates since last reminder //-------------------------------------- Boolean statsOpen; // flag: true if stats was open Boolean commentsOpen; // flag: true if comments was open Boolean colorsOpen; // flag: true if colors was open Rect statsBounds; // statistics window bounds Rect prefsBounds; // preferences dialog bounds Rect slideBounds; // slide show dialog bounds Rect helpBounds; // help window bounds Rect commentsBounds; // comments window bounds Rect colorsBounds; // colors window bounds Rect progressBounds; // progress dialog bounds Rect slideControlsBounds; // slide show controls bounds Rect aboutHelpBounds; // about help dialog bounds } PrefsData; #if defined(powerc) || defined(__powerc) #pragma options align=reset #endif OSErr OpenPrefs(void); void ClosePrefs(void); WindowPtr GetPrefsWindow(void); void HandlePrefsEvent(short theItem); Boolean HandlePrefsKey(char theChar); void HidePrefsItems(short theSect); void ShowPrefsItems(short theSect); void UpdatePrefsButtons(short theSect); Boolean GetPrefsSpec(FSSpec *theSpec); extern void SaveGeneralPrefs(void); extern void LoadGeneralPrefs(void); extern OSErr LoadPrefsHandle(OSType type, short index, Handle *theHandle); extern OSErr SavePrefsHandle(OSType type, short index, Handle theHandle); #endif

1
Headers/ProgressProcs.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __PROGRESSPROCS__ #define __PROGRESSPROCS__ extern pascal OSErr DummyProgress(short theMessage, Fixed thePercent, long refCon); extern pascal OSErr GenericProgress(short theMessage, Fixed thePercent, long refCon); extern pascal OSErr DrawProgress(short theMessage, Fixed thePercent, JVDrawParamsHandle theParams); extern pascal OSErr SlideProgress(short theMessage, Fixed thePercent, long refCon); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __QDXDISPATCHPATCH__ #define __QDXDISPATCHPATCH__ extern void InstallQDxDispatchPatch(Boolean roundGWorld); extern void RemoveQDxDispatchPatch(void); extern Boolean GetQDxDispatchPatchState(void); extern void SetQDxDispatchPatchState(Boolean on); extern Boolean HasVirtualMemory(void); #endif

1
Headers/Quantize.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __QUANTIZE__ #define __QUANTIZE__ extern OSErr DoQuantize(ImageHandle theImage, long numColors, PaletteHandle *thePalette, NestedProgressPtr progProc); extern OSErr QuantizeFromHistogram(Handle theHistogram, long numColors, PaletteHandle *thePalette); extern OSErr ShrinkGWorld(ImageHandle theImage); extern void FillHistogram(PixMapPtr thePixMap); #endif

1
Headers/QuickDrawUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __QUICKDRAWUTILS__ #define __QUICKDRAWUTILS__ #define Height(rect) ((rect)->bottom - (rect)->top) #define Width(rect) ((rect)->right - (rect)->left) #define TopLeft(rect) (*(Point *)&(rect).top) #define BotRight(rect) (*(Point *)&(rect).bottom) #define EqualSizeRect(r1, r2) ((Height(r1) == Height(r2)) && (Width(r1) == Width(r2))) #define MySetRect(rect, l, t, r, b) (rect)->left = l, (rect)->top = t, \ (rect)->right = r, (rect)->bottom = b #define MySetPt(point, hp, vp) (point)->h = hp, (point)->v = vp extern void PushPort(void); extern void PopPort(void); extern void MySetPort(CGrafPtr thePort); extern GWorldPtr NewTempGWorld(short width, short height, short depth, CTabHandle colors); extern GWorldPtr MyNewGWorld(Rect *theRect, short theDepth, CTabHandle theColors, GDHandle theDevice, Boolean whiteBack, Boolean inTempMem); extern void MaxRect(Rect *srcRect, Rect *boundingRect, Rect *dstRect); extern void MaxSquare(Rect *srcRect, Rect *squareRect); extern void CopyGWorldToGWorld(GWorldPtr gw1, GWorldPtr gw2, Rect *srcRect, Rect *dstRect, short mode, RgnHandle mask); extern void GlobalRect(Rect *theRect, WindowPtr theWindow); extern void GlobalRgn(RgnHandle theRgn, WindowPtr theWindow); extern void LocalRect(Rect *theRect, WindowPtr theWindow); extern void LocalRgn(RgnHandle theRgn, WindowPtr theWindow); extern Boolean Clipped(Rect *theRect, RgnHandle clipRgn); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __REQUIREDEVENTHANDLERS__ #define __REQUIREDEVENTHANDLERS__ pascal OSErr HandleOpenApplication(AppleEvent *theEvent, AppleEvent *reply, long refCon); void GetOpenDefaults(DescType *openScreen, DescType *openFull, DescType *openPalette, DescType *drawQuality); pascal OSErr HandleOpenDocuments(AppleEvent *theEvent, AppleEvent *reply, long refCon); pascal OSErr HandlePrintDocuments(AppleEvent *theEvent, AppleEvent *reply, long refCon); extern OSErr DoPrintDocument(ImageHandle theImage, Boolean first); pascal OSErr HandleQuitApplication(AppleEvent *theEvent, AppleEvent *reply, long refCon); #endif

1
Headers/SCRN.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SCRN__ #define __SCRN__ extern Boolean idSCRN(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenSCRN(ImageHandle theImage); extern OSErr LoadSCRN(short theFile, ImageHandle theImage); extern OSErr DrawSCRN(Handle theHandle, JVDrawParamsHandle theParams); extern OSErr FixSCRN(ImageHandle theImage, Handle *finalData, Boolean palette); extern OSErr SaveSCRN(FSSpec *theSpec, Handle theHandle, GWorldPtr thePreview, Rect *theRect, Handle thePrivates); #endif

1
Headers/SaveOpen.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SAVEOPEN__ #define __SAVEOPEN__ enum { kCropNothing = 0, kCropIcon = 1, kCropImage = 2 }; OSErr DoSaveDocument(ImageHandle theImage, FSSpec *theSpec, OSType theType, Boolean preview, Boolean palette, Boolean icons, short cropWhat); OSErr DoOpenDocument(FSSpec *theFile, Boolean first, DescType openScreen, DescType openFull, Boolean autoExpand, Boolean openVisible, DescType openPalette, DescType drawQuality, Boolean openBitmaps, Boolean autoComments, Boolean fixTypes, Boolean fixCreator); OSErr ReadFile(ImageHandle theImage, Boolean fixTypes, Boolean fixCreator); short IDImage(short theFile, FSSpec *theSpec); OSErr InitImage(ImageHandle theImage, DescType openScreen, DescType openFull, DescType drawQuality, Boolean visible); extern OSErr DefaultLoad(short theFile, ImageHandle theImage); extern OSErr DefaultSave(FSSpec *theSpec, Handle theHandle, GWorldPtr thePreview, Rect *theRect, OSType theType); Boolean UseFullScreen(ImageHandle theImage, DescType openFull, Boolean visible); OSErr PickFirstPalette(ImageHandle theImage, DescType openPalette); OSErr RenderOffscreen(ImageHandle theImage, Boolean openBitmaps); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SENDAPPLEEVENTS__ #define __SENDAPPLEEVENTS__ extern OSErr SendSetWindowBounds(WindowPtr theWindow, Rect *theRect); extern OSErr SendSetZoomed(WindowPtr theWindow, Boolean zoomed); extern OSErr SendNewPalette(ImageHandle theImage, DescType thePalette); extern OSErr SendDither(ImageHandle theImage, Boolean dither); extern OSErr SendQuality(ImageHandle theImage, DescType theQuality); extern OSErr SendSetSelection(ImageHandle theImage, Rect *theRect); extern OSErr SendCloneDocument(ImageHandle theImage, ImageHandle *theNewImage); extern OSErr SendSetImageBounds(WindowPtr theWindow, Rect *theRect); extern OSErr SendSetWindowVis(WindowPtr theWindow, Boolean visible); extern OSErr SendOpenDocument(FSSpec *theSpec); extern OSErr SendCreateWindow(DescType windowID); extern OSErr SendCloseWindow(WindowPtr theWindow); extern OSErr SendSaveDocument(FSSpec *theSpec, OSType theFormat, Boolean preview, Boolean palette, Boolean icons, short cropWhat); extern OSErr SendSlideShow(void); extern OSErr SendPrintDocument(ImageHandle theImage); extern OSErr SendQuitApplication(void); extern OSErr SendSetFullScreen(WindowPtr theWindow, Boolean full); extern OSErr SendSetDrawBounds(WindowPtr theWindow, Rect *theRect); extern OSErr SendMoveToFront(WindowPtr theWindow); extern OSErr SendCopy(void); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SLIDECONTROLSWINDOW__ #define __SLIDECONTROLSWINDOW__ enum { standard = 0, depressed = 1, disabled = 2 }; enum { kReverseButton = 0, kStopButton = 1, kPauseButton = 2, kForwardButton = 3, kHideButton = 4 }; extern OSErr OpenSlideControls(void); extern void CloseSlideControls(void); extern WindowPtr GetSlideControlsWindow(void); extern void SetSlideControlButton(short id, short status); extern short GetSlideControlButton(short id); extern void DrawSlideControlsWindow(void); extern void HandleSlideControlsClick(Point where, short modifiers, Boolean actNow); extern void HandleSlideControlsKey(char theChar, short modifiers, Boolean actNow); extern Boolean HandleUserControlButton(short button); extern Boolean HandleAutomaticButton(short button); extern Boolean PauseSlideShow(Boolean *advance); extern Boolean HideSlideShow(Boolean *advance); extern void SetSlideControlsText(StringPtr string0, StringPtr string1, StringPtr string2, StringPtr string3); extern void DoSlideControlsHelp(Point globalPt); #endif

1
Headers/SlideShow.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SLIDESHOW__ #define __SLIDESHOW__ /* * sSlideItem = linked list item containing information pertaining to the current * slide image [SlideItem, *SlidePtr, **SlideHandle] */ typedef struct SlideItem { struct SlideItem **next; // pointer to next slide item Boolean mem; // flag: true if the given image is in memory FSSpec spec; // the filespec for the image } SlideItem, *SlidePtr, **SlideHandle; typedef struct LoopCheck { struct LoopCheck *prev; short vRefNum; long dirID; } LoopCheck, *LoopCheckPtr; #if defined(powerc) || defined(__powerc) #pragma options align=mac68k #endif typedef struct SlideOptions { Boolean userControl; // user-controlled? long delay; // delay time, in seconds Boolean random; // show slide in random order? Boolean repeat; // repeat indefinitely? Boolean noErrors; // stop when we get an error? Boolean hideWindoids; // hide the windoids? Boolean hideControls; // hide the controls? Boolean autoComments; // automatically show comments? Boolean fromMemory; // run from memory or disk? Boolean recursive; // do a recursive directory scan? Boolean allFiles; // try to import files? Boolean fileNames; // display filenames? Boolean offscreen; // render offscreen first? } SlideOptions, *SlideOptionsPtr, **SlideOptionsHandle; #if defined(powerc) || defined(__powerc) #pragma options align=reset #endif enum { kStopped = 0, kRunning = 1, kPaused = 2 }; extern WindowPtr GetSlideBackWindow(void); extern void CloseSlideBackWindow(void); extern void DrawSlideBackWindow(void); extern void ResetSlideTimer(void); extern void HandleSlideNullEvent(void); extern void PointToPreviousSlide(void); extern void InitSlideShow(void); extern void ReinitSlideShow(SlideOptionsPtr oldOptions); extern OSErr AddSlideDir(FSSpec *spec, Boolean recursive, ICMProgressProcRecordPtr theProg, LoopCheckPtr theLoop); extern void CleanUpSlideShow(void); extern Boolean LoadSlide(Boolean *advance); extern Boolean EndSlideShow(void); extern Boolean NextSlide(Boolean *advance); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __SLIDESHOWOPTIONS__ #define __SLIDESHOWOPTIONS__ OSErr OpenSlideOptions(void); void CloseSlideOptions(void); WindowPtr GetSlideOptionsWindow(void); void HandleSlideOptionsEvent(short theItem); Boolean HandleSlideOptionsKey(char theChar); void UpdateSlideOptionsButtons(void); pascal void SlideOptionsUser(DialogPtr theDialog, short theItem); extern OSErr GetSlideSpec(FSSpec *theSpec); #endif

1
Headers/StandardFolder.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __STANDARDFOLDER__ #define __STANDARDFOLDER__ /* * sFolder = Standard get folder structure [SFData, SFDataPtr] */ typedef struct SFData { StandardFileReply *replyPtr; FSSpec oldSelection, origSelection; } SFData, *SFDataPtr; Boolean StandardGetFolder(FSSpec *theSpec); pascal Boolean StdFolderFilter(CInfoPBPtr pb, long refCon); pascal short StdFolderHook(short item, DialogPtr theDialog, Ptr userData); void SetSelectButtonName(StringPtr selName, Boolean hilited, DialogPtr theDialog); OSErr MakeCanonFSSpec(FSSpec *theSpec); OSErr GetDeskFolderSpec(FSSpec *theSpec, short vRefNum); Boolean ShouldHiliteSelect(FSSpec *theSpec); extern Boolean SameFile(FSSpec *file1, FSSpec *file2); #endif

View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __STATISTICSWINDOW__ #define __STATISTICSWINDOW__ OSErr OpenStats(void); void CloseStats(void); void SizeStats(Boolean zoomed); void ZoomStats(void); WindowPtr GetStatWindow(void); extern void HandleStatClick(EventRecord *theEvent); void SetStatistics(void); void DrawStatWindow(void); void DrawStatSummary(ImageHandle theImage, short *vPos); void DrawStatFileName(ImageHandle theImage, short *vPos); void DrawStatImageSize(ImageHandle theImage, short *vPos); void DrawStatImageStatus(ImageHandle theImage, short *vPos); void DrawStatImageColors(ImageHandle theImage, short *vPos); void DrawStatCompression(ImageHandle theImage, short *vPos); void DrawStatFileFormat(ImageHandle theImage, short *vPos); void DrawStatImageLength(ImageHandle theImage, short *vPos); void DrawStatDisplayedSize(ImageHandle theImage, short *vPos); void DrawStatDisplayedColors(ImageHandle theImage, short *vPos); void DrawStatDisplayQuality(ImageHandle theImage, short *vPos); void DrawStatDisplayTime(ImageHandle theImage, short *vPos); void DrawStatOffscreen(ImageHandle theImage, short *vPos); void DrawStatFree(ImageHandle theImage, short *vPos); void DrawStatItem(short vPos, short item, StringPtr theNum); extern void IdleCredits(void); void DoStatsHelp(Point globalPt); #endif

1
Headers/TIFF.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __TIFF__ #define __TIFF__ extern Boolean idTIFF(uchar *theData, long theSize, short refNum, FSSpec *theSpec); extern OSErr OpenTIFF(ImageHandle theImage); extern OSErr DrawTIFF(Handle theHandle, JVDrawParamsHandle theParams); extern OSErr CloneTIFF(ImageHandle origImage, ImageHandle newImage); extern OSErr CloseTIFF(ImageHandle theImage); #endif

1
Headers/ViewMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __VIEWMENU__ #define __VIEWMENU__ void HandleViewChoice(short theItem); void ForceScreenSize(ImageHandle theImage, Rect *srcRect); #endif

1
Headers/WindowMenu.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __WINDOWMENU__ #define __WINDOWMENU__ void HandleWindowChoice(short theItem); #endif

1
Headers/WindowUtils.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __WINDOWUTILS__ #define __WINDOWUTILS__ void SaveWindowPosition(DialogPtr theDialog, Rect *position); void PlaceWindow(WindowPtr theWindow, Rect *theRect, Point defaultLoc); void ChangeActive(WindowPtr theWindow); OSErr DoCloneWindow(WindowPtr theWindow, WindowPtr behindWindow, WindowPtr *newWindow); OSErr DoCloseWindow(WindowPtr theWindow, Boolean restore); OSErr DoCreateWindow(DescType theType, WindowPtr behindWindow, WindowPtr *theWindow); OSErr DoMoveWindow(WindowPtr theWindow, WindowPtr behindWindow); Boolean IsZoomed(WindowPtr theWindow); OSErr DoZoomWindow(WindowPtr theWindow, Boolean zoomed); OSErr MakeNewWindow(ImageHandle theImage, Boolean first, Boolean autoExpand); void ScaleRect(Rect *theRect, MonitorHandle theMonitor, Boolean full, Boolean autoExpand); void MakeTitle(ImageHandle theImage, StringPtr theTitle); void PositionWindow(Rect *theRect, MonitorHandle theMonitor); Boolean SlotTaken(Rect *theRect); Boolean ResizeWindow(ImageHandle theImage); Boolean NudgeWindowRect(Rect *windowRect, MonitorHandle theMonitor); #endif

1
Headers/cApplication.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CAPPLICATION__ #define __CAPPLICATION__ pascal OSErr AppPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetApplicationData(DescType typeWanted, AEDesc *theData); OSErr GetAppPropertyData(DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetAppPropertyData(DescType theProperty, AEDesc *theData); OSErr MakeAppPropertyObject(DescType theProperty, AEDesc *theObject); #endif

1
Headers/cDocument.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CDOCUMENT__ #define __CDOCUMENT__ pascal OSErr DocumentAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr DocPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetDocumentData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetDocPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetDocPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakeDocumentObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakeDocPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); Boolean IsValidForOne(DescType keyForm, AEDesc *keyData); void PurgeNonDocuments(ObjectTokenHandle theList); OSErr GetNamedDocument(AEDesc *keyData, ObjectTokenHandle *theList); short CountDocuments(void); WindowPtr IndexedDocument(short index); short GetDocumentIndex(WindowPtr theWindow); #endif

1
Headers/cDrawingArea.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CDRAWINGAREA__ #define __CDRAWINGAREA__ pascal OSErr DrawingAreaAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr DrawPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetDrawingAreaData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetDrawPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetDrawPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakeDrawingAreaObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakeDrawPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); OSErr DoSetColorTable(WindowPtr theWindow, CTabHandle theColors); OSErr DoSetPalette(WindowPtr theWindow, DescType thePalette); OSErr DoSetImageDither(ImageHandle theImage, Boolean dither); OSErr DoSetImageQuality(ImageHandle theImage, DescType theQuality); extern OSErr DoSetDrawBounds(ImageHandle theImage, Rect *theRect); #endif

1
Headers/cFile.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CFILE__ #define __CFILE__ pascal OSErr FileAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr FilePropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetFileData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetFilePropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetFilePropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakeFileObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakeFilePropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); #endif

1
Headers/cImage.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CIMAGE__ #define __CIMAGE__ pascal OSErr ImageAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr ImagePropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetImageData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetImagePropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetImagePropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakeImageObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakeImagePropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); OSErr DoSetImageBounds(ImageHandle theImage, Rect *theRect); #endif

1
Headers/cPixelMap.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CPIXELMAP__ #define __CPIXELMAP__ pascal OSErr PixelMapAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr PixelPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetPixelMapData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetPixelPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetPixelPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakePixelMapObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakePixelPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); #endif

1
Headers/cSelection.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CSELECTION__ #define __CSELECTION__ pascal OSErr SelectionAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr SelPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetSelectionData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetSelPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetSelPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr MakeSelectionObject(WindowPtr theWindow, AEDesc *theObject); OSErr MakeSelPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); extern OSErr DoSetSelection(ImageHandle theImage, Rect *theRect); #endif

1
Headers/cWindow.h Normal file
View File

@ -0,0 +1 @@
/*********************************************************/ /* This source code copyright (c) 1991-2001, Aaron Giles */ /* See the Read Me file for licensing information. */ /* Contact email: mac@aarongiles.com */ /*********************************************************/ #ifndef __CWINDOW__ #define __CWINDOW__ pascal OSErr WindowAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); pascal OSErr WinPropertyAccessor(DescType classWanted, AEDesc *container, DescType containerClass, DescType keyForm, AEDesc *keyData, AEDesc *resultToken, long theRefCon); OSErr GetWindowData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData); OSErr GetWinPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, AEDesc *theData); OSErr SetWinPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData); OSErr GetAbsoluteWindow(AEDesc *keyData, ObjectTokenHandle *theList); OSErr GetNamedWindow(AEDesc *keyData, ObjectTokenHandle *theList); short CountWindows(void); WindowPtr IndexedWindow(short index); short GetWindowIndex(WindowPtr theWindow); OSErr MakeWinPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject); OSErr MakeWindowObject(WindowPtr theWindow, AEDesc *theObject); ObjectTokenHandle MakeAllWindowsToken(void); ObjectTokenHandle MakeSingleObjectToken(Ptr theObject); OSErr DoSetWindowBounds(WindowPtr theWindow, Rect *bounds); OSErr DoSetWindowFull(WindowPtr theWindow, Boolean full); OSErr DoSetWindowTitle(WindowPtr theWindow, StringPtr theString); extern OSErr DoSetWindowVisible(WindowPtr theWindow, Boolean visible); #endif

1
Headers/jconfig.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/jerror.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/jmorecfg.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/jpeglib.h Normal file

File diff suppressed because one or more lines are too long

1
Headers/jversion.h Normal file
View File

@ -0,0 +1 @@
/* * jversion.h * * Copyright (C) 1991-1994, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains software version identification. */ #define JVERSION "5alpha2 4-May-94" #define JCOPYRIGHT "Copyright (C) 1994, Thomas G. Lane"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
#-------------------------------------------------------------------- # # JPEGView MakeFile # # Created: 23 Jan 94 # Modified: 17 Mar 94 # #-------------------------------------------------------------------- # Step 1: Define the variables #-------------------------------------------------------------------- #--------------------------------- General application variables LibName = JPEGLib #--------------------------------- Directories and dependencies ObjDir = :Objects: CSrcDir = : "{ObjDir}" Ä "{CSrcDir}" #--------------------------------- Include paths IncludePaths = -i "{MPW}"Interfaces:PPCCIncludes: #--------------------------------- Object list variables PPCObjects = "{ObjDir}"jcapi.c.ppc.o ¶ "{ObjDir}"jccoefct.c.ppc.o ¶ "{ObjDir}"jccolor.c.ppc.o ¶ "{ObjDir}"jcdctmgr.c.ppc.o ¶ "{ObjDir}"jchuff.c.ppc.o ¶ "{ObjDir}"jcmainct.c.ppc.o ¶ "{ObjDir}"jcmarker.c.ppc.o ¶ "{ObjDir}"jcmaster.c.ppc.o ¶ "{ObjDir}"jcomapi.c.ppc.o ¶ "{ObjDir}"jcparam.c.ppc.o ¶ "{ObjDir}"jcprepct.c.ppc.o ¶ "{ObjDir}"jcsample.c.ppc.o ¶ "{ObjDir}"jdapi.c.ppc.o ¶ "{ObjDir}"jdatasrc.c.ppc.o ¶ "{ObjDir}"jdatadst.c.ppc.o ¶ "{ObjDir}"jdcoefct.c.ppc.o ¶ "{ObjDir}"jdcolor.c.ppc.o ¶ "{ObjDir}"jddctmgr.c.ppc.o ¶ "{ObjDir}"jdhuff.c.ppc.o ¶ "{ObjDir}"jdmainct.c.ppc.o ¶ "{ObjDir}"jdmarker.c.ppc.o ¶ "{ObjDir}"jdmaster.c.ppc.o ¶ "{ObjDir}"jdpostct.c.ppc.o ¶ "{ObjDir}"jdsample.c.ppc.o ¶ "{ObjDir}"jerror.c.ppc.o ¶ "{ObjDir}"jutils.c.ppc.o ¶ "{ObjDir}"jfdctllm.c.ppc.o ¶ "{ObjDir}"jidctllm.c.ppc.o ¶ "{ObjDir}"jidctred.c.ppc.o ¶ "{ObjDir}"jquant1.c.ppc.o ¶ "{ObjDir}"jquant2.c.ppc.o ¶ "{ObjDir}"jmemmgr.c.ppc.o ¶ "{ObjDir}"jmemnobs.c.ppc.o 68kObjects = "{ObjDir}"jcapi.c.68k.o ¶ "{ObjDir}"jccoefct.c.68k.o ¶ "{ObjDir}"jccolor.c.68k.o ¶ "{ObjDir}"jcdctmgr.c.68k.o ¶ "{ObjDir}"jchuff.c.68k.o ¶ "{ObjDir}"jcmainct.c.68k.o ¶ "{ObjDir}"jcmarker.c.68k.o ¶ "{ObjDir}"jcmaster.c.68k.o ¶ "{ObjDir}"jcomapi.c.68k.o ¶ "{ObjDir}"jcparam.c.68k.o ¶ "{ObjDir}"jcprepct.c.68k.o ¶ "{ObjDir}"jcsample.c.68k.o ¶ "{ObjDir}"jdapi.c.68k.o ¶ "{ObjDir}"jdatasrc.c.68k.o ¶ "{ObjDir}"jdatadst.c.68k.o ¶ "{ObjDir}"jdcoefct.c.68k.o ¶ "{ObjDir}"jdcolor.c.68k.o ¶ "{ObjDir}"jddctmgr.c.68k.o ¶ "{ObjDir}"jdhuff.c.68k.o ¶ "{ObjDir}"jdmainct.c.68k.o ¶ "{ObjDir}"jdmarker.c.68k.o ¶ "{ObjDir}"jdmaster.c.68k.o ¶ "{ObjDir}"jdpostct.c.68k.o ¶ "{ObjDir}"jdsample.c.68k.o ¶ "{ObjDir}"jerror.c.68k.o ¶ "{ObjDir}"jutils.c.68k.o ¶ "{ObjDir}"jfdctllm.c.68k.o ¶ "{ObjDir}"jidctllm.c.68k.o ¶ "{ObjDir}"jidctred.c.68k.o ¶ "{ObjDir}"jquant1.c.68k.o ¶ "{ObjDir}"jquant2.c.68k.o ¶ "{ObjDir}"jmemmgr.c.68k.o ¶ "{ObjDir}"jmemnobs.c.68k.o #--------------------------------- Compiler options PPCCOptions = -opt speed -appleext on {IncludePaths} 68kCOptions = -mbg off -sym off -r -mc68020 -opt speed {IncludePaths} #-------------------------------------------------------------------- # Step 2: Compile dependencies for PPC #-------------------------------------------------------------------- #--------------------------------- The library itself {LibName}.xcoff ÄÄ {PPCObjects} PPCLink {PPCObjects} -xm library -o "{LinkDir}"{LibName}.xcoff #--------------------------------- Source files .c.ppc.o Ä .c PPCC "{DepDir}""{default}".c -o "{TargDir}""{default}".c.ppc.o {PPCCOptions} #-------------------------------------------------------------------- # Step 3: Compile dependencies for 68k #-------------------------------------------------------------------- #--------------------------------- The application itself {LibName}.o ÄÄ {68kObjects} Lib {68kObjects} -o {LibName}.o #--------------------------------- Source files .c.68k.o Ä .c C "{DepDir}""{default}".c -o "{TargDir}""{default}".c.68k.o -s "{default}" {68kCOptions}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.TH ANSI2KNR 1 "31 December 1990" .SH NAME ansi2knr \- convert ANSI C to Kernighan & Ritchie C .SH SYNOPSIS .I ansi2knr input_file output_file .SH DESCRIPTION If no output_file is supplied, output goes to stdout. .br There are no error messages. .sp .I ansi2knr recognizes functions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line. It will recognize a multi-line header if the last character on each line but the last is a left parenthesis or comma. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line. .sp The following constructs will confuse it: .br - Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call). .br - Macros that tinker with the syntax of the function header.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/* * cderror.h * * Copyright (C) 1994, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file defines the error and message codes for the cjpeg/djpeg * applications. These strings are not needed as part of the JPEG library * proper. * Edit this file to add new codes, or to translate the message strings to * some other language. */ /* To define the enum list of message codes, include this file without * defining JMAKE_MSG_TABLE. To create the message string table, include it * again with JMAKE_MSG_TABLE defined (this should be done in just one module). */ #ifdef JMAKE_MSG_TABLE const char * const addon_message_table[] = { #define JMESSAGE(code,string) string , #else /* not JMAKE_MSG_TABLE */ typedef enum { #define JMESSAGE(code,string) code , #endif /* JMAKE_MSG_TABLE */ JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ #ifdef GIF_SUPPORTED JMESSAGE(JERR_GIF_BUG, "GIF output got confused") JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") JMESSAGE(JERR_GIF_NOT, "Not a GIF file") JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") JMESSAGE(JTRC_GIF_BADVERSION, "Warning: unexpected GIF version number '%c%c%c'") JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") #endif /* GIF_SUPPORTED */ #ifdef PPM_SUPPORTED JMESSAGE(JERR_PPM_SAMPLESIZE, "PPM code requires 8-bit JSAMPLEs") JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") JMESSAGE(JERR_PPM_NOT, "Not a PPM file") JMESSAGE(JTRC_PGM, "%ux%u PGM image") JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") JMESSAGE(JTRC_PPM, "%ux%u PPM image") JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") #endif /* PPM_SUPPORTED */ #ifdef RLE_SUPPORTED JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") JMESSAGE(JERR_RLE_NOT, "Not an RLE file") JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") #endif /* RLE_SUPPORTED */ #ifdef TARGA_SUPPORTED JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") #else JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") #endif /* TARGA_SUPPORTED */ JMESSAGE(JERR_TOO_MANY_COLORS, "Output file format cannot handle %d colormap entries") JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") #ifdef TARGA_SUPPORTED JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format --- perhaps you need -targa") #else JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") #endif JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") #ifdef JMAKE_MSG_TABLE NULL }; #else /* not JMAKE_MSG_TABLE */ JMSG_LASTADDONCODE } ADDON_MESSAGE_CODE; #endif /* JMAKE_MSG_TABLE */ #undef JMESSAGE

View File

@ -0,0 +1 @@
/* * cdjpeg.h * * Copyright (C) 1994, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains common declarations for the sample applications * cjpeg and djpeg. It is NOT used by the core JPEG library. */ #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ #include "jinclude.h" #include "jpeglib.h" #include "jerror.h" /* get library error codes too */ #include "cderror.h" /* get application-specific error codes */ /* * Object interface for cjpeg's source file decoding modules */ typedef struct cjpeg_source_struct * cjpeg_source_ptr; struct cjpeg_source_struct { JMETHOD(void, start_input, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); JMETHOD(void, finish_input, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); FILE *input_file; JSAMPARRAY buffer; JDIMENSION buffer_height; }; /* * Object interface for djpeg's output file encoding modules */ typedef struct djpeg_dest_struct * djpeg_dest_ptr; struct djpeg_dest_struct { /* start_output is called after jpeg_start_decompress finishes. * The color map will be ready at this time, if one is needed. */ JMETHOD(void, start_output, (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)); /* Emit the specified number of pixel rows from the buffer. */ JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, JDIMENSION rows_supplied)); /* Finish up at the end of the image. */ JMETHOD(void, finish_output, (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)); /* Target file spec; filled in by djpeg.c after object is created. */ FILE * output_file; /* Output pixel-row buffer. Created by module init or start_output. * Width is cinfo->output_width * cinfo->output_components; * height is buffer_height. */ JSAMPARRAY buffer; JDIMENSION buffer_height; }; /* Short forms of external names for systems with brain-damaged linkers. */ #ifdef NEED_SHORT_EXTERNAL_NAMES #define jinit_read_gif jIRdGIF #define jinit_write_gif jIWrGIF #define jinit_read_ppm jIRdPPM #define jinit_write_ppm jIWrPPM #define jinit_read_rle jIRdRLE #define jinit_write_rle jIWrRLE #define jinit_read_targa jIRdTarga #define jinit_write_targa jIWrTarga #endif /* NEED_SHORT_EXTERNAL_NAMES */ /* Module selection routines for I/O modules. */ EXTERN cjpeg_source_ptr jinit_read_gif JPP((j_compress_ptr cinfo)); EXTERN djpeg_dest_ptr jinit_write_gif JPP((j_decompress_ptr cinfo)); EXTERN cjpeg_source_ptr jinit_read_ppm JPP((j_compress_ptr cinfo)); EXTERN djpeg_dest_ptr jinit_write_ppm JPP((j_decompress_ptr cinfo)); EXTERN cjpeg_source_ptr jinit_read_rle JPP((j_compress_ptr cinfo)); EXTERN djpeg_dest_ptr jinit_write_rle JPP((j_decompress_ptr cinfo)); EXTERN cjpeg_source_ptr jinit_read_targa JPP((j_compress_ptr cinfo)); EXTERN djpeg_dest_ptr jinit_write_targa JPP((j_decompress_ptr cinfo));

View File

@ -0,0 +1 @@
CHANGE LOG for Independent JPEG Group's JPEG software Version 5alpha2 4-May-94 ------------------------- Two-pass color quantization is working, although it ought to be revisited to tune the algorithm for operation in RGB color space. The change to RGB means that the library can also quantize to an externally-supplied colormap; but I have not gotten around to implementing a djpeg switch for this. Output resizing via the IDCT works: see djpeg's "-scale" switch. The system design allows for more general rescaling at the upsample step, but I have no intention of implementing that anytime soon (any volunteers?). Other speed/quality tradeoff options remain to be implemented: alternate DCTs and merged color conversion/upsample/quantize are high on the list. Documentation is in fairly decent shape, although libjpeg.doc is still missing a few sections. All of the documentation will need updates as more features are added to v5. Version 5alpha1 6-Apr-94 ------------------------- This alpha-test release includes rewritten configuration/installation stuff. In particular there's now a "configure" script that should do everything needed for Unix installations. Please read install.doc. GIF and Targa file I/O are working again. Utah RLE is not there, and won't be unless someone volunteers to update those files. Huffman optimization and one-pass color quantization are working again. Two-pass quantization isn't fixed yet; ditto input smoothing and progress monitoring. Block smoothing is missing (and may remain so indefinitely...). Multiple-scan JPEG files are not supported for either encoding or decoding. None of the promised new v5 features (output resizing, speed/quality tradeoffs) are implemented yet. The documentation needs work; in particular, usage.doc/cjpeg.1/djpeg.1 have not been updated. I have plans for an extensive "libjpeg.doc" file describing use of the library, but haven't written anything yet. Changes from version 4 ---------------------- Version 5 represents a nearly complete redesign and rewrite of the IJG software. Major user-visible changes include: * Automatic configuration simplifies installation for most Unix systems. * A range of speed vs. image quality tradeoffs are [will be] supported. This includes resizing of an image during decompression: scaling down by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. The application programmer's interface to the library has changed completely. Notable improvements include: * We have eliminated the use of callback routines for handling the uncompressed image data. The application now sees the library as a set of routines that it calls to read or write image data on a scanline-by-scanline basis. * The application image data is represented in a conventional interleaved- pixel format, rather than as a separate array for each color channel. This can save a copying step in many programs. * The handling of compressed data has been cleaned up: the application can supply routines to source or sink the compressed data. It is possible to suspend processing on source/sink buffer overrun, although this is not supported in all operating modes. * All static state has been eliminated from the library, so that multiple instances of compression or decompression can be active concurrently. * JPEG abbreviated datastream formats are supported, ie, quantization and Huffman tables can be stored separately from the image data. The last widely used release before the version 5 rewrite was version 4A of 18-Feb-93. Change logs before that point have been discarded, since they are not of much interest after the rewrite.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More