TEXTWIN.C

03-16-89

Simple Text Windowing Library for Micro-C, Turbo-C, and DJGPP.

Copyright (c) 1989, 1997, Scott Beasley.
Released into the Public Domain

Scott Beasley.
704 Otis RD. Walterboro, SC 29488.
e-mail: scottb@lowcountry.com


/* PROTOTYPES AND MACROS. */

/* Macros to find actaul screen coords of cursor inside window. */
int screenx ( struct WINDOW *hwnd );
int screeny ( struct WINDOW *hwnd );

/* 
   Function to save a portion of the screen, and return a handle to it.
*/
struct WINDOW * wsave ( int x, int y, int xwid, int yhgt );

/* 
   Function to restore a saved portion of the screen, back to the screen.
*/
int wrestore ( struct WINDOW *hwnd );

/* 
   Function to restore a saved portion of the screen, back to the
   screen and destroy its handle.
*/
int wdestroy ( struct WINDOW *hwnd );

/*
   Clears a window with spaces.
*/
int wcls ( struct WINDOW *hwnd );

/*
   Draws a frame around a window.
*/
void wbox ( struct WINDOW *hwnd, int fore, int back, int intens );

/* 
   Set the cursor postion in a window.
*/
int wlocate ( struct WINDOW *hwnd, int xp, int yp );

/* 
   Writes a string to a window.
*/
int wputs ( struct WINDOW *hwnd, char *str );

/* 
   Writes a char to a window.
*/
int wputc ( struct WINDOW *hwnd, char c );

/*
   Formated print in a window.
*/
int wprintf ( struct WINDOW *hwnd, char *strfmt, ... );

/*
   Sets the color in a window.
*/
void wcolor ( struct WINDOW *hwnd, int fore, int back, int intens );
