This is hgraphic.h in view mode; [Download] [Up]
/*
* hgraphic.h - prototypes and macros for hippo's graphic routines
*
* Copyright (C) 1993 The Board of Trustees of The Leland Stanford
* Junior University. All Rights Reserved.
*
* $Id: hgraphic.h,v 5.0 1993/08/17 21:54:59 rensing Exp $
*/
#ifndef _HGRAPHIC_H_
#define _HGRAPHIC_H_
#if defined(VMS) || defined(ultrix)
#define Concat3(x,y,z) x/**/y/**/z
#else
#define Concat3(x,y,z) x##y##z
#endif
#ifdef _NEXT_PLOT_
#include "hplotNxt.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR NEXT
#endif
#define NeXTFunc(name,parm) \
case NEXT: \
rc = Concat3(name,_NeXT,parm); \
break;
#else
#define NeXTFunc(name,parm)
#endif
#ifdef _UNIXPLOT_PLOT_
#include "hplotUP.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR UNIXPLOT
#endif
#define UPFunc(name,parm) \
case UNIXPLOT: \
rc = Concat3(name,_UP,parm); \
break;
#else
#define UPFunc(name,parm)
#endif
#ifdef _XIV_PLOT_
#include "hplotXIV.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR XIVPLOT
#endif
#define XIVFunc(name,parm) \
case XIVPLOT: \
Concat3(name,_XIV,parm); \
rc = 0; \
break;
#else
#define XIVFunc(name,parm)
#endif
#ifdef _X11_PLOT_
#include "hplotX11.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR X11PLOT
#endif
#define X11Func(name,parm) \
case X11PLOT: \
Concat3(name,_X11,parm); \
rc = 0; \
break;
#else
#define X11Func(name,parm)
#endif
#ifdef THINK_C
#include "hplotMAC.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR MAC
#endif
#define MACFunc(name,parm) \
case MAC: \
Concat3(name,_MAC,parm); \
rc = 0; \
break;
#else
#define MACFunc(name,parm)
#endif
/*
* always make PS driver available
*/
#include "hplotPS.h"
#ifndef DEF_PLOT_DRVR
#define DEF_PLOT_DRVR PSPLOT
#endif
#define PSFunc(name,parm) \
case PSPLOT: \
case EPSPLOT: \
Concat3(name,_PS,parm); \
rc = 0; \
break;
#define PlotSwitch(drvr,name, parm) \
switch (drvr) \
{ \
NeXTFunc(name,parm) \
UPFunc(name,parm) \
XIVFunc(name,parm) \
X11Func(name,parm) \
MACFunc(name,parm) \
PSFunc(name,parm) \
default: \
rc = -1; \
}
/*
* This should be temporary. Eventually, put all functions using
* plot_drvr in hgraphic.c.
*/
extern plotdrvr_t plot_drvr;
int h_setPlotDrvr( plotdrvr_t drvr, ...);
int h_setPlotVars( int dummy, ... );
int h_vsetPlotVars( va_list argPtr );
int h_endPlotDrvr( void );
int h_endPage( void );
int h_setUserCoord(rectangle *docCoord, rectangle *userCoord);
int h_endPlot( void );
int h_drawText(char *s, float x, float y, float fontsize, float angle,
char xp, char yp );
int h_drawLine2(float *x, float *y, int npts, linestyle_t style,
int userCoords);
int h_drawPoints2(float *x, float *y, int npts, plotsymbol_t symbol,
float size, int userCoords);
#endif /* _HGRAPHIC_H_ */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.