Index: trunk/src/libcschem/extobj.h =================================================================== --- trunk/src/libcschem/extobj.h (revision 11143) +++ trunk/src/libcschem/extobj.h (revision 11144) @@ -39,9 +39,36 @@ void csch_extobj_impl_unreg(const csch_extobj_impl_t *impl); +/* Force re-reder the object (if it is an ext-object); safe to call on any cgrp */ +RND_INLINE void csch_extobj_update(csch_cgrp_t *grp); +/* let extobj decide if an update is needed (and do the update); safe to call + on any cgrp */ +RND_INLINE void csch_extrobj_attr_edit_pre(csch_cgrp_t *grp, const char *key); +RND_INLINE void csch_extrobj_attr_edit_post(csch_cgrp_t *grp, const char *key); + + /* internal, do not call */ void csch_extobj_init(void); void csch_extobj_uninit(void); const csch_extobj_impl_t *csch_extobj_lookup(const char *name); +/*** implementation ***/ +RND_INLINE void csch_extobj_update(csch_cgrp_t *grp) +{ + if ((grp->extobj != NULL) && (grp->extobj->update != NULL)) + grp->extobj->update(grp); +} + +RND_INLINE void csch_extrobj_attr_edit_pre(csch_cgrp_t *grp, const char *key) +{ + if ((grp->extobj != NULL) && (grp->extobj->attr_edit_pre != NULL)) + grp->extobj->attr_edit_pre(grp, key); +} + +RND_INLINE void csch_extrobj_attr_edit_post(csch_cgrp_t *grp, const char *key) +{ + if ((grp->extobj != NULL) && (grp->extobj->attr_edit_post != NULL)) + grp->extobj->attr_edit_post(grp, key); +} +