summaryrefslogtreecommitdiff
path: root/xc/unsupported/test/suspex/src/common_sun/surface.h
blob: 838c253edda68b14a5326d8c83411bfe1d07f22c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/* $XConsortium: surface.h,v 1.0 93/11/22 12:26:26 rws Exp $ */

/*
        NOTICE TO USER: The source code in this file is copyrighted under
        U.S. and international laws.  SunSoft, Inc., a Sun Microsystems,
        Inc. business of Mountain View, California owns the copyright. 
        Users and possessors of this source code are hereby granted a
        nonexclusive, royalty-free copyright and design patent license
        to use this code in individual and commercial software. 

        Any use of this source code must include, in the user documentation 
        and internal comments to the code, notices to the end user as follows:

(c) Copyright 1992, 1993 SunSoft, Inc., a Sun Microsystems, Inc. business.

        SUNSOFT, INC. AND SUN MICROSYSTEMS, INC. MAKE NO REPRESENTATIONS
        ABOUT THE SUITABILITY OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS
        PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. 
        SUNSOFT, INC., AND SUN MICROSYSTEMS, INC., SEVERALLY AND
        INDIVIDUALLY, DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOURCE
        CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
        FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUNSOFT, INC.
        OR SUN MICROSYSTEMS, INC., BE LIABLE FOR ANY SPECIAL, INDIRECT,
        INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
        RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
        OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
        OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
*/
#ifndef _SURFACE_H
#define _SURFACE_H


/* Surface Primitives */

#define FILLAREA(_shape, _ignoreEdge, _count, _data) \
    PEXFillArea(dpy, resourceID, req_type, (_shape), 	\
        (_ignoreEdge), (_count), (_data));

#define FILLAREA2D(_shape, _ignoreEdge, _count, _data) \
    PEXFillArea2D(dpy, resourceID, req_type, (_shape), 	\
        (_ignoreEdge), (_count), (_data));

#define FILLAREA_SET(_shape, _ignoreEdge, _contour, _count, _data) \
    PEXFillAreaSet(dpy, resourceID, req_type, (_shape), 	\
        (_ignoreEdge), (_contour), (_count), (_data));

#define FILLAREA_SET2D(_shape, _ignoreEdge, _contour, _count, _data) \
    PEXFillAreaSet2D(dpy, resourceID, req_type, (_shape), 	\
        (_ignoreEdge), (_contour), (_count), (_data));

#define FILLAREA_WITH_DATA(_shape, _ignore, _fattrs, _vattrs, _ctype, _fdata, _count, _vdata) \
    PEXFillAreaWithData(dpy, resourceID, req_type, (_shape), (_ignore),\
 	(_fattrs), (_vattrs), (_ctype), (_fdata), (_count), (_vdata));

#define FILLAREA_SET_WITH_DATA(_shape, _ignore, _contour, _fattrs, _vattrs, _ctype, _count,  _fdata, _vdata) \
    PEXFillAreaSetWithData(dpy, resourceID, req_type, (_shape), \
	(_ignore), (_contour), (_fattrs), (_vattrs), (_ctype), \
	(_count), (_fdata), (_vdata));

#define SETOF_FILLAREA_SETS(_shape, _fattrs, _vattrs, _eattrs, _contour, _allone, _ctype, _scount, _fdata, _vcount, _vdata, _icount, _eflags, _cdata) \
    PEXSetOfFillAreaSets(dpy, resourceID, req_type, (_shape), \
	(_fattrs), (_vattrs), (_eattrs), (_contour), (_allone), \
	(_ctype), (_scount), (_fdata), (_vcount), (_vdata), (_icount), \
	(_eflags), (_cdata));

#define TRIANGLE_STRIP(_fattrs, _vattrs, _ctype, _fdata, _count, _vdata) \
    PEXTriangleStrip(dpy, resourceID, req_type, \
 	(_fattrs), (_vattrs), (_ctype), (_fdata), (_count), (_vdata));

