1 /*
2 Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8 
9     - Redistributions of source code must retain the above copyright
10       notice, this list of conditions and the following disclaimer.
11 
12     - Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in
14       the documentation and/or other materials provided with the
15       distribution.
16 
17     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
18       names of its contributors may be used to endorse or promote products
19       derived from this software without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33 
34 #ifndef _GDRAWS0_H_
35 #define _GDRAWS0_H_ 1
36 
37 #include <X11/Xlib.h>
38 #include "fricas_c_macros.h"
39 
40 
41 #define yes             1
42 #define no              0
43 
44 /*
45  * Indices for PostScript draw procedures.
46  *
47  * The order of these defined variables are very important; they are used
48  * to create the OUTPUT file.  Essentially, PSCreateFile() loops through the
49  * index of 0 to psDrawNo and checks if the file/procedure is used.  If so,
50  * the file is copied to the output file.
51  */
52 
53 #define output          0               /* output file */
54 #define headerps        1               /* postscript header file */
55 #define drawps          2               /* draw procedure */
56 #define drawarcps       3               /* draw arc procedure */
57 #define drawfilledps    4               /* draw filled procedure */
58 #define drawcolorps     5               /* draw color filled procedure */
59 #define drawpointps     6               /* draw point procedure */
60 #define fillpolyps      7               /* polygon filled procedure */
61 #define fillwolps       8               /* polygon filled with outline proc */
62 #define colorpolyps     9               /* polygon fill with color procedure */
63 #define colorwolps      10              /* polygon fill with color procedure */
64 #define drawlineps      11              /* draw line procedure */
65 #define drawlinesps     12              /* draw lines procedure */
66 #define drawIstrps      13              /* draw image string procedure */
67 #define drawstrps       14              /* draw string procedure */
68 #define drawrectps      15              /* draw rectangle procedure */
69 #define fillarcps       16              /* filled arc procedure */
70 #define setupps         17              /* setup, or pre-script */
71 #define GCdictps        18              /* grahphics context definition file */
72 #define scriptps        19              /* script file */
73 #define endps           20              /* wrap up, close down, procedure */
74 
75 #define psDrawNo        21              /* for use in createPSfile() */
76 
77 
78 /*
79  * PostScript structures
80  */
81 
82 typedef struct _psStruct {      /* data structure for ps routines info */
83         int     flag;
84         char    filename[200];
85 } psStruct;
86 
87 psStruct psData[psDrawNo];      /* need psDrawNo of them */
88 
89 
90 /*
91  * These variables are expected to be declared in within client programs, eg,
92  * main.c in view2D and view3D.
93  */
94 
95 extern  int             scrn;          /* screen */
96 extern  Display         *dsply;        /* display */
97 /* environment variable FRICAS or DEVE */
98 extern  char            * env_fricas;
99 
100 
101 #endif
102