Go to the documentation of this file.00001
00025 #ifndef __PCB_GLOBALS_INCLUDED__
00026 #define __PCB_GLOBALS_INCLUDED__
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #define MAX_LAYER 16
00040
00043 #define MAX_ELEMENTNAMES 3
00044
00045 #define EMARK_SIZE 1000
00046
00047 #define MIN_TEXTSCALE 10
00048
00049 #define MAX_TEXTSCALE 10000
00050
00052 #ifndef MIN
00053 #define MIN(a,b) ((a) < (b) ? (a) : (b))
00054 #define MAX(a,b) ((a) > (b) ? (a) : (b))
00055 #endif
00056
00057
00058 #define CLEAR 0x0000
00059
00060 #define PIN 0x0001
00061
00063 #define VIA 0x0002
00064
00065 #define HOLE 0x0008
00066
00068 #define PININPOLY 0x0010
00069
00071 #define SHOWNAME 0x0020
00072
00073 #define ONSOLDER 0x0080
00074
00076 #define SQUARE 0x0100
00077
00078 #define WARN 0x0200
00079
00080 #define OCTAGON 0x0800
00081
00082 #define LOCK 0x2000
00083
00084 #define EDGE2 0x4000
00085
00089 #define MARKER 0x8000
00090
00091 #define NOPASTE 0x10000
00092
00095 static int ID = 1;
00102 typedef enum
00103 {
00104 NORTH,
00105 EAST,
00106 SOUTH,
00107 WEST
00108 } direction_t;
00109
00110 typedef int LocationType;
00111 typedef int BDimension;
00113 typedef unsigned int Cardinal;
00114 typedef char Boolean;
00115 typedef char *String;
00116 typedef short Position;
00117 typedef short Dimension;
00118 typedef unsigned char BYTE;
00119
00122 typedef struct
00123 {
00124 LocationType X1;
00126 LocationType Y1;
00128 LocationType X2;
00130 LocationType Y2;
00132 } BoxType, *BoxTypePtr;
00133
00139 typedef struct
00140 {
00141 unsigned long f;
00143 unsigned char t[(MAX_LAYER + 1) / 2];
00145 } FlagType, *FlagTypePtr;
00146
00150 typedef struct
00151 {
00152 char *name;
00153 char *value;
00154 } AttributeType, *AttributeTypePtr;
00155
00159 typedef struct
00160 {
00161 int Number;
00162 int Max;
00163 AttributeType *List;
00164 } AttributeListType, *AttributeListTypePtr;
00165
00171 typedef struct
00172 {
00173 LocationType X;
00174 LocationType Y;
00175 LocationType X2;
00176 LocationType Y2;
00177 long int ID;
00178 } PointType, *PointTypePtr;
00179
00185 #define ANYOBJECTFIELDS \
00186 BoxType BoundingBox; \
00187 long int ID; \
00188 FlagType Flags; \
00189 struct LibraryEntryType *net
00190
00194 #define ANYLINEFIELDS \
00195 ANYOBJECTFIELDS; \
00196 BDimension Thickness; \
00197 BDimension Clearance; \
00198 PointType Point1; \
00199 PointType Point2
00200
00204 typedef struct
00205 {
00206 ANYLINEFIELDS;
00207 } AnyLineObjectType, *AnyLineObjectTypePtr;
00208
00212 typedef struct
00213 {
00214 ANYLINEFIELDS;
00215 char *Number;
00216 } LineType, *LineTypePtr;
00217
00221 typedef struct
00222 {
00223 Boolean status;
00224 long int X;
00226 long int Y;
00228 } MarkType, *MarkTypePtr;
00229
00233 typedef struct
00234 {
00235 ANYOBJECTFIELDS;
00236 BDimension Scale;
00238 LocationType X;
00240 LocationType Y;
00242 BYTE Direction;
00244 char *TextString;
00246 void *Element;
00247 } TextType, *TextTypePtr;
00248
00252 typedef struct
00253 {
00254 ANYOBJECTFIELDS;
00255 BDimension Thickness;
00257 BDimension Clearance;
00259 LocationType Width;
00261 LocationType Height;
00263 LocationType X;
00265 LocationType Y;
00267 long int StartAngle;
00269 long int Delta;
00271 } ArcType, *ArcTypePtr;
00272
00276 typedef struct
00277 {
00278 ANYLINEFIELDS;
00279 BDimension Mask;
00280 char *Name;
00282 char *Number;
00284 void *Element;
00285 void *Spare;
00286 } PadType, *PadTypePtr;
00287
00291 typedef struct
00292 {
00293 ANYOBJECTFIELDS;
00294 BDimension Thickness;
00296 BDimension Clearance;
00298 BDimension Mask;
00299 BDimension DrillingHole;
00301 LocationType X;
00303 LocationType Y;
00305 char *Name;
00307 char *Number;
00309 void *Element;
00310 void *Spare;
00311 } PinType, *PinTypePtr, **PinTypeHandle;
00312
00316 typedef struct
00317 {
00318 ANYOBJECTFIELDS;
00319 TextType Name[MAX_ELEMENTNAMES];
00326 LocationType MarkX;
00328 LocationType MarkY;
00330 Cardinal PinN;
00332 Cardinal PinMax;
00334 Cardinal PadN;
00336 Cardinal PadMax;
00338 Cardinal LineN;
00340 Cardinal LineMax;
00342 Cardinal ArcN;
00344 Cardinal ArcMax;
00346 PinTypePtr Pin;
00348 PadTypePtr Pad;
00350 LineTypePtr Line;
00352 ArcTypePtr Arc;
00354 BoxType VBox;
00356 AttributeListType Attributes;
00358 } ElementType, *ElementTypePtr, **ElementTypeHandle;
00359
00360
00361 #endif
00362
00363
00364