/*
   Windows globals
*/

extern HINSTANCE hInst ;        // Global copy of instance handle
extern HWND hwndMain ;          // Main window
extern HWND hwndWaitMessage ;   // MESSAGES.CPP
extern HWND hwndProgress ;      // PROGRESS.CPP
extern HWND hwndMagnify ;       // MAGNIFY.CPP
extern int HelpDialogIsActive ; // True when user selected a dialog box
extern int escape_key_pressed ; // Set/reset in MESSAGES.CPP (user_pressed_escape)
extern int Executing ;          // Are we executing a cruncher that calls user_pressed_escape()?
extern PRINTDLG print_dlg ;     // Filled in PRINT.CPP
extern DOCINFO doc_info ;       // Ditto

/*
   Parameters
*/

extern int ObjectType ;          // 1=Mandelbrot; 2=Julia; 3=Mand quaternion; 4=Julia quaternion
extern int DwellVsBinary ;       // For Mandelbrot and Julia, dwell method versus binary MSETDIST
extern double BinaryThreshold ;  // For binary (MSETDIST), binary threshold
extern double JuliaR, JuliaI ;   // Julia parameter
extern unsigned int DwellLimit ; // Max dwell
extern double EscapeConstant ;   // Escape constant, usually 2
extern int QuatSmooth ;          // Smooth the quaternion display?
extern int BinaryDecomp ;        // Do binary decomposition?
extern int Collapse ;            // Which quaternion dimension to collapse (0-3)
extern double Elevation ;        // Quaternion view angle 0-90
extern double Azimuth ;          // Ditto 0-360

extern PrintParams print_params ;  // Printing parameters

/*
   Location
*/

extern int DisplayedRows ;             // Actual number of rows displayed on monitor
extern int DisplayedCols ;             // And cols.  May not equal client rect if TrueAspect
extern int LocateHow ;                 /* Locate via center (0) or limits (1) */
extern double CentR, CentI ;           /* Center */
extern double MagR, MagI ;             /* Magnification */
extern double MinR, MaxR, MinI, MaxI ; /* Limits */
extern double rcentRT, icentRT, jcentRT, kcentRT, magnifRT ; /* Quaternions */
// These are for the rectangle
extern double MagCentR, MagCentI ;                 /* Center */
extern double MagMagR, MagMagI ;                   /* Magnification */
extern double MagMinR, MagMaxR, MagMinI, MagMaxI ; /* Limits */

/*
   Display
*/

extern int DisplayedObjectType ;   // 1=Mandelbrot; 2=Julia; 3=Mand quaternion; 4=Julia quaternion
extern int TrueAspect ;            // As opposed to full screen use
extern int RowResolution ;         // Number of rows computed
extern int ColResolution ;         // And columns
extern unsigned char *raw_image ;  // After processing dwells via color map
extern DIBimage *dib ;             // The image is here
extern double CmapStart ;          // Color map starting color, 0-360 for color
                                   // Or if B&W, 0 for min dwell black, nonzero for white
extern int CmapNcolors ;           // Number of colors in rotation, or 0 for B&W
extern int xCmapNdwells ;           // Number of contiguous dwells per color !!!!!!!!!!!!!!!!!
extern double CmapFloor ;          // Floor brightness, 0-100 (percent)
extern unsigned int CmapNlinear ;  // Number of initial dwells treated linearly
extern unsigned int CmapNlog ;     // Number of subsequent dwells treated logarithmically
extern int Lighting ;              // Quaternion lighting
                                   // 0 - No lighting; distance only
                                   // 1 - Single white light at eye (usually best)
                                   // 2 - RBG staggered around eye
                                   // 3 - Single white light above object
                                   // 4 - RGB staggered above object

/*
   Miscellaneous
*/

extern int out_by_escape, out_by_max, out_by_conv, out_by_loop ;  /* COUNTIT */
extern unsigned int *dwells ;   // Computed for Mandelbrot and Julia; used by COLORMAP.CPP
extern int disallow_menu ;
