home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / panshr24.zip / PANEL.H < prev    next >
Text File  |  1992-12-18  |  2KB  |  61 lines

  1. #ifndef NULLF
  2. #define NULLF (int (*)()) 0
  3. #endif
  4.  
  5. /*
  6.  *  These variables are assigned from within the panel_execute
  7.  *  function.  They indicate the row, column and field where the
  8.  *  cursor was positioned prior to the user pressing a response
  9.  *  key.
  10.  */
  11. extern int pan_row, pan_col, pan_field_sub;
  12. extern char pan_field_name[];
  13.  
  14. void      pan_init();
  15.  
  16. void      pan_activate(char []);
  17. void      pan_destroy();
  18. void      pan_error(int, int, char *);
  19.  
  20. unsigned  pan_execute(char [], int, int);
  21. unsigned  pan_get_key();
  22.  
  23. void      pan_sound(int, int);
  24. void      pan_get_field(char *, int, char []);
  25. void      pan_put_field(char *, int, char []);
  26. void      pan_delay(int);
  27. void      pan_field_attr(char *, int, char []);
  28.  
  29. void      pan_idle_func(int (*)());
  30. void      pan_resp_keys(unsigned *);
  31.  
  32. /*
  33.  *  Functions and structures to support the creation of list picks.
  34.  */
  35.  
  36. typedef struct PAN_ITEM {
  37.     char *desc;               /* list option description */
  38.     void *data;               /* pointer to misc data */
  39.     struct PAN_ITEM *next,    /* next and previous list elements */
  40.                     *prev;
  41.     } PAN_OPT;
  42.  
  43. typedef struct {
  44.     int  bg;                  /* background color code (0..7) */
  45.     char nrm_attr[8];         /* normal panel attribute */
  46.     char sel_attr[8];         /* selected panel attribute */
  47.     int  border;              /* 0 = none, 1 = single, 2 = double */
  48.     int  ul_row, ul_col;      /* upper left screen coordinates */
  49.     int  lines;               /* number of lines visible for list */
  50.     int  len;                 /* maximum length of each option line */
  51.     PAN_OPT *head, *tail, *selected, *vfirst;
  52.     } PAN_LIST;
  53.  
  54.  
  55. PAN_LIST *pan_linit();
  56. void      pan_ladd(PAN_LIST *, char *, void *);
  57. void      pan_lfree(PAN_LIST *, int, int);
  58. void      pan_lact(PAN_LIST *);
  59. unsigned  pan_lexec(PAN_LIST *);
  60.  
  61.