home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / include / display.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  1.7 KB  |  61 lines

  1. /*
  2.  * display.h -- structures involving the display of images
  3.  *
  4.  */
  5.  
  6. /* palette for standout colors */
  7.  
  8. #include <hipl_format.h>
  9. #include <X11/Xlib.h>
  10. #include <xview/xview.h>
  11. #include <xview/canvas.h>
  12.  
  13.  
  14. #define NCOLORS 128     /* total number of colors to use */
  15.  
  16. #define PALSIZE 8 /* size of the palette */
  17. #define RED                     0
  18. #define YELLOW                  1
  19. #define GREEN                   2
  20. #define CYAN                    3
  21. #define BLUE                    4
  22. #define MAGENTA                 5
  23. #define BLACK                   6
  24. #define WHITE                   7
  25.  
  26. extern XColor    pallet[PALSIZE];
  27. extern u_long    standout;
  28. extern u_long    *colors;
  29.  
  30. /* structure for a single display window.  This is an alternative to the
  31.    genial_imgwin_objects structure because genial_imgwin_objects can only
  32.    contain what GUIDE puts into it.*/
  33. struct disp_win {
  34.   Xv_window d_win;      /* both of these derive from GUIDE */
  35.   Xv_Window d_paintwin; /* the paint window of the canvas */
  36.   Canvas d_canv;
  37.   XID d_xid;            /* the XID of the paint window */
  38. };
  39.  
  40. /* structure for an image dataset */
  41. struct img_data {
  42.   int hsize; /* header size in the file */
  43.   int dsize; /* number of bytes / pixel */
  44.   int width, height; /* the x and y size of the image */
  45.   int nframes, cframe; /* number of frames in sequence, current
  46.               frame number */
  47.   unsigned minv, maxv; /* min and max of the image */
  48.   char *data;  /* address of actual image data */
  49.   char *lut;  /* colormap lut values */
  50.   char *comment;  /* comment for this image */
  51.   struct header head; /* HIPS header */
  52.   int  file_saved;    /* flag indicating file with log has been saved */
  53. };
  54.   
  55. extern struct img_data *orig_img;
  56. extern XImage *orig_ximg, *disp_ximg, *mk_x_img();
  57.  
  58. extern struct disp_win *img_win;
  59.  
  60.  
  61.