--- ray/src/rt/driver.h 2003/02/25 02:47:22 2.5 +++ ray/src/rt/driver.h 2003/08/20 10:00:09 2.8 @@ -1,16 +1,22 @@ -/* RCSid $Id: driver.h,v 2.5 2003/02/25 02:47:22 greg Exp $ */ +/* RCSid $Id: driver.h,v 2.8 2003/08/20 10:00:09 schorsch Exp $ */ /* * driver.h - header file for interactive device drivers. */ +#ifndef _RAD_DRIVER_H_ +#define _RAD_DRIVER_H_ -#include "copyright.h" +#include "color.h" +#ifdef __cplusplus +extern "C" { +#endif + struct driver { /* driver functions */ - void (*close)(); /* close device */ - void (*clear)(); /* clear device */ - void (*paintr)(); /* paint rectangle */ - int (*getcur)(); /* get cursor position */ - void (*comout)(); /* command line output */ + void (*close)(void); /* close device */ + void (*clear)(int, int); /* clear device */ + void (*paintr)(COLOR col, int xmin, int ymin, int xmax, int ymax); /* paint rectangle */ + int (*getcur)(int*,int*); /* get cursor position */ + void (*comout)(char*); /* command line output */ void (*comin)(); /* command line input */ void (*flush)(); /* flush output */ double pixaspect; /* pixel aspect ratio */ @@ -115,20 +121,6 @@ extern char dev_default[]; /* default device name */ * to check for input during calls to paintr.) */ -#ifdef NOPROTO - -extern void editline(); -extern void tocombuf(); -extern int fromcombuf(); -extern struct driver *slave_init(); -extern struct driver *comm_init(); -extern int new_ctab(); -extern int get_pixel(); -extern void make_gmap(); -extern void set_cmap(); -extern void map_color(); - -#else /* defined in editline.c */ extern void editline(char *buf, int (*c_get)(), void (*s_put)()); extern void tocombuf(char *b, struct driver *d); @@ -143,4 +135,9 @@ extern void make_gmap(double gam); extern void set_cmap(BYTE *rmap, BYTE *gmap, BYTE *bmap); extern void map_color(BYTE rgb[3], COLOR col); + +#ifdef __cplusplus +} #endif +#endif /* _RAD_DRIVER_H_ */ +