#define QUADRILATERAL_MESH(_shape, _fattrs, _vattrs, _ctype, _fdata, _ccount, _rcount, _vdata) \
    PEXQuadrilateralMesh(dpy, resourceID, req_type, (_shape), (_fattrs), \
	(_vattrs), (_ctype), (_fdata), (_ccount), (_rcount), (_vdata));


/* Front surface attributes */

#define SET_INTERIOR_STYLE(_style)	\
    PEXSetInteriorStyle(dpy, resourceID, req_type, (_style));

#define SET_INTERIOR_STYLE_INDEX(_style)	\
    PEXSetInteriorStyleIndex(dpy, resourceID, req_type, (_style));

#define SET_SURFACE_COLOR(_colorType,_colr)	\
    PEXSetSurfaceColor(dpy, resourceID, req_type, (_colorType), (_colr));

#define SET_SURFACE_COLOR_INDEX(_colorIndex)	\
    PEXSetSurfaceColorIndex(dpy, resourceID, req_type, (_colorIndex));

#define SET_SURFACE_INTERP_METHOD(_method)	\
    PEXSetSurfaceInterpMethod(dpy, resourceID, req_type, (_method)); 


/* Back surface attributes */

#define SET_BF_INTERIOR_STYLE(_style)	\
    PEXSetBFInteriorStyle(dpy, resourceID, req_type, (_style));

#define SET_BF_INTERIOR_STYLE_INDEX(_style)	\
    PEXSetBFInteriorStyleIndex(dpy, resourceID, req_type, (_style));

#define SET_BF_SURFACE_COLOR(_colorType,_colr)	\
    PEXSetBFSurfaceColor(dpy, resourceID, req_type, (_colorType), (_colr));

#define SET_BF_SURFACE_COLOR_INDEX(_colorIndex)	\
    PEXSetBFSurfaceColorIndex(dpy, resourceID, req_type, (_colorIndex));

#define SET_BF_SURFACE_INTERP_METHOD(_method)	\
    PEXSetBFSurfaceInterpMethod(dpy, resourceID, req_type, (_method)); 


/* Misc surface attributes */

#define SET_INTERIOR_BUNDLE_INDEX(_index)	\
    PEXSetInteriorBundleIndex(dpy, resourceID, req_type, (_index));

#define SET_FACET_CULLING_MODE(_mode)	\
    PEXSetFacetCullingMode(dpy, resourceID, req_type, (_method));

#define SET_FACET_DISTINGUISH_FLAG(_flag)	\
    PEXSetFacetDistinguishFlag(dpy, resourceID, req_type, (_flag));

#define SET_SURFACE_APPROX(_method, _utolerance, _vtolerance)	\
    PEXSetSurfaceApprox(dpy, resourceID, req_type, (_method), \
	(_utolerance), (_vtolerance));


/* Edge attributes */

#define SET_EDGE_COLOR(_colorType,_colr)	\
    PEXSetSurfaceEdgeColor(dpy, resourceID, req_type, (_colorType), (_colr));

#define SET_EDGE_COLOR_INDEX(_colorIndex)	\
    PEXSetSurfaceEdgeColorIndex(dpy, resourceID, req_type, (_colorIndex));

#define SET_EDGE_WIDTH(_width)	\
    PEXSetSurfaceEdgeWidth(dpy, resourceID, req_type, (_width));

#define SET_EDGE_TYPE(_type)	\
    PEXSetSurfaceEdgeType(dpy, resourceID, req_type, (_type));

#define SET_EDGE_FLAG(_flag)	\
    PEXSetSurfaceEdgeFlag(dpy, resourceID, req_type, (_flag));

#define SET_EDGE_BUNDLE_INDEX(_index)	\
    PEXSetEdgeBundleIndex(dpy, resourceID, req_type, (_index));

#endif /* _SURFACE_H */