pcb 4.1.1
An interactive printed circuit board layout editor.

global.h File Reference

Definition of types. More...

#include "const.h"
#include "macro.h"
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdarg.h>
#include <math.h>
#include <ctype.h>
#include <sys/types.h>
#include <stdbool.h>
#include <glib.h>
#include "hid.h"
#include "polyarea.h"
#include "gettext.h"
Include dependency graph for global.h:

Go to the source code of this file.

Data Structures

struct  PLMeasure
 This is used by the lexer/parser. More...
struct  FlagType
 Nobody should know about the internals of this except the macros in macros.h that access it. More...
struct  OutputType
 Holds information about output window. More...
struct  LayerGroupType
 Layer group. More...
struct  BoxType
 A bounding box. More...
struct  RectangleType
struct  AttributeType
struct  AttributeListType
struct  AnyObjectType
 All on-pcb objects (elements, lines, pads, vias, rats, etc) are based on this. More...
struct  PointType
 A line/polygon point. More...
struct  AnyLineObjectType
 Lines, rats, pads, etc. More...
struct  LineType
 Holds information about one line. More...
struct  TextType
struct  polygon_st
 Holds information about a polygon. More...
struct  ArcType
 Holds information about arcs. More...
struct  rtree
struct  LayerType
 Holds information about one layer. More...
struct  RatType
 A rat line. More...
struct  pad_st
 A SMD pad. More...
struct  pin_st
 A pin. More...
struct  ElementType
 An element. More...
struct  SymbolType
 A single symbol. More...
struct  FontType
 Complete set of symbols. More...
struct  DataType
 Holds all objects. More...
struct  DrillType
 Holds drill information. More...
struct  DrillInfoType
 Holds a range of Drill Infos. More...
struct  RouteStyleType
struct  LibraryEntryType
 Structure used by library routines. More...
struct  LibraryMenuType
  More...
struct  LibraryType
struct  PCBType
 The PCBType struct holds information about board layout most of which is saved with the layout. More...
struct  BufferType
 Information about the paste buffer. More...
struct  RubberbandType
 Rubberband lines for element moves. More...
struct  AttachedLineType
 Current marked line. More...
struct  AttachedBoxType
 Currently marked block. More...
struct  AttachedObjectType
 Currently attached object. More...
struct  CrosshairType
 Holds cursor information. More...
struct  MarkType
struct  SettingType
 Our resources. More...
struct  ObjectFunctionType
 Pointer to low-level copy, move and rotate functions. More...
struct  ConnectionType
 Holds a connection. More...
struct  NetType
 Holds a net of connections. More...
struct  NetListType
 Holds a list of nets. More...
struct  NetListListType
 Holds a list of net lists. More...
struct  PointerListType
 Holds a generic list of pointers. More...
struct  BoxListType
struct  drc_violation_st

Defines

#define _(S)   S
#define N_(S)   S
#define C_(C, S)   S
#define __FUNCTION1(a, b)   a ":" #b
#define __FUNCTION2(a, b)   __FUNCTION1(a,b)
#define __FUNCTION__   __FUNCTION2(__FILE__,__LINE__)
#define LIKELY(expr)   (expr)
#define UNLIKELY(expr)   (expr)
#define ANYOBJECTFIELDS
#define ANYLINEFIELDS
#define PIN_SIZE(pinptr)
#define UNDO_CHANGENAME   0x0001
#define UNDO_MOVE   0x0002
#define UNDO_REMOVE   0x0004
#define UNDO_REMOVE_POINT   0x0008
#define UNDO_INSERT_POINT   0x0010
#define UNDO_REMOVE_CONTOUR   0x0020
#define UNDO_INSERT_CONTOUR   0x0040
#define UNDO_ROTATE   0x0080
#define UNDO_CREATE   0x0100
#define UNDO_MOVETOLAYER   0x0200
#define UNDO_FLAG   0x0400
#define UNDO_CHANGESIZE   0x0800
#define UNDO_CHANGE2NDSIZE   0x1000
#define UNDO_MIRROR   0x2000
#define UNDO_CHANGECLEARSIZE   0x4000
#define UNDO_CHANGEMASKSIZE   0x8000
#define UNDO_CHANGEANGLES   0x10000
#define UNDO_LAYERCHANGE   0x20000
#define UNDO_CLEAR   0x40000
#define UNDO_NETLISTCHANGE   0x80000
#define UNDO_CHANGESETVIALAYERS   0x100000
#define ATTRIBUTE_UNUSED
#define AUSAGE(x)   Message (_("Usage:\n%s\n"), _(x##_syntax))
#define AFAIL(x)   { Message (_("Syntax error. Usage:\n%s\n"), _(x##_syntax)); return 1; }

