home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 2 / amigaformatcd02.iso / comms / netsoftware / nethandler.lha / NetHandler / server / struct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-16  |  1.9 KB  |  70 lines

  1. #ifndef DSTRUCT
  2. #define DSTRUCT
  3.  
  4.  
  5. struct BUFDATA
  6. {
  7. struct Gadget Gadget1;
  8. struct Gadget Gadget2;
  9. struct Gadget Gadget3;
  10. struct PropInfo Gadget1SInfo;
  11. int    pos;
  12. int    size;
  13. char   buf[1];
  14. };
  15.  
  16. union STDATA
  17. {
  18.    APTR data;
  19.    struct BUFDATA *bdata;
  20.    struct FileInfoBlock *fib;
  21.    struct FileHandle *fh;
  22.    struct FileLock *lock;
  23.    struct InfoData *info;
  24. };
  25.  
  26. #define WNAMELEN 20
  27.  
  28. struct STNODE
  29. {
  30.    struct STNODE *next, *prev;
  31.    int len;              /* Length of this allocation, for convenience   */
  32.    int num;              /* Number of the node within its type           */
  33.    int type;             /* One of the ST_ defines above                 */
  34.    union STDATA d;       /* Points to the mem allocted for the struct    */
  35.    char wname[WNAMELEN]; /* Name of the window                           */
  36.    char *oname;          /* Name of the object associated with it        */
  37.    struct Window *w;     /* Points to the window opened to display it    */
  38. };
  39.  
  40. struct STGLOB
  41. {
  42.    struct STNODE *stlist;/* Linked list of STNODE structures             */
  43.    struct STNODE *unlist;/* Linked list of unlinked nodes                */
  44.    int count[ST_NUM];    /* How many of each type there are              */
  45.    struct MsgPort *Port; /* Message port to use for comm with Intuition  */
  46. };
  47.  
  48. #define DOTEXT(y, format, val) \
  49.    sprintf(data, format, val); \
  50.    PrintIText(n->w->RPort, &IText, 0, y);
  51.  
  52.  
  53. void stfhnew(struct NewWindow **, struct IntuiText **, struct STNODE *);
  54. void stlocknew(struct NewWindow **, struct IntuiText **, struct STNODE *);
  55. void stfibnew(struct NewWindow **, struct IntuiText **, struct STNODE *);
  56. void stinfnew(struct NewWindow **, struct IntuiText **, struct STNODE *);
  57. void stbufnew(struct NewWindow **, struct IntuiText **, struct STNODE *);
  58.  
  59.  
  60. int stfhdisp(struct STNODE *);
  61. int stlockdisp(struct STNODE *);
  62. int stfibdisp(struct STNODE *);
  63. int stinfdisp(struct STNODE *);
  64. int stbufdisp(struct STNODE *);
  65. int stbufmove(struct STNODE *, int);
  66.  
  67.  
  68. #endif
  69.  
  70.