Index: trunk/Ohana/src/libkapa/include/kapa.h
===================================================================
--- trunk/Ohana/src/libkapa/include/kapa.h	(revision 13326)
+++ trunk/Ohana/src/libkapa/include/kapa.h	(revision 13479)
@@ -2,7 +2,16 @@
 # define KAPA_H
 
+/* linux is happy with this, not solaris */
+# include <netinet/ip.h>
+# include <netdb.h>
+# include <arpa/inet.h>
+
+# include <sys/types.h>
+# include <sys/socket.h>
 # include <X11/Xlib.h>
 # include <png.h>
 # include <dvo.h>
+
+typedef struct sockaddr_in KapaSockAddress;
 
 typedef struct {
@@ -11,13 +20,13 @@
   int Nx;
   int Ny;
-  char *file;
-  char *name;
 } KiiImage;
 
 typedef struct {
-  double zero;
-  double range;
-  int logflux;
-} KiiDisplayMode;
+  float x;
+  float y;
+  float dx;
+  float dy;
+  int type;
+} KiiOverlayBase;
 
 typedef struct {
@@ -73,4 +82,11 @@
 
 typedef struct {
+  int logflux;
+  double zero, range;
+  char name[1024];
+  char file[1024];
+} KapaImageData;
+
+typedef struct {
   int dx, dy, ascent;
   unsigned char *bits;
@@ -98,4 +114,5 @@
 int KiiSendData (int device, char *data, int Nbytes);
 char *KiiRecvData (int device);
+int KiiWaitAnswer (int device, char *expect);
 
 /* KiiOpen.c */
@@ -105,6 +122,6 @@
 
 /* KiiPicture.c */
-int KiiNewPicture1D (int fd, KiiImage *image, KiiDisplayMode *mode, Coords *coords);
-int KiiNewPicture2D (int fd, KiiImage *image, KiiDisplayMode *mode, Coords *coords);
+int KiiNewPicture1D (int fd, KiiImage *image, KapaImageData *data, Coords *coords);
+int KiiNewPicture2D (int fd, KiiImage *image, KapaImageData *data, Coords *coords);
 
 /* KiiOverlay.c */
@@ -125,5 +142,5 @@
 int KiiCursorOn (int fd);
 int KiiCursorOff (int fd);
-int KiiCursorRead (int fd, double *x, double *y, char *key);
+int KiiCursorRead (int fd, double *x, double *y, double *z, double *r, double *d, char *key);
 
 /* KapaWindow.c */
@@ -131,8 +148,11 @@
 int KiiCenter (int fd, double x, double y, int zoom);
 int KapaBox (int fd, Graphdata *graphdata);
-int KapaClear (int fd, int ClearSection);
+int KapaClearCurrentPlot (int fd);
+int KapaClearPlots (int fd);
+int KapaClearSections (int fd);
+int KapaClearImage (int fd);
 int KapaInitGraph (Graphdata *graphdata);
 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode);
-int KapaPlotVector (int fd, int Npts, float *values);
+int KapaPlotVector (int fd, int Npts, float *values, char *type);
 int KapaSetFont (int fd, char *name, int size);
 int KapaSendLabel (int fd, char *string, int mode);
@@ -142,4 +162,9 @@
 int KapaSelectSection (int fd, char *name);
 int KapaGetSection (int fd, char *name);
+int KapaMoveSection (int fd, char *name, char *direction);
+int KapaSetGraphData (int fd, Graphdata *graphmode);
+int KapaGetGraphData (int fd, Graphdata *graphmode);
+int KapaSetImageData (int fd, KapaImageData *graphmode);
+int KapaGetImageData (int fd, KapaImageData *graphmode);
 
 /* KapaColors */
@@ -196,6 +221,13 @@
 int bDrawRotBitmap (int x, int y, int dx, int dy, unsigned char *bitmap, int mode, double angle, double scale);
 
+/* Kapa Socket functions */
+int KapaOpen (char *kapa_exec, char *kapa_name);
+int KapaServerInit (KapaSockAddress *Address);
+int KapaServerWait (int InitSocket, KapaSockAddress *Address);
+int KapaDefineValidIP (char *ipstring);
+int KapaClientSocket (char *hostname);
+
 /* define Kapa names for shared functions */
-# define KapaOpen(p,n) KiiOpen(p,n)
+// # define KapaOpen(p,n) KiiOpen(p,n)
 # define KapaResize(fd,Nx,Ny) KiiResize(fd,Nx,Ny)
 # define KapaCenter(fd,x,y,z) KiiResize(fd,x,y,z)
