Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 25602) +++ trunk/scconfig/Rev.h (revision 25603) @@ -1 +1 @@ -static const int myrev = 25463; +static const int myrev = 25603; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 25602) +++ trunk/scconfig/Rev.tab (revision 25603) @@ -1,3 +1,4 @@ +25603 configure infrastructure for extended objects 25463 configure new library window (DAD based) 25436 configure remove plugin lib_legacy_func 25418 configure remove obsolete menufiles from the install Index: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 25602) +++ trunk/src/Makefile.in (revision 25603) @@ -141,6 +141,7 @@ data.o draw.o drc.o + extobj.o font.o font_act.o file_act.o Index: trunk/src/extobj.c =================================================================== --- trunk/src/extobj.c (nonexistent) +++ trunk/src/extobj.c (revision 25603) @@ -0,0 +1,49 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2019 Tibor 'Igor2' Palinkas + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#include "config.h" + +#include +#include + +#include "extobj.h" + + +vtp0_t extobj_i2o; /* extobj_idx -> (pcb_ext_obj_t *) */ +htsi_t extobj_n2i; /* extobj name -> index */ + + +void pcb_extobj_init(void) +{ + +} + + +void pcb_extobj_uninit(void) +{ + +} + Index: trunk/src/extobj.h =================================================================== --- trunk/src/extobj.h (nonexistent) +++ trunk/src/extobj.h (revision 25603) @@ -0,0 +1,40 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2019 Tibor 'Igor2' Palinkas + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#ifndef PCB_EXT_OBJ_H +#define PCB_EXT_OBJ_H + +#include "obj_common.h" +#include "draw.h" + +struct pcb_ext_obj_s { + void (*draw)(pcb_draw_info_t *info, pcb_any_obj_t *obj); +}; + +void pcb_extobj_init(void); +void pcb_extobj_uninit(void); + +#endif Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 25602) +++ trunk/src/main.c (revision 25603) @@ -71,6 +71,7 @@ #include "tool.h" #include "color.h" #include "netlist2.h" +#include "extobj.h" #include "actions.h" #include "actions_pcb.h" @@ -311,6 +312,7 @@ pcb_cli_uninit(); pcb_dynflag_uninit(); + pcb_extobj_uninit(); pcb_import_uninit(); pcb_io_uninit(); pcb_fp_uninit(); @@ -447,6 +449,7 @@ /* Minimal conf setup before we do anything else */ pcb_netlist_geo_init(); pcb_minuid_init(); + pcb_extobj_init(); pcb_hidlib_init1(conf_core_init); pcb_layer_vis_init(); pcb_brave_init(); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 25602) +++ trunk/src/obj_common.c (revision 25603) @@ -155,6 +155,9 @@ if (inv != NULL) pcb_message(PCB_MSG_ERROR, "Invalid character '%c' in terminal name (term attribute) '%s'\n", *inv, obj->term); } + else if (strcmp(name, "extobj") == 0) { + obj->extobj = value; + } else if (strcmp(name, "intconn") == 0) { long cid = 0; if (value != NULL) { Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 25602) +++ trunk/src/obj_common.h (revision 25603) @@ -185,6 +185,8 @@ #define PCB_ANY_PRIMITIVE_FIELDS \ PCB_ANY_OBJ_FIELDS; \ const char *term; \ + const char *extobj; \ + unsigned int extobj_idx; \ void *ratconn; \ unsigned char thermal; \ unsigned char intconn, intnoconn; \