Index: trunk/src/event.h =================================================================== --- trunk/src/event.h (revision 5480) +++ trunk/src/event.h (revision 5481) @@ -39,6 +39,8 @@ PCB_EVENT_LAYERS_CHANGED, /* called after layers or layer groups change (used to be the LayersChanged action) */ PCB_EVENT_LIBRARY_CHANGED, /* called after a change in the footprint lib (used to be the LibraryChanged action) */ + PCB_EVENT_BUSY, /* called before CPU-intensive task begins */ + PCB_EVENT_RUBBER_RESET, /* rubber band: reset attached */ PCB_EVENT_RUBBER_REMOVE_ELEMENT, /* rubber band: removed an element with rubber bands attached */ PCB_EVENT_RUBBER_MOVE, /* rubber band: object moved */ Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 5480) +++ trunk/src/hid.h (revision 5481) @@ -96,7 +96,6 @@ /* Note that PCB expects the gui to provide the following actions: LibraryChanged() - Busy() */ /* File Watch flags */ Index: trunk/src_plugins/autoplace/action.c =================================================================== --- trunk/src_plugins/autoplace/action.c (revision 5480) +++ trunk/src_plugins/autoplace/action.c (revision 5481) @@ -31,6 +31,7 @@ #include "hid_actions.h" #include "compat_nls.h" #include "board.h" +#include "event.h" static const char autoplace_syntax[] = "AutoPlaceSelected()"; @@ -45,7 +46,7 @@ static int pcb_act_AutoPlaceSelected(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - pcb_hid_action("Busy"); + pcb_event(PCB_EVENT_BUSY, NULL); if (pcb_gui->confirm_dialog(_("Auto-placement can NOT be undone.\n" "Do you want to continue anyway?\n"), 0)) { if (AutoPlaceSelected()) pcb_board_set_changed_flag(pcb_true); Index: trunk/src_plugins/autoroute/action.c =================================================================== --- trunk/src_plugins/autoroute/action.c (revision 5480) +++ trunk/src_plugins/autoroute/action.c (revision 5481) @@ -30,6 +30,7 @@ #include "action_helper.h" #include "plugins.h" #include "hid_actions.h" +#include "event.h" /* action routines for the autorouter */ @@ -64,7 +65,7 @@ static int pcb_act_AutoRoute(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { const char *function = PCB_ACTION_ARG(0); - pcb_hid_action("Busy"); + pcb_event(PCB_EVENT_BUSY, NULL); if (function) { /* one parameter */ if (strcmp(function, "AllRats") == 0) { if (AutoRoute(pcb_false)) Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 5480) +++ trunk/src_plugins/djopt/djopt.c (revision 5481) @@ -48,6 +48,7 @@ #include "djopt_conf.h" #include "obj_line.h" #include "obj_pinvia.h" +#include "event.h" conf_djopt_t conf_djopt; @@ -2553,7 +2554,7 @@ SwitchDrawingWindow(PCB->Zoom, Output.drawing_area->window, conf_core.editor.show_solder_side, pcb_false); #endif - pcb_hid_action("Busy"); + pcb_event(PCB_EVENT_BUSY, NULL); lines = 0; corners = 0; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 5480) +++ trunk/src_plugins/hid_batch/batch.c (revision 5481) @@ -50,11 +50,6 @@ } } -static int nop(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) -{ - return 0; -} - static void ev_pcb_changed(void *user_data, int argc, pcb_event_arg_t argv[]) { if (prompt != NULL) @@ -101,8 +96,6 @@ } pcb_hid_action_t batch_action_list[] = { - {"Busy", 0, nop} - , {"Help", 0, help} , {"Info", 0, info} Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 5480) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 5481) @@ -1925,10 +1925,9 @@ /* ------------------------------------------------------------ */ -static int Busy(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static void ghid_Busy(void *user_data, int argc, pcb_event_arg_t argv[]) { ghid_watch_cursor(); - return 0; } pcb_hid_action_t ghid_main_action_list[] = { @@ -1936,8 +1935,6 @@ , {"Benchmark", 0, Benchmark} , - {"Busy", 0, Busy} - , {"Center", N_("Click on a location to center"), Center, center_help, center_syntax} , {"Command", 0, Command} @@ -2148,6 +2145,7 @@ pcb_event_bind(PCB_EVENT_NETLIST_CHANGED, GhidNetlistChanged, NULL, ghid_cookie); pcb_event_bind(PCB_EVENT_ROUTE_STYLES_CHANGED, RouteStylesChanged, NULL, ghid_cookie); pcb_event_bind(PCB_EVENT_LAYERS_CHANGED, ghid_LayersChanged, NULL, ghid_cookie); + pcb_event_bind(PCB_EVENT_BUSY, ghid_Busy, NULL, ghid_cookie); return hid_hid_gtk_uninit; } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 5480) +++ trunk/src_plugins/hid_lesstif/main.c (revision 5481) @@ -309,7 +309,7 @@ /* Called from the core when it's busy doing something and we need to indicate that to the user. */ -static int Busy(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static void LesstifBusy(void *user_data, int argc, pcb_event_arg_t argv[]) { static Cursor busy_cursor = 0; if (busy_cursor == 0) @@ -317,7 +317,7 @@ XDefineCursor(display, window, busy_cursor); XFlush(display); old_cursor_mode = -1; - return 0; + return; } /* ---------------------------------------------------------------------- */ @@ -898,8 +898,6 @@ , {"Center", "Click on a location to center", Center} , - {"Busy", 0, Busy} - , {"Cursor", 0, CursorAction, cursor_help, cursor_syntax} , @@ -3844,6 +3842,7 @@ pcb_event_bind(PCB_EVENT_ROUTE_STYLES_CHANGED, LesstifRouteStylesChanged, NULL, lesstif_cookie); pcb_event_bind(PCB_EVENT_LAYERS_CHANGED, LesstifLayersChanged, NULL, lesstif_cookie); pcb_event_bind(PCB_EVENT_LIBRARY_CHANGED, LesstifLibraryChanged, NULL, lesstif_cookie); + pcb_event_bind(PCB_EVENT_BUSY, LesstifBusy, NULL, lesstif_cookie); pcb_hid_register_hid(&lesstif_hid); Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 5480) +++ trunk/src_plugins/hid_remote/remote.c (revision 5481) @@ -36,11 +36,6 @@ /* ----------------------------------------------------------------------------- */ -static int nop(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) -{ - return 0; -} - static void ev_pcb_changed(void *user_data, int argc, pcb_event_arg_t argv[]) { } @@ -57,8 +52,6 @@ } pcb_hid_action_t remote_action_list[] = { - {"Busy", 0, nop} - , {"Help", 0, help} , {"Info", 0, info} Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 5480) +++ trunk/src_plugins/jostle/jostle.c (revision 5481) @@ -37,6 +37,7 @@ #include "conf_core.h" #include "misc_util.h" #include "obj_line.h" +#include "event.h" /*#define DEBUG_pcb_polyarea_t*/ @@ -115,7 +116,7 @@ } } while ((p = p->f) != s); ddraw->flush_debug_draw(); - pcb_hid_action("Busy"); + pcb_event(PCB_EVENT_BUSY, NULL); sleep(3); ddraw->finish_debug_draw(); } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 5480) +++ trunk/src_plugins/vendordrill/vendor.c (revision 5481) @@ -48,6 +48,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "obj_pinvia.h" +#include "event.h" #include #include @@ -105,7 +106,7 @@ int pcb_act_ApplyVendor(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - pcb_hid_action("Busy"); + pcb_event(PCB_EVENT_BUSY, NULL); apply_vendor_map(); return 0; }