#ifndef __SVGASCREEN_H
#define __SVGASCREEN_H

#include "../screen.h"
//#include "../graphic.h"

#define SKEY_ENTER '\n'
#define SKEY_BACKSPACE 127
#define SKEY_ESCAPE     27

class SVGAScreen : public Screen
{
 public:
  SVGAScreen();
  virtual ~SVGAScreen();

  virtual int start();  // started das System

  //virtual int mouseCallback( void );
  //virtual int keyCallback( int key );

  virtual int open();
//  int reopen();
  virtual int close();

  virtual int mouseX();		// Maus X-Position holen
  virtual int mouseX( int );	// Maus X-Position setzen und holen
  virtual int mouseY();		// Maus Y-Position holen
  virtual int mouseY( int );	// Maus Y-Position setzen und holen
  virtual int mouseButton();	// Maus Button abfragen
  virtual int getKey();			// liefert die gedrueckte Taste
  virtual int getChar();		// wartet auf einen Tastendruck


  virtual int drawPoint( int x, int y, Color color );
  virtual int clearPoint( int x, int y );
	virtual Color getPoint( int x, int y );

	virtual int drawLine( int x1, int y1, int x2, int y2, Color color );
  virtual void drawCircle( int x, int y, int radius, Color c );

  virtual int   print( int x, int y, char* text );
  virtual int   print( int x, int y, char c );
  virtual void  setFgc( Color c );
  virtual Color getFgc( void ) { return fgc; };
  virtual void  setBgc( Color c );
  virtual Color getBgc( void ) { return bgc; };

  virtual void mouseOn( void ){};
  virtual void mouseOff( void ){};


	virtual void clearScreen( void );
  virtual int isError(){ return error; };

  virtual AreaBuffer* getArea( int x, int y, int width, int height );
  virtual int putArea( int x, int y, AreaBuffer* buffer );
  virtual int setArea( int x, int y, int width, int height, Color c );
  virtual int freeArea( AreaBuffer* buffer );
  virtual AreaBuffer* cloneArea( AreaBuffer* buffer );

 protected:
	int savedPoint;
	int oldx, oldy;   // Mousebackground
	Color oldPixel;

};

typedef SVGAScreen MScreen;

#endif // __SVGASCREEN_H
