1 /***************************************************************************** 2 ** Copyright (C) 1998-2001 Ljubomir Milanovic & Horst Wagner 3 ** This file is part of the g2 library 4 ** 5 ** This library is free software; you can redistribute it and/or 6 ** modify it under the terms of the GNU Lesser General Public 7 ** License as published by the Free Software Foundation; either 8 ** version 2.1 of the License, or (at your option) any later version. 9 ** 10 ** This library is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 ** Lesser General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU Lesser General Public 16 ** License along with this library; if not, write to the Free Software 17 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 ******************************************************************************/ 19 #ifndef _G2_FUNIX_H 20 #define _G2_FUNIX_H 21 22 /* 23 * 24 * FUNction IndeX enumeration 25 * 26 */ 27 28 #define G2_N_FUNIX 31 /* WARNING !! */ 29 /* number of funix excl. g2_FUNIX_NULL !!! */ 30 31 typedef enum g2_funix { 32 g2_FUNIX_NULL=-1, /* null funix (_don't_ _count_ in G2_N_FUNIX !!!!) */ 33 34 g2_DoNothing=0, /* do nothing */ 35 /* ... = */ 36 37 g2_Delete, /* delete physical device */ 38 /* ... = */ 39 40 g2_Ink, /* set ink */ 41 /* ... = (int)red, (int)green, (int)blue */ 42 /* 0 < (red,green,blue) < 65535 (=0xFFFF) */ 43 /* ret: color id(>=0), <0 if error */ 44 45 g2_Pen, /* set pen */ 46 /* ... = (int)pen */ 47 48 g2_SetBackground, /* set background */ 49 /* ... = (int)pen */ 50 51 g2_ClearPalette, /* reset color pallete to default values */ 52 /* ... = */ 53 /* for list of default colors (0,31) see later */ 54 55 g2_SetLineWidth, /* set line width (line, rectangle, ...) */ 56 /* ... = (double)line width */ 57 58 g2_SetDash, /* set line dash */ 59 /* ... = (int)number of descr., (double*) bw list */ 60 61 g2_SetFontSize, /* set font size */ 62 /* ... = (double)font size */ 63 64 g2_Clear, /* clear screen(X11), print page(PostScript), ... */ 65 /* ... = */ 66 67 g2_Flush, /* update output */ 68 /* X11: Flush, PostScript: fflush, ... */ 69 70 g2_Save, /* save output to device (e.g. file) */ 71 /* X11: Flush, etc. */ 72 73 g2_Plot, /* plot point */ 74 /* ... = (double)x, (double)y */ 75 76 g2_Line, /* draw line */ 77 /* ... = (double)x1, (double)y1, 78 (double)x2, (double)y2 */ 79 80 g2_PolyLine, /* draw poly line */ 81 /* ... = (int)N, 82 (double*)dp 83 dp[0]=x1, dp[1]=y1, 84 ... 85 dp[2*N-2]=xN, dp[2*N-1]=yN */ 86 87 g2_Polygon, /* draw polygon */ 88 /* ... = (int)N, 89 (double*)dp 90 dp[0]=x1, dp[1]=y1, 91 ... 92 dp[2*N-2]=xN, dp[2*N-1]=yN */ 93 94 g2_FilledPolygon, /* draw filled polygon */ 95 /* ... = (int)N, 96 (double*)dp 97 dp[0]=x1, dp[1]=y1, 98 ... 99 dp[2*N-2]=xN, dp[2*N-1]=yN */ 100 101 g2_Rectangle, /* draw rectangle */ 102 /* ... = (double)x1, (double)y1, 103 (double)x2, (double)y2 */ 104 105 g2_FilledRectangle, /* draw filled rectangle */ 106 /* ... = (double)x1, (double)x1, 107 (double)x2, (double)y2 */ 108 109 g2_Triangle, /* draw triangle (should be faster as lines) */ 110 /* ... = (double)x1, (double)y1, 111 (double)x2, (double)y2, 112 (double)x3, (double)y3 */ 113 114 g2_FilledTriangle, /* draw filled triangle */ 115 /* ... = (double)x1, (double)y1, 116 (double)x2, (double)y2, 117 (double)x3, (double)y3 */ 118 119 g2_Arc, /* draw arc */ 120 /* ... = (double)x, (double)y, 121 (double)r1, (double)r2, 122 (double)a1, (double)a2 */ 123 124 g2_FilledArc, /* draw filled arc */ 125 /* ... = (double)x, (double)y, 126 (double)r1, (double)r2, 127 (double)a1, (double)a2 */ 128 129 g2_Ellipse, /* draw ellipse */ 130 /* ... = (double)x, (double)y, 131 (double)r1, (double)r2 */ 132 133 g2_FilledEllipse, /* draw filled ellipse */ 134 /* ... = (double)x, (double)y, 135 (double)r1, (double)r2 */ 136 137 g2_Circle, /* draw circle */ 138 /* ... = (double)x, (double)y, 139 (double)r */ 140 141 g2_FilledCircle, /* draw filled circle */ 142 /* ... = (double)x, (double)y, 143 (double)r */ 144 145 g2_String, /* draw string */ 146 /* ... = (double)x, (double)y, (const char*)string */ 147 148 g2_Image, /* draw (pen) image */ 149 /* ... = (double)x, (double)y, 150 (int)x_size, (int)y_size, (int*)pen_array */ 151 152 g2_QueryPointer, /* query pointer position (mouse) */ 153 /* ... = (double)*x, (double)*y, 154 (unsigned int)*button */ 155 g2_GetPDHandles /* get pointers to low level handles */ 156 /* ... = void *handles[G2_MAX_NUMBER_PD_HANDLES] */ 157 } g2_funix; 158 159 160 #endif /* _G2_FUNIX_H */ 161