# include "external.h"
# include "kapa.h"

# ifndef DISPLAY_H
# define DISPLAY_H

# if (0)
typedef struct {
  double xmin, xmax, ymin, ymax;
  int style, ptype, ltype, etype, ebar, color;
  double lweight, size;
  Coords coords;
  int flipeast, flipnorth;
  char axis[8], labels[8], ticks[8];
} Graphdata;
# endif

/*** plotting functions ***/
int           GetCurrentDevice      PROTO((void));
int           PrepPlotting          PROTO((int Npts, Graphdata *graphmode));
int           PlotVector            PROTO((int, float *));
int           PlotVectorTriplet     PROTO((int N, float *xValues, float *yValues, float *zValues, Graphdata *graphmode));
int           GetGraphData          PROTO((Graphdata *data, int *sock, int *N));
int           GetGraph              PROTO((Graphdata *data, int *socket, int *N));
void          InitGraph             PROTO((void));
int           open_graph            PROTO((int N));
int           close_graph           PROTO((int N));
void          QuitGraph             PROTO((void));
void          SetGraph              PROTO((Graphdata data));
void          XGraphDead            PROTO((int input));
int           GetColor              PROTO((char *name));

/* image (tv) functions */
int           GetImage              PROTO((int *socket, int *N));
char         *GetImageName          PROTO((void));
void          GetImageScale         PROTO((double *zero, double *range));
void          InitImage             PROTO((void));
int           open_image            PROTO((int N));
int           close_image           PROTO((int N));
void          QuitImage             PROTO((void));
void          SetImageDevice        PROTO((int state));
void          SetImageName          PROTO((char *name));
void          SetImageScale         PROTO((double zero, double range));
void          XImageDead            PROTO((int input));
int           SelectOverlay         PROTO((char *name, int *number));

/* calling program need to define a function 'get_variable' which
 * returns the name of the executable for each of KAPA and KII
 */
char         *get_variable          PROTO((char *name));

int SendLabel (char *string, int Xgraph, int mode);

int SendGraphMessage (int device, char *format, ...);
int SendGraphCommand (int device, int length, char *format, ...);
int SendGraphCommandV (int device, int length, char *format, va_list argp);

# endif
