File: g2__funix_8h-source.html

package info (click to toggle)
g2 0.70-1.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,956 kB
  • ctags: 1,057
  • sloc: ansic: 8,497; sh: 2,796; makefile: 226; perl: 223; fortran: 183; cpp: 33
file content (172 lines) | stat: -rw-r--r-- 12,177 bytes parent folder | download | duplicates (2)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>g2: g2_funix.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>g2_funix.h</h1><pre class="fragment"><div>00001 <span class="comment">/*****************************************************************************</span>
00002 <span class="comment">**  Copyright (C) 1998-2001  Ljubomir Milanovic &amp; Horst Wagner</span>
00003 <span class="comment">**  This file is part of the g2 library</span>
00004 <span class="comment">**</span>
00005 <span class="comment">**  This library is free software; you can redistribute it and/or</span>
00006 <span class="comment">**  modify it under the terms of the GNU Lesser General Public</span>
00007 <span class="comment">**  License as published by the Free Software Foundation; either</span>
00008 <span class="comment">**  version 2.1 of the License, or (at your option) any later version.</span>
00009 <span class="comment">**</span>
00010 <span class="comment">**  This library is distributed in the hope that it will be useful,</span>
00011 <span class="comment">**  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00012 <span class="comment">**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
00013 <span class="comment">**  Lesser General Public License for more details.</span>
00014 <span class="comment">**</span>
00015 <span class="comment">**  You should have received a copy of the GNU Lesser General Public</span>
00016 <span class="comment">**  License along with this library; if not, write to the Free Software</span>
00017 <span class="comment">**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
00018 <span class="comment">******************************************************************************/</span>
00019 <span class="preprocessor">#ifndef _G2_FUNIX_H</span>
00020 <span class="preprocessor"></span><span class="preprocessor">#define _G2_FUNIX_H</span>
00021 <span class="preprocessor"></span>
00022 <span class="comment">/*</span>
00023 <span class="comment"> *</span>
00024 <span class="comment"> * FUNction IndeX enumeration</span>
00025 <span class="comment"> *</span>
00026 <span class="comment"> */</span>
00027 
00028 <span class="preprocessor">#define G2_N_FUNIX  31    </span><span class="comment">/* WARNING !! */</span>
00029                           <span class="comment">/* number of funix excl. g2_FUNIX_NULL !!! */</span>
00030 
00031 <span class="keyword">typedef</span> <span class="keyword">enum</span> g2_funix {
00032     g2_FUNIX_NULL=-1,     <span class="comment">/* null funix (_don't_ _count_ in G2_N_FUNIX !!!!) */</span>
00033     
00034     g2_DoNothing=0,       <span class="comment">/* do nothing */</span>
00035                           <span class="comment">/* ... =  */</span>
00036 
00037     g2_Delete,            <span class="comment">/* delete physical device */</span>
00038                           <span class="comment">/* ... =  */</span>
00039 
00040     g2_Ink,               <span class="comment">/* set ink */</span>
00041                           <span class="comment">/* ... = (int)red, (int)green, (int)blue */</span>
00042                           <span class="comment">/* 0 &lt; (red,green,blue) &lt; 65535 (=0xFFFF) */</span>
00043                           <span class="comment">/* ret: color id(&gt;=0), &lt;0 if error */</span>
00044     
00045     g2_Pen,               <span class="comment">/* set pen */</span>
00046                           <span class="comment">/* ... = (int)pen */</span>
00047     
00048     g2_SetBackground,     <span class="comment">/* set background */</span>
00049                           <span class="comment">/* ... = (int)pen */</span>
00050     
00051     g2_ClearPalette,      <span class="comment">/* reset color pallete to default values */</span>
00052                           <span class="comment">/* ... = */</span>
00053                           <span class="comment">/* for list of default colors (0,31) see later */</span>
00054 
00055     g2_SetLineWidth,      <span class="comment">/* set line width (line, rectangle, ...) */</span>
00056                           <span class="comment">/* ... = (double)line width */</span>
00057     
00058     g2_SetDash,           <span class="comment">/* set line dash */</span>
00059                           <span class="comment">/* ... = (int)number of descr., (double*) bw list */</span>
00060     
00061     g2_SetFontSize,       <span class="comment">/* set font size */</span>
00062                           <span class="comment">/* ... = (double)font size */</span>
00063     
00064     g2_Clear,             <span class="comment">/* clear screen(X11), print page(PostScript), ... */</span>
00065                           <span class="comment">/* ... = */</span>
00066     
00067     g2_Flush,             <span class="comment">/* update output */</span>
00068                           <span class="comment">/* X11: Flush, PostScript: fflush, ... */</span>
00069 
00070     g2_Save,              <span class="comment">/* save output to device (e.g. file) */</span>
00071                           <span class="comment">/* X11: Flush, etc. */</span>
00072 
00073     g2_Plot,              <span class="comment">/* plot point */</span>
00074                           <span class="comment">/* ... = (double)x, (double)y */</span>
00075 
00076     g2_Line,              <span class="comment">/* draw line */</span>
00077                           <span class="comment">/* ... = (double)x1, (double)y1,</span>
00078 <span class="comment">                                   (double)x2, (double)y2  */</span>
00079 
00080     g2_PolyLine,          <span class="comment">/* draw poly line */</span>
00081                           <span class="comment">/* ... = (int)N,</span>
00082 <span class="comment">                                   (double*)dp</span>
00083 <span class="comment">                            dp[0]=x1, dp[1]=y1,</span>
00084 <span class="comment">                            ...</span>
00085 <span class="comment">                            dp[2*N-2]=xN, dp[2*N-1]=yN   */</span>
00086 
00087     g2_Polygon,           <span class="comment">/* draw polygon */</span>
00088                           <span class="comment">/* ... = (int)N,</span>
00089 <span class="comment">                                   (double*)dp</span>
00090 <span class="comment">                            dp[0]=x1, dp[1]=y1,</span>
00091 <span class="comment">                            ...</span>
00092 <span class="comment">                            dp[2*N-2]=xN, dp[2*N-1]=yN   */</span>
00093 
00094     g2_FilledPolygon,     <span class="comment">/* draw filled polygon */</span>
00095                           <span class="comment">/* ... = (int)N,</span>
00096 <span class="comment">                                   (double*)dp</span>
00097 <span class="comment">                            dp[0]=x1, dp[1]=y1,</span>
00098 <span class="comment">                            ...</span>
00099 <span class="comment">                            dp[2*N-2]=xN, dp[2*N-1]=yN   */</span>
00100 
00101     g2_Rectangle,         <span class="comment">/* draw rectangle */</span>
00102                           <span class="comment">/* ... = (double)x1, (double)y1,</span>
00103 <span class="comment">                                   (double)x2, (double)y2  */</span>
00104 
00105     g2_FilledRectangle,   <span class="comment">/* draw filled rectangle */</span>
00106                           <span class="comment">/* ... = (double)x1, (double)x1,</span>
00107 <span class="comment">                                   (double)x2, (double)y2  */</span>
00108 
00109     g2_Triangle,          <span class="comment">/* draw triangle (should be faster as lines) */</span>
00110                           <span class="comment">/* ... = (double)x1, (double)y1,</span>
00111 <span class="comment">                                   (double)x2, (double)y2,</span>
00112 <span class="comment">                                   (double)x3, (double)y3 */</span>
00113     
00114     g2_FilledTriangle,    <span class="comment">/* draw filled triangle */</span>
00115                           <span class="comment">/* ... = (double)x1, (double)y1,</span>
00116 <span class="comment">                                   (double)x2, (double)y2,</span>
00117 <span class="comment">                                   (double)x3, (double)y3 */</span>
00118     
00119     g2_Arc,               <span class="comment">/* draw arc */</span>
00120                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00121 <span class="comment">                                   (double)r1, (double)r2,</span>
00122 <span class="comment">                                   (double)a1, (double)a2  */</span>
00123 
00124     g2_FilledArc,         <span class="comment">/* draw filled arc */</span>
00125                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00126 <span class="comment">                                   (double)r1, (double)r2,</span>
00127 <span class="comment">                                   (double)a1, (double)a2  */</span>
00128     
00129     g2_Ellipse,           <span class="comment">/* draw ellipse */</span>
00130                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00131 <span class="comment">                                   (double)r1, (double)r2 */</span>
00132 
00133     g2_FilledEllipse,     <span class="comment">/* draw filled ellipse */</span>
00134                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00135 <span class="comment">                                   (double)r1, (double)r2 */</span>
00136 
00137     g2_Circle,            <span class="comment">/* draw circle */</span>
00138                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00139 <span class="comment">                                   (double)r */</span>
00140 
00141     g2_FilledCircle,      <span class="comment">/* draw filled circle */</span>
00142                           <span class="comment">/* ... = (double)x,  (double)y,</span>
00143 <span class="comment">                                   (double)r */</span>
00144 
00145     g2_String,            <span class="comment">/* draw string */</span>
00146                           <span class="comment">/* ... = (double)x, (double)y, (const char*)string */</span>
00147 
00148     g2_Image,             <span class="comment">/* draw (pen) image */</span>
00149                           <span class="comment">/* ... = (double)x, (double)y,</span>
00150 <span class="comment">                                   (int)x_size, (int)y_size, (int*)pen_array */</span>
00151 
00152     g2_QueryPointer,      <span class="comment">/* query pointer position (mouse) */</span>
00153                           <span class="comment">/* ... =  (double)*x, (double)*y,</span>
00154 <span class="comment">                                    (unsigned int)*button */</span>
00155     g2_GetPDHandles       <span class="comment">/* get pointers to low level handles */</span>
00156                           <span class="comment">/* ... = void *handles[G2_MAX_NUMBER_PD_HANDLES] */</span>
00157 } g2_funix;
00158 
00159 
00160 <span class="preprocessor">#endif </span><span class="comment">/* _G2_FUNIX_H */</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Tue Jun 14 23:33:58 2005 for g2 by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>