Removed back portability to GTK+ 1.x. Also some minor reformatting to suit the rest...
[geda-gerbv/spe.git] / src / search.h
blob4bbacacc8b5ebea4c2ee5a7f108e6d9ded44fc9e
1 /*
2 * gEDA - GNU Electronic Design Automation
3 * This file is a part of gerbv.
5 * Copyright (C) 2004 Juergen Haas (juergenhaas@gmx.net)
7 * $Id$
8 *
9 * Juergen H. (juergenhaas@gmx.net)
10 * and Tomasz M. (T.Motylewski@bfad.de)
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
27 #ifndef SEARCH_H
28 #define SEARCH_H
30 #include <stdio.h>
31 #include "search_file.h"
32 #include "gerbv_screen.h"
33 #include "search_cb.h"
35 /** maximum size of strings. */
36 #define MAXL 200
38 enum e_footprint {
39 PART_SHAPE_UNKNOWN = 0, /* drawn as circle with line*/
40 PART_SHAPE_RECTANGLE = 1, /* rectangle with one side marked*/
41 PART_SHAPE_STD = 2 /* rectangle with one corner marked*/
44 /** captures all pick and place data columns.
45 which were read successfully in from a pick and place file.\n
46 There is only one pnp file at any time valid, for the whole project. Loading a second pnp file results in complete loss of previous pick_and_place data.\n
48 typedef struct pnp_state {\n
50 char designator[MAXL];\n
51 char footprint[MAXL];\n
52 double mid_x;\n
53 double mid_y;\n
54 double ref_x;\n
55 double ref_y;\n
56 double pad_x;\n
57 double pad_y;\n
58 char layer[MAXL]; T is top B is bottom\n
59 double rotation;\n
60 char comment[MAXL]; \n
61 int shape;\n
62 double width;\n
63 double length;\n
65 unsigned int nuf_push; Nuf pushes to estimate stack size \n
66 struct pnp_state *next;\n
67 } pnp_state_t;\n
70 typedef struct pnp_state {
72 char designator[MAXL];
73 char footprint[MAXL];
74 double mid_x;
75 double mid_y;
76 double ref_x;
77 double ref_y;
78 double pad_x;
79 double pad_y;
80 char layer[MAXL]; /*T is top B is bottom*/
81 double rotation;
82 char comment[MAXL];
83 int shape;
84 double width;
85 double length;
87 unsigned int nuf_push; /* Nuf pushes to estimate stack size */
88 struct pnp_state *next;
89 } pnp_state_t;
91 /** captures all pick and place data in a netlist style.
92 Is intended to be also used e.g. for reloading files*/
93 extern pnp_state_t *parsed_PNP_data;
95 pnp_state_t *new_pnp_state();
96 double get_float_unit(char *str);
97 int pnp_screen_for_delimiter(char *str, int n);
98 pnp_state_t *parse_pnp(pnp_file_t *fd);
99 void free_pnp_state(pnp_state_t *pnp_state);
101 #endif /* SEARCH_H */