Typedefs

typedef struct BoxType BoxType
typedef struct polygon_st PolygonType
typedef struct pad_st PadType
typedef struct pin_st PinType
typedef struct drc_violation_st DrcViolationType
typedef struct rtree rtree_t
typedef struct AttributeListType AttributeListType
typedef struct unit Unit
typedef struct increments Increments
typedef COORD_TYPE Coord
typedef double Angle
typedef unsigned int Cardinal
typedef char * String
typedef short Position
typedef short Dimension
typedef unsigned char BYTE
typedef struct PCBType PCBType
 The PCBType struct holds information about board layout most of which is saved with the layout.

Enumerations

enum  crosshair_shape { Basic_Crosshair_Shape = 0, Union_Jack_Crosshair_Shape, Dozen_Crosshair_Shape, Crosshair_Shapes_Number }

Variables

char * bindir
char * pcblibdir
char * pcblibpath
char * pcbtreedir
char * pcbtreepath
char * exec_prefix
char * homedir

Detailed Description

Definition of types.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996, 2004 Thomas Nau

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de


Change History:

10/11/96 11:37 AJF Added support for a Text() driver function. This was done out of a pressing need to force text to be printed on the silkscreen layer. Perhaps the design is not the best.

Definition in file global.h.


Define Documentation

#define _ (   S)    S

Definition at line 94 of file global.h.

