/**************************************************************/
/**  C++ code Copyright (C) Nick V. King <nking@eworld.com>  **/
/**************************************************************/

#ifndef SURF_MACH
#define SURF_MACH

#include <gf_mac.h>
#include <surface.h>

extern GWorldPtr	offscreenGWorld;
extern WindowPtr	mainWindow;
extern GDHandle		currentDevice;
extern RGBColor		blackRGB, whiteRGB;

class macscreen : public surface
{
	int _x, _y;
	Boolean offscreenLocked;
	
public:
	macscreen(void);
	~macscreen(void); 
  	surface& resize_usable(int, int, int, int, int, int);

	void moveto(const int, const int);
	void moverel(const int, const int);

	void clear(void);
	void invert(void);

	surface& operator<<(LINE&);
	surface& operator<<(dot&);  
	surface& operator<<(text&);

	void flush(void);
	void fill_rect(const int);

	void print(const char*);
	void update(void);

	inline boolean hardcopy(void) { return false; }

	inline int width(void) { return use_right; }
	inline int height(void) { return use_bottom; }

	void lock(void);
	void unlock(void);
	Boolean locked(void);
	
	PicHandle PICT(void);
};

#endif

/***********/
/**  End  **/
/***********/