JPEGView/Headers/Preferences.h

1 line
3.5 KiB
C

/*********************************************************/
/* 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