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

  1. /*
  2.  * plist.h -- include file for point lists chosen by the user
  3.  *
  4.  */
  5.  
  6. #include <X11/Xlib.h>
  7. #define CRSIZE 16        /* width of a cross */
  8. #define MAXPOINTS 200        /* max # of points in any list */
  9. #define NODRAW 1        /* for dlists which need not be redrawn */
  10.  
  11. /* cbstore is a structure for storing the points underneath a cross indicating
  12.    a user selection */
  13. struct cbstore {
  14.     XPoint    top;
  15.     short     cht;        /* height of cross. */
  16.     unsigned char vvals[(CRSIZE * 2) + 1];
  17.     XPoint    left;
  18.     short     cwt;        /* width of cross. */
  19.     unsigned char hvals[(CRSIZE * 2) + 1];
  20. };
  21.  
  22. /* plists are linked lists of points the user chose */
  23. struct plist {
  24.     struct plist *next, *prev;
  25.     XPoint    pt;
  26.     struct cbstore cb;
  27. };
  28.  
  29. /* pbstore is used to store point/value vectors for fast and easy access */
  30.  
  31. struct pval {
  32.     XPoint    pt;        /* x,y coordinate pair */
  33.     unsigned char val;        /* XImage value */
  34.     unsigned long oval;        /* original value off of image. */
  35. };
  36.  
  37. struct dlist {
  38.     struct dlist *next, *prev;
  39.     int       flags;        /* special flags (line NODRAW) */
  40.     int       len;        /* length of segment (number of points) in
  41.                  * the following array. */
  42.     struct pval *points;
  43. };
  44.  
  45.  
  46. extern struct plist *pl_find(), *pfind(), *pfind_all();
  47.  
  48. extern struct dlist *dlist_new();
  49.