home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / irit / drawfuns.arc / GRAPHGNG.H < prev    next >
Text File  |  1989-09-10  |  3KB  |  102 lines

  1. /*************************************************************************
  2. * Global definitions of    GraphGen.c for all the world...             *
  3. *************************************************************************/
  4.  
  5. #ifndef    GRAPH_GEN_H    /* Define only once */
  6. #define    GRAPH_GEN_H
  7.  
  8. /* The following conditional compilation flags are also in GraphGen.c!       */
  9. /* #define NOGRAPHICS       /* If no graphics to perform (only routine calls) */
  10. /* #define NOWINDOWS            /* If no windows routines to be included */
  11. /* #define NOMENUS              /* If no menus routines to be included */
  12. /* #define NOHELP         /* If no print help routines to be included */
  13. /* #define DEBUG           /* Print graphics driver info and dies... */
  14. /* #define SINGLEPAGE           /* If more than one pages should be supported */
  15.  
  16. #define    MENU_MAX_ITEMS 14          /* Maximum number of items in menu */
  17. #define    MENU_MAX_LEN   20           /* Maximum length of string entry */
  18.  
  19. typedef struct MenuItem    {
  20.    int color;
  21.    char    string[MENU_MAX_LEN];
  22. } MenuItem;
  23.  
  24. extern    int    GGGraphMode;              /* The Graphics mode value */
  25. extern    double GGAspectRatio;        /* Aspect ratio of a pixel in the screen */
  26. extern    int    GGScreenMaxX, GGScreenMaxY; /* The maximum res. of the screen */
  27. extern    int    GGScreenMaxColors;    /* The maximum # of colors available */
  28. extern    int    GGScreenMaxPages;     /* The maximum # of pages available */
  29. extern    int    GGScreenErrorCode;          /* Reports any graphics errors */
  30. extern    struct palettetype palette;            /* Used to read palette info */
  31. extern    int    GGCurrentCursorX, GGCurrentCursorY;/* Cursor current position */
  32. extern    int    GGScreenGraphicMode;      /* TRUE if current mode is graphic */
  33.  
  34. #ifndef    TRUE
  35. #define    TRUE    -1
  36. #define    FALSE    0
  37. #endif
  38.  
  39. #define    MSG_AREA_X      1.25            /* General notes goes to here... */
  40. #define    MSG_AREA_Y     -0.9
  41. #define    MSG_AREA_WIDTH  0.7
  42.  
  43. #define MAX_HELP_MENU_CHAR 20           /* Maximum of chars per help line */
  44.  
  45. #define MENU_FRAME_COLOR    RED
  46. #define HELP_COLOR        CYAN
  47. #define HELP_COLOR_HEADER    YELLOW
  48.  
  49. #ifndef    NOWINDOWS
  50.  
  51. #define SW_MIN_X    1.2                /* The STATUS window */
  52. #define SW_MAX_X    2.0
  53. #define SW_MIN_Y    -0.97
  54. #define    SW_MAX_Y    0.97
  55. #define SW_FRAME_COLOR    LIGHTRED
  56. #define SW_LINE_COLOR    MAGENTA
  57.  
  58.  
  59. #define VW_MIN_X    -0.97                  /* The VIEW window */
  60. #define VW_MAX_X    1.1
  61. #define VW_MIN_Y    -0.97
  62. #define    VW_MAX_Y    0.97
  63. #define VW_FRAME_COLOR    LIGHTGREEN
  64. #define VW_LINE_COLOR    GREEN
  65.  
  66. #endif    NOWINDOWS
  67.  
  68. /* And finally the external routine prototypes: */
  69.  
  70. void GGMyMove(double x, double y);
  71. void GGMyDraw(double x, double y);
  72. void GGMySetColor(int color);
  73. void GGInitGraph(void);
  74. void GGCloseGraph(void);
  75. void GGGetPoint(double *x, double *y);
  76. void GGDrawPoint(double p[], char title[], int PointColor);
  77.  
  78. #ifndef NOMENUS
  79. int GGMenuDraw(int n, struct MenuItem m[], int erase);
  80. int GGMenuPick(void);
  81. int GGConfirm(char *s);
  82. #endif    NOMENUS
  83.  
  84. #ifndef NOHELP
  85. void GGPrintHelpMenu(char *FileName, char *MenuName);
  86. #endif    NOHELP
  87.  
  88. void GGClearMenuArea(void);
  89. void GGClearViewArea(void);
  90. void GGClearAllScreen(void);
  91. void GGViewPortMenuArea(void);
  92. void GGViewPortViewArea(void);
  93. void GGViewPortAllScreen(void);
  94. void GGPutErrorMsg(char *s);
  95. void GGPutMsgXY(char *s, double x, double y);
  96. void GGGetGraphicLine(double x, double y, char s[], int color);
  97. void GGTone(int Frequency, int Time);
  98.  
  99. #define GGXYPutStr(x, y, s) GGPutMsgXY(s, x, y)/* Same duty - different name */
  100.  
  101. #endif    GRAPH_GEN_H
  102.