Index: layer.h =================================================================== --- layer.h (revision 19102) +++ layer.h (revision 19103) @@ -115,6 +115,8 @@ const char *name; /* layer name */ pcb_layer_combining_t comb; /* how to combine this layer with other layers in the group */ + char *purpose; /* what a doc/mech layer is used for */ + int purpi; /* integer version of purpose from the funtion hash (cache) */ /* for bound layers these point to the board layer's*/ pcb_rtree_t *line_tree, *text_tree, *polygon_tree, *arc_tree; @@ -268,7 +270,12 @@ int pcb_layer_rename_(pcb_layer_t *Layer, char *Name); int pcb_layer_recolor_(pcb_layer_t *Layer, char *color); +/* Change the purpose field and recalc purpi (not undoable) */ +int pcb_layer_set_purpose__(pcb_layer_t *ly, char *purpose); /* no strdup, no event */ +int pcb_layer_set_purpose_(pcb_layer_t *ly, char *purpose); /* no strdup, send layer change event */ +int pcb_layer_set_purpose(pcb_layer_t *ly, const char *purpose); /* strdup, send event */ + /* index is 0..PCB_MAX_LAYER-1. If old_index is -1, a new layer is inserted at that index. If new_index is -1, the specified layer is deleted. Returns non-zero on error, zero if OK. */