view pwplib/tty.h @ 57:7d4f6c33a6ac

Warning cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 28 May 2010 15:24:04 +0300
parents 5d819ba6891c
children
line wrap: on
line source

#ifndef PWP_TTY_H
#define PWP_TTY_H

#include "pwplib.h"

#ifndef __TTY_C
  extern
#endif
struct
{
  int fd;
  int width; int height;

  int type,minor;
  long int vtcap;

  int att,cx,cy; /* getridoff */

  u8*prevbuf;

#ifdef __POSIX__
  struct termios setup;
#endif

  int maxframedata;
  int framedelay;
}pwp_tty;

/* major types */
enum
{
  TTY_DUMB=0,

  TTY_XVT_MONO,
  TTY_XVT_COLOR,

  TTY_VT_COLOR_IBM,
  TTY_VT_COLOR,
  TTY_VT1XX,         /* vt100, vt102 etc */

  TTY_ANSISYS,       /* ansi, ansi-bbs etc */
  TTY_LINUX,         /* linux */
 
  TTY_VT2XX          /* vtnnn where nnn>=200 */
};

int tty_init(void);
void tty_write(void *data, int lgt);

#ifdef DRIVE_TTY_DEC
void tty_vt1xx_init();
void tty_vt_dump_attr();
void tty_vt_initstring();
#endif

#ifdef HAVE_TTYSTUFF
int tty_dumb_init();
#endif

#ifdef DRIVE_TTY
void tty_ansicol_prep_attr(void);
void tty_ansicol_dump_attr(void);

void tty_ansicol_init(void);
void tty_ansisys_init(void);
#endif


#endif /* PWP_TTY_H */