//	Zinc Application Framework - I_ENV.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#ifndef I_ENV_HPP
#define I_ENV_HPP

// ----- Presentation -------------------------------------------------------

// Presentation switch. Comment this out to provide new Draw() methods.
#define ZAF_DEFAULT_DRAW		// Use default Draw() methods.

// Presentation switches for the library.  MUST choose one or the other.
//#define ZAF_TEXT_MODE			// Run Zinc ONLY in text mode.
#if !defined(ZAF_TEXT_MODE)
#	define ZAF_GRAPHICS_MODE   // Run Zinc ONLY in graphics mode.
#endif

#if defined(ZAF_GRAPHICS_MODE)
#	define ZAF_WIN95_STYLE		    // Use the MS Windows 95 presentation (graphics).
//#	define ZAF_MSWINDOWS_STYLE		// Use the MS Windows presentation (graphics).
//#	define ZAF_OS2_STYLE			// Use the OS/2 presentation (graphics).
//#	define ZAF_MOTIF_STYLE		    // Use the Motif presentation (graphics).
#elif defined(ZAF_TEXT_MODE)
//#	define ZAF_SHADOW_BORDER		// Shadow the border and button objects (text).
#	define ZAF_STANDARD_BORDER	    // Standard double/single border (text).
#endif

//#define ZAF_BLIT_MOVE			// Blit move windows instead of rubber band
								// outline.  For graphics only.

#define ZAF_LOCAL_FILE_STATICS

// ----- Environment Information --------------------------------------------
#if defined(ZAF_VXWORKS)
#	include <v_env.hpp>
#elif defined(ZAF_PSOS)
#	include <p_env.hpp>
#else
#	include <d_env.hpp>
#endif

#if !defined(ZAF_DIR_SEP_CHAR)
#	define ZAF_DIR_SEP_CHAR        '\\'
#endif
#if !defined(ZAF_DIR_SEP_STR)
#	define ZAF_DIR_SEP_STR         ZAF_ITEXT("\\")
#endif

// ----- Miscellaneous ------------------------------------------------------

struct OSPosition
{
	int column;
	int line;
};

class ZAF_EXPORT ZafTimer;
typedef char OSAPIChar;
#if defined(ZAF_METAWINDOW)
typedef int OSColor;
#else
typedef long OSColor;
#endif
typedef unsigned long OSDisplayContext;
typedef unsigned long OSDrawContext;
typedef struct
{
	long type;
	OSPosition position;
} OSEventStruct;
#if defined(ZAF_METAWINDOW)
typedef struct
{
	char *fontPtr;
	char fontName[13];
	int size;
	int maxWidth, maxHeight;
} OSFont;
typedef struct
{
	short patWidth;
	short patHeight;
	char patAlign;
	char patFlags;
	short patRowBytes;
	short patBits;
	short patPlanes;
	unsigned char patData[32];
} OSFillPattern;
#else
typedef UGL_FONT_ID OSFont;
typedef UGL_BITMAP_ID OSFillPattern;
#endif
typedef void *OSGraphicContext;
typedef void *OSImageID;
typedef int OSLineStyle;
typedef int OSMode;
typedef int OSMono;
typedef void *OSPaletteID;
typedef ZafTimer *OSTimerHandle;
typedef unsigned long OSWindowID;

// Meta Windows.
#if defined(ZAF_METAWINDOW)
typedef grafPort *OSBitmapID;
typedef grafPort *OSIconID;
typedef grafPort *OSMouseID;
typedef grafPort *OSMaskID;
#else
typedef UGL_BITMAP_ID OSBitmapID;
typedef UGL_BITMAP_ID OSIconID;
typedef UGL_BITMAP_ID OSMouseID;
typedef UGL_BITMAP_ID OSMaskID;
#endif

// Double-click constant.
const int ZAF_INDEPENDENT_DOUBLE_CLICK_DISTANCE		= 4;

// Special screen values.
const OSWindowID ID_ZAF_DIRECT					= 0xFFFF;
const OSWindowID ID_ZAF_SCREEN					= 0x0001;

#endif // I_ENV_HPP
