home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / tek / tekdefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-19  |  5.8 KB  |  182 lines  |  [TEXT/CWIE]

  1. /*--------------------------------------------------------------------------*/
  2. /* TEKDEFS -- This file contains all of the defines, and other related         */
  3. /*         stuff for TEK, bundled up into one neat package                        */
  4. /*        First come the #defines                                                */
  5. /*--------------------------------------------------------------------------*/
  6.  
  7. #define TEK_DEVICE_MAX 2
  8. #define SPLASH_SQUARED    4    /* NCSA: sb - used by tekrgmac.c */
  9.  
  10. #define MAXWIND 20
  11. #define WINXMAX 4095
  12. #define WINYMAX 3139
  13. #define INXMAX 4096
  14. #define INYMAX 4096
  15.  
  16. #define NUMSIZES 6                 /* number of char sizes */
  17. #define PREDCOUNT 50
  18.  
  19. /* MORE vgtek specific stuff */
  20. #define MAXVG        20 /* maximum number of VG windows */
  21.  
  22. /* temporary states */
  23. #define HIY            0    /* waiting for various pieces of coordinates */
  24. #define EXTRA        1
  25. #define LOY            2
  26. #define HIX            3
  27. #define LOX            4
  28.  
  29. #define DONE        5    /* not waiting for coordinates */
  30. #define ENTERVEC    6    /* entering vector mode */
  31. #define CANCEL        7    /* done but don't draw a line */
  32. #define RS            8    /* RS - incremental plot mode */
  33. #define ESCOUT        9    /* when you receive an escape char after a draw command */
  34. #define CMD0        50    /* got esc, need 1st cmd letter */
  35. #define SOMEL        51    /* got esc L, need 2nd letter */
  36. #define IGNORE        52    /* ignore next char */
  37. #define SOMEM        53    /* got esc M, need 2nd letter */
  38. #define IGNORE2        54
  39. #define INTEGER        60    /* waiting for 1st integer part */
  40. #define INTEGER1    61    /* waiting for 2nd integer part */
  41. #define INTEGER2    62    /* waiting for 3rd (last) integer part */
  42. #define COLORINT    70
  43. #define GTSIZE0        75
  44. #define GTSIZE1        76
  45. #define    GTEXT        77    /* TEK4105 GraphText            17jul90dsw */
  46. #define MARKER        78    /* TEK4105 Marker select        17jul90dsw */
  47. #define    GTPATH        79    /* TEK4105 GraphText path        17jul90dsw */
  48. #define SOMET        80
  49. #define JUNKARRAY    81
  50. #define STARTDISC    82
  51. #define DISCARDING    83
  52. #define    FPATTERN    84    /* TEK4105 FillPattern            17jul90dsw */
  53. #define    GTROT        85    /* TEK4105 GraphText rotation    17jul90dsw */
  54. #define GTROT1        86
  55. #define    GTINDEX        87    /* TEK4105 GraphText color        17jul90dsw */
  56. #define PANEL        88    /* TEK4105 Begin Panel            23jul90dsw */
  57. #define    SUBPANEL    89    /* TEK4105 Begin^2 Panel        25jul90dsw */
  58. #define TERMSTAT    90    /* TEK4105 Report Term Status    24jul90dsw */
  59. #define    SOMER        91    /* TEK4105 for ViewAttributes    10jan91dsw */
  60. #define    VIEWAT        92    /* TEK4105 ViewAttributes        10jan91dsw */
  61. #define VIEWAT2        93
  62.  
  63. /* output modes */
  64. #define ALPHA        0
  65. #define DRAW        1
  66. #define MARK        3
  67. #define TEMPDRAW    101
  68. #define TEMPMOVE    102
  69. #define TEMPMARK    103
  70.  
  71. /* stroked fonts */
  72. #define CHARWIDE    51        /* total horz. size */
  73. #define CHARTALL    76        /* total vert. size */
  74. #define CHARH        10        /* horz. unit size */
  75. #define CHARV        13        /* vert. unit size */
  76.  
  77. /*--------------------------------------------------------------------------*/
  78. /* Next come the typedefs for the various tek structures                    */
  79. /*--------------------------------------------------------------------------*/
  80.  
  81. typedef struct TPOINT *pointlist;
  82.  
  83. typedef    struct TPOINT {
  84.     short        x,y;
  85.     pointlist    next;
  86. } point/*,*pointlist*/;        /* BYU LSC */
  87.  
  88. typedef struct {
  89.     short
  90.         (*newwin)(void);
  91.     char * 
  92.         (*devname)(void);
  93.     void 
  94.         (*init)(void);
  95.     short
  96.         (*gin)(short),
  97.         (*pencolor)(short, short),
  98.         (*clrscr)(short),
  99.         (*close)(short),
  100.         (*point)(short, short, short),
  101.         (*drawline)(short, short, short, short, short);
  102.     void
  103.         (*info)(short, short, short, short, short, short),
  104.         (*pagedone)(short),
  105.         (*dataline)(short, short, short), 
  106.         (*charmode)(short, short, short), 
  107.         (*gmode)(void),
  108.         (*tmode)(void),
  109.         (*showcur)(void),
  110.         (*lockcur)(void),
  111.         (*hidecur)(void),
  112.         (*bell)(short),
  113.         (*uncover)(short);
  114. } RGLINK;
  115.  
  116. /*--------------------------------------------------------------------------*/
  117. /* VGwintype structure -- this is the main high level TEK structure, where    */
  118. /*         everything happens                                                    */
  119. /*--------------------------------------------------------------------------*/
  120. struct VGWINTYPE {
  121.     OSType    id;    // VGWN
  122.     short    RGdevice,RGnum,theVS;
  123.     char    mode,modesave;                    /* current output mode */
  124.     char    loy,hiy,lox,hix,ex,ey;            /* current graphics coordinates */
  125.     char    nloy,nhiy,nlox,nhix,nex,ney;    /* new coordinates */
  126.     short    curx,cury;                        /* current composite coordinates */
  127.     short    savx,savy;                        /* save the panel's x,y */
  128.     short    winbot,wintop,winleft,winright,wintall,winwide; 
  129.         /* position of window in virutal space */
  130.     short    textcol;                        /* text starts in 0 or 2048 */
  131.     short    intin;                            /* integer parameter being input */
  132.     short    pencolor;                        /* current pen color */
  133.     short    fontnum,charx,chary;            /* char size */
  134.     short    count;                            /* for temporary use in special state loops */
  135.     char    TEKtype;                        /* 4105 or 4014?  added: 16jul90dsw */
  136.     char    TEKMarker;                        /* 4105 marker type 17jul90dsw */
  137.     char    TEKOutline;                        /* 4105 panel outline boolean */
  138.     short    TEKPath;                        /* 4105 GTPath */
  139.     short    TEKPattern;                        /* 4105 Panel Fill Pattern */
  140.     short    TEKIndex;                        /* 4105 GTIndex */
  141.     short    TEKRot;                            /* 4105 GTRotation */
  142.     short    TEKSize;                        /* 4105 GTSize */
  143.     short    TEKBackground;                    /* 4105 Background color */
  144.     pointlist    TEKPanel;                    /* 4105 Panel's list of points */
  145.     pointlist    current;                    /* current point in the list */
  146. };
  147.  
  148. /*--------------------------------------------------------------------------*/
  149. /* RGMwindow structure -- this is the display structure for tek stuff.  It    */
  150. /*         contains all the display specific info (location, scale, etc)        */
  151. /*--------------------------------------------------------------------------*/
  152.  
  153. struct RGMwindows {
  154. OSType
  155.     id;        // RGMW
  156. GrafPtr
  157.     wind;
  158. short 
  159.     xorigin,
  160.     yorigin,
  161.     xscale,
  162.     yscale,
  163.     vg,
  164.     vs,
  165.     ingin;
  166. unsigned char
  167.     *name;
  168. short 
  169.     width,
  170.     height;
  171. ControlHandle
  172.     zoom,
  173.     vert,
  174.     horiz;
  175.     };
  176.     /* *RGMwind[ MAXWIND ];    *//* BYU - changed from an array of structure to an array of pointers */
  177.  
  178. typedef struct {
  179.     long    thiselnum;    /* number of currently-viewing element */
  180.     Handle    dataHandle;    /* Handle to the data */
  181.     }    TEKSTORE, *TEKSTOREP;
  182.