Referenced by ActionAttributes(), ActionAutoPlaceSelected(), ActionChange2ndSize(), ActionChangeClearSize(), ActionChangeHole(), ActionChangeJoin(), ActionChangeName(), ActionChangeOctagon(), ActionChangePaste(), ActionChangeSize(), ActionChangeSquare(), ActionClearOctagon(), ActionClearSquare(), ActionConnection(), ActionDisplay(), ActionDRCheck(), ActionElementList(), ActionElementSetAttr(), ActionExecuteFile(), ActionFreeRotateBuffer(), ActionImport(), ActionLoadFrom(), ActionLoadVendorFrom(), ActionMorphPolygon(), ActionMoveObject(), ActionMoveToCurrentLayer(), ActionNew(), ActionPasteBuffer(), ActionRenumber(), ActionSelect(), ActionSetOctagon(), ActionSetSquare(), ActionSetViaLayers(), ActionToggleHideName(), ActionUnselect(), add_to_drills(), AddAllRats(), AddNet(), append_drc_violation(), apply_vendor_map(), AutoPlaceSelected(), Benchmark(), BuildObjectList(), ChangeBuriedViasAfterLayerMove(), ChangeElementName(), ChangeFlag(), ChangePolygonClearSize(), ChdirErrorMessage(), check_file_version(), check_unique_accel(), CheckAndOpenFile(), CheckShorts(), ClosePolygon(), CollectSubnets(), config_color_button_create(), config_color_file_set_label(), config_color_load_cb(), config_color_save_cb(), config_colors_tab_create(), config_general_tab_create(), config_increments_tab_create(), config_layers_apply(), config_layers_tab_create(), config_library_tab_create(), config_sizes_tab_create(), ConvertBufferToElement(), create_lib_treeview(), CreateDefaultFont(), CreateNewPin(), CreateNewVia(), describe_location(), dialog_style_changed_cb(), drc_callback(), DRCAll(), DRCFind(), Export(), FinishStroke(), get_menu_filename(), GetFunctionID(), GetInfoString(), GetObjectBoundingBox(), GetUndoSlot(), ghid_attribute_dialog(), ghid_attributes(), ghid_attributes_need_rows(), ghid_calibrate(), ghid_cell_renderer_visibility_class_init(), ghid_command_window_show(), ghid_config_groups_changed(), ghid_config_window_show(), ghid_confirm_dialog(), ghid_coord_entry_popup_cb(), ghid_dialog_close_confirm(), ghid_dialog_confirm(), ghid_dialog_confirm_all(), ghid_dialog_export(), ghid_dialog_file_select_multiple(), ghid_dialog_file_select_open(), ghid_dialog_input(), ghid_dialog_print(), ghid_drc_window_show(), ghid_handle_user_command(), ghid_keyref_window_show(), ghid_library_window_create(), ghid_listener_cb(), ghid_load_menus(), ghid_log_window_create(), ghid_main_menu_real_add_resource(), ghid_netlist_window_create(), ghid_route_style_selector_edit_dialog(), ghid_route_style_selector_new(), ghid_set_cursor_position_labels(), ghid_set_status_line_label(), ghid_text_view_append_strings(), ghid_trackball_constructor(), ghid_violation_renderer_set_property(), ghid_window_set_name_label(), hid_actionv(), hid_parse_actionstring(), hid_register_actions(), HideCrosshair(), hybrid_router(), ImportGUI(), initialize_units(), layer_process(), LayerGroupsChanged(), LayerStringToLayerStack(), lesstif_sizes_reset(), library_window_constructor(), Load(), LoadFootprint(), LoadFootprintByName(), LoadNewlibFootprintsFromDir(), LookupLOConnectionsToLOList(), lpr_do_export(), main(), make_mode_buttons_and_toolbar(), make_progress_dialog(), MirrorBuffer(), MoveArcToLayer(), MoveLineToLayer(), MovePolygonToLayer(), MoveTextToLayer(), Netlist(), nogui_close_confirm_dialog(), NotifyMode(), OpenConnectionDataFile(), OpendirErrorMessage(), OpenErrorMessage(), PanAction(), ParseConnection(), ParseLibraryTree(), pcb_spawnvp(), png_do_export(), PopenErrorMessage(), Popup(), Print(), PrintCalibrate(), process_skips(), ProcNetlist(), ps_calibrate_1(), pv_arc_callback(), pv_line_callback(), pv_pad_callback(), pv_pv_callback(), QueryInputAndChangeObjectName(), ReadEdifNetlist(), ReadNetlist(), real_load_pcb(), Redo(), REGISTER_ACTIONS(), rematch(), Report(), ReportAllNetLengths(), ReportDialog(), ReportDrills(), ReportFoundPins(), ReportNetLength(), ReportNetLengthByName(), RestoreCrosshair(), RestoreUndoSerialNumber(), roar_router(), RotateScreenObject(), RouteAll(), Save(), SaveInTMP(), SeekPad(), selection_changed_cb(), SetMode(), show_file_modified_externally_prompt(), smartdisperse(), SmashBufferElement(), tempfile_unlink(), toporouter_export(), toporouter_free(), toporouter_new(), translate_accelerator(), Undo(), vendorDrillMap(), vendorIsElementMappable(), and yyerror().

#define __FUNCTION1 (   a,
 
)    a ":" #b

Definition at line 131 of file global.h.

#define __FUNCTION2 (   a,
 
)    __FUNCTION1(a,b)

Definition at line 132 of file global.h.

#define ANYLINEFIELDS
Value:
ANYOBJECTFIELDS;                \
        Coord           Thickness,      \
                        Clearance;      \
        PointType       Point1,         \
                        Point2

Definition at line 184 of file global.h.

#define ANYOBJECTFIELDS
Value:
BoxType         BoundingBox;    \
        long int        ID;             \
        FlagType        Flags;          \

Definition at line 177 of file global.h.

#define ATTRIBUTE_UNUSED

