antoine-source/scsi2/AppleScanGS/Globals.c
Antoine Vignau fae5db3afd scsi-2 powa!
2024-08-15 21:27:35 +02:00

1 line
1.5 KiB
C

/***********************************************************************
*
* Globals.c
*
* Copyright (c)
* Apple Computer, Inc. 1986-1989
* All Rights Reserved.
*
* This file contains the code which intializes the global variables
* used by the scanner program.
*
***********************************************************************/
#include "Scan.h"
#include <qdaux.h>
#include <quickdraw.h>
#include <window.h>
unsigned int quitFlag = 0; /* True when quitting */
unsigned int staggerCount = 0; /* Used to stagger windows as they open */
WmTaskRec event; /* All events are returned here */
scannerWindowDef sWindowDef;
GrafPortPtr previewWindowPtr = NULL;
GrafPortPtr settingsWindowPtr = NULL;
PicHndl previewRuler = NULL;
int scanDevnum; /* device number of Scanner */
word Scanner_Type;
long (*Setup[2])() = {Setup_Apple,Setup_CPCScan};
void initGlobals()
{
quitFlag = staggerCount = 0;
sWindowDef.reserved0 = sWindowDef.reserved0 = sWindowDef.reserved1 = sWindowDef.reserved2 = 0;
sWindowDef.reserved3 = sWindowDef.reserved4 = sWindowDef.reserved5 = 0;
sWindowDef.windDescBlockLenMSB = sWindowDef.windDescBlockLenLSB = 0;
sWindowDef.windowIdentifier = sWindowDef.reserved6 = sWindowDef.xResolution = 0;
sWindowDef.yResolution = sWindowDef.xUpperLeft = sWindowDef.yUpperLeft = 0;
sWindowDef.width = sWindowDef.length = sWindowDef.brightness = 0;
sWindowDef.threshold = sWindowDef.contrast = sWindowDef.imageComposition = 0;
sWindowDef.bitsPerPixel = sWindowDef.halfTone = sWindowDef.paddingType = 0;
}