typedef int (*PROCESS)();

typedef struct {
  char     *database;
  char     *nfields;
  char     **field_name;
  char     *raw_fields;
  char     **field_data;
  char     *ntagfields;
  char     **tag_fields;
} DEntry;

typedef struct {
  int       number;
  Window    slide;     /* the little one */
  Window    vidmin;    /* sub-window for video */
  Window    regmin;    /* sub-window for non-video */
  Window    blowup;    /* the big one */
  Window    text;      /* the one with the dbase info */
  Window    magnify;   /* loupe */
  Window    trash;     /* throw it out */
  Window    pick;      /* this one is active */
  Window    paint;     /* paint this picture */
  Window    showtext;  /* look at the dbase info */
  Window    secure;    /* keep from being damaged */
  Window    datadisplay;  /* show the database info */
  Window    menu;      /* menu of some options */
  Window    exportwin; /* send database to cut buffer */
  Window    importwin; /* get database from cut buffer */

  XImage    *miniature;
  XImage    *expanded;
  int       ratio;     /* if this was from mag disk, ratio
			  between expanded and miniature */

  int       min_store; /* {CLIENT | PIXMAP | SOURCE} */
  int       expand_store;

  Pixmap    min_pixmap;
  Pixmap    expand_pixmap;

  int       state;     /* LARGE or MINI */
  int       lock;      /* LOCKED or UNLOCKED */
  int       usage;     /* AVAILABLE or USED or NOTCREATED */
  int       dataviewable;  /* VIEW or NOVIEW */

  int       textheight;  /* Height of the database display area */

  int       sourcetype;  /* VIDEO or MAG */

  int       numconverters;  /* how many image processors to run */
  PROCESS       proc[10];  /* a bunch of processors with arguments:
			       (proc)(srcbuf, destbuf, width, height)  */
                            /* need a 2D lookup table to find processors
                               between a given source and a given screen */

/* here put the dbase stuff */

  int       dataloaded;/* LOADED or NOTLOADED */
  DEntry    database;
} Slide;

#define SLIDE_WIDTH      130
#define SLIDE_HEIGHT     130

#define LARGE            2
#define MINI             1

#define AVAILABLE        4
#define USED             3
#define NOTCREATED       5

#define LOCKED           6
#define UNLOCKED         5

#define CLIENT           7
#define PIXMAP           8
#define SOURCE           6

#define VIDEO            10
#define MAG              11

#define LOADED           12
#define NOTLOADED        13

#define VIEW             14
#define NOVIEW           15
