Index: trunk/src/event.h =================================================================== --- trunk/src/event.h (revision 37084) +++ trunk/src/event.h (revision 37085) @@ -29,38 +29,42 @@ #include +/* Prefix: + [d]: per-design: generated for a specific rnd_design_t + [a]: per-app: generated once, not targeted or specific for a rnd_design_t +*/ enum { PCB_EVENT_NEW_PSTK = RND_EVENT_app, /* called when a new padstack is created */ - PCB_EVENT_ROUTE_STYLES_CHANGED, /* called after any route style change (used to be the RouteStylesChanged action) */ - PCB_EVENT_NETLIST_CHANGED, /* called after any netlist change (used to be the NetlistChanged action) */ - PCB_EVENT_LAYERS_CHANGED, /* called after layers or layer groups change (used to be the LayersChanged action) */ - PCB_EVENT_LAYER_CHANGED_GRP, /* called after a layer changed its group; argument: layer pointer */ - PCB_EVENT_LAYERVIS_CHANGED, /* called after the visibility of layers has changed */ - PCB_EVENT_LIBRARY_CHANGED, /* called after a change in the footprint lib (used to be the LibraryChanged action) */ - PCB_EVENT_FONT_CHANGED, /* called when a font has changed; argument is the font ID */ - PCB_EVENT_BOARD_EDITED, /* called after any edit on the board */ + PCB_EVENT_ROUTE_STYLES_CHANGED, /* [d] called after any route style change (used to be the RouteStylesChanged action) */ + PCB_EVENT_NETLIST_CHANGED, /* [d] called after any netlist change (used to be the NetlistChanged action) */ + PCB_EVENT_LAYERS_CHANGED, /* [d] called after layers or layer groups change (used to be the LayersChanged action) */ + PCB_EVENT_LAYER_CHANGED_GRP, /* [d] called after a layer changed its group; argument: layer pointer */ + PCB_EVENT_LAYERVIS_CHANGED, /* [d] called after the visibility of layers has changed */ + PCB_EVENT_LIBRARY_CHANGED, /* [d] called after a change in the footprint lib (used to be the LibraryChanged action) */ + PCB_EVENT_FONT_CHANGED, /* [d] called when a font has changed; argument is the font ID */ + PCB_EVENT_BOARD_EDITED, /* [d] called after any edit on the board */ - PCB_EVENT_UNDO_POST, /* called after an undo/redo operation; argument is an integer pcb_undo_ev_t */ + PCB_EVENT_UNDO_POST, /* [d] called after an undo/redo operation; argument is an integer pcb_undo_ev_t */ - PCB_EVENT_RUBBER_RESET, /* rubber band: reset attached */ - PCB_EVENT_RUBBER_MOVE, /* rubber band: object moved */ - PCB_EVENT_RUBBER_MOVE_DRAW, /* rubber band: draw crosshair-attached rubber band objects after a move or copy */ - PCB_EVENT_RUBBER_ROTATE90, /* rubber band: crosshair object rotated by 90 degrees */ - PCB_EVENT_RUBBER_ROTATE, /* rubber band: crosshair object rotated by arbitrary angle */ - PCB_EVENT_RUBBER_LOOKUP_LINES, /* rubber band: attach rubber banded line objects to crosshair */ - PCB_EVENT_RUBBER_LOOKUP_RATS, /* rubber band: attach rubber banded rat lines objects to crosshair */ - PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, /* rubber band: adapt main line to keep rubberband lines direction */ + PCB_EVENT_RUBBER_RESET, /* [d] rubber band: reset attached */ + PCB_EVENT_RUBBER_MOVE, /* [d] rubber band: object moved */ + PCB_EVENT_RUBBER_MOVE_DRAW, /* [d] rubber band: draw crosshair-attached rubber band objects after a move or copy */ + PCB_EVENT_RUBBER_ROTATE90, /* [d] rubber band: crosshair object rotated by 90 degrees */ + PCB_EVENT_RUBBER_ROTATE, /* [d] rubber band: crosshair object rotated by arbitrary angle */ + PCB_EVENT_RUBBER_LOOKUP_LINES, /* [d] rubber band: attach rubber banded line objects to crosshair */ + PCB_EVENT_RUBBER_LOOKUP_RATS, /* [d] rubber band: attach rubber banded rat lines objects to crosshair */ + PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, /* [d] rubber band: adapt main line to keep rubberband lines direction */ - PCB_EVENT_DRAW_CROSSHAIR_CHATT, /* called from crosshair code upon attached object recalculation; event handlers can use this hook to enforce various geometric restrictions */ + PCB_EVENT_DRAW_CROSSHAIR_CHATT, /* [d] called from crosshair code upon attached object recalculation; event handlers can use this hook to enforce various geometric restrictions */ - PCB_EVENT_DRC_RUN, /* called from core to run all configured DRCs (implemented in plugins). Args: (int *) that each DRC plugin shall increase if it did any check */ + PCB_EVENT_DRC_RUN, /* [d] called from core to run all configured DRCs (implemented in plugins). Args: (int *) that each DRC plugin shall increase if it did any check */ - PCB_EVENT_NET_INDICATE_SHORT, /* called by core to get a shortcircuit indicated (e.g. by mincut). Args: (pcb_net_t *net, pcb_any_obj_t *offending_term, pcb_net_t *offending_net, int *handled, int *cancel) - if *handled is non-zero, the short is already indicated; if *cancel is non-zero the whole process is cancelled, no more advanced short checking should take place in this session */ + PCB_EVENT_NET_INDICATE_SHORT, /* [d] called by core to get a shortcircuit indicated (e.g. by mincut). Args: (pcb_net_t *net, pcb_any_obj_t *offending_term, pcb_net_t *offending_net, int *handled, int *cancel) - if *handled is non-zero, the short is already indicated; if *cancel is non-zero the whole process is cancelled, no more advanced short checking should take place in this session */ - PCB_EVENT_LAYER_KEY_CHANGE, /* called by core if a pcb-rnd::key::* attribute on a layer changes */ + PCB_EVENT_LAYER_KEY_CHANGE, /* [d] called by core if a pcb-rnd::key::* attribute on a layer changes */ - PCB_EVENT_CROSSHAIR_NEW_POS, /* called when the crosshair is moved to a new position; screen indications may need to be updated; args: (pcb_crosshair_t *), pcb_coord_t oldx, pcb_coord_t oldy */ + PCB_EVENT_CROSSHAIR_NEW_POS, /* [d] called when the crosshair is moved to a new position; screen indications may need to be updated; args: (pcb_crosshair_t *), pcb_coord_t oldx, pcb_coord_t oldy */ PCB_EVENT_last /* not a real event */ };