Definition at line 986 of file global.h.

#define AUSAGE (   x)    Message (_("Usage:\n%s\n"), _(x##_syntax))

Definition at line 993 of file global.h.

Referenced by Report().

#define C_ (   C,
 
)    S
#define LIKELY (   expr)    (expr)

Definition at line 163 of file global.h.

#define N_ (   S)    S

Definition at line 95 of file global.h.

Referenced by ActionListLayertypes(), ActionSetLayertype(), hid_lpr_init(), and hid_ps_init().

#define PIN_SIZE (   pinptr)
Value:
(TEST_FLAG(HOLEFLAG, (pinptr)) \
                          ? (pinptr)->DrillingHole \
                          : (pinptr)->Thickness)

Definition at line 402 of file global.h.

Referenced by check_point_in_pin(), find_pair_pinline_callback(), find_pairs(), gp_pin_cb(), IsPointOnPin(), pin_sub_callback(), PinLineIntersect(), pv_poly_callback(), SetPinBoundingBox(), and SubtractPin().

#define UNDO_CHANGE2NDSIZE   0x1000

Change 2ndSize of object.

Definition at line 972 of file global.h.

Referenced by AddObjectTo2ndSizeUndoList(), and PerformUndo().

#define UNDO_CHANGEANGLES   0x10000

Change arc angles.

Definition at line 976 of file global.h.

Referenced by AddObjectToChangeAnglesUndoList(), and PerformUndo().

#define UNDO_CHANGECLEARSIZE   0x4000

Change clearance size.

Definition at line 974 of file global.h.

Referenced by AddObjectToClearSizeUndoList(), and PerformUndo().

#define UNDO_CHANGEMASKSIZE   0x8000

Change mask size.

Definition at line 975 of file global.h.

Referenced by AddObjectToMaskSizeUndoList(), and PerformUndo().

#define UNDO_CHANGENAME   0x0001

Change of names.

Definition at line 960 of file global.h.

Referenced by AddObjectToChangeNameUndoList(), ClearUndoList(), GetUndoSlot(), and PerformUndo().

#define UNDO_CHANGESETVIALAYERS   0x100000

Buried data change.

Definition at line 980 of file global.h.

Referenced by AddObjectToSetViaLayersUndoList(), and PerformUndo().

#define UNDO_CHANGESIZE   0x0800

Change size of object.

Definition at line 971 of file global.h.

Referenced by AddObjectToSizeUndoList(), and PerformUndo().

#define UNDO_CLEAR   0x40000

Clear/restore to polygons.

Definition at line 978 of file global.h.

Referenced by AddObjectToClearPolyUndoList(), and PerformUndo().

#define UNDO_CREATE   0x0100

Creation of objects.

Definition at line 968 of file global.h.

Referenced by ActionUndo(), AddObjectToCreateUndoList(), PerformUndo(), and UndoRemove().

#define UNDO_FLAG   0x0400

Toggling SELECTED flag.

Definition at line 970 of file global.h.

Referenced by AddObjectToFlagUndoList(), and PerformUndo().

#define UNDO_INSERT_CONTOUR   0x0040

Inserting a contour from a polygon.

Definition at line 966 of file global.h.

Referenced by AddObjectToInsertContourUndoList(), and PerformUndo().

#define UNDO_INSERT_POINT   0x0010

Inserting polygon/... points.

Definition at line 964 of file global.h.

Referenced by AddObjectToInsertPointUndoList(), PerformUndo(), and UndoRemovePoint().

#define UNDO_LAYERCHANGE   0x20000

Layer new/delete/move.

Definition at line 977 of file global.h.

Referenced by AddLayerChangeToUndoList(), and PerformUndo().

#define UNDO_MIRROR   0x2000

Change side of board.

Definition at line 973 of file global.h.

Referenced by AddObjectToMirrorUndoList(), and PerformUndo().

#define UNDO_MOVE   0x0002

Moving objects.

Definition at line 961 of file global.h.

Referenced by AddObjectToMoveUndoList(), and PerformUndo().

