mirror of
https://github.com/aaronsgiles/JPEGView.git
synced 2024-06-17 18:29:34 +00:00
1 line
6.2 KiB
C
1 line
6.2 KiB
C
|
/*********************************************************/
/* This source code copyright (c) 1991-2001, Aaron Giles */
/* See the Read Me file for licensing information. */
/* Contact email: mac@aarongiles.com */
/*********************************************************/
/*
* JPEGView header file, to be #included with every JPEGView code segment
*
* Contains (in order):
* Constants (#defines and enums)
* In-line functions (#defines)
* Typedefs
* Structures
* Function and Variable Prototypes
*
*/
// Make sure we don't include any unnecessary glue
#define SystemSevenOrLater 1
#if THINK_C
#define applec 1
#endif
// Standard Mac includes
#include <AEObjects.h>
#include <AEPackObject.h>
#include <AERegistry.h>
#include <Aliases.h>
#include <AppleEvents.h>
#include <Balloons.h>
#include <Controls.h>
#include <Desk.h>
#include <Devices.h>
#include <Dialogs.h>
#include <DiskInit.h>
#include <Drag.h>
#include <Errors.h>
#include <Events.h>
#include <Files.h>
#include <Finder.h>
#include <FixMath.h>
#include <Folders.h>
#include <Fonts.h>
#include <FragLoad.h>
#include <GestaltEqu.h>
#include <Icons.h>
#include <ImageCompression.h>
#include <IntlResources.h>
#include <LowMem.h>
#include <Memory.h>
#include <Menus.h>
#include <Movies.h>
#include <Notification.h>
#include <OSUtils.h>
#include <Palettes.h>
#include <Printing.h>
#include <Processes.h>
#include <QDOffscreen.h>
#include <Quickdraw.h>
#include <Resources.h>
#include <Retrace.h>
#include <Scrap.h>
#include <Script.h>
#include <StandardFile.h>
#include <TextEdit.h>
#include <TextUtils.h>
#include <Timer.h>
#include <ToolUtils.h>
#include <Traps.h>
#include <Types.h>
#include <Values.h>
#include <Windows.h>
// JPEGView resource definitions
#include "JPEGView.r.h"
/*** Compile-time constants ***/
#ifndef USE_ASM
#if defined(powerc) || defined (__powerc)
#define USE_ASM 0
#else
#define USE_ASM 1
#endif
#endif
/*** General constants ***/
enum
{
kStackSize = 48L * 1024L,
kMaxPorts = 100,
kDialogClose = 0x7acd,
kDialogCancel = 0x7ace,
kDialogOK = 0x7acf,
kCodeResource = 'CODE',
kPictResource = 'PICT',
kBSChar = 0x08,
kTabChar = 0x09,
kHelpChar = 0x05,
kReturnChar = 0x0d,
kEnterChar = 0x03,
kEscapeChar = 0x1b,
kHomeChar = 0x01,
kEndChar = 0x04,
kPageUpChar = 0x0b,
kPageDownChar = 0x0c,
kLeftArrowChar = 0x1c,
kRightArrowChar = 0x1d,
kUpArrowChar = 0x1e,
kDownArrowChar = 0x1f,
kClockFreq = 60,
kSelRectSpeed = 5,
kUpdateDelay = 300,
kSleepTime = kSelRectSpeed,
kMinSelection = 16,
kHeaderSize = 512,
kImageID = 'Im',
kTitleBarHeight = 19,
kFloatingTitleBarHeight = 11,
kWindowStepDown = kTitleBarHeight - 1,
kWindowStepRight = kTitleBarHeight - 1,
kWindowBorderWidth = 6,
kWindowBorderHeight = 5,
kFileFormats = 8,
kInvalidType = -1,
kNumStrings = strLast,
kNumCursors = rLastSpin - rFirstSpin + 1,
kSpinFrequency = 6,
kSpinContinue = kNumCursors,
errNotADirectory = -31111,
errBadJPEG = -31112,
codecProgressUpdateScaling = -1,
codecProgressUpdateDithering = -2,
codecProgressStartAdjust = -3,
codecProgressStopAdjust = -4,
codecProgressRealOpen = -5,
codecProgressRealClose = -6
};
/*** State constants ***/
enum {
bfOffscreen = 0x0001, // bf ==> gBitsFlags constants
bfOnscreen = 0x0002,
bfQuantize = 0x0004,
bfUseSlideProgress = 0x0008,
bfForceFull = 0x0010
};
enum {
plNone, // pl ==> Palettes
plSys,
plGrey,
plImage,
plQuant
};
enum {
ofNever, // of ==> Open Full Screen Options
ofAlways,
ofAsk,
ofNoMatterWhat
};
enum {
osDeepest, // os ==> Open Screen options
osLargest,
osMain
};
enum {
otSame, // ot ==> Open Statistics options
otMain
};
enum {
swNone, // su ==> Startup Options
swOpen,
swSlide,
swAutoSlide
};
enum {
aqAlways, // aq ==> autoQuantize options
aqOnly,
aqNever
};
enum {
sqAlways, // sq ==> saveQuantize options
sqOnly,
sqNever
};
enum {
ubAlways, // ub ==> useBitmaps options
ubOptional,
ubNever
};
enum {
iqVHigh, // iq ==> imageQuality options
iqHigh,
iqMedium,
iqLow
};
enum {
bgMaximal,
|