home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / layers.zoo / layers.2 / layers.h next >
Encoding:
C/C++ Source or Header  |  1990-06-11  |  2.0 KB  |  65 lines

  1. /*             Copyright (C) 1989 by David W. Trissel 
  2.  *
  3.  *  Not derived from licensed software.
  4.  *
  5.  * Permission is granted to freely use, copy, modify, and redistribute
  6.  * this software, provided that no attempt is made to gain profit from it,
  7.  * the author is not construed to be liable for any results of using the
  8.  * software, alterations are clearly marked as such, and this notice is
  9.  * not modified.
  10.  *
  11.  */
  12.  
  13. #define MAXPCHAN    7                        /* maximum layers supported */
  14.  
  15. #define MAXSTR        200
  16. #define    MAXARGS        64
  17. #define MAXLINE        1024
  18. #define IOSIZE        800                        /* data gulp handling size */
  19.  
  20. /* WARNING - packet sizes must be insured to never match the ESCAPE char */
  21. #define    ESCAPE        '}'                        /* datalink escape character */
  22.  
  23. #define DO         if (Dflag)                    /* for debugging */
  24.  
  25. /* miscelaneous common data */
  26. extern    int    Dflag;                            /* debug dump indicator flag */
  27.  
  28. /* Shape structure passed between MacLayers and ourselves */
  29. struct Shape
  30. {    short    worigv;                            /* verical window bit origin */
  31.     short    worigh;                            /* horizontal window bit origin */
  32.     short    wlines;                            /* window height */
  33.     short    wchars;                            /* window width */
  34.     short    wfont;                            /* window font size */
  35.     short    wattr;                            /* window attributes */
  36. };
  37.  
  38. #define Wa_shell    0x01                    /* window is a shell */
  39.  
  40.  
  41.   /* The following modules define the complete protocol/server interface */
  42.  
  43.                 /* layers.c */
  44.  
  45. extern void FQuit(/* exitcode */);
  46. extern void ReceiveQuit();
  47. extern void ReceiveNew(/* chanid, shape */);
  48. extern void ReceiveDelete(/* chanid */);
  49. extern void ReceiveSignal(/* chanid, signal */);
  50. extern void    ReceiveData(/* chanid, buff, cnt */);
  51. extern void ReceiveReshape(/*chanid, shape */);
  52. extern void DEBUG(/* format, arg1, arg2, arg3, arg4 */);
  53.  
  54.                 /* protocol.c */
  55.  
  56. extern int    InitLink();
  57. extern int    TopChannel();
  58. extern int    SendNew(/* shape */);
  59. extern void    SendTitle(/* chan, buff, cnt */);
  60. extern void SendDelete(/* chan */);
  61. extern void SendQuit();
  62. extern void    SendReshape(/* chan, shape */);
  63. extern void    SendData(/* chan, buff, cnt */);
  64. extern void    ProcessStreamin();
  65.