Index: trunk/doc/developer/renames =================================================================== --- trunk/doc/developer/renames (revision 15880) +++ trunk/doc/developer/renames (revision 15881) @@ -1756,3 +1756,4 @@ PCB_TYPEMASK_ALL -> PCB_OBJ_ANY PCB_OBJ_RATLINE -> PCB_OBJ_RAT PCB_OBJ_SUBC_FLOATER -> PCB_OBJ_FLOATER +PCB_TYPEMASK_ -> PCB_OBJ_CLASS_ Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 15880) +++ trunk/src/change_act.c (revision 15881) @@ -436,7 +436,7 @@ case F_Selected: case F_SelectedObjects: - if (pcb_chg_selected_2nd_size(PCB_TYPEMASK_PIN, value, absolute)) + if (pcb_chg_selected_2nd_size(PCB_OBJ_CLASS_PIN, value, absolute)) pcb_board_set_changed_flag(pcb_true); break; } Index: trunk/src/flag_str.c =================================================================== --- trunk/src/flag_str.c (revision 15880) +++ trunk/src/flag_str.c (revision 15881) @@ -63,7 +63,7 @@ {FN(PCB_FLAG_PIN), N("pin"), PCB_OBJ_ANY, "If set, this object is a pin. This flag is for internal use only." }, {FN(PCB_FLAG_VIA), N("via"), PCB_OBJ_ANY, "If set, this object is a via. This flag is for internal use only." }, {FN(PCB_FLAG_FOUND), N("found"), PCB_OBJ_ANY, "If set, this object has been found by FindConnection()" }, - {FN(PCB_FLAG_HOLE), N("hole"), PCB_TYPEMASK_PIN, "For pins and vias, this flag means that the pin or via is a hole without a copper annulus." }, + {FN(PCB_FLAG_HOLE), N("hole"), PCB_OBJ_CLASS_PIN, "For pins and vias, this flag means that the pin or via is a hole without a copper annulus." }, {FN(PCB_FLAG_RAT), N("rat"), PCB_OBJ_RAT, "If set for a line, indicates that this line is a rat line instead of a copper trace." }, {FN(PCB_FLAG_PININPOLY), N("pininpoly"), 0, "For pins and pads, this flag is used internally to indicate that the pin or pad overlaps a polygon on some layer." }, {FN(PCB_FLAG_CLEARPOLY), N("clearpoly"), PCB_OBJ_POLY, "For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. " }, @@ -75,8 +75,8 @@ {FN(PCB_FLAG_AUTO), N("auto"), PCB_OBJ_ANY, "For lines and vias, indicates that these were created by the autorouter."}, {FN(PCB_FLAG_SQUARE), N("square"), 0, "For pins and pads, indicates a square (vs round) pin/pad."}, {FN(PCB_FLAG_RUBBEREND), N("rubberend"), PCB_OBJ_LINE | PCB_OBJ_ARC, "For lines, used internally for rubber band moves: indicates one end already rubber banding."}, - {FN(PCB_FLAG_WARN), N("warn"), PCB_TYPEMASK_PIN, "For pins, vias, and pads, set to indicate a warning."}, - {FN(PCB_FLAG_USETHERMAL), N("usetherm"), PCB_TYPEMASK_PIN | PCB_OBJ_LINE | PCB_OBJ_ARC, "Obsolete, indicates that pins/vias should be drawn with thermal fingers."}, + {FN(PCB_FLAG_WARN), N("warn"), PCB_OBJ_CLASS_PIN, "For pins, vias, and pads, set to indicate a warning."}, + {FN(PCB_FLAG_USETHERMAL), N("usetherm"), PCB_OBJ_CLASS_PIN | PCB_OBJ_LINE | PCB_OBJ_ARC, "Obsolete, indicates that pins/vias should be drawn with thermal fingers."}, {FN(PCB_FLAG_OCTAGON), N("octagon"), 0, "Draw pins and vias as octagons." }, {FN(PCB_FLAG_DRC), N("drc"), PCB_OBJ_ANY, "Set for objects that fail DRC: flag like FOUND flag for DRC checking."}, {FN(PCB_FLAG_LOCK), N("lock"), PCB_OBJ_ANY, "Set for locked objects."}, Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 15880) +++ trunk/src/obj_common.h (revision 15881) @@ -67,17 +67,17 @@ /* combinations, groups, masks of pcb_objtype_t */ typedef enum pcb_objmask_e { + /* lists */ + PCB_OBJ_CLASS_PIN = (PCB_OBJ_PSTK | PCB_OBJ_SUBC_PART), + PCB_OBJ_CLASS_TERM = (PCB_OBJ_CLASS_PIN | PCB_OBJ_SUBC_PART | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_POLY | PCB_OBJ_TEXT), + PCB_OBJ_CLASS_LOCK = (PCB_OBJ_PSTK | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_POLY | PCB_OBJ_SUBC | PCB_OBJ_TEXT | PCB_OBJ_LOCKED), + + /* masks */ PCB_OBJ_CLASS_REAL = 0x0000FFF, /* global and on-layer objects (but not abstract things like layers) */ PCB_OBJ_CLASS_HOST = 0x00FF000, /* host types: layers, boards, nets */ PCB_OBJ_CLASS_MASK = 0xFF00000, /* for virtual searches */ PCB_OBJ_CLASS_OBJ = 0x0000000, /* anything with common object fields (pcb_any_obj_t) */ - PCB_OBJ_ANY = 0xFFFFFFF, - -/* TODO: rename these */ - PCB_TYPEMASK_PIN = (PCB_OBJ_PSTK | PCB_OBJ_SUBC_PART), - PCB_TYPEMASK_TERM = (PCB_TYPEMASK_PIN | PCB_OBJ_SUBC_PART | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_POLY | PCB_OBJ_TEXT), - PCB_TYPEMASK_LOCK = (PCB_OBJ_PSTK | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_POLY | PCB_OBJ_SUBC | PCB_OBJ_TEXT | PCB_OBJ_LOCKED) - + PCB_OBJ_ANY = 0xFFFFFFF } pcb_objmask_t; Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 15880) +++ trunk/src/obj_line.c (revision 15881) @@ -683,7 +683,7 @@ sb.X2 = newone->Point1.X + newone->Thickness / 2; sb.Y1 = newone->Point1.Y - newone->Thickness / 2; sb.Y2 = newone->Point1.Y + newone->Thickness / 2; - if ((pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, + if ((pcb_search_obj_by_location(PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3, newone->Point1.X, newone->Point1.Y, conf_core.design.via_thickness / 2) == PCB_OBJ_VOID)) { info.X = newone->Point1.X; info.Y = newone->Point1.Y; @@ -695,7 +695,7 @@ sb.X2 = newone->Point2.X + newone->Thickness / 2; sb.Y1 = newone->Point2.Y - newone->Thickness / 2; sb.Y2 = newone->Point2.Y + newone->Thickness / 2; - if ((pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, + if ((pcb_search_obj_by_location(PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3, newone->Point2.X, newone->Point2.Y, conf_core.design.via_thickness / 2) == PCB_OBJ_VOID)) { info.X = newone->Point2.X; info.Y = newone->Point2.Y; Index: trunk/src/tool_line.c =================================================================== --- trunk/src/tool_line.c (revision 15880) +++ trunk/src/tool_line.c (revision 15881) @@ -140,7 +140,7 @@ isn't a pin already here */ if (conf_core.editor.auto_via && PCB->ViaOn && pcb_layer_get_group_(CURRENT) != pcb_layer_get_group_(last_layer) - && pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, + && pcb_search_obj_by_location(PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, conf_core.design.via_thickness / 2) == @@ -234,7 +234,7 @@ && (pcb_layer_flags_(CURRENT) & PCB_LYT_COPPER) && (pcb_layer_flags_(last_layer) & PCB_LYT_COPPER) && (!PCB->is_footprint) - && pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, + && pcb_search_obj_by_location(PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, conf_core.design.via_thickness / 2) == PCB_OBJ_VOID Index: trunk/src/tool_lock.c =================================================================== --- trunk/src/tool_lock.c (revision 15880) +++ trunk/src/tool_lock.c (revision 15881) @@ -49,7 +49,7 @@ void *ptr1, *ptr2, *ptr3; int type; - type = pcb_search_screen(pcb_tool_note.X, pcb_tool_note.Y, PCB_TYPEMASK_LOCK, &ptr1, &ptr2, &ptr3); + type = pcb_search_screen(pcb_tool_note.X, pcb_tool_note.Y, PCB_OBJ_CLASS_LOCK, &ptr1, &ptr2, &ptr3); if (type == PCB_OBJ_SUBC) { pcb_subc_t *subc = (pcb_subc_t *)ptr2; Index: trunk/src/tool_thermal.c =================================================================== --- trunk/src/tool_thermal.c (revision 15880) +++ trunk/src/tool_thermal.c (revision 15881) @@ -94,7 +94,7 @@ void *ptr1, *ptr2, *ptr3; int type; - if (((type = pcb_search_screen(pcb_tool_note.X, pcb_tool_note.Y, PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) + if (((type = pcb_search_screen(pcb_tool_note.X, pcb_tool_note.Y, PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) && !PCB_FLAG_TEST(PCB_FLAG_HOLE, (pcb_any_obj_t *) ptr3)) { if (type == PCB_OBJ_PSTK) pcb_tool_thermal_on_pstk((pcb_pstk_t *)ptr2, INDEXOFCURRENT); Index: trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 15880) +++ trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 15881) @@ -57,7 +57,7 @@ /* check if there are any pins or pads at that position */ - type = pcb_search_obj_by_location(PCB_TYPEMASK_TERM, &ptr1, &ptr2, &ptr3, X, Y, Range); + type = pcb_search_obj_by_location(PCB_OBJ_CLASS_TERM, &ptr1, &ptr2, &ptr3, X, Y, Range); if (type == PCB_OBJ_VOID) return NULL; Index: trunk/tests/strflags/tester.c =================================================================== --- trunk/tests/strflags/tester.c (revision 15880) +++ trunk/tests/strflags/tester.c (revision 15881) @@ -91,7 +91,7 @@ PCB_FLAG_SET(pcb_object_flagbits[i].mask, &fh); } - if (otype & PCB_TYPEMASK_PIN) + if (otype & PCB_OBJ_CLASS_PIN) for (i = 0; i < PCB_MAX_LAYER; i++) if (random() & 4) PCB_FLAG_THERM_ASSIGN(i, 3, &fh);