#ifndef	LIN_VGA_H
#define	LIN_VGA_H

#ifdef	__cplusplus
extern "C" {
#endif
	/*
	 *	graphInitSvgalib
	 *	Input:
	 *		- width, height, bpp: resolution and bit depth of mode. Bit
	 *		  depth must be 8, 16 or 32.
	 *	Output:
	 *		1 if no error, 0 otherwise.
	 */
	int		graphInitSvgalib(int width,int height,int bpp);
	void	graphShutdownSvgalib(void);
	/*
	 *	graphSetPalette
	 *	Input:
	 *		- pal: array of 256 RGB triples. All values in range 0-255.
	 */ 
	void	graphSetPalette(unsigned char *pal);
	/*
	 *	This routine returns pointer to the array of the start
	 *	addresses of each scanline in the backbuffer.
	 */
	void	**graphLockBackbuffer(void);
	/*
	 *	Stub.
	 */
	void	graphUnlockBackbuffer(void);
	/*
	 *	These routines draw pixels in the backbuffer.
	 */
	void	graphSetPixel8(int x,int y,unsigned char color);
	void	graphSetPixel16(int x,int y,unsigned short color);
	void	graphSetPixel32(int x,int y,unsigned int color);
	/*
	 *	Clears backbuffer.
	 */
	void	graphClear(unsigned int color);
	/*
	 *	Blits backbuffer onto the screen.
	 */
	void	graphSwapBuffers(void);
#ifdef	__cplusplus
}
#endif

#endif	/* LIN_VGA_H */
