/*
    Video.h, Copyright  (c) by Lukas Ruf, lr@lpr.ch,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public Licence.
 
    A full copy of the GNU GPL is provided in the file COPYING found in the 
    development root of Topsy.
*/
/*
	
	File:                  $Source: /home/ruf/cvs_Topsy/cvs/Topsy/IO/ia32/Drivers/Video.h,v $
 	Author(s):             Lukas Ruf, lr@lpr.ch
 	Affiliation:           ETH Zuerich, TIK
 	Version:               $Revision: 2922 $
 	Creation Date:         
 	Last Date of Change:   $Date: 2007-03-19 17:48:52 +0100 (Mon, 19 Mär 2007) $      by: $Author: baderma $
	
	
	$Log: Video.h,v $
	Revision 1.5  2000/11/23 11:17:47  cjeker
	fixes for ia32 Now ia32 and mips should work again
	
	Revision 1.4  2000/11/22 15:20:44  cjeker
	cleanup for printf
	
	Revision 1.3  2000/11/15 09:51:27  ruf
	*** empty log message ***
	
	Revision 1.3  2000/06/05 15:05:36  ruf
	*** empty log message ***
	
	Revision 1.2  1999/12/13 21:48:27  ruf
	GNU General Public Licence Update
	
	Revision 1.1  1999/06/06 20:58:33  jeker
	putting everything together for Topsy 2.0
	
	Revision 1.1  1999/05/13 17:05:30  jeker
	Initial revision
 
*/

#ifndef _V_IDEO_H_
#define _V_IDEO_H_

#include <stdarg.h>
#include "TMHal.h"

typedef struct Video_t
{
  char    TextAttr;
  char    X;
  char    Y;
}
VideoT;
typedef VideoT* VideoPtr;

typedef struct Window_t
{
  char    X1,Y1;
  char    X2,Y2;
}
WindowT;
typedef WindowT* WindowPtr;

void VideoInit();

void Printstr(long pY, long pX, char pTextAttr, char *ps);
/* LR 000604 -- Support.c defines vsprintf... */
void k_vsprintf(char *pBuffer, char *pfmt, va_list pap);
void kprintc(char pc);
void kprintf(char *ps);
void DebugDisp(char *ps);
void MemoryDump(char *ps, unsigned int Addr);

void ClearScreen();

unsigned char TextAttr(unsigned char pNewAttr);
unsigned char GetTextAttr();
void GotoYX(char pY, char pX);
void WhereYX(char *pY, char *pX);
void WindowState(char *pY1, char *pX1, char *pY2, char *pX2, char *pAttr);
void Window(char pY1, char pX1, char pY2, char pX2);
void SaveScreen(char *pBuff, char pY1, char pX1, char pY2, char pX2);
void RestoreScreen(char *pBuff, char pY1, char pX1, char pY2, char pX2);

#endif