#define UNDO_MOVETOLAYER   0x0200

Moving objects to.

Definition at line 969 of file global.h.

Referenced by AddObjectToMoveToLayerUndoList(), and PerformUndo().

#define UNDO_NETLISTCHANGE   0x80000

Netlist change.

Definition at line 979 of file global.h.

Referenced by AddNetlistLibToUndoList(), and PerformUndo().

#define UNDO_REMOVE   0x0004

Removing objects.

Definition at line 962 of file global.h.

Referenced by ActionUndo(), GetUndoSlot(), MoveObjectToRemoveUndoList(), PerformUndo(), and UndoCopyOrCreate().

#define UNDO_REMOVE_CONTOUR   0x0020

Removing a contour from a polygon.

Definition at line 965 of file global.h.

Referenced by AddObjectToRemoveContourUndoList(), and PerformUndo().

#define UNDO_REMOVE_POINT   0x0008

Removing polygon/... points.

Definition at line 963 of file global.h.

Referenced by AddObjectToRemovePointUndoList(), PerformUndo(), and UndoInsertPoint().

#define UNDO_ROTATE   0x0080

Rotations.

Definition at line 967 of file global.h.

Referenced by AddObjectToRotateUndoList(), and PerformUndo().

#define UNLIKELY (   expr)    (expr)

Definition at line 164 of file global.h.

Referenced by __r_insert_node(), contour_bounds_touch(), and M_POLYAREA_intersect().


Typedef Documentation

typedef double Angle

Degrees.

Definition at line 79 of file global.h.

Definition at line 73 of file global.h.

typedef struct BoxType BoxType

Definition at line 67 of file global.h.

typedef unsigned char BYTE

Definition at line 116 of file global.h.

typedef unsigned int Cardinal

Definition at line 110 of file global.h.

typedef COORD_TYPE Coord

pcb base unit.

Definition at line 78 of file global.h.

typedef short Dimension

Definition at line 114 of file global.h.

Definition at line 71 of file global.h.

typedef struct increments Increments

Definition at line 76 of file global.h.

typedef struct pad_st PadType

Definition at line 69 of file global.h.

typedef struct PCBType PCBType

The PCBType struct holds information about board layout most of which is saved with the layout.

A new PCB layout struct is first initialized with values from the user configurable Settings struct and then reset to the saved layout values when a layout is loaded.

This struct is also used for the remove list and for buffer handling.

typedef struct pin_st PinType

Definition at line 70 of file global.h.

typedef struct polygon_st PolygonType

Definition at line 68 of file global.h.

typedef short Position

Definition at line 113 of file global.h.

typedef struct rtree rtree_t

Definition at line 72 of file global.h.

typedef char* String

Definition at line 112 of file global.h.

typedef struct unit Unit

Definition at line 75 of file global.h.


Enumeration Type Documentation

Enumerator:
Basic_Crosshair_Shape 

4-ray.

Union_Jack_Crosshair_Shape 

8-ray.

Dozen_Crosshair_Shape 

12-ray.

Crosshair_Shapes_Number 

Definition at line 697 of file global.h.


Variable Documentation

char* bindir

The dir in which PCB installation was found.

Definition at line 1680 of file main.c.

Referenced by InitPaths(), pcb_main_uninit(), and REGISTER_FLAGS().

char* exec_prefix

Definition at line 1681 of file main.c.

Referenced by hid_init(), InitPaths(), and pcb_main_uninit().

char* pcblibdir

The system M4 fp directory.

Definition at line 1682 of file main.c.

Referenced by hid_load_settings(), InitPaths(), load_rc_files(), and pcb_main_uninit().

char* pcblibpath

The search path for M4 fps.

Definition at line 1683 of file main.c.

Referenced by InitPaths().

char* pcbtreedir

The system newlib fp directory.

Definition at line 1684 of file main.c.

Referenced by InitPaths().

char* pcbtreepath

The search path for newlib fps.

Definition at line 1685 of file main.c.

Referenced by InitPaths().