Added file which was being "recommended" by running make distdir
[geda-gaf/whiteaudio.git] / libgeda / include / defines.h
blob624b0163eddf45085e6f03a50ef2cca408c12911
1 /* gEDA - GPL Electronic Design Automation
2 * libgeda - gEDA's Library
3 * Copyright (C) 1998-2004 Ales V. Hvezda
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef _DEFINES_H_INCL
21 #define _DEFINES_H_INCL
23 /* Current schematic/symbol file format */
24 #define FILEFORMAT_VERSION 1
26 /* release version which had file format changes */
27 /* New file format changes after 20030921 use the above version */
28 /* and not these #defines anymore. */
29 #define VERSION_20000220 20000220
30 #define VERSION_20000704 20000704
31 #define VERSION_20020825 20020825
32 #define VERSION_20030921 20030921
33 /* 20030921 wasn't a real version, just a MinGW test version, but it is */
34 /* out there */
36 /* Set this string to something interesting to create a custom */
37 /* version of gEDA/gaf. This string is prepended to all messages that */
38 /* output the program's version output. You would set this if you are */
39 /* creating a specific custom version of gEDA/gaf. */
40 /* For example, if you set this string to "FIX-", the resulting output is: */
41 /* FIX-1.0.0.20060906. */
42 #define PREPEND_VERSION_STRING ""
44 /* for color mechanism used in gschem */
45 #define MAX_COLORS 25
47 /* for new fileselection dialog box */
48 #define MAX_FILES 2048
49 #define MAX_DIRS 2048
51 #define ZOOM_OUT 0
52 #define ZOOM_IN 1
53 #define ZOOM_FULL 2
55 #define CONNECTION_NONE 0 /* this one is not used */
56 #define CONNECTION_REGULAR 1
57 #define CONNECTION_ROUND 2
59 #if 0 /* Comment this in if you don't have gtk 1.0.4 or greater */
60 #define TRUE 1
61 #define FALSE 0
62 #endif
64 /* X's obsession with *64 */
65 #define FULL_CIRCLE 360*64
67 /* for show_name_value in st_objects */
68 #define SHOW_NAME_VALUE 0
69 #define SHOW_VALUE 1
70 #define SHOW_NAME 2
71 #define LEAVE_NAME_VALUE_ALONE -1
73 /* for visibility in st_objects */
74 #define INVISIBLE 0
75 #define VISIBLE 1
76 #define LEAVE_VISIBILITY_ALONE -1
78 /* For pin and net styles */
79 #define THIN 0
80 #define THICK 1
82 /* various thicknesses (in mils) */
83 #define NET_WIDTH 10
84 #define PIN_WIDTH 10
85 #define LINE_WIDTH 10
86 #define BUS_WIDTH 30
88 /* various visual cue sizes (in mils) */
89 #define CUE_BOX_SIZE 30
90 #define CUE_CIRCLE_SMALL_SIZE 30
91 #define CUE_CIRCLE_LARGE_SIZE 60
93 /* For grip size */
94 #define GRIP_SIZE1 25
95 #define GRIP_SIZE2 50
96 #define GRIP_SIZE3 80
97 #define SMALL_ZOOMFACTOR1 150
98 #define SMALL_ZOOMFACTOR2 30
101 /* For text location on component not found graphics */
102 #define NOT_FOUND_TEXT_X 100
103 #define NOT_FOUND_TEXT_Y 100
105 /* for bus_ripper_type */
106 #define COMP_BUS_RIPPER 0
107 #define NET_BUS_RIPPER 1
109 /* for bus_ripper_rotation */
110 #define SYMMETRIC 0
111 #define NON_SYMMETRIC 1
113 #undef max
114 #define max(a,b) ((a) > (b) ? (a) : (b))
116 #undef min
117 #define min(a,b) ((a) < (b) ? (a) : (b))
119 #define FREE 1
120 #define CONSTRAINED 2
122 /* for attrib_edit_dialog invocation flag */
123 #define FROM_MENU 0
124 #define FROM_HOTKEY 1
126 /* for s_clib_getfilename() */
127 #define OPEN_DIR 0
128 #define READ_DIR 1
129 #define CLOSE_DIR 2
130 #define SET_COUNT 3
132 /* for s_slib_search() */
133 #define SLIB_SEARCH_START 0
134 #define SLIB_SEARCH_NEXT 1
135 #define SLIB_SEARCH_DONE 2
137 /* for text cap style */
138 #define LOWER 0
139 #define UPPER 1
140 #define BOTH 2
142 /* for text alignment */
143 /* 2 -- 5 -- 8 */
144 /* | | | */
145 /* 1 -- 4 -- 7 */
146 /* | | | */
147 /* 0 -- 3 -- 6 */
148 #define LOWER_LEFT 0
149 #define MIDDLE_LEFT 1
150 #define UPPER_LEFT 2
151 #define LOWER_MIDDLE 3
152 #define MIDDLE_MIDDLE 4
153 #define UPPER_MIDDLE 5
154 #define LOWER_RIGHT 6
155 #define MIDDLE_RIGHT 7
156 #define UPPER_RIGHT 8
158 /* maximum single line length when reading in text strings */
159 #define MAX_TEXT_LINE_LENGTH 1024
161 /* one character string used to calculate tab's width */
162 /* Warning: it MUST be a string. */
163 #define TAB_CHAR_MODEL "b"
165 /* multi text line spacing (multipled times character height) */
166 #define LINE_SPACING 2.0
168 /* These modes are for net_endpoint_mode */
169 #define NONE 0
170 #define FILLEDBOX 1
171 #define EMPTYBOX 2
172 #define X 3
174 /* These modes are for net_midpoint_mode */
175 /* NONE also applies here */
176 #define FILLED 3
177 #define EMPTY 4
180 /* The conn modes for type */
181 #define CONN_NULL 0
182 #define CONN_ENDPOINT 1
183 #define CONN_MIDPOINT 2
185 /* The conn whole type */
186 #define NO_MIDPOINT 0
187 #define HAS_MIDPOINT 1
188 #define HAS_BUS_MIDPOINT 2
190 /* The conn modes for visual_cue */
191 #define NO_CUE 1
192 #define NET_DANGLING_CUE 2
193 #define PIN_DANGLING_CUE 3
194 #define BUS_DANGLING_CUE 4
195 #define MIDPOINT_CUE 5
196 #define BUS_MIDPOINT_CUE 6
197 #define INVALID_CUE 7
200 /* used by world_tiles to set the size of the array */
201 #define MAX_TILES_X 10
202 #define MAX_TILES_Y 10
204 /* These modes are for actionfeedback_mode */
205 /* there's a hack in i_keypress.c dealing with the 0 and 1 (has to be these */
206 /* values */
207 #define OUTLINE 0
208 #define BOUNDINGBOX 1
211 /* there are modes for text-feedback */
212 #define ONLY_WHEN_READABLE 0
213 #define ALWAYS 1
215 /* used in o_undo_callback */
216 #define UNDO_ACTION 0
217 #define REDO_ACTION 1
219 /* used for undo_type */
220 #define UNDO_DISK 0
221 #define UNDO_MEMORY 1
223 /* used for undo_savestate flag */
224 #define UNDO_ALL 0
225 #define UNDO_VIEWPORT_ONLY 1
227 /* These are for where status information goes */
228 #define LOG_WINDOW 0
229 #define STDOUT_TTY 1
230 #define BOTH_LOGWIN_STDOUT 2
232 /* list copying flags */
233 #define NORMAL_FLAG 0
234 #define SELECTION_FLAG 1
236 /* hierarchy loading flags */
237 #define HIERARCHY_NORMAL_LOAD 0
238 #define HIERARCHY_FORCE_LOAD 1
240 /* hierarchy traversing flags */
241 #define HIERARCHY_NODUPS (1<<0)
242 #define HIERARCHY_POSTORDER (1<<1)
243 #define HIERARCHY_INNERLOOP (1<<7)
245 /* selection types */
246 /* used in o_select_object */
247 #define SINGLE 0
248 #define MULTIPLE 1
250 #define MILS_PER_INCH 1000
252 /* for text_output */
253 #define VECTOR_FONTS 0
254 #define PS_FONTS 1
256 /* for grid_mode */
257 #define GRID_VARIABLE_MODE 0
258 #define GRID_FIXED_MODE 1
260 /* for print dialog box */
261 #define EXTENTS 0
262 #define WINDOW 1
263 #define EXTENTS_NOMARGINS 2
265 /* for output-capstyle */
266 #define BUTT_CAP 0
267 #define ROUND_CAP 1
268 #define SQUARE_CAP 2
270 /* for print dialog box */
271 #define LANDSCAPE 0
272 #define PORTRAIT 1
274 /* for type to s_cue_output_all */
275 #define POSTSCRIPT 0
276 #define PNG 1
278 /* for log-window keyword */
279 #define MAP_LATER 0
280 #define MAP_ON_STARTUP 1
282 /* for log-window-type */
283 #define DECORATED 0
284 #define TRANSIENT 1
286 /* for third-mouse */
287 #define POPUP_ENABLED 0
288 #define MOUSEPAN_ENABLED 1
290 /* for middle-mouse */
291 #define STROKE 0
292 #define REPEAT 1
293 #define ACTION 2
294 #define MID_MOUSEPAN_ENABLED 3
296 /* for scroll-wheel */
297 #define SCROLL_WHEEL_CLASSIC 0
298 #define SCROLL_WHEEL_GTK 1
300 /* for selected_from */
301 #define DONTCARE 0
302 #define MENU 1
303 #define HOTKEY 2
305 /* for a_pan_general and a_zoom */
306 #define A_PAN_IGNORE_BORDERS 1
307 #define A_PAN_DONT_REDRAW 2
309 /* for o_net_orientation */
310 #define NEITHER 0
311 #define HORIZONTAL 1
312 #define VERTICAL 2
313 #define HORIZONTAL_ABOVE 3
314 #define HORIZONTAL_BELOW 4
315 #define VERTICAL_LEFT 5
316 #define VERTICAL_RIGHT 6
318 /* for pin_type */
319 #define PIN_TYPE_NET 0
320 #define PIN_TYPE_BUS 1
322 /* gnetlist: hierarchy_*_order */
323 #define APPEND 0
324 #define PREPEND 1
326 /* gnetlist: netlist_mode */
327 #define gEDA 0
328 #define SPICE 1
329 #define TANGO 2
331 /* gnetlist: net-naming-priority */
332 #define NETATTRIB_ATTRIBUTE 0
333 #define NETNAME_ATTRIBUTE 1
335 /* gschcheck: Error types */
336 #define NO_ERR 0
337 #define FLOAT_NET 1
338 #define FLOAT_PIN 2
339 #define DUP_NET_NAME 4
341 /* Max level of symlinks */
342 #define MAX_LINK_LEVEL 256
344 #if defined(__MINGW32__) && !defined(M_PI)
345 #define M_PI 3.14159265358979323846
346 #endif
348 /* Logs a normal message. */
349 #define s_log_message g_message
351 /* Backup filename creation string */
352 #define AUTOSAVE_BACKUP_FILENAME_STRING "#%s#"
354 /* These permission bits are absent on MinGW */
355 #ifndef S_IWGRP
356 # define S_IWGRP 0
357 #endif
358 #ifndef S_IWOTH
359 # define S_IWOTH 0
360 #endif
361 #ifndef S_IXGRP
362 # define S_IXGRP 0
363 #endif
364 #ifndef S_IXOTH
365 # define S_IXOTH 0
366 #endif
367 #ifndef S_IRWXG
368 # define S_IRWXG 0
369 #endif
372 /* Used by the rc loading mechanism */
373 #define RETURN_G_RC_MODE(rc, var, size) \
374 return g_rc_mode_general(mode, \
375 (rc), \
376 &(var), \
377 mode_table, \
378 size)
381 #endif /* !_DEFINES_H_INCL */