Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 30966) +++ trunk/src/board.c (revision 30967) @@ -167,7 +167,7 @@ } if (pcb == PCB) - pcb_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); return 0; } @@ -375,7 +375,7 @@ PCB->Changed = New; if (old != New) - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_META_CHANGED, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_META_CHANGED, NULL); } @@ -383,7 +383,7 @@ { if ((pcb_gui != NULL) && (pcb_gui->set_hidlib != NULL)) pcb_gui->set_hidlib(pcb_gui, &PCB->hidlib); - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_CHANGED, "i", reverted); + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_CHANGED, "i", reverted); } int pcb_board_normalize(pcb_board_t *pcb) Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 30966) +++ trunk/src/board.h (revision 30967) @@ -164,7 +164,7 @@ /* sets or resets changed flag and redraws status */ void pcb_board_set_changed_flag(rnd_bool New); -/* Shorthand for emitting a board changed event (PCB_EVENT_BOARD_CHANGED) */ +/* Shorthand for emitting a board changed event (RND_EVENT_BOARD_CHANGED) */ void pcb_board_changed(int reverted); Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 30966) +++ trunk/src/change_act.c (revision 30967) @@ -776,7 +776,7 @@ case F_LineSize: case F_Line: pcb_board_set_line_width(absolute ? value : value + conf_core.design.line_thickness); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); break; case F_Text: Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 30966) +++ trunk/src/crosshair.c (revision 30967) @@ -280,8 +280,8 @@ memcpy(&line, (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2, sizeof(line)); if(conf_core.editor.rubber_band_keep_midlinedir) - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, "pppppp", &line, &constrained, &dx1, &dy1, &dx2, &dy2); - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", constrained, dx1, dy1, dx2, dy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, "pppppp", &line, &constrained, &dx1, &dy1, &dx2, &dy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", constrained, dx1, dy1, dx2, dy2); event_sent = 1; @@ -310,7 +310,7 @@ { /* Make a temporary arc and move it by dx,dy */ pcb_arc_t arc = *((pcb_arc_t *) pcb_crosshair.AttachedObject.Ptr2); - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", 0, dx, dy, dx, dy); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", 0, dx, dy, dx, dy); event_sent = 1; arc.X += dx; @@ -437,7 +437,7 @@ pcb_arc_get_end(&arc,0, &nx1, &ny1); pcb_arc_get_end(&arc,1, &nx2, &ny2); - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", 0, nx1-ox1,ny1-oy1,nx2-ox2,ny2-oy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icccc", 0, nx1-ox1,ny1-oy1,nx2-ox2,ny2-oy2); event_sent = 1; break; } @@ -483,7 +483,7 @@ } if(!event_sent) - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icc", 0, dx, dy ); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icc", 0, dx, dy ); } void pcbhl_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) @@ -1052,7 +1052,7 @@ } /* allocate GC only when the GUI is already up and running */ -static void pcb_crosshair_gui_init(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_crosshair_gui_init(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_crosshair.GC = pcb_hid_make_gc(); @@ -1079,7 +1079,7 @@ pcb_route_init(&pcb_crosshair.Route); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_crosshair_gui_init, NULL, crosshair_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_crosshair_gui_init, NULL, crosshair_cookie); } void pcb_crosshair_pre_init(void) @@ -1094,7 +1094,7 @@ pcb_route_destroy(&pcb_crosshair.Route); if (pcb_render != NULL) pcb_hid_destroy_gc(pcb_crosshair.GC); - pcb_event_unbind_allcookie(crosshair_cookie); + rnd_event_unbind_allcookie(crosshair_cookie); } void pcb_crosshair_set_local_ref(rnd_coord_t X, rnd_coord_t Y, rnd_bool Showing) @@ -1125,7 +1125,7 @@ if (pcb_crosshair_move_absolute(ev_x, ev_y)) { /* update object position and cursor location */ pcb_tool_adjust_attached(&PCB->hidlib); - pcb_event(&PCB->hidlib, PCB_EVENT_DRAW_CROSSHAIR_CHATT, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_DRAW_CROSSHAIR_CHATT, NULL); pcb_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); } } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 30966) +++ trunk/src/draw.c (revision 30967) @@ -288,7 +288,7 @@ pcb_draw_pstk_marks(info); } - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_DRAW_OVERLAY_XOR, "p", &pcb_draw_out.fgGC, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_DRAW_OVERLAY_XOR, "p", &pcb_draw_out.fgGC, NULL); pcb_hid_set_draw_xor(pcb_draw_out.fgGC, 0); pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); Index: trunk/src/drc.c =================================================================== --- trunk/src/drc.c (revision 30966) +++ trunk/src/drc.c (revision 30967) @@ -152,7 +152,7 @@ void pcb_drc_all(void) { pcb_view_list_free_fields(&pcb_drc_lst); - pcb_event(&PCB->hidlib, PCB_EVENT_DRC_RUN, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_DRC_RUN, NULL); } static const char pcb_acts_DRC[] = "DRC([list|simple|print|log|dump])"; Index: trunk/src/event.c =================================================================== --- trunk/src/event.c (revision 30966) +++ trunk/src/event.c (revision 30967) @@ -53,5 +53,5 @@ void pcb_event_init_app(void) { - pcb_event_app_reg(PCB_EVENT_last, pcb_evnames, sizeof(pcb_evnames)); + rnd_event_app_reg(PCB_EVENT_last, pcb_evnames, sizeof(pcb_evnames)); } Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 30966) +++ trunk/src/file_act.c (revision 30967) @@ -256,7 +256,7 @@ } if (pcb_save_pcb(RND_ACT_HIDLIB->filename, NULL) == 0) pcb_board_set_changed_flag(pcb_false); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_BOARD_FN_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_BOARD_FN_CHANGED, NULL); return 0; case F_LayoutAs: @@ -264,7 +264,7 @@ pcb_board_set_changed_flag(pcb_false); free(RND_ACT_HIDLIB->filename); RND_ACT_HIDLIB->filename = rnd_strdup(name); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_BOARD_FN_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_BOARD_FN_CHANGED, NULL); } return 0; @@ -511,12 +511,12 @@ argc-=2; /* call the exporter */ - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_EXPORT_SESSION_BEGIN, NULL); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_EXPORT_SESSION_BEGIN, NULL); a = args; a++; pcb_exporter->parse_arguments(pcb_exporter, &argc, &a); pcb_exporter->do_export(pcb_exporter, NULL); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_EXPORT_SESSION_END, NULL); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_EXPORT_SESSION_END, NULL); pcb_exporter = NULL; RND_ACT_IRES(0); Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 30966) +++ trunk/src/font.c (revision 30967) @@ -405,7 +405,7 @@ e = htip_popentry(&fk->fonts, id); pcb_font_free(e->value); - pcb_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", id); + rnd_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", id); if (id == fk->last_id) update_last_id(fk); return 0; @@ -465,8 +465,8 @@ if (src == fk->last_id) update_last_id (fk); fk->last_id = MAX(fk->last_id, dst); - pcb_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", src); - pcb_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", dst); + rnd_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", src); + rnd_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", dst); return 0; } Index: trunk/src/font_act.c =================================================================== --- trunk/src/font_act.c (revision 30966) +++ trunk/src/font_act.c (revision 30967) @@ -94,7 +94,7 @@ } r = pcb_parse_font(fnt, fname); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_FONT_CHANGED, "i", fnt->id); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_FONT_CHANGED, "i", fnt->id); if (r != 0) { rnd_message(RND_MSG_ERROR, "LoadFontFrom(): failed to load font from %s\n", fname); pcb_del_font(&PCB_ACT_BOARD->fontkit, fnt->id); Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 30966) +++ trunk/src/gui_act.c (revision 30967) @@ -454,8 +454,8 @@ RND_ACT_IRES(-1); return 0; switched:; - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_RESET, NULL); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_RESET, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); return 0; } @@ -594,7 +594,7 @@ if (pcbhl_conf.editor.mode != pcb_crosshair.tool_line) pcb_tool_select_by_name(RND_ACT_HIDLIB, "line"); pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); break; case PCB_OBJ_ARC: @@ -604,7 +604,7 @@ if (pcbhl_conf.editor.mode != pcb_crosshair.tool_arc) pcb_tool_select_by_name(RND_ACT_HIDLIB, "arc"); pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); break; case PCB_OBJ_POLY: @@ -704,7 +704,7 @@ args[1].type = FGW_LONG; args[1].val.nat_long = pcb_layer_id(PCB->Data, ly); ret = rnd_actionv_(args[0].val.func, res, 2, args); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); } else return FGW_ERR_NOT_FOUND; @@ -711,7 +711,7 @@ return ret; } - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); RND_ACT_IRES(0); return ret; } @@ -813,7 +813,7 @@ args[1].type = FGW_LONG; args[1].val.nat_long = pcb_layergrp_id(PCB, g); ret = rnd_actionv_(args[0].val.func, res, 2, args); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); } else return FGW_ERR_NOT_FOUND; @@ -821,7 +821,7 @@ } - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); RND_ACT_IRES(0); return ret; } @@ -966,7 +966,7 @@ RND_ACT_IRES(-1); pcb_layergrp_inhibit_dec(); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); if ((pcb_gui != NULL) && (pcb_exporter == NULL)) pcb_gui->invalidate_all(pcb_gui); @@ -1022,7 +1022,7 @@ pcb_undo_inc_serial(); pcb_layergrp_inhibit_dec(); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERS_CHANGED, NULL); if ((pcb_gui != NULL) && (pcb_exporter == NULL)) pcb_gui->invalidate_all(pcb_gui); return 0; @@ -1062,7 +1062,7 @@ return 0; } *s = *v = 1; - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } @@ -1069,7 +1069,7 @@ PCB->RatDraw = 0; pcb_layervis_change_group_vis(RND_ACT_HIDLIB, atoi(name)-1, 1, 1); pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } @@ -1150,7 +1150,7 @@ RND_ACT_FAIL(toggleview); pcb_layer_vis_change_all(PCB, open, vis); pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } else if (rnd_strcasecmp(name, "silk") == 0) { @@ -1162,12 +1162,12 @@ else if ((rnd_strcasecmp(name, "padstacks") == 0) || (rnd_strcasecmp(name, "vias") == 0) || (rnd_strcasecmp(name, "pins") == 0) || (rnd_strcasecmp(name, "pads") == 0)) { PCB->pstk_on = !PCB->pstk_on; pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); } else if (rnd_strcasecmp(name, "BackSide") == 0) { PCB->InvisibleObjectsOn = !PCB->InvisibleObjectsOn; pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); } else if (strncmp(name, "ui:", 3) == 0) { pcb_layer_t *ly = pcb_uilayer_get(atoi(name+3)); @@ -1178,7 +1178,7 @@ } ly->meta.real.vis = !ly->meta.real.vis; pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); } else { char *end; @@ -1186,7 +1186,7 @@ if (*end == '\0') { /* integer layer */ pcb_layervis_change_group_vis(RND_ACT_HIDLIB, id, -1, 0); pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } else { /* virtual menu layer */ @@ -1195,7 +1195,7 @@ rnd_bool *v = (rnd_bool *)((char *)PCB + ml->vis_offs); *v = !(*v); pcb_gui->invalidate_all(pcb_gui); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } rnd_message(RND_MSG_ERROR, "Invalid layer id: '%s'\n", name); @@ -1326,7 +1326,7 @@ pcb->RatDraw = 0; pcb_layervis_change_group_vis(&pcb->hidlib, lid, 1, 1); pcb_gui->invalidate_all(pcb_gui); - pcb_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } @@ -1449,7 +1449,7 @@ { pcb_layervis_reset_stack(RND_ACT_HIDLIB); pcb_layer_vis_historical_hides(PCB_ACT_BOARD); - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); RND_ACT_IRES(0); return 0; } Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 30966) +++ trunk/src/layer.c (revision 30967) @@ -130,7 +130,7 @@ static void layer_post_change(rnd_attribute_list_t *list, const char *name, const char *value) { if (strncmp(name, "pcb-rnd::key::", 14) == 0) - pcb_event(&PCB->hidlib, PCB_EVENT_LAYER_KEY_CHANGE, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYER_KEY_CHANGE, NULL); } @@ -819,7 +819,7 @@ g->len++; pcb_layergrp_notify_chg(pcb); pcb_layervis_change_group_vis(&pcb->hidlib, new_lid, 1, 1); - pcb_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); return lp; } @@ -951,7 +951,7 @@ l->meta.real.color = m->color; pcb_layergrp_notify_chg(pcb); pcb_layervis_change_group_vis(&pcb->hidlib, m->lid, 1, 1); - pcb_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&pcb->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); } m->append = !m->append; Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 30966) +++ trunk/src/layer_grp.c (revision 30967) @@ -47,7 +47,7 @@ do { \ pcb->LayerGroups.cache.copper_valid = 0; \ if (!inhibit_notify) { \ - pcb_event(&pcb->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); \ + rnd_event(&pcb->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); \ if ((pcb_gui != NULL) && (pcb_exporter == NULL)) \ pcb_gui->invalidate_all(pcb_gui); \ pcb_board_set_changed_flag(pcb_true); \ @@ -194,7 +194,7 @@ if (pcb_layergrp_del_layer(pcb, -1, lid) != 0) return -1; pcb_layer_add_in_group(pcb, lid, gid); - pcb_event(&pcb->hidlib, PCB_EVENT_LAYER_CHANGED_GRP, "p", &pcb->Data->Layer[lid]); + rnd_event(&pcb->hidlib, PCB_EVENT_LAYER_CHANGED_GRP, "p", &pcb->Data->Layer[lid]); NOTIFY(pcb); return gid; } @@ -1011,7 +1011,7 @@ r->grp->name = r->name; r->name = old; - pcb_event(&r->grp->parent.board->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&r->grp->parent.board->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); return 0; } @@ -1143,7 +1143,7 @@ { int ret = pcb_layergrp_set_purpose__(lg, purpose, undoable); assert(lg->parent_type == PCB_PARENT_BOARD); - pcb_event(&lg->parent.board->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&lg->parent.board->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); return ret; } Index: trunk/src/layer_ui.c =================================================================== --- trunk/src/layer_ui.c (revision 30966) +++ trunk/src/layer_ui.c (revision 30967) @@ -68,7 +68,7 @@ l->meta.real.vis = 1; l->parent_type = PCB_PARENT_UI; l->parent.any = NULL; - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); return l; } @@ -89,7 +89,7 @@ break; } } - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } void pcb_uilayer_free_all_cookie(const char *cookie) @@ -100,7 +100,7 @@ if ((l != NULL) && (l->meta.real.cookie == cookie)) pcb_uilayer_free_(l, n); } - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } void pcb_uilayer_uninit(void) Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30966) +++ trunk/src/layer_vis.c (revision 30967) @@ -120,7 +120,7 @@ /* update control panel and exit */ if (ChangeStackOrder) PCB->RatDraw = 0; /* any layer selection here means we can not be in rat mode */ - pcb_event(hl, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(hl, PCB_EVENT_LAYERVIS_CHANGED, NULL); return changed; } @@ -229,7 +229,7 @@ } } if (chg) - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); in = 0; } @@ -286,13 +286,13 @@ } } -static void layer_vis_grp_defaults(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void layer_vis_grp_defaults(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_board_t *pcb = (pcb_board_t *)hidlib; pcb_layer_vis_change_all(pcb, PCB_BOOL_SET, PCB_BOOL_PRESERVE); pcb_layer_vis_historical_hides(pcb); - pcb_event(hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); /* Can't send LAYERVIS_CHANGED here: it's a race condition, the layer selector could still have the old widgets */ + rnd_event(hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); /* Can't send LAYERVIS_CHANGED here: it's a race condition, the layer selector could still have the old widgets */ } pcb_layer_id_t pcb_layer_vis_last_lyt(pcb_layer_type_t target) @@ -361,12 +361,12 @@ rnd_conf_hid_set_cb(n_mask, layer_vis_conf_id, &cbs_mask); } - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, layer_vis_grp_defaults, NULL, layer_vis_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, layer_vis_grp_defaults, NULL, layer_vis_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, layer_vis_grp_defaults, NULL, layer_vis_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, layer_vis_grp_defaults, NULL, layer_vis_cookie); } void pcb_layer_vis_uninit(void) { - pcb_event_unbind_allcookie(layer_vis_cookie); + rnd_event_unbind_allcookie(layer_vis_cookie); rnd_conf_hid_unreg(layer_vis_cookie); } Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 30966) +++ trunk/src/librnd/core/actions.c (revision 30967) @@ -682,7 +682,7 @@ /* no backend or forced action mode: classic pcb-rnd action parse */ if (force_action_mode || (pcbhl_conf.rc.cli_backend == NULL) || (*pcbhl_conf.rc.cli_backend == '\0')) { - pcb_event(NULL, PCB_EVENT_CLI_ENTER, "s", str_); + rnd_event(NULL, RND_EVENT_CLI_ENTER, "s", str_); return hid_parse_actionstring(hl, str_, pcb_false); } Index: trunk/src/librnd/core/error.c =================================================================== --- trunk/src/librnd/core/error.c (revision 30966) +++ trunk/src/librnd/core/error.c (revision 30967) @@ -92,7 +92,7 @@ rnd_log_last = line; line->len = tmp.used - offsetof(rnd_logline_t, str); - pcb_event(NULL, PCB_EVENT_LOG_APPEND, "p", line); + rnd_event(NULL, RND_EVENT_LOG_APPEND, "p", line); } rnd_logline_t *rnd_log_find_min_(rnd_logline_t *from, unsigned long ID) @@ -214,7 +214,7 @@ rnd_PCB_ACT_MAY_CONVARG(2, FGW_ULONG, Log, from = fgw_keyword(&argv[2])); rnd_PCB_ACT_MAY_CONVARG(3, FGW_ULONG, Log, from = fgw_keyword(&argv[3])); rnd_log_del_range(from, to); - pcb_event(NULL, PCB_EVENT_LOG_CLEAR, "pp", &from, &to); + rnd_event(NULL, RND_EVENT_LOG_CLEAR, "pp", &from, &to); ret = 0; } else if (rnd_strcasecmp(op, "Export") == 0) { Index: trunk/src/librnd/core/event.c =================================================================== --- trunk/src/librnd/core/event.c (revision 30966) +++ trunk/src/librnd/core/event.c (revision 30967) @@ -70,7 +70,7 @@ typedef struct event_s event_t; struct event_s { - pcb_event_handler_t *handler; + rnd_event_handler_t *handler; void *user_data; const char *cookie; event_t *next; @@ -80,7 +80,7 @@ static event_t **rnd_events_app = NULL; #define EVENT_SETUP(ev, err) \ - pcb_event_id_t evid = ev; \ + rnd_event_id_t evid = ev; \ const char **evnames = rnd_evnames_lib; \ event_t **events = rnd_events_lib; \ (void)evnames; \ @@ -94,7 +94,7 @@ } \ else if (!(((ev) >= 0) && ((ev) < RND_EVENT_last))) { err; } -void pcb_event_app_reg(long last_event_id, const char **event_names, long sizeof_event_names) +void rnd_event_app_reg(long last_event_id, const char **event_names, long sizeof_event_names) { rnd_event_app_last = last_event_id; rnd_evnames_app = event_names; @@ -102,7 +102,7 @@ rnd_events_app = calloc(sizeof(event_t), last_event_id - RND_EVENT_app + 1); } -void pcb_event_bind(pcb_event_id_t ev, pcb_event_handler_t *handler, void *user_data, const char *cookie) +void rnd_event_bind(rnd_event_id_t ev, rnd_event_handler_t *handler, void *user_data, const char *cookie) { event_t *e; EVENT_SETUP(ev, return); @@ -122,7 +122,7 @@ free(ev); } -void pcb_event_unbind(pcb_event_id_t ev, pcb_event_handler_t *handler) +void rnd_event_unbind(rnd_event_id_t ev, rnd_event_handler_t *handler) { event_t *prev = NULL, *e, *next; EVENT_SETUP(ev, return); @@ -141,7 +141,7 @@ } } -void pcb_event_unbind_cookie(pcb_event_id_t ev, const char *cookie) +void rnd_event_unbind_cookie(rnd_event_id_t ev, const char *cookie) { event_t *prev = NULL, *e, *next; EVENT_SETUP(ev, return); @@ -161,32 +161,32 @@ } -void pcb_event_unbind_allcookie(const char *cookie) +void rnd_event_unbind_allcookie(const char *cookie) { - pcb_event_id_t n; + rnd_event_id_t n; for (n = 0; n < RND_EVENT_last; n++) - pcb_event_unbind_cookie(n, cookie); + rnd_event_unbind_cookie(n, cookie); for (n = RND_EVENT_app; n < rnd_event_app_last; n++) - pcb_event_unbind_cookie(n, cookie); + rnd_event_unbind_cookie(n, cookie); } -const char *pcb_event_name(pcb_event_id_t ev) +const char *rnd_event_name(rnd_event_id_t ev) { EVENT_SETUP(ev, return ""); return rnd_evnames_lib[ev]; } -void pcb_event(rnd_hidlib_t *hidlib, pcb_event_id_t ev, const char *fmt, ...) +void rnd_event(rnd_hidlib_t *hidlib, rnd_event_id_t ev, const char *fmt, ...) { va_list ap; - pcb_event_arg_t argv[EVENT_MAX_ARG], *a; - fgw_arg_t fargv[EVENT_MAX_ARG+1], *fa; + rnd_event_arg_t argv[RND_EVENT_MAX_ARG], *a; + fgw_arg_t fargv[RND_EVENT_MAX_ARG+1], *fa; event_t *e; int argc; EVENT_SETUP(ev, return); a = argv; - a->type = PCB_EVARG_INT; + a->type = RND_EVARG_INT; a->d.i = evid; fa = fargv; @@ -197,34 +197,34 @@ if (fmt != NULL) { va_start(ap, fmt); for (a++, fa++; *fmt != '\0'; fmt++, a++, fa++, argc++) { - if (argc >= EVENT_MAX_ARG) { - rnd_message(RND_MSG_ERROR, "pcb_event(): too many arguments\n"); + if (argc >= RND_EVENT_MAX_ARG) { + rnd_message(RND_MSG_ERROR, "rnd_event(): too many arguments\n"); break; } switch (*fmt) { case 'i': - a->type = PCB_EVARG_INT; + a->type = RND_EVARG_INT; fa->type = FGW_INT; fa->val.nat_int = a->d.i = va_arg(ap, int); break; case 'd': - a->type = PCB_EVARG_DOUBLE; + a->type = RND_EVARG_DOUBLE; fa->type = FGW_DOUBLE; fa->val.nat_double = a->d.d = va_arg(ap, double); break; case 's': - a->type = PCB_EVARG_STR; + a->type = RND_EVARG_STR; fa->type = FGW_STR; a->d.s = va_arg(ap, const char *); fa->val.str = (char *)a->d.s; break; case 'p': - a->type = PCB_EVARG_PTR; + a->type = RND_EVARG_PTR; fa->type = FGW_PTR; fa->val.ptr_void = a->d.p = va_arg(ap, void *); break; case 'c': - a->type = PCB_EVARG_COORD; + a->type = RND_EVARG_COORD; a->d.c = va_arg(ap, rnd_coord_t); fa->type = FGW_LONG; fa->val.nat_long = a->d.c; @@ -231,15 +231,15 @@ fgw_arg_conv(&rnd_fgw, fa, FGW_COORD_); break; case 'a': - a->type = PCB_EVARG_ANGLE; + a->type = RND_EVARG_ANGLE; fa->type = FGW_DOUBLE; fa->val.nat_double = a->d.a = va_arg(ap, pcb_angle_t); break; default: - a->type = PCB_EVARG_INT; + a->type = RND_EVARG_INT; a->d.i = 0; fa->type = FGW_INVALID; - rnd_message(RND_MSG_ERROR, "pcb_event(): invalid argument type '%c'\n", *fmt); + rnd_message(RND_MSG_ERROR, "rnd_event(): invalid argument type '%c'\n", *fmt); break; } } @@ -249,13 +249,13 @@ for (e = events[ev]; e != NULL; e = e->next) e->handler(hidlib, e->user_data, argc, argv); - fgw_ucall_all(&rnd_fgw, hidlib, pcb_event_name(ev), argc, fargv); + fgw_ucall_all(&rnd_fgw, hidlib, rnd_event_name(ev), argc, fargv); } void pcb_events_init(void) { if ((sizeof(rnd_evnames_lib) / sizeof(rnd_evnames_lib[0])) != RND_EVENT_last) { - fprintf(stderr, "INTERNAL ERROR: event.c: rnd_evnames_lib and pcb_event_id_t are out of sync\n"); + fprintf(stderr, "INTERNAL ERROR: event.c: rnd_evnames_lib and rnd_event_id_t are out of sync\n"); exit(1); } } Index: trunk/src/librnd/core/event.h =================================================================== --- trunk/src/librnd/core/event.h (revision 30966) +++ trunk/src/librnd/core/event.h (revision 30967) @@ -32,63 +32,63 @@ #include typedef enum { - PCB_EVENT_GUI_INIT, /* finished initializing the GUI called right before the main loop of the GUI; args: (void) */ - PCB_EVENT_CLI_ENTER, /* the user pressed enter on a CLI command - called before parsing the line for actions; args: (str commandline) */ + RND_EVENT_GUI_INIT, /* finished initializing the GUI called right before the main loop of the GUI; args: (void) */ + RND_EVENT_CLI_ENTER, /* the user pressed enter on a CLI command - called before parsing the line for actions; args: (str commandline) */ - PCB_EVENT_TOOL_REG, /* called after a new tool has been registered; arg is (pcb_tool_t *) of the new tool */ - PCB_EVENT_TOOL_SELECT_PRE, /* called before a tool is selected; arg is (int *ok, int toolid); if ok is non-zero if the selection is accepted */ - PCB_EVENT_TOOL_RELEASE, /* no arg */ - PCB_EVENT_TOOL_PRESS, /* no arg */ + RND_EVENT_TOOL_REG, /* called after a new tool has been registered; arg is (pcb_tool_t *) of the new tool */ + RND_EVENT_TOOL_SELECT_PRE, /* called before a tool is selected; arg is (int *ok, int toolid); if ok is non-zero if the selection is accepted */ + RND_EVENT_TOOL_RELEASE, /* no arg */ + RND_EVENT_TOOL_PRESS, /* no arg */ - PCB_EVENT_BUSY, /* called before/after CPU-intensive task begins; argument is an integer: 1 is before, 0 is after */ - PCB_EVENT_LOG_APPEND, /* called after a new log line is appended; arg is a pointer to the log line */ - PCB_EVENT_LOG_CLEAR, /* called after a clear; args: two pointers; unsigned long "from" and "to" */ + RND_EVENT_BUSY, /* called before/after CPU-intensive task begins; argument is an integer: 1 is before, 0 is after */ + RND_EVENT_LOG_APPEND, /* called after a new log line is appended; arg is a pointer to the log line */ + RND_EVENT_LOG_CLEAR, /* called after a clear; args: two pointers; unsigned long "from" and "to" */ - PCB_EVENT_GUI_LEAD_USER, /* GUI aid to lead the user attention to a specific location on the board in the main drawing area; args: (coord x, coord y, int enabled) */ - PCB_EVENT_GUI_DRAW_OVERLAY_XOR, /* called in board draw after finished drawing the xor marks, still in xor draw mode; argument is a pointer to the GC to use for drawing */ - PCB_EVENT_USER_INPUT_POST, /* generated any time any user input reaches core, after processing it */ - PCB_EVENT_USER_INPUT_KEY, /* generated any time a keypress is registered by the hid_cfg_key code (may be one key stroke of a multi-stroke sequence) */ + RND_EVENT_GUI_LEAD_USER, /* GUI aid to lead the user attention to a specific location on the board in the main drawing area; args: (coord x, coord y, int enabled) */ + RND_EVENT_GUI_DRAW_OVERLAY_XOR, /* called in board draw after finished drawing the xor marks, still in xor draw mode; argument is a pointer to the GC to use for drawing */ + RND_EVENT_USER_INPUT_POST, /* generated any time any user input reaches core, after processing it */ + RND_EVENT_USER_INPUT_KEY, /* generated any time a keypress is registered by the hid_cfg_key code (may be one key stroke of a multi-stroke sequence) */ - PCB_EVENT_CROSSHAIR_MOVE, /* called when the crosshair changed coord; arg is an integer which is zero if more to come */ + RND_EVENT_CROSSHAIR_MOVE, /* called when the crosshair changed coord; arg is an integer which is zero if more to come */ - PCB_EVENT_DAD_NEW_DIALOG, /* called by the GUI after a new DAD dialog is open; args are pointer hid_ctx, string dialog id and a pointer to int[4] for getting back preferre {x,y,w,h} (-1 means unknown) */ - PCB_EVENT_DAD_NEW_GEO, /* called by the GUI after the window geometry got reconfigured; args are: void *hid_ctx, const char *dialog id, int x1, int y1, int width, int height */ + RND_EVENT_DAD_NEW_DIALOG, /* called by the GUI after a new DAD dialog is open; args are pointer hid_ctx, string dialog id and a pointer to int[4] for getting back preferre {x,y,w,h} (-1 means unknown) */ + RND_EVENT_DAD_NEW_GEO, /* called by the GUI after the window geometry got reconfigured; args are: void *hid_ctx, const char *dialog id, int x1, int y1, int width, int height */ - PCB_EVENT_EXPORT_SESSION_BEGIN, /* called before an export session (e.g. CAM script execution) starts; should not be nested; there's no guarantee that options are parsed before or after this event */ - PCB_EVENT_EXPORT_SESSION_END, /* called after an export session (e.g. CAM script execution) ends */ + RND_EVENT_EXPORT_SESSION_BEGIN, /* called before an export session (e.g. CAM script execution) starts; should not be nested; there's no guarantee that options are parsed before or after this event */ + RND_EVENT_EXPORT_SESSION_END, /* called after an export session (e.g. CAM script execution) ends */ - PCB_EVENT_STROKE_START, /* parameters: rnd_coord_t x, rnd_coord_t y */ - PCB_EVENT_STROKE_RECORD, /* parameters: rnd_coord_t x, rnd_coord_t y */ - PCB_EVENT_STROKE_FINISH, /* parameters: int *handled; if it is non-zero, stroke has handled the request and Tool() should return 1, breaking action script execution */ + RND_EVENT_STROKE_START, /* parameters: rnd_coord_t x, rnd_coord_t y */ + RND_EVENT_STROKE_RECORD, /* parameters: rnd_coord_t x, rnd_coord_t y */ + RND_EVENT_STROKE_FINISH, /* parameters: int *handled; if it is non-zero, stroke has handled the request and Tool() should return 1, breaking action script execution */ - PCB_EVENT_BOARD_CHANGED, /* called after the board being edited got _replaced_ (used to be the PCBChanged action) */ - PCB_EVENT_BOARD_META_CHANGED, /* called if the metadata of the board has changed */ - PCB_EVENT_BOARD_FN_CHANGED, /* called after the file name of the board has changed */ + RND_EVENT_BOARD_CHANGED, /* called after the board being edited got _replaced_ (used to be the PCBChanged action) */ + RND_EVENT_BOARD_META_CHANGED, /* called if the metadata of the board has changed */ + RND_EVENT_BOARD_FN_CHANGED, /* called after the file name of the board has changed */ - PCB_EVENT_SAVE_PRE, /* called before saving the design (required for window placement) */ - PCB_EVENT_SAVE_POST, /* called after saving the design (required for window placement) */ - PCB_EVENT_LOAD_PRE, /* called before loading a new design (required for window placement) */ - PCB_EVENT_LOAD_POST, /* called after loading a new design, whether it was successful or not (required for window placement) */ + RND_EVENT_SAVE_PRE, /* called before saving the design (required for window placement) */ + RND_EVENT_SAVE_POST, /* called after saving the design (required for window placement) */ + RND_EVENT_LOAD_PRE, /* called before loading a new design (required for window placement) */ + RND_EVENT_LOAD_POST, /* called after loading a new design, whether it was successful or not (required for window placement) */ RND_EVENT_last /* not a real event */ -} pcb_event_id_t; +} rnd_event_id_t; /* Maximum number of arguments for an event handler, auto-set argv[0] included */ -#define EVENT_MAX_ARG 16 +#define RND_EVENT_MAX_ARG 16 /* Argument types in event's argv[] */ typedef enum { - PCB_EVARG_INT, /* format char: i */ - PCB_EVARG_DOUBLE, /* format char: d */ - PCB_EVARG_STR, /* format char: s */ - PCB_EVARG_PTR, /* format char: p */ - PCB_EVARG_COORD, /* format char: c */ - PCB_EVARG_ANGLE /* format char: a */ -} pcb_event_argtype_t; + RND_EVARG_INT, /* format char: i */ + RND_EVARG_DOUBLE, /* format char: d */ + RND_EVARG_STR, /* format char: s */ + RND_EVARG_PTR, /* format char: p */ + RND_EVARG_COORD, /* format char: c */ + RND_EVARG_ANGLE /* format char: a */ +} rnd_event_argtype_t; /* An argument is its type and value */ -struct pcb_event_arg_s { - pcb_event_argtype_t type; +struct rnd_event_arg_s { + rnd_event_argtype_t type; union { int i; double d; @@ -106,33 +106,33 @@ void pcb_events_uninit(void); -/* Event callback prototype; user_data is the same as in pcb_event_bind(). - argv[0] is always an PCB_EVARG_INT with the event id that triggered the event. */ -typedef void (pcb_event_handler_t)(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +/* Event callback prototype; user_data is the same as in rnd_event_bind(). + argv[0] is always an RND_EVARG_INT with the event id that triggered the event. */ +typedef void (rnd_event_handler_t)(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); /* Bind: add a handler to the call-list of an event; the cookie is also remembered so that mass-unbind is easier later. user_data is passed to the handler. */ -void pcb_event_bind(pcb_event_id_t ev, pcb_event_handler_t *handler, void *user_data, const char *cookie); +void rnd_event_bind(rnd_event_id_t ev, rnd_event_handler_t *handler, void *user_data, const char *cookie); /* Unbind: remove a handler from an event */ -void pcb_event_unbind(pcb_event_id_t ev, pcb_event_handler_t *handler); +void rnd_event_unbind(rnd_event_id_t ev, rnd_event_handler_t *handler); /* Unbind by cookie: remove all handlers from an event matching the cookie */ -void pcb_event_unbind_cookie(pcb_event_id_t ev, const char *cookie); +void rnd_event_unbind_cookie(rnd_event_id_t ev, const char *cookie); /* Unbind all by cookie: remove all handlers from all events matching the cookie */ -void pcb_event_unbind_allcookie(const char *cookie); +void rnd_event_unbind_allcookie(const char *cookie); /* Event trigger: call all handlers for an event. Fmt is a list of - format characters (e.g. i for PCB_EVARG_INT). */ -void pcb_event(rnd_hidlib_t *hidlib, pcb_event_id_t ev, const char *fmt, ...); + format characters (e.g. i for RND_EVARG_INT). */ +void rnd_event(rnd_hidlib_t *hidlib, rnd_event_id_t ev, const char *fmt, ...); /* Return the name of an event as seen on regisrtation */ -const char *pcb_event_name(pcb_event_id_t ev); +const char *rnd_event_name(rnd_event_id_t ev); /* The application may register its events by defining an enum starting from RND_EVENT_app and calling this function after hidlib_init1() */ -void pcb_event_app_reg(long last_event_id, const char **event_names, long sizeof_event_names); +void rnd_event_app_reg(long last_event_id, const char **event_names, long sizeof_event_names); #define RND_EVENT_app 100 #endif Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30966) +++ trunk/src/librnd/core/global_typedefs.h (revision 30967) @@ -60,7 +60,7 @@ typedef struct pcb_hid_dad_subdialog_s pcb_hid_dad_subdialog_t; -typedef struct pcb_event_arg_s pcb_event_arg_t; +typedef struct rnd_event_arg_s rnd_event_arg_t; typedef struct pcb_hid_expose_ctx_s pcb_hid_expose_ctx_t; typedef struct pcb_hid_s pcb_hid_t; Index: trunk/src/librnd/core/hid.c =================================================================== --- trunk/src/librnd/core/hid.c (revision 30966) +++ trunk/src/librnd/core/hid.c (revision 30967) @@ -35,5 +35,5 @@ { if (pcb_gui->notify_crosshair_change) pcb_gui->notify_crosshair_change(pcb_gui, changes_complete); - pcb_event(hl, PCB_EVENT_CROSSHAIR_MOVE, "i", (int)changes_complete, NULL); + rnd_event(hl, RND_EVENT_CROSSHAIR_MOVE, "i", (int)changes_complete, NULL); } Index: trunk/src/librnd/core/hid.h =================================================================== --- trunk/src/librnd/core/hid.h (revision 30966) +++ trunk/src/librnd/core/hid.h (revision 30967) @@ -624,7 +624,7 @@ #define pcb_hid_busy(pcb, is_busy) \ do { \ - pcb_event(&pcb->hidlib, PCB_EVENT_BUSY, "i", is_busy, NULL); \ + rnd_event(&pcb->hidlib, RND_EVENT_BUSY, "i", is_busy, NULL); \ if ((pcb_gui != NULL) && (pcb_gui->busy != NULL)) \ pcb_gui->busy(pcb_gui, is_busy); \ } while(0) Index: trunk/src/librnd/core/hid_cfg_input.c =================================================================== --- trunk/src/librnd/core/hid_cfg_input.c (revision 30966) +++ trunk/src/librnd/core/hid_cfg_input.c (revision 30967) @@ -185,7 +185,7 @@ { pcbhl_conf.temp.click_cmd_entry_active = cmd_entry_active; pcb_hid_cfg_action(hl, find_best_action(mouse, button_and_mask)); - pcb_event(NULL, PCB_EVENT_USER_INPUT_POST, NULL); + rnd_event(NULL, RND_EVENT_USER_INPUT_POST, NULL); pcbhl_conf.temp.click_cmd_entry_active = 0; } @@ -598,11 +598,11 @@ if (ns->action_node != NULL) { km->seq_len_action = *seq_len; (*seq_len) = 0; - pcb_event(NULL, PCB_EVENT_USER_INPUT_KEY, NULL); + rnd_event(NULL, RND_EVENT_USER_INPUT_KEY, NULL); return km->seq_len_action; } - pcb_event(NULL, PCB_EVENT_USER_INPUT_KEY, NULL); + rnd_event(NULL, RND_EVENT_USER_INPUT_KEY, NULL); return 0; } @@ -619,7 +619,7 @@ return -1; res = pcb_hid_cfg_action(hl, seq[seq_len-1]->action_node); - pcb_event(hl, PCB_EVENT_USER_INPUT_POST, NULL); + rnd_event(hl, RND_EVENT_USER_INPUT_POST, NULL); return res; } Index: trunk/src/librnd/core/hid_dad.h =================================================================== --- trunk/src/librnd/core/hid_dad.h (revision 30966) +++ trunk/src/librnd/core/hid_dad.h (revision 30967) @@ -827,7 +827,7 @@ argc/argv are all specific to the given dialog. Returns 0 on success, return payload may be placed in res (if it is not NULL). Parent poke: close() - cancel/close the dialog */ - int (*parent_poke)(pcb_hid_dad_subdialog_t *sub, const char *cmd, pcb_event_arg_t *res, int argc, pcb_event_arg_t *argv); + int (*parent_poke)(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv); /* OPTIONAL: filled in by the sub-dialog's creator: called by the sub-dialog's parent while the parent dialog is being closed. If Index: trunk/src/librnd/core/hid_dlg.c =================================================================== --- trunk/src/librnd/core/hid_dlg.c (revision 30966) +++ trunk/src/librnd/core/hid_dlg.c (revision 30967) @@ -274,7 +274,7 @@ static const char *event_dlg_cookie = "hid_dlg"; -static void hid_dlg_log_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void hid_dlg_log_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { hid_dlg_gui_inited = 1; } @@ -281,12 +281,12 @@ void pcb_hid_dlg_uninit(void) { - pcb_event_unbind_allcookie(event_dlg_cookie); + rnd_event_unbind_allcookie(event_dlg_cookie); } void pcb_hid_dlg_init(void) { - pcb_event_bind(PCB_EVENT_GUI_INIT, hid_dlg_log_gui_init_ev, NULL, event_dlg_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, hid_dlg_log_gui_init_ev, NULL, event_dlg_cookie); } void pcb_hid_dlg_init2(void) Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 30966) +++ trunk/src/librnd/core/hid_init.c (revision 30967) @@ -689,9 +689,9 @@ rnd_message(RND_MSG_WARNING, "Exporting empty board (nothing loaded or drawn).\n"); if (pcb_gui->set_hidlib != NULL) pcb_gui->set_hidlib(pcb_gui, hidlib); - pcb_event(hidlib, PCB_EVENT_EXPORT_SESSION_BEGIN, NULL); + rnd_event(hidlib, RND_EVENT_EXPORT_SESSION_BEGIN, NULL); pcb_gui->do_export(pcb_gui, 0); - pcb_event(hidlib, PCB_EVENT_EXPORT_SESSION_END, NULL); + rnd_event(hidlib, RND_EVENT_EXPORT_SESSION_END, NULL); pcbhl_log_print_uninit_errs("Exporting"); return 1; } Index: trunk/src/librnd/core/hidlib.c =================================================================== --- trunk/src/librnd/core/hidlib.c (revision 30966) +++ trunk/src/librnd/core/hidlib.c (revision 30967) @@ -36,12 +36,12 @@ void pcb_hidcore_crosshair_move_to(rnd_hidlib_t *hidlib, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { if (mouse_mot) - pcb_event(hidlib, PCB_EVENT_STROKE_RECORD, "cc", abs_x, abs_y); + rnd_event(hidlib, RND_EVENT_STROKE_RECORD, "cc", abs_x, abs_y); pcb_hidlib_crosshair_move_to(hidlib, abs_x, abs_y, mouse_mot); } -static void hidlib_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void hidlib_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_tool_gui_init(); pcb_gui->set_mouse_cursor(pcb_gui, pcbhl_conf.editor.mode); /* make sure the mouse cursor is set up now that it is registered */ @@ -67,10 +67,10 @@ void pcb_hidlib_event_uninit(void) { - pcb_event_unbind_allcookie(hidlib_cookie); + rnd_event_unbind_allcookie(hidlib_cookie); } void pcb_hidlib_event_init(void) { - pcb_event_bind(PCB_EVENT_GUI_INIT, hidlib_gui_init_ev, NULL, hidlib_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, hidlib_gui_init_ev, NULL, hidlib_cookie); } Index: trunk/src/librnd/core/tool.c =================================================================== --- trunk/src/librnd/core/tool.c (revision 30966) +++ trunk/src/librnd/core/tool.c (revision 30967) @@ -83,7 +83,7 @@ vtp0_append(&pcb_tools, (void *)tool); if (pcb_gui != NULL) pcb_gui->reg_mouse_cursor(pcb_gui, id, tool->cursor.name, tool->cursor.pixel, tool->cursor.mask); - pcb_event(NULL, PCB_EVENT_TOOL_REG, "p", tool); + rnd_event(NULL, RND_EVENT_TOOL_REG, "p", tool); return id; } @@ -135,7 +135,7 @@ return -1; /* check if the UI logic allows picking that tool */ - pcb_event(hidlib, PCB_EVENT_TOOL_SELECT_PRE, "pi", &ok, id); + rnd_event(hidlib, RND_EVENT_TOOL_SELECT_PRE, "pi", &ok, id); if (ok == 0) id = pcbhl_conf.editor.mode; @@ -272,7 +272,7 @@ if (pcb_tool_is_saved) pcb_tool_restore(hidlib); pcb_tool_is_saved = pcb_false; - pcb_event(hidlib, PCB_EVENT_TOOL_RELEASE, NULL); + rnd_event(hidlib, RND_EVENT_TOOL_RELEASE, NULL); } void pcb_tool_do_press(rnd_hidlib_t *hidlib) @@ -284,7 +284,7 @@ hidlib->tool_grabbed.Y = hidlib->tool_y; pcb_tool_press(hidlib); - pcb_event(hidlib, PCB_EVENT_TOOL_PRESS, NULL); + rnd_event(hidlib, RND_EVENT_TOOL_PRESS, NULL); } @@ -325,7 +325,7 @@ else if (rnd_strcasecmp(cmd, "Release") == 0) { if (pcbhl_conf.editor.enable_stroke) { int handled = 0; - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_STROKE_FINISH, "p", &handled); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_STROKE_FINISH, "p", &handled); if (handled) { /* Ugly hack: returning 1 here will break execution of the action script, so actions after this one could do things @@ -339,7 +339,7 @@ } else if (rnd_strcasecmp(cmd, "Stroke") == 0) { if (pcbhl_conf.editor.enable_stroke) - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_STROKE_START, "cc", hidlib->tool_x, hidlib->tool_y); + rnd_event(RND_ACT_HIDLIB, RND_EVENT_STROKE_START, "cc", hidlib->tool_x, hidlib->tool_y); else goto escape; /* Right mouse button restarts drawing mode. */ } Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30966) +++ trunk/src/librnd/pcb_compat.h (revision 30967) @@ -391,3 +391,44 @@ #define pcb_log_next_ID rnd_log_next_ID #define pcb_log_first rnd_log_first #define pcb_log_last rnd_log_last +#define pcb_event_arg_s rnd_event_arg_s +#define pcb_event_arg_t rnd_event_arg_t +#define pcb_event_id_t rnd_event_id_t +#define EVENT_MAX_ARG RND_EVENT_MAX_ARG +#define pcb_event_argtype_t rnd_event_argtype_t +#define pcb_event_handler_t rnd_event_handler_t +#define pcb_event_bind rnd_event_bind +#define pcb_event_unbind rnd_event_unbind +#define pcb_event_unbind_cookie rnd_event_unbind_cookie +#define pcb_event_unbind_allcookie rnd_event_unbind_allcookie +#define pcb_event rnd_event +#define pcb_event_name rnd_event_name +#define pcb_event_app_reg rnd_event_app_reg +#define PCB_EVENT_GUI_INIT RND_EVENT_GUI_INIT +#define PCB_EVENT_CLI_ENTER RND_EVENT_CLI_ENTER +#define PCB_EVENT_TOOL_REG RND_EVENT_TOOL_REG +#define PCB_EVENT_TOOL_SELECT_PRE RND_EVENT_TOOL_SELECT_PRE +#define PCB_EVENT_TOOL_RELEASE RND_EVENT_TOOL_RELEASE +#define PCB_EVENT_TOOL_PRESS RND_EVENT_TOOL_PRESS +#define PCB_EVENT_BUSY RND_EVENT_BUSY +#define PCB_EVENT_LOG_APPEND RND_EVENT_LOG_APPEND +#define PCB_EVENT_LOG_CLEAR RND_EVENT_LOG_CLEAR +#define PCB_EVENT_GUI_LEAD_USER RND_EVENT_GUI_LEAD_USER +#define PCB_EVENT_GUI_DRAW_OVERLAY_XOR RND_EVENT_GUI_DRAW_OVERLAY_XOR +#define PCB_EVENT_USER_INPUT_POST RND_EVENT_USER_INPUT_POST +#define PCB_EVENT_USER_INPUT_KEY RND_EVENT_USER_INPUT_KEY +#define PCB_EVENT_CROSSHAIR_MOVE RND_EVENT_CROSSHAIR_MOVE +#define PCB_EVENT_DAD_NEW_DIALOG RND_EVENT_DAD_NEW_DIALOG +#define PCB_EVENT_DAD_NEW_GEO RND_EVENT_DAD_NEW_GEO +#define PCB_EVENT_EXPORT_SESSION_BEGIN RND_EVENT_EXPORT_SESSION_BEGIN +#define PCB_EVENT_EXPORT_SESSION_END RND_EVENT_EXPORT_SESSION_END +#define PCB_EVENT_STROKE_START RND_EVENT_STROKE_START +#define PCB_EVENT_STROKE_RECORD RND_EVENT_STROKE_RECORD +#define PCB_EVENT_STROKE_FINISH RND_EVENT_STROKE_FINISH +#define PCB_EVENT_SAVE_PRE RND_EVENT_SAVE_PRE +#define PCB_EVENT_SAVE_POST RND_EVENT_SAVE_POST +#define PCB_EVENT_LOAD_PRE RND_EVENT_LOAD_PRE +#define PCB_EVENT_LOAD_POST RND_EVENT_LOAD_POST +#define PCB_EVENT_BOARD_CHANGED RND_EVENT_BOARD_CHANGED +#define PCB_EVENT_BOARD_META_CHANGED RND_EVENT_BOARD_META_CHANGED +#define PCB_EVENT_BOARD_FN_CHANGED RND_EVENT_BOARD_FN_CHANGED Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 30966) +++ trunk/src/main.c (revision 30967) @@ -534,7 +534,7 @@ /* read the library file and display it if it's not empty */ if (!pcb_fp_read_lib_all() && pcb_library.data.dir.children.used) - pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); if (conf_core.rc.script_filename) { rnd_message(RND_MSG_INFO, "Executing startup script file %s\n", conf_core.rc.script_filename); @@ -565,7 +565,7 @@ rnd_message(RND_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); } pcb_tool_select_by_name(&PCB->hidlib, "arrow"); - pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); pcbhl_mainloop_interactive(&ga, &PCB->hidlib); pcb_main_uninit(); Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 30966) +++ trunk/src/move.c (revision 30967) @@ -189,19 +189,19 @@ /* Get the new arc point positions so that we can calculate the position deltas */ pcb_arc_get_end(p_arc,0, &nx1, &ny1); pcb_arc_get_end(p_arc,1, &nx2, &ny2); - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", 0, nx1-ox1, ny1-oy1, nx2-ox2, ny2-oy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", 0, nx1-ox1, ny1-oy1, nx2-ox2, ny2-oy2); ptr2 = p_arc; } break; case PCB_OBJ_ARC: - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", 0, DX, DY, DX, DY); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", 0, DX, DY, DX, DY); pcb_undo_add_obj_to_move(Type, Ptr1, Ptr2, Ptr3, DX, DY); ptr2 = pcb_object_operation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); break; case PCB_OBJ_LINE_POINT : - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icc", 0, DX, DY); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icc", 0, DX, DY); ptr2 = pcb_lineop_move_point_with_route(&ctx, Ptr1, Ptr2, Ptr3); break; @@ -215,8 +215,8 @@ int constrained = 0; if(conf_core.editor.rubber_band_keep_midlinedir) - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, "pppppp", line, &constrained, &dx1, &dy1, &dx2, &dy2); - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", constrained, dx1, dy1, dx2, dy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, "pppppp", line, &constrained, &dx1, &dy1, &dx2, &dy2); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icccc", constrained, dx1, dy1, dx2, dy2); ctx.move.dx = dx1; ctx.move.dy = dy1; @@ -246,7 +246,7 @@ break; default: - pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icc", 0, DX, DY); + rnd_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE, "icc", 0, DX, DY); pcb_undo_add_obj_to_move(Type, Ptr1, Ptr2, Ptr3, DX, DY); ptr2 = pcb_object_operation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); break; Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 30966) +++ trunk/src/netlist.c (revision 30967) @@ -555,7 +555,7 @@ else rnd_message(RND_MSG_WARNING, "SHORT: net \"%s\" is shorted to terminal %s-%s\n", sctx->current_net->name, sc->refdes, offender->term); - pcb_event(&PCB->hidlib, PCB_EVENT_NET_INDICATE_SHORT, "ppppp", sctx->current_net, offender, offn, &handled, &sctx->cancel_advanced); + rnd_event(&PCB->hidlib, PCB_EVENT_NET_INDICATE_SHORT, "ppppp", sctx->current_net, offender, offn, &handled, &sctx->cancel_advanced); if (!handled) { pcb_net_term_t *orig_t = pcb_termlist_first(&sctx->current_net->conns); pcb_any_obj_t *orig_o = pcb_term_find_name(sctx->pcb, sctx->pcb->Data, PCB_LYT_COPPER, orig_t->refdes, orig_t->term, NULL, NULL); @@ -895,7 +895,7 @@ PCB->netlist_needs_update = 1; else { PCB->netlist_needs_update = 0; - pcb_event(&PCB->hidlib, PCB_EVENT_NETLIST_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_NETLIST_CHANGED, NULL); } } Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30966) +++ trunk/src/obj_pstk.c (revision 30967) @@ -136,7 +136,7 @@ ps->xmirror = xmirror; ps->smirror = smirror; pcb_pstk_add(data, ps); - pcb_event(&PCB->hidlib, PCB_EVENT_NEW_PSTK, "p", ps); + rnd_event(&PCB->hidlib, PCB_EVENT_NEW_PSTK, "p", ps); pcb_poly_clear_from_poly(data, PCB_OBJ_PSTK, NULL, ps); return ps; } Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30966) +++ trunk/src/obj_text.c (revision 30967) @@ -1520,10 +1520,10 @@ return need_redraw; } -static void pcb_text_font_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_text_font_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { - if ((argc < 2) || (argv[1].type != PCB_EVARG_INT)) + if ((argc < 2) || (argv[1].type != RND_EVARG_INT)) return; if (pcb_text_font_chg_data(PCB->Data, argv[1].d.i)) @@ -1550,10 +1550,10 @@ void pcb_text_init(void) { - pcb_event_bind(PCB_EVENT_FONT_CHANGED, pcb_text_font_chg, NULL, text_cookie); + rnd_event_bind(PCB_EVENT_FONT_CHANGED, pcb_text_font_chg, NULL, text_cookie); } void pcb_text_uninit(void) { - pcb_event_unbind_allcookie(text_cookie); + rnd_event_unbind_allcookie(text_cookie); } Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 30966) +++ trunk/src/object_act.c (revision 30967) @@ -324,11 +324,11 @@ if (ny->absolute[0]) ny->c[0] -= pcb_crosshair.Y; - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_RESET, NULL); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_RESET, NULL); if (conf_core.editor.rubber_band_mode) - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); if (type == PCB_OBJ_SUBC) - pcb_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_move_obj_and_rubberband(type, ptr1, ptr2, ptr3, nx->c[0], ny->c[0]); pcb_board_set_changed_flag(pcb_true); Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 30966) +++ trunk/src/plug_footprint.c (revision 30967) @@ -459,7 +459,7 @@ if (l == NULL) { pcb_fp_free_children(&pcb_library); res = pcb_fp_read_lib_all(); - pcb_event(hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); + rnd_event(hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); return res; } if (l->type != PCB_LIB_DIR) @@ -476,7 +476,7 @@ free(path); if (res >= 0) { - pcb_event(hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); + rnd_event(hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); return 0; } return -1; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30966) +++ trunk/src/plug_io.c (revision 30967) @@ -146,7 +146,7 @@ } if (gen_event) - pcb_event(&PCB->hidlib, PCB_EVENT_LOAD_PRE, "s", Filename); + rnd_event(&PCB->hidlib, RND_EVENT_LOAD_PRE, "s", Filename); len = pcb_find_io(available, maxav, type, 0, fmt); if (fmt != NULL) { @@ -242,8 +242,8 @@ pcb_set_design_dir(Filename); if (load_settings) - pcb_event(&PCB->hidlib, PCB_EVENT_LOAD_POST, "si", Filename, res); - pcb_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_LOAD_POST, "si", Filename, res); + rnd_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); rnd_conf_set(RND_CFR_DESIGN, "design/text_font_id", 0, "0", RND_POL_OVERWRITE); /* we have only one font now, make sure it is selected */ pcb_plug_io_err(&Ptr->hidlib, res, "load pcb", Filename); @@ -489,9 +489,9 @@ if (p != NULL) { if (p->write_pcb != NULL) { - pcb_event(&PCB->hidlib, PCB_EVENT_SAVE_PRE, "s", fmt); + rnd_event(&PCB->hidlib, RND_EVENT_SAVE_PRE, "s", fmt); res = p->write_pcb(p, f, old_filename, new_filename, emergency); - pcb_event(&PCB->hidlib, PCB_EVENT_SAVE_POST, "si", fmt, res); + rnd_event(&PCB->hidlib, RND_EVENT_SAVE_POST, "si", fmt, res); } else { rnd_message(RND_MSG_ERROR, "Can't write PCB: internal error: io plugin %s doesn't implement write_pcb()\n", p->description); @@ -556,7 +556,7 @@ } /* have to be called after pcb_board_resize() so vis update is after a board changed update */ - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); pcb_layervis_reset_stack(&PCB->hidlib); /* enable default font if necessary */ Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30966) +++ trunk/src/polygon.c (revision 30967) @@ -71,12 +71,12 @@ static const char *polygon_cookie = "core polygon"; -void pcb_poly_layers_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_poly_layers_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_layer_t *ly; pcb_data_t *data; - if ((argc < 2) || (argv[1].type != PCB_EVARG_PTR)) + if ((argc < 2) || (argv[1].type != RND_EVARG_PTR)) return; ly = argv[1].d.p; if ((ly->is_bound) || (ly->parent_type != PCB_PARENT_DATA)) @@ -93,12 +93,12 @@ void pcb_polygon_init(void) { - pcb_event_bind(PCB_EVENT_LAYER_CHANGED_GRP, pcb_poly_layers_chg, NULL, polygon_cookie); + rnd_event_bind(PCB_EVENT_LAYER_CHANGED_GRP, pcb_poly_layers_chg, NULL, polygon_cookie); } void pcb_polygon_uninit(void) { - pcb_event_unbind_allcookie(polygon_cookie); + rnd_event_unbind_allcookie(polygon_cookie); } rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point) Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 30966) +++ trunk/src/rotate.c (revision 30967) @@ -107,7 +107,7 @@ ctx.rotate.center_x = X; ctx.rotate.center_y = Y; - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_ROTATE90, "ipppccip", obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.number, &changed); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_ROTATE90, "ipppccip", obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.number, &changed); if (obj->type != PCB_OBJ_PSTK) /* padstack has its own way doing the rotation-undo */ pcb_undo_add_obj_to_rotate90(obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.number); @@ -134,7 +134,7 @@ ctx.rotate.center_x = X; ctx.rotate.center_y = Y; - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_ROTATE, "ipppccip", obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.angle, &changed); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_ROTATE, "ipppccip", obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.angle, &changed); if (obj->type != PCB_OBJ_PSTK) /* padstack has its own way doing the rotation-undo */ pcb_undo_add_obj_to_rotate(obj->type, obj->parent.any, obj, obj, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.angle); @@ -158,11 +158,11 @@ rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); if (conf_core.editor.rubber_band_mode) - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); if (type == PCB_OBJ_SUBC) - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_obj_rotate90(pcb, obj, X, Y, Steps); pcb_board_set_changed_flag(pcb_true); } @@ -178,11 +178,11 @@ rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); if (conf_core.editor.rubber_band_mode) - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", type, ptr1, ptr2, ptr3); if (type == PCB_OBJ_SUBC) - pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); + rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_obj_rotate(PCB, obj, X, Y, angle); pcb_board_set_changed_flag(pcb_true); } Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 30966) +++ trunk/src/tool_logic.c (revision 30967) @@ -41,15 +41,15 @@ #include "tool_logic.h" -static void tool_logic_chg_layer(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -static void pcb_release_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -static void pcb_press_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +static void tool_logic_chg_layer(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +static void pcb_release_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +static void pcb_press_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); /*** Generic part, all rnd apps should do something like this ***/ static char tool_logic_cookie[] = "tool_logic"; -static void tool_logic_chg_tool(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void tool_logic_chg_tool(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { int *ok = argv[1].d.p; int id = argv[2].d.i; @@ -79,15 +79,15 @@ rnd_conf_hid_set_cb(n_mode, tool_conf_id, &cbs_mode); } - pcb_event_bind(PCB_EVENT_TOOL_SELECT_PRE, tool_logic_chg_tool, NULL, tool_logic_cookie); - pcb_event_bind(PCB_EVENT_TOOL_RELEASE, pcb_release_mode, NULL, tool_logic_cookie); - pcb_event_bind(PCB_EVENT_TOOL_PRESS, pcb_press_mode, NULL, tool_logic_cookie); - pcb_event_bind(PCB_EVENT_LAYERVIS_CHANGED, tool_logic_chg_layer, NULL, tool_logic_cookie); + rnd_event_bind(RND_EVENT_TOOL_SELECT_PRE, tool_logic_chg_tool, NULL, tool_logic_cookie); + rnd_event_bind(RND_EVENT_TOOL_RELEASE, pcb_release_mode, NULL, tool_logic_cookie); + rnd_event_bind(RND_EVENT_TOOL_PRESS, pcb_press_mode, NULL, tool_logic_cookie); + rnd_event_bind(PCB_EVENT_LAYERVIS_CHANGED, tool_logic_chg_layer, NULL, tool_logic_cookie); } void pcb_tool_logic_uninit(void) { - pcb_event_unbind_allcookie(tool_logic_cookie); + rnd_event_unbind_allcookie(tool_logic_cookie); rnd_conf_hid_unreg(tool_logic_cookie); } @@ -94,7 +94,7 @@ /*** pcb-rnd-specific parts ***/ -static void tool_logic_chg_layer(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void tool_logic_chg_layer(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { static int was_rat; if (PCB->RatDraw && !was_rat && !(pcb_tool_get(pcbhl_conf.editor.mode)->user_flags & PCB_TLF_RAT)) @@ -137,7 +137,7 @@ { rnd_coord_t mx = 0, my = 0; - pcb_event(hl, PCB_EVENT_RUBBER_RESET, NULL); + rnd_event(hl, PCB_EVENT_RUBBER_RESET, NULL); if (!conf_core.editor.snap_pin) { /* dither the grab point so that the mark, center, etc * will end up on a grid coordinate @@ -156,12 +156,12 @@ /* get all attached objects if necessary */ if (do_rubberband && conf_core.editor.rubber_band_mode) - pcb_event(hl, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); + rnd_event(hl, PCB_EVENT_RUBBER_LOOKUP_LINES, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); if (do_rubberband && (pcb_crosshair.AttachedObject.Type == PCB_OBJ_SUBC || pcb_crosshair.AttachedObject.Type == PCB_OBJ_PSTK || pcb_crosshair.AttachedObject.Type == PCB_OBJ_LINE || pcb_crosshair.AttachedObject.Type == PCB_OBJ_LINE_POINT)) - pcb_event(hl, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); + rnd_event(hl, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); } void pcb_tool_notify_block(void) @@ -183,12 +183,12 @@ /*** old helpers ***/ -static void pcb_release_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_release_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_draw(); } -static void pcb_press_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_press_mode(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_board_t *pcb = (pcb_board_t *)hidlib; Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 30966) +++ trunk/src/undo.c (revision 30967) @@ -121,7 +121,7 @@ else if (pcb_undo_and_draw) pcb_draw(); - pcb_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_UNDO); + rnd_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_UNDO); return res; } @@ -170,7 +170,7 @@ else if (pcb_undo_and_draw) pcb_draw(); - pcb_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_REDO); + rnd_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_REDO); return res; } @@ -223,7 +223,7 @@ { if (pcb_uundo.num_undo && (Force || pcb_hid_message_box(&PCB->hidlib, "warning", "clear undo buffer", "Do you reall want to clear 'undo' buffer?", "yes", 1, "no", 0, NULL) == 1)) { uundo_list_clear(&pcb_uundo); - pcb_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_CLEAR_LIST); + rnd_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_CLEAR_LIST); } } @@ -260,7 +260,7 @@ void pcb_undo_truncate_from(uundo_serial_t sfirst) { uundo_list_truncate_from(&pcb_uundo, sfirst); - pcb_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_TRUNCATE); + rnd_event(&PCB->hidlib, PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_TRUNCATE); } int undo_check(void) Index: trunk/src_plugins/cam/cam_compile.c =================================================================== --- trunk/src_plugins/cam/cam_compile.c (revision 30966) +++ trunk/src_plugins/cam/cam_compile.c (revision 30967) @@ -156,7 +156,7 @@ pcb_hid_save_and_show_layergrp_ons(save_g_ons); } - pcb_event(&PCB->hidlib, PCB_EVENT_EXPORT_SESSION_BEGIN, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_BEGIN, NULL); for(n = 0; n < ctx->code.used; n++) { if (cam_exec_inst(ctx, &ctx->code.array[n]) != 0) { res = 1; @@ -163,7 +163,7 @@ break; } } - pcb_event(&PCB->hidlib, PCB_EVENT_EXPORT_SESSION_END, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_END, NULL); if (ctx->partial) { pcb_data_clear_flag(PCB->Data, PCB_FLAG_EXPORTSEL, 0, 0); @@ -174,7 +174,7 @@ pcb_hid_restore_layer_ons(save_l_ons); pcb_hid_restore_layergrp_ons(save_g_ons); pcb_layervis_change_group_vis(&PCB->hidlib, currly, 1, 1); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); } pcb_batched_ask_ovr_uninit(&PCB->hidlib, old_ovr); Index: trunk/src_plugins/ddraft/constraint.c =================================================================== --- trunk/src_plugins/ddraft/constraint.c (revision 30966) +++ trunk/src_plugins/ddraft/constraint.c (revision 30967) @@ -171,7 +171,7 @@ pcb_crosshair.AttachedObject.ty = pcb_crosshair.AttachedObject.Y + dy; } -static void cnst_enforce(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void cnst_enforce(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((pcb_crosshair.AttachedLine.State == PCB_CH_STATE_SECOND) || (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_THIRD)) cnst_line2(&cons); Index: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 30966) +++ trunk/src_plugins/ddraft/ddraft.c (revision 30967) @@ -539,7 +539,7 @@ void pplg_uninit_ddraft(void) { rnd_conf_hid_unreg(ddraft_cookie); - pcb_event_unbind_allcookie(ddraft_cookie); + rnd_event_unbind_allcookie(ddraft_cookie); rnd_remove_actions_by_cookie(ddraft_cookie); pcb_tool_unreg_by_cookie(ddraft_cookie); } @@ -555,7 +555,7 @@ PCB_API_CHK_VER; RND_REGISTER_ACTIONS(ddraft_action_list, ddraft_cookie) - pcb_event_bind(PCB_EVENT_DRAW_CROSSHAIR_CHATT, cnst_enforce, NULL, ddraft_cookie); + rnd_event_bind(PCB_EVENT_DRAW_CROSSHAIR_CHATT, cnst_enforce, NULL, ddraft_cookie); pcb_ddraft_tool = pcb_tool_reg(&tool_ddraft, ddraft_cookie); Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 30966) +++ trunk/src_plugins/diag/diag.c (revision 30967) @@ -393,7 +393,7 @@ return 0; } -static void ev_ui_post(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void ev_ui_post(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (conf_diag.plugins.diag.auto_integrity) { @@ -596,7 +596,7 @@ { rnd_remove_actions_by_cookie(diag_cookie); rnd_conf_unreg_fields("plugins/diag/"); - pcb_event_unbind_allcookie(diag_cookie); + rnd_event_unbind_allcookie(diag_cookie); } int pplg_init_diag(void) @@ -607,7 +607,7 @@ rnd_conf_reg_field(conf_diag, field,isarray,type_name,cpath,cname,desc,flags); #include "diag_conf_fields.h" - pcb_event_bind(PCB_EVENT_USER_INPUT_POST, ev_ui_post, NULL, diag_cookie); + rnd_event_bind(RND_EVENT_USER_INPUT_POST, ev_ui_post, NULL, diag_cookie); RND_REGISTER_ACTIONS(diag_action_list, diag_cookie) return 0; } Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 30967) @@ -85,9 +85,9 @@ for(h = 0; h < export_ctx->len; h++) { if (export_ctx->button[h] == wid) { pcb_hid_attr_val_t *results = get_results(export_ctx, h); - pcb_event(&PCB->hidlib, PCB_EVENT_EXPORT_SESSION_BEGIN, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_BEGIN, NULL); export_ctx->hid[h]->do_export(export_ctx->hid[h], results); - pcb_event(&PCB->hidlib, PCB_EVENT_EXPORT_SESSION_END, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_END, NULL); free(results); rnd_message(RND_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); goto done; @@ -101,7 +101,7 @@ pcb_hid_restore_layer_ons(save_l_ons); pcb_hid_restore_layergrp_ons(save_g_ons); pcb_layervis_change_group_vis(&PCB->hidlib, currly, 1, 1); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); } } Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30967) @@ -229,7 +229,7 @@ return 0; } -static void fontsel_mchanged_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void fontsel_mchanged_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { fontsel_ctx_t *c; @@ -240,7 +240,7 @@ fontsel_preview_update(c); } -static void fontsel_bchanged_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void fontsel_bchanged_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { fontsel_ctx_t *c, *next; pcb_dad_retovr_t retovr; @@ -274,7 +274,7 @@ fontsel_timer = pcb_gui->add_timer(pcb_gui, fontsel_timer_cb, 500, fontsel_timer); } -static void fontsel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void fontsel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { fontsel_timer_cb(fontsel_timer); fontsel_timer_active = 1; @@ -284,14 +284,14 @@ { if ((fontsel_timer_active) && (pcb_gui != NULL) && (pcb_gui->stop_timer != NULL)) pcb_gui->stop_timer(pcb_gui, fontsel_timer); - pcb_event_unbind_allcookie(fontsel_cookie); + rnd_event_unbind_allcookie(fontsel_cookie); } void pcb_dlg_fontsel_init(void) { - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, fontsel_bchanged_ev, NULL, fontsel_cookie); - pcb_event_bind(PCB_EVENT_BOARD_META_CHANGED, fontsel_mchanged_ev, NULL, fontsel_cookie); - pcb_event_bind(PCB_EVENT_FONT_CHANGED, fontsel_mchanged_ev, NULL, fontsel_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, fontsel_gui_init_ev, NULL, fontsel_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, fontsel_bchanged_ev, NULL, fontsel_cookie); + rnd_event_bind(RND_EVENT_BOARD_META_CHANGED, fontsel_mchanged_ev, NULL, fontsel_cookie); + rnd_event_bind(PCB_EVENT_FONT_CHANGED, fontsel_mchanged_ev, NULL, fontsel_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, fontsel_gui_init_ev, NULL, fontsel_cookie); } Index: trunk/src_plugins/dialogs/dlg_layer_flags.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30967) @@ -208,7 +208,7 @@ if (changed) { pcb_board_set_changed_flag(pcb_true); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } } else Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30967) @@ -726,7 +726,7 @@ return 0; } -static void library_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void library_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (library_ctx.active) library_lib2dlg(&library_ctx); @@ -734,10 +734,10 @@ void pcb_dlg_library_uninit(void) { - pcb_event_unbind_allcookie(library_cookie); + rnd_event_unbind_allcookie(library_cookie); } void pcb_dlg_library_init(void) { - pcb_event_bind(PCB_EVENT_LIBRARY_CHANGED, library_changed_ev, NULL, library_cookie); + rnd_event_bind(PCB_EVENT_LIBRARY_CHANGED, library_changed_ev, NULL, library_cookie); } Index: trunk/src_plugins/dialogs/dlg_loadsave.c =================================================================== --- trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30967) @@ -128,7 +128,7 @@ save_t *save = fmtsub->sub_ctx; char *bn, *fn, *s; const char *ext; - pcb_event_arg_t res, argv[4]; + rnd_event_arg_t res, argv[4]; int selection = attr->val.lng; pcb_hid_attr_val_t hv; @@ -167,7 +167,7 @@ /* build a new file name with the right extension */ - argv[0].type = PCB_EVARG_STR; + argv[0].type = RND_EVARG_STR; argv[0].d.s = pcb_concat(bn, ext, NULL);; fmtsub->parent_poke(fmtsub, "set_file_name", &res, 1, argv); free(fn); @@ -239,7 +239,7 @@ save->timer = pcb_gui->add_timer(pcb_gui, save_timer, 300, user_data); if ((save->fmtsub->parent_poke != NULL) && (save->fmtsub->dlg_hid_ctx != NULL) && (save->fmtsub->dlg[save->wguess].val.lng)) { - pcb_event_arg_t res; + rnd_event_arg_t res; char *end; save->fmtsub->parent_poke(save->fmtsub, "get_path", &res, 0, NULL); Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 30967) @@ -46,7 +46,7 @@ netlist_ctx_t *ctx = caller_data; PCB_DAD_FREE(ctx->dlg); memset(ctx, 0, sizeof(netlist_ctx_t)); - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); } /* returns allocated net name for the currently selected net */ @@ -158,7 +158,7 @@ if (netname != NULL) net = pcb_net_get(ctx->pcb, &ctx->pcb->netlist[PCB_NETLIST_EDITED], netname, 0); netlist_data2dlg_connlist(ctx, net); - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); netlist_force_redraw(ctx); } @@ -169,7 +169,7 @@ char *refdes, *term; pcb_any_obj_t *obj; - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_LEAD_USER, "cci", 0, 0, 0); if (row == NULL) return; refdes = rnd_strdup(row->cell[0]); @@ -181,7 +181,7 @@ if (obj != NULL) { rnd_coord_t x, y; pcb_obj_center(obj, &x, &y); - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_LEAD_USER, "cci", x, y, 1); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_LEAD_USER, "cci", x, y, 1); } } free(refdes); @@ -454,7 +454,7 @@ } /* update the dialog after a netlist change */ -static void pcb_dlg_netlist_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_dlg_netlist_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { netlist_ctx_t *ctx = user_data; if (!ctx->active) @@ -463,11 +463,11 @@ } static void pcb_dlg_netlist_init(void) { - pcb_event_bind(PCB_EVENT_NETLIST_CHANGED, pcb_dlg_netlist_ev, &netlist_ctx, dlg_netlist_cookie); + rnd_event_bind(PCB_EVENT_NETLIST_CHANGED, pcb_dlg_netlist_ev, &netlist_ctx, dlg_netlist_cookie); } static void pcb_dlg_netlist_uninit(void) { - pcb_event_unbind_allcookie(dlg_netlist_cookie); + rnd_event_unbind_allcookie(dlg_netlist_cookie); vtp0_uninit(&netlist_color_save); } Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 30967) @@ -335,7 +335,7 @@ PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, pref_ctx.wtab, lng, target_tab); } -static void pref_ev_board_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pref_ev_board_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pref_ctx_t *ctx = user_data; if (!pref_ctx.active) @@ -347,7 +347,7 @@ pref_win_brd2dlg(ctx); } -static void pref_ev_board_meta_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pref_ev_board_meta_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pref_ctx_t *ctx = user_data; if (!pref_ctx.active) @@ -374,8 +374,8 @@ void pcb_dlg_pref_init(void) { pref_conf_cb.val_change_post = pref_conf_changed; - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pref_ev_board_changed, &pref_ctx, pref_cookie); - pcb_event_bind(PCB_EVENT_BOARD_META_CHANGED, pref_ev_board_meta_changed, &pref_ctx, pref_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, pref_ev_board_changed, &pref_ctx, pref_cookie); + rnd_event_bind(RND_EVENT_BOARD_META_CHANGED, pref_ev_board_meta_changed, &pref_ctx, pref_cookie); pref_hid = rnd_conf_hid_reg(pref_cookie, &pref_conf_cb); pcb_dlg_pref_sizes_init(&pref_ctx); pcb_dlg_pref_lib_init(&pref_ctx); @@ -383,7 +383,7 @@ void pcb_dlg_pref_uninit(void) { - pcb_event_unbind_allcookie(pref_cookie); + rnd_event_unbind_allcookie(pref_cookie); rnd_conf_hid_unreg(pref_cookie); } Index: trunk/src_plugins/dialogs/dlg_pref_board.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_board.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_pref_board.c (revision 30967) @@ -64,7 +64,7 @@ if (changed) { PCB->Changed = 1; - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_META_CHANGED, NULL); /* always generate the event to make sure visible changes are flushed */ + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_META_CHANGED, NULL); /* always generate the event to make sure visible changes are flushed */ } } Index: trunk/src_plugins/dialogs/dlg_undo.c =================================================================== --- trunk/src_plugins/dialogs/dlg_undo.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_undo.c (revision 30967) @@ -158,7 +158,7 @@ } /* update the dialog after an undo operation */ -static void pcb_dlg_undo_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_dlg_undo_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { undo_ctx_t *ctx = user_data; if (!ctx->active) @@ -167,7 +167,7 @@ } /* Check if the serial has changed and update the dialog if so */ -static void pcb_dlg_undo_ev_chk(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_dlg_undo_ev_chk(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { undo_ctx_t *ctx = user_data; if (!ctx->active) @@ -181,11 +181,11 @@ static void pcb_dlg_undo_init(void) { - pcb_event_bind(PCB_EVENT_UNDO_POST, pcb_dlg_undo_ev, &undo_ctx, dlg_undo_cookie); - pcb_event_bind(PCB_EVENT_USER_INPUT_POST, pcb_dlg_undo_ev_chk, &undo_ctx, dlg_undo_cookie); + rnd_event_bind(PCB_EVENT_UNDO_POST, pcb_dlg_undo_ev, &undo_ctx, dlg_undo_cookie); + rnd_event_bind(RND_EVENT_USER_INPUT_POST, pcb_dlg_undo_ev_chk, &undo_ctx, dlg_undo_cookie); } static void pcb_dlg_undo_uninit(void) { - pcb_event_unbind_allcookie(dlg_undo_cookie); + rnd_event_unbind_allcookie(dlg_undo_cookie); } Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 30966) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 30967) @@ -811,7 +811,7 @@ return 0; } -static void view_preview_update_cb(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void view_preview_update_cb(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (drc_gui_ctx.active) view_preview_update(&drc_gui_ctx); @@ -821,11 +821,11 @@ void pcb_view_dlg_uninit(void) { - pcb_event_unbind_allcookie(dlg_view_cookie); + rnd_event_unbind_allcookie(dlg_view_cookie); vtp0_uninit(&view_color_save); } void pcb_view_dlg_init(void) { - pcb_event_bind(PCB_EVENT_USER_INPUT_POST, view_preview_update_cb, NULL, dlg_view_cookie); + rnd_event_bind(RND_EVENT_USER_INPUT_POST, view_preview_update_cb, NULL, dlg_view_cookie); } Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 30966) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 30967) @@ -753,7 +753,7 @@ pcb_layer_create(PCB, outline_gactive, "outline", 1); pcb_undo_unfreeze_serial(); pcb_undo_inc_serial(); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } drag_addoutline = 0; gactive = -1; @@ -795,11 +795,11 @@ else if (drag_addlayer) { if (gactive >= 0) { pcb_layer_create(PCB, gactive, "New Layer", 1); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } else if (outline_gactive >= 0 && PCB->LayerGroups.grp[outline_gactive].len == 0) { pcb_layer_create(PCB, outline_gactive, "outline", 1); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } drag_addlayer = 0; gactive = -1; @@ -846,7 +846,7 @@ memmove(g->lid + lactive_idx + 1, g->lid + lactive_idx, (g->len - 1 - lactive_idx) * sizeof(pcb_layer_id_t)); g->lid[lactive_idx] = drag_lid; } - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } } else if (outline_gactive >= 0 && PCB->LayerGroups.grp[outline_gactive].len == 0) { Index: trunk/src_plugins/drc_orig/drc_orig.c =================================================================== --- trunk/src_plugins/drc_orig/drc_orig.c (revision 30966) +++ trunk/src_plugins/drc_orig/drc_orig.c (revision 30967) @@ -340,7 +340,7 @@ } } -static void pcb_drc_orig(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_drc_orig(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_view_list_t *lst = &pcb_drc_lst; @@ -349,7 +349,7 @@ pcb_layervis_save_stack(); pcb_layervis_reset_stack(&PCB->hidlib); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); /* actual tests */ pcb_hid_progress(0, 0, NULL); @@ -379,7 +379,7 @@ out:; pcb_hid_progress(0, 0, NULL); pcb_layervis_restore_stack(); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); pcb_gui->invalidate_all(pcb_gui); } @@ -389,7 +389,7 @@ void pplg_uninit_drc_orig(void) { - pcb_event_unbind_allcookie(drc_orig_cookie); + rnd_event_unbind_allcookie(drc_orig_cookie); rnd_conf_unreg_file(DRC_ORIG_CONF_FN, drc_orig_conf_internal); rnd_conf_unreg_fields("plugins/drc_orig/"); } @@ -397,7 +397,7 @@ int pplg_init_drc_orig(void) { PCB_API_CHK_VER; - pcb_event_bind(PCB_EVENT_DRC_RUN, pcb_drc_orig, NULL, drc_orig_cookie); + rnd_event_bind(PCB_EVENT_DRC_RUN, pcb_drc_orig, NULL, drc_orig_cookie); rnd_conf_reg_file(DRC_ORIG_CONF_FN, drc_orig_conf_internal); #define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \ Index: trunk/src_plugins/drc_query/drc_query.c =================================================================== --- trunk/src_plugins/drc_query/drc_query.c (revision 30966) +++ trunk/src_plugins/drc_query/drc_query.c (revision 30967) @@ -200,7 +200,7 @@ return nat->val.boolean; } -static void pcb_drc_query(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_drc_query(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_board_t *pcb = (pcb_board_t *)hidlib; gdl_iterator_t it; @@ -361,7 +361,7 @@ long n; pcb_drc_impl_unreg(&drc_query_impl); - pcb_event_unbind_allcookie(drc_query_cookie); + rnd_event_unbind_allcookie(drc_query_cookie); rnd_conf_unreg_file(DRC_QUERY_CONF_FN, drc_query_conf_internal); rnd_conf_unreg_fields(DRC_CONF_PATH_PLUGIN); rnd_conf_hid_unreg(drc_query_cookie); @@ -382,7 +382,7 @@ pcb_drcq_stat_init(); - pcb_event_bind(PCB_EVENT_DRC_RUN, pcb_drc_query, NULL, drc_query_cookie); + rnd_event_bind(PCB_EVENT_DRC_RUN, pcb_drc_query, NULL, drc_query_cookie); vtp0_init(&free_drc_conf_nodes); cbs.new_hlist_item_post = drc_query_newconf; Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30966) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30967) @@ -475,7 +475,7 @@ { } -static void exc_session_begin(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void exc_session_begin(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { exc_aperture_cnt = 0; } @@ -487,7 +487,7 @@ pcb_export_remove_opts_by_cookie(excellon_cookie); free(filename); rnd_conf_unreg_fields("plugins/export_excellon/"); - pcb_event_unbind_allcookie(excellon_cookie); + rnd_event_unbind_allcookie(excellon_cookie); } int pplg_init_export_excellon(void) @@ -531,6 +531,6 @@ pcb_hid_register_hid(&excellon_hid); - pcb_event_bind(PCB_EVENT_EXPORT_SESSION_BEGIN, exc_session_begin, NULL, excellon_cookie); + rnd_event_bind(RND_EVENT_EXPORT_SESSION_BEGIN, exc_session_begin, NULL, excellon_cookie); return 0; } Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 30966) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30967) @@ -1055,7 +1055,7 @@ { } -static void gerber_session_begin(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void gerber_session_begin(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { gerber_global_aperture_cnt = 0; } @@ -1066,7 +1066,7 @@ { pcb_export_remove_opts_by_cookie(gerber_cookie); rnd_conf_unreg_fields("plugins/export_gerber/"); - pcb_event_unbind_allcookie(gerber_cookie); + rnd_event_unbind_allcookie(gerber_cookie); } int pplg_init_export_gerber(void) @@ -1112,7 +1112,7 @@ pcb_hid_register_hid(&gerber_hid); - pcb_event_bind(PCB_EVENT_EXPORT_SESSION_BEGIN, gerber_session_begin, NULL, gerber_cookie); + rnd_event_bind(RND_EVENT_EXPORT_SESSION_BEGIN, gerber_session_begin, NULL, gerber_cookie); return 0; } Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 30966) +++ trunk/src_plugins/export_openems/excitation.c (revision 30967) @@ -534,7 +534,7 @@ return excitations[exc_ctx.selected].get(exc_ctx.selected); } -static void exc_ev_board_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void exc_ev_board_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { load_selector(); if (exc_ctx.active) @@ -543,10 +543,10 @@ static void pcb_openems_excitation_init(void) { - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, exc_ev_board_changed, NULL, openems_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, exc_ev_board_changed, NULL, openems_cookie); } static void pcb_openems_excitation_uninit(void) { - pcb_event_unbind_allcookie(openems_cookie); + rnd_event_unbind_allcookie(openems_cookie); } Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 30966) +++ trunk/src_plugins/export_openems/mesh.c (revision 30967) @@ -1040,7 +1040,7 @@ free((char *)mesh.ui_layer_xy->name); /* we have strdup'd it */ mesh.ui_name_xy = pcb_strdup_printf("mesh 0: %s", mesh.layer->name); mesh.ui_layer_xy->name = rnd_strdup(mesh.ui_name_xy); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); pcb_gui->invalidate_all(pcb_gui); } Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 30966) +++ trunk/src_plugins/fontmode/fontmode.c (revision 30967) @@ -145,8 +145,8 @@ pcb_layergrp_inhibit_dec(); /* Inform the rest about the board change (layer stack, size) */ - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_CHANGED, NULL); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); for (s = 0; s <= PCB_MAX_FONTPOSITION; s++) { char txt[32]; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30966) +++ trunk/src_plugins/hid_batch/batch.c (revision 30967) @@ -55,7 +55,7 @@ static void uninit_batch(void) { - pcb_event_unbind_allcookie(batch_cookie); + rnd_event_unbind_allcookie(batch_cookie); if (prompt != NULL) { free(prompt); prompt = NULL; @@ -62,7 +62,7 @@ } } -static void ev_pcb_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void ev_pcb_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (prompt != NULL) free(prompt); @@ -96,7 +96,7 @@ line->seen = 1; } -static void ev_log_append(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void ev_log_append(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (!batch_active) return; @@ -331,7 +331,7 @@ void pplg_uninit_hid_batch(void) { - pcb_event_unbind_allcookie(batch_cookie); + rnd_event_unbind_allcookie(batch_cookie); pcb_export_remove_opts_by_cookie(batch_cookie); } @@ -390,8 +390,8 @@ batch_hid.open_command = batch_open_command; batch_hid.open_popup = batch_open_popup; - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, batch_cookie); - pcb_event_bind(PCB_EVENT_LOG_APPEND, ev_log_append, NULL, batch_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, batch_cookie); + rnd_event_bind(RND_EVENT_LOG_APPEND, ev_log_append, NULL, batch_cookie); pcb_hid_register_hid(&batch_hid); return 0; Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30966) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30967) @@ -28,7 +28,7 @@ void pplg_uninit_hid_gtk2_gl(void) { - pcb_event_unbind_allcookie(ghid_gl_cookie); + rnd_event_unbind_allcookie(ghid_gl_cookie); rnd_conf_hid_unreg(ghid_gl_cookie); drawgl_uninit(); } Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 30966) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 30967) @@ -47,7 +47,7 @@ plc[2] = defx; plc[3] = defy; - pcb_event(ltf_hidlib, PCB_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); + rnd_event(ltf_hidlib, RND_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); if (pcbhl_conf.editor.auto_place) { if ((plc[2] > 0) && (plc[3] > 0) && (plc[0] >= 0) && (plc[1] >= 0)) { @@ -101,7 +101,7 @@ /* restore the original window position (either what the code wants or what we learned from the GUI */ - pcb_event(ltf_hidlib, PCB_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); + rnd_event(ltf_hidlib, RND_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); if ((plc[0] >= 0) && (plc[1] >= 0)) { x = plc[0]; y = plc[1]; @@ -120,7 +120,7 @@ XGetGeometry(dsp, win, &rw, &tmp, &tmp, &w, &h, &brd, &depth); x -= wplc_hackx; y -= wplc_hacky; - pcb_event(ltf_hidlib, PCB_EVENT_DAD_NEW_GEO, "psiiii", ctx, id, (int)x, (int)y, (int)w, (int)h); + rnd_event(ltf_hidlib, RND_EVENT_DAD_NEW_GEO, "psiiii", ctx, id, (int)x, (int)y, (int)w, (int)h); } } Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 30966) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 30967) @@ -101,7 +101,7 @@ XmStringFree(xms_path); } -static int pcb_ltf_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, pcb_event_arg_t *res, int argc, pcb_event_arg_t *argv) +static int pcb_ltf_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { pcb_ltf_fsd_t *pctx = sub->parent_ctx; @@ -114,12 +114,12 @@ } if (strcmp(cmd, "get_path") == 0) { - res->type = PCB_EVARG_STR; + res->type = RND_EVARG_STR; res->d.s = pcb_ltf_get_path(pctx); return 0; } - if ((strcmp(cmd, "set_file_name") == 0) && (argc == 1) && (argv[0].type == PCB_EVARG_STR)) { + if ((strcmp(cmd, "set_file_name") == 0) && (argc == 1) && (argv[0].type == RND_EVARG_STR)) { pcb_ltf_set_fn(pctx, 1, argv[0].d.s); return 0; } Index: trunk/src_plugins/hid_lesstif/library.c =================================================================== --- trunk/src_plugins/hid_lesstif/library.c (revision 30966) +++ trunk/src_plugins/hid_lesstif/library.c (revision 30967) @@ -132,7 +132,7 @@ lib_dfs(l, level+1); } -void LesstifLibraryChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void LesstifLibraryChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { int i; if (pcb_library.data.dir.children.used == 0) Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30966) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30967) @@ -175,7 +175,7 @@ return ltf_dockbox[where]; } -static int ltf_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, pcb_event_arg_t *res, int argc, pcb_event_arg_t *argv) +static int ltf_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { return -1; } @@ -398,8 +398,8 @@ old_cursor_mode = -1; } -extern void LesstifNetlistChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -extern void LesstifLibraryChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +extern void LesstifNetlistChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +extern void LesstifLibraryChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); static void ltf_set_hidlib(pcb_hid_t *hid, rnd_hidlib_t *hidlib) @@ -1547,7 +1547,7 @@ pcb_board_changed(0); lesstif_menubar = menu; - pcb_event(&PCB->hidlib, PCB_EVENT_GUI_INIT, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_GUI_INIT, NULL); lesstif_hid_inited = 1; @@ -2933,7 +2933,7 @@ void pplg_uninit_hid_lesstif(void) { pcb_export_remove_opts_by_cookie(lesstif_cookie); - pcb_event_unbind_allcookie(lesstif_cookie); + rnd_event_unbind_allcookie(lesstif_cookie); rnd_conf_hid_unreg(lesstif_cookie); } @@ -3045,8 +3045,8 @@ lesstif_hid.get_dad_hidlib = ltf_attr_get_dad_hidlib; - pcb_event_bind(PCB_EVENT_NETLIST_CHANGED, LesstifNetlistChanged, NULL, lesstif_cookie); - pcb_event_bind(PCB_EVENT_LIBRARY_CHANGED, LesstifLibraryChanged, NULL, lesstif_cookie); + rnd_event_bind(PCB_EVENT_NETLIST_CHANGED, LesstifNetlistChanged, NULL, lesstif_cookie); + rnd_event_bind(PCB_EVENT_LIBRARY_CHANGED, LesstifLibraryChanged, NULL, lesstif_cookie); pcb_hid_register_hid(&lesstif_hid); if (lesstif_conf_id < 0) Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 30966) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 30967) @@ -344,7 +344,7 @@ return 0; } -void LesstifNetlistChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void LesstifNetlistChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { htsp_entry_t *e; int i; Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30966) +++ trunk/src_plugins/hid_remote/remote.c (revision 30967) @@ -40,7 +40,7 @@ /* ----------------------------------------------------------------------------- */ -static void ev_pcb_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void ev_pcb_changed(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { } @@ -385,7 +385,7 @@ void pplg_uninit_hid_remote(void) { /* rnd_remove_actions_by_cookie(remote_cookie);*/ - pcb_event_unbind_allcookie(remote_cookie); + rnd_event_unbind_allcookie(remote_cookie); } int pplg_init_hid_remote(void) @@ -445,7 +445,7 @@ pcb_hid_register_hid(&remote_hid); - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, remote_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, remote_cookie); return 0; } Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 30966) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 30967) @@ -111,8 +111,8 @@ pcb_hid_busy(PCB, 0); /* notify GUI */ - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_CHANGED, NULL); RND_ACT_IRES(retval); return 0; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30966) +++ trunk/src_plugins/io_pcb/file.c (revision 30967) @@ -709,7 +709,7 @@ } if (chg) - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } static void WriteLayers(FILE *FP, pcb_data_t *data) Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30966) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30967) @@ -794,7 +794,7 @@ ctx->id = rnd_strdup(id); ctx->modal = modal; - pcb_event(gctx->hidlib, PCB_EVENT_DAD_NEW_DIALOG, "psp", ctx, ctx->id, plc); + rnd_event(gctx->hidlib, RND_EVENT_DAD_NEW_DIALOG, "psp", ctx, ctx->id, plc); ctx->dialog = gtk_dialog_new(); if ((modal && pcb_conf_hid_gtk.plugins.hid_gtk.dialog.transient_modal) || (!modal && pcb_conf_hid_gtk.plugins.hid_gtk.dialog.transient_modeless)) @@ -1026,7 +1026,7 @@ /* For whatever reason, get_allocation doesn't set these. Gtk. */ gtk_window_get_position(GTK_WINDOW(widget), &allocation.x, &allocation.y); - pcb_event(hidlib, PCB_EVENT_DAD_NEW_GEO, "psiiii", ctx, id, + rnd_event(hidlib, RND_EVENT_DAD_NEW_GEO, "psiiii", ctx, id, (int)allocation.x, (int)allocation.y, (int)allocation.width, (int)allocation.height); return 0; Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 30966) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 30967) @@ -84,7 +84,7 @@ void *hid_ctx; /* DAD subdialog context */ } pcb_gtk_fsd_t; -static int pcb_gtk_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, pcb_event_arg_t *res, int argc, pcb_event_arg_t *argv) +static int pcb_gtk_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { pcb_gtk_fsd_t *pctx = sub->parent_ctx; @@ -98,7 +98,7 @@ if (strcmp(cmd, "get_path") == 0) { gchar *gp = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(pctx->dialog)); - res->type = PCB_EVARG_STR; + res->type = RND_EVARG_STR; if (gp != NULL) { res->d.s = rnd_strdup(gp); g_free(gp); @@ -108,7 +108,7 @@ return 0; } - if ((strcmp(cmd, "set_file_name") == 0) && (argc == 1) && (argv[0].type == PCB_EVARG_STR)) { + if ((strcmp(cmd, "set_file_name") == 0) && (argc == 1) && (argv[0].type == RND_EVARG_STR)) { gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(pctx->dialog), argv[0].d.s); return 0; } Index: trunk/src_plugins/lib_gtk_common/dlg_topwin.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 30966) +++ trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 30967) @@ -63,7 +63,7 @@ #include "glue_common.h" /*** docking code (dynamic parts) ***/ -static int pcb_gtk_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, pcb_event_arg_t *res, int argc, pcb_event_arg_t *argv) +static int pcb_gtk_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { return -1; } Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30966) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30967) @@ -338,7 +338,7 @@ /*** init ***/ void ghid_glue_common_uninit(const char *cookie) { - pcb_event_unbind_allcookie(cookie); + rnd_event_unbind_allcookie(cookie); rnd_conf_hid_unreg(cookie); rnd_conf_hid_unreg(cookie_menu); } Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30966) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30967) @@ -116,7 +116,7 @@ if (im && ic && first) { first = 0; - pcb_event(gctx->hidlib, PCB_EVENT_GUI_INIT, NULL); + rnd_event(gctx->hidlib, RND_EVENT_GUI_INIT, NULL); pcb_gtk_zoom_view_win_side(&gctx->port.view, 0, 0, gctx->hidlib->size_x, gctx->hidlib->size_y, 0); } } @@ -202,7 +202,7 @@ { int plc[4] = {-1, -1, -1, -1}; - pcb_event(hidlib, PCB_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); + rnd_event(hidlib, RND_EVENT_DAD_NEW_DIALOG, "psp", NULL, id, plc); if (pcbhl_conf.editor.auto_place) { if ((plc[2] > 0) && (plc[3] > 0)) Index: trunk/src_plugins/lib_hid_common/dlg_log.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30967) @@ -193,7 +193,7 @@ return 0; } -static void log_append_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void log_append_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_logline_t *line = argv[1].d.p; @@ -213,7 +213,7 @@ } } -static void log_clear_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void log_clear_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (log_ctx.active) { pcb_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; @@ -224,7 +224,7 @@ } } -static void log_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void log_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_logline_t *n; @@ -246,12 +246,12 @@ void pcb_dlg_log_uninit(void) { - pcb_event_unbind_allcookie(log_cookie); + rnd_event_unbind_allcookie(log_cookie); } void pcb_dlg_log_init(void) { - pcb_event_bind(PCB_EVENT_LOG_APPEND, log_append_ev, NULL, log_cookie); - pcb_event_bind(PCB_EVENT_LOG_CLEAR, log_clear_ev, NULL, log_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, log_gui_init_ev, NULL, log_cookie); + rnd_event_bind(RND_EVENT_LOG_APPEND, log_append_ev, NULL, log_cookie); + rnd_event_bind(RND_EVENT_LOG_CLEAR, log_clear_ev, NULL, log_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, log_gui_init_ev, NULL, log_cookie); } Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30967) @@ -100,7 +100,7 @@ grid_lock--; } -void pcb_grid_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_grid_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (grid_lock) return; grid_lock++; Index: trunk/src_plugins/lib_hid_common/grid_menu.h =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.h (revision 30966) +++ trunk/src_plugins/lib_hid_common/grid_menu.h (revision 30967) @@ -2,4 +2,4 @@ #include void pcb_grid_update_conf(rnd_conf_native_t *cfg, int arr_idx); -void pcb_grid_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_grid_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_common/lead_user.c =================================================================== --- trunk/src_plugins/lib_hid_common/lead_user.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/lead_user.c (revision 30967) @@ -75,11 +75,11 @@ lead_timer = pcb_gui->add_timer(pcb_gui, lead_cb, LEAD_PERIOD_MS, user_data); } -void pcb_lead_user_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_lead_user_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (argc < 4) return; - if ((argv[1].type != PCB_EVARG_COORD) || (argv[2].type != PCB_EVARG_COORD) || (argv[3].type != PCB_EVARG_INT)) + if ((argv[1].type != RND_EVARG_COORD) || (argv[2].type != RND_EVARG_COORD) || (argv[3].type != RND_EVARG_INT)) return; pcb_lead_user_to_location(hidlib, argv[1].d.c, argv[2].d.c, argv[3].d.i); @@ -88,13 +88,13 @@ #define ARL LEAD_ARROW_LEN/3 -void pcb_lead_user_draw_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_lead_user_draw_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (lead) { pcb_hid_gc_t *gc = argv[1].d.p; rnd_coord_t x = leadx + step, y = leady + step; - assert(argv[1].type == PCB_EVARG_PTR); + assert(argv[1].type == RND_EVARG_PTR); pcb_render->set_line_width(*gc, ARL/40); pcb_render->draw_arc(*gc, leadx, leady, LEAD_CENTER_RAD+step/10, LEAD_CENTER_RAD+step/10, 0, 360); Index: trunk/src_plugins/lib_hid_common/lead_user.h =================================================================== --- trunk/src_plugins/lib_hid_common/lead_user.h (revision 30966) +++ trunk/src_plugins/lib_hid_common/lead_user.h (revision 30967) @@ -1,5 +1,5 @@ -void pcb_lead_user_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_lead_user_draw_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_lead_user_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_lead_user_draw_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_common/lib_hid_common.c =================================================================== --- trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 30967) @@ -96,9 +96,9 @@ rnd_conf_unreg_file(DIALOGS_CONF_FN, dialogs_conf_internal); pcb_clihist_save(); pcb_clihist_uninit(); - pcb_event_unbind_allcookie(grid_cookie); - pcb_event_unbind_allcookie(lead_cookie); - pcb_event_unbind_allcookie(wplc_cookie); + rnd_event_unbind_allcookie(grid_cookie); + rnd_event_unbind_allcookie(lead_cookie); + rnd_event_unbind_allcookie(wplc_cookie); rnd_conf_hid_unreg(grid_cookie); pcb_dialog_place_uninit(); rnd_remove_actions_by_cookie(hid_common_cookie); @@ -126,11 +126,11 @@ pcb_dialog_place_init(); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_grid_update_ev, NULL, grid_cookie); - pcb_event_bind(PCB_EVENT_GUI_LEAD_USER, pcb_lead_user_ev, NULL, lead_cookie); - pcb_event_bind(PCB_EVENT_GUI_DRAW_OVERLAY_XOR, pcb_lead_user_draw_ev, NULL, lead_cookie); - pcb_event_bind(PCB_EVENT_DAD_NEW_DIALOG, pcb_dialog_place, NULL, wplc_cookie); - pcb_event_bind(PCB_EVENT_DAD_NEW_GEO, pcb_dialog_resize, NULL, wplc_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_grid_update_ev, NULL, grid_cookie); + rnd_event_bind(RND_EVENT_GUI_LEAD_USER, pcb_lead_user_ev, NULL, lead_cookie); + rnd_event_bind(RND_EVENT_GUI_DRAW_OVERLAY_XOR, pcb_lead_user_draw_ev, NULL, lead_cookie); + rnd_event_bind(RND_EVENT_DAD_NEW_DIALOG, pcb_dialog_place, NULL, wplc_cookie); + rnd_event_bind(RND_EVENT_DAD_NEW_GEO, pcb_dialog_resize, NULL, wplc_cookie); conf_id = rnd_conf_hid_reg(grid_cookie, NULL); Index: trunk/src_plugins/lib_hid_common/place.c =================================================================== --- trunk/src_plugins/lib_hid_common/place.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/place.c (revision 30967) @@ -78,13 +78,13 @@ } -void pcb_dialog_place(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_dialog_place(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { const char *id; int *geo; htsw_entry_t *e; - if ((argc < 3) || (argv[1].type != PCB_EVARG_PTR) || (argv[2].type != PCB_EVARG_STR)) + if ((argc < 3) || (argv[1].type != RND_EVARG_PTR) || (argv[2].type != RND_EVARG_STR)) return; id = argv[2].d.s; @@ -100,9 +100,9 @@ /* rnd_trace("dialog place: %p '%s'\n", hid_ctx, id);*/ } -void pcb_dialog_resize(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_dialog_resize(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { - if ((argc < 7) || (argv[1].type != PCB_EVARG_PTR) || (argv[2].type != PCB_EVARG_STR)) + if ((argc < 7) || (argv[1].type != RND_EVARG_PTR) || (argv[2].type != RND_EVARG_STR)) return; /* hid_ctx = argv[1].d.p;*/ @@ -235,13 +235,13 @@ /* event handlers that run before the current pcb is saved to save win geo in the board conf and after loading a new board to fetch window placement info. */ -static void place_save_pre(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void place_save_pre(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { place_maybe_save(hidlib, RND_CFR_PROJECT, 0); place_maybe_save(hidlib, RND_CFR_DESIGN, 0); } -static void place_load_post(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void place_load_post(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_wplc_load(RND_CFR_PROJECT); pcb_wplc_load(RND_CFR_DESIGN); @@ -298,7 +298,7 @@ for(e = htsw_first(&wingeo); e != NULL; e = htsw_next(&wingeo, e)) free((char *)e->key); htsw_uninit(&wingeo); - pcb_event_unbind_allcookie(place_cookie); + rnd_event_unbind_allcookie(place_cookie); for(n = 0; n < cleanup_later.used; n++) free(cleanup_later.array[n]); @@ -308,8 +308,8 @@ void pcb_dialog_place_init(void) { htsw_init(&wingeo, strhash, strkeyeq); - pcb_event_bind(PCB_EVENT_SAVE_PRE, place_save_pre, NULL, place_cookie); - pcb_event_bind(PCB_EVENT_LOAD_POST, place_load_post, NULL, place_cookie); + rnd_event_bind(RND_EVENT_SAVE_PRE, place_save_pre, NULL, place_cookie); + rnd_event_bind(RND_EVENT_LOAD_POST, place_load_post, NULL, place_cookie); pcb_wplc_load(RND_CFR_INTERNAL); pcb_wplc_load(RND_CFR_ENV); pcb_wplc_load(RND_CFR_SYSTEM); Index: trunk/src_plugins/lib_hid_common/place.h =================================================================== --- trunk/src_plugins/lib_hid_common/place.h (revision 30966) +++ trunk/src_plugins/lib_hid_common/place.h (revision 30967) @@ -5,6 +5,6 @@ /*** for internal use ***/ void pcb_dialog_place_uninit(void); void pcb_dialog_place_init(void); -void pcb_dialog_resize(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_dialog_place(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_dialog_resize(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_dialog_place(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30966) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30967) @@ -179,15 +179,15 @@ } } -void pcb_toolbar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_toolbar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB_HAVE_GUI_ATTR_DLG) && (pcb_gui->get_menu_cfg != NULL)) toolbar_create(); } -void pcb_toolbar_reg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_toolbar_reg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { - if ((toolbar.sub_inited) && (argv[1].type == PCB_EVARG_PTR)) { + if ((toolbar.sub_inited) && (argv[1].type == RND_EVARG_PTR)) { pcb_tool_t *tool = argv[1].d.p; pcb_toolid_t tid = pcb_tool_lookup(tool->name); if ((tool->flags & PCB_TLF_AUTO_TOOLBAR) != 0) { @@ -231,7 +231,7 @@ void rnd_toolbar_uninit(void) { - pcb_event_unbind_allcookie(toolbar_cookie); + rnd_event_unbind_allcookie(toolbar_cookie); rnd_conf_hid_unreg(toolbar_cookie); } @@ -240,7 +240,7 @@ const char *tpaths[] = {"editor/mode", NULL}; static rnd_conf_hid_callbacks_t tcb[sizeof(tpaths)/sizeof(tpaths[0])]; - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_toolbar_gui_init_ev, NULL, toolbar_cookie); - pcb_event_bind(PCB_EVENT_TOOL_REG, pcb_toolbar_reg_ev, NULL, toolbar_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_toolbar_gui_init_ev, NULL, toolbar_cookie); + rnd_event_bind(RND_EVENT_TOOL_REG, pcb_toolbar_reg_ev, NULL, toolbar_cookie); install_events(toolbar_cookie, tpaths, tcb, pcb_toolbar_update_conf); } Index: trunk/src_plugins/lib_hid_common/toolbar.h =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.h (revision 30966) +++ trunk/src_plugins/lib_hid_common/toolbar.h (revision 30967) @@ -7,8 +7,8 @@ /* Alternatively, the caller can bind these */ -void pcb_toolbar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_toolbar_reg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_toolbar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_toolbar_reg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); void pcb_toolbar_update_conf(rnd_conf_native_t *cfg, int arr_idx); Index: trunk/src_plugins/lib_hid_pcbui/infobar.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 30967) @@ -36,7 +36,7 @@ static double last_date = -1; static int infobar_gui_inited = 0; -static void pcb_infobar_brdchg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_infobar_brdchg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_actionva(hidlib, "InfoBarFileChanged", "close", NULL); if ((hidlib != NULL) && (hidlib->filename != NULL)) @@ -79,7 +79,7 @@ } -static void pcb_infobar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_infobar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { infobar_gui_inited = 1; pcb_infobar_brdchg_ev(hidlib, NULL, 0, NULL); /* this may have happened ebfore plugin init if file was specified on the CLI and is already loaded - pick up file data from memory */ @@ -87,7 +87,7 @@ infobar_tick(infobar_timer); } -static void pcb_infobar_fn_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_infobar_fn_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB != NULL) && (PCB->hidlib.filename != NULL)) { last_date = pcb_file_mtime(NULL, PCB->hidlib.filename); Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30967) @@ -257,7 +257,7 @@ } -void pcb_layer_menu_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layer_menu_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { layer_install_menu(); if ((pcb_gui != NULL) && (pcb_gui->update_menu_checkbox != NULL)) @@ -264,7 +264,7 @@ pcb_gui->update_menu_checkbox(pcb_gui, NULL); } -void pcb_layer_menu_vis_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layer_menu_vis_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((pcb_gui != NULL) && (pcb_gui->update_menu_checkbox != NULL)) pcb_gui->update_menu_checkbox(pcb_gui, NULL); @@ -282,7 +282,7 @@ } -void pcb_layer_menu_key_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layer_menu_key_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_hidval_t timerdata; Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.h (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.h (revision 30967) @@ -1,7 +1,7 @@ #include -void pcb_layer_menu_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_layer_menu_vis_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_layer_menu_key_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_layer_menu_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_layer_menu_vis_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_layer_menu_key_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_pcbui/layersel.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30967) @@ -244,7 +244,7 @@ static void locked_layervis_ev(layersel_ctx_t *ls) { ls->lock_vis++; - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); ls->lock_vis--; } @@ -838,13 +838,13 @@ } } -void pcb_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB_HAVE_GUI_ATTR_DLG) && (pcb_gui->get_menu_cfg != NULL)) layersel_build(); } -void pcb_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((!layersel.sub_inited) || (layersel.lock_vis > 0)) return; @@ -851,7 +851,7 @@ layersel_update_vis(&layersel, PCB); } -void pcb_layersel_stack_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_layersel_stack_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB_HAVE_GUI_ATTR_DLG) && (pcb_gui->get_menu_cfg != NULL) && (layersel.sub_inited)) { pcb_hid_dock_leave(&layersel.sub); Index: trunk/src_plugins/lib_hid_pcbui/layersel.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.h (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/layersel.h (revision 30967) @@ -1,3 +1,3 @@ -void pcb_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_layersel_stack_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_layersel_stack_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c (revision 30967) @@ -79,13 +79,13 @@ rnd_remove_actions_by_cookie(rst_cookie); rnd_remove_actions_by_cookie(status_cookie); rnd_remove_actions_by_cookie(act_cookie); - pcb_event_unbind_allcookie(layer_cookie); - pcb_event_unbind_allcookie(rst_cookie); - pcb_event_unbind_allcookie(status_cookie); - pcb_event_unbind_allcookie(rendering_cookie); - pcb_event_unbind_allcookie(infobar_cookie); - pcb_event_unbind_allcookie(title_cookie); - pcb_event_unbind_allcookie(layersel_cookie); + rnd_event_unbind_allcookie(layer_cookie); + rnd_event_unbind_allcookie(rst_cookie); + rnd_event_unbind_allcookie(status_cookie); + rnd_event_unbind_allcookie(rendering_cookie); + rnd_event_unbind_allcookie(infobar_cookie); + rnd_event_unbind_allcookie(title_cookie); + rnd_event_unbind_allcookie(layersel_cookie); rnd_conf_hid_unreg(rst_cookie); rnd_conf_hid_unreg(status_cookie); rnd_conf_hid_unreg(status_rd_cookie); @@ -130,26 +130,26 @@ RND_REGISTER_ACTIONS(status_action_list, status_cookie); RND_REGISTER_ACTIONS(act_action_list, act_cookie); - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_layer_menu_update_ev, NULL, layer_cookie); - pcb_event_bind(PCB_EVENT_LAYERS_CHANGED, pcb_layer_menu_update_ev, NULL, layer_cookie); - pcb_event_bind(PCB_EVENT_LAYERS_CHANGED, pcb_layersel_stack_chg_ev, NULL, layersel_cookie); - pcb_event_bind(PCB_EVENT_LAYERVIS_CHANGED, pcb_layer_menu_vis_update_ev, NULL, layer_cookie); - pcb_event_bind(PCB_EVENT_LAYERVIS_CHANGED, pcb_layersel_vis_chg_ev, NULL, layersel_cookie); - pcb_event_bind(PCB_EVENT_LAYER_KEY_CHANGE, pcb_layer_menu_key_update_ev, NULL, layer_cookie); - pcb_event_bind(PCB_EVENT_ROUTE_STYLES_CHANGED, pcb_rst_update_ev, NULL, rst_cookie); - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_rst_update_ev, NULL, rst_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_layersel_gui_init_ev, NULL, layersel_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_rst_gui_init_ev, NULL, rst_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_status_gui_init_ev, NULL, status_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_rendering_gui_init_ev, NULL, rendering_cookie); - pcb_event_bind(PCB_EVENT_USER_INPUT_KEY, pcb_status_st_update_ev, NULL, status_cookie); - pcb_event_bind(PCB_EVENT_CROSSHAIR_MOVE, pcb_status_rd_update_ev, NULL, status_cookie); - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_infobar_brdchg_ev, NULL, infobar_cookie); - pcb_event_bind(PCB_EVENT_BOARD_FN_CHANGED, pcb_infobar_fn_chg_ev, NULL, infobar_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_infobar_gui_init_ev, NULL, infobar_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_title_gui_init_ev, NULL, title_cookie); - pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_title_board_changed_ev, NULL, title_cookie); - pcb_event_bind(PCB_EVENT_BOARD_META_CHANGED, pcb_title_meta_changed_ev, NULL, title_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, pcb_layer_menu_update_ev, NULL, layer_cookie); + rnd_event_bind(PCB_EVENT_LAYERS_CHANGED, pcb_layer_menu_update_ev, NULL, layer_cookie); + rnd_event_bind(PCB_EVENT_LAYERS_CHANGED, pcb_layersel_stack_chg_ev, NULL, layersel_cookie); + rnd_event_bind(PCB_EVENT_LAYERVIS_CHANGED, pcb_layer_menu_vis_update_ev, NULL, layer_cookie); + rnd_event_bind(PCB_EVENT_LAYERVIS_CHANGED, pcb_layersel_vis_chg_ev, NULL, layersel_cookie); + rnd_event_bind(PCB_EVENT_LAYER_KEY_CHANGE, pcb_layer_menu_key_update_ev, NULL, layer_cookie); + rnd_event_bind(PCB_EVENT_ROUTE_STYLES_CHANGED, pcb_rst_update_ev, NULL, rst_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, pcb_rst_update_ev, NULL, rst_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_layersel_gui_init_ev, NULL, layersel_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_rst_gui_init_ev, NULL, rst_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_status_gui_init_ev, NULL, status_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_rendering_gui_init_ev, NULL, rendering_cookie); + rnd_event_bind(RND_EVENT_USER_INPUT_KEY, pcb_status_st_update_ev, NULL, status_cookie); + rnd_event_bind(RND_EVENT_CROSSHAIR_MOVE, pcb_status_rd_update_ev, NULL, status_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, pcb_infobar_brdchg_ev, NULL, infobar_cookie); + rnd_event_bind(RND_EVENT_BOARD_FN_CHANGED, pcb_infobar_fn_chg_ev, NULL, infobar_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_infobar_gui_init_ev, NULL, infobar_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, pcb_title_gui_init_ev, NULL, title_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, pcb_title_board_changed_ev, NULL, title_cookie); + rnd_event_bind(RND_EVENT_BOARD_META_CHANGED, pcb_title_meta_changed_ev, NULL, title_cookie); install_events(rst_cookie, rpaths, rcb, pcb_rst_update_conf); install_events(status_cookie, stpaths, stcb, pcb_status_st_update_conf); Index: trunk/src_plugins/lib_hid_pcbui/rendering.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/rendering.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/rendering.c (revision 30967) @@ -90,7 +90,7 @@ return common_set_layer_group(hid, group, purpose, purpi, layer, flags, is_empty, xform); } -static void pcb_rendering_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_rendering_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { /* hook in our dispatcher */ gui_set_layer_group = pcb_gui->set_layer_group; Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30967) @@ -201,12 +201,12 @@ } -void pcb_rst_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_rst_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rst_update(); } -void pcb_rst_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_rst_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (PCB_HAVE_GUI_ATTR_DLG) { rst_docked_create(); Index: trunk/src_plugins/lib_hid_pcbui/routest.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.h (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/routest.h (revision 30967) @@ -2,8 +2,8 @@ #include #include -void pcb_rst_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_rst_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_rst_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_rst_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); void pcb_rst_update_conf(rnd_conf_native_t *cfg, int arr_idx); Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30967) @@ -110,7 +110,7 @@ { if (rst != NULL) pcb_use_route_style(rst); - pcb_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); pcb_board_set_changed_flag(1); } Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30967) @@ -302,7 +302,7 @@ } -void pcb_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB_HAVE_GUI_ATTR_DLG) && (pcb_gui->get_menu_cfg != NULL)) { status_docked_create_st(); @@ -329,12 +329,12 @@ status_rd_pcb2dlg(); } -void pcb_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { status_st_pcb2dlg(); } -void pcb_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +void pcb_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { status_rd_pcb2dlg(); } Index: trunk/src_plugins/lib_hid_pcbui/status.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.h (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/status.h (revision 30967) @@ -2,11 +2,11 @@ #include #include -void pcb_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); void pcb_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx); void pcb_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx); -void pcb_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); +void pcb_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); +void pcb_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); extern const char pcb_acts_StatusSetText[]; extern const char pcb_acth_StatusSetText[]; Index: trunk/src_plugins/lib_hid_pcbui/title.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/title.c (revision 30966) +++ trunk/src_plugins/lib_hid_pcbui/title.c (revision 30967) @@ -56,13 +56,13 @@ pcb_gui->set_top_title(pcb_gui, title_buf.array); } -static void pcb_title_board_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_title_board_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { brd_changed = 0; update_title(); } -static void pcb_title_meta_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_title_meta_changed_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (brd_changed == PCB->Changed) return; @@ -70,7 +70,7 @@ update_title(); } -static void pcb_title_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_title_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { gui_inited = 1; update_title(); Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 30966) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 30967) @@ -323,7 +323,7 @@ return bad_gr; } -static void pcb_mincut_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_mincut_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { int *handled, *cancel; pcb_any_obj_t *term; @@ -335,7 +335,7 @@ if (argc < 5) return; - if ((argv[4].type != PCB_EVARG_PTR) || (argv[5].type != PCB_EVARG_PTR)) + if ((argv[4].type != RND_EVARG_PTR) || (argv[5].type != RND_EVARG_PTR)) return; handled = (int *)argv[4].d.p; cancel = (int *)argv[5].d.p; @@ -342,15 +342,15 @@ if (*handled || *cancel) return; - if (argv[2].type != PCB_EVARG_PTR) + if (argv[2].type != RND_EVARG_PTR) return; term = (pcb_any_obj_t *)argv[2].d.p; - if (argv[1].type != PCB_EVARG_PTR) + if (argv[1].type != RND_EVARG_PTR) return; Snet = (pcb_net_t *)argv[1].d.p; - if (argv[3].type != PCB_EVARG_PTR) + if (argv[3].type != RND_EVARG_PTR) return; Tnet = (pcb_net_t *)argv[3].d.p; @@ -364,7 +364,7 @@ void pplg_uninit_mincut(void) { rnd_conf_unreg_fields("plugins/mincut/"); - pcb_event_unbind_allcookie(pcb_mincut_cookie); + rnd_event_unbind_allcookie(pcb_mincut_cookie); } int pplg_init_mincut(void) @@ -371,7 +371,7 @@ { PCB_API_CHK_VER; - pcb_event_bind(PCB_EVENT_NET_INDICATE_SHORT, pcb_mincut_ev, NULL, pcb_mincut_cookie); + rnd_event_bind(PCB_EVENT_NET_INDICATE_SHORT, pcb_mincut_ev, NULL, pcb_mincut_cookie); #define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \ rnd_conf_reg_field(conf_mincut, field,isarray,type_name,cpath,cname,desc,flags); Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30966) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30967) @@ -273,7 +273,7 @@ static const char pcb_acth_RouteStylesChanged[] = "Tells the GUI that the routing styles have changed."; static fgw_error_t pcb_act_RouteStylesChanged(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); return 0; } @@ -281,7 +281,7 @@ static const char pcb_acth_LibraryChanged[] = "Tells the GUI that the libraries have changed."; static fgw_error_t pcb_act_LibraryChanged(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); return 0; } Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 30966) +++ trunk/src_plugins/order/order.c (revision 30967) @@ -193,7 +193,7 @@ } -static void order_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void order_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_hid_cfg_map_anchor_menus(ANCH, order_install_menu, NULL); } @@ -203,7 +203,7 @@ void pplg_uninit_order(void) { rnd_remove_actions_by_cookie(order_cookie); - pcb_event_unbind_allcookie(order_cookie); + rnd_event_unbind_allcookie(order_cookie); rnd_conf_unreg_file(ORDER_CONF_FN, order_conf_internal); rnd_conf_unreg_fields("plugins/order/"); } @@ -218,6 +218,6 @@ #include "order_conf_fields.h" RND_REGISTER_ACTIONS(order_action_list, order_cookie) - pcb_event_bind(PCB_EVENT_GUI_INIT, order_menu_init, NULL, order_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, order_menu_init, NULL, order_cookie); return 0; } Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30966) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30967) @@ -1020,7 +1020,7 @@ } /*** event handlers ***/ -static void rbe_reset(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_reset(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; rbnd->lines.used = 0; @@ -1027,7 +1027,7 @@ rbnd->arcs.used = 0; } -static void rbe_move(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_move(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; pcb_rb_line_t *ptr = rbnd->lines.array; @@ -1129,7 +1129,7 @@ } } -static void rbe_draw(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_draw(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; pcb_rb_line_t *ptr; @@ -1241,7 +1241,7 @@ } } -static void rbe_rotate90(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_rotate90(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; pcb_rb_line_t *ptr; @@ -1292,12 +1292,12 @@ } } -static void rbe_rotate(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_rotate(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { TODO("TODO") } -static void rbe_lookup_lines(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_lookup_lines(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; int type = argv[1].d.i; @@ -1307,7 +1307,7 @@ pcb_rubber_band_lookup_lines(rbnd, type, ptr1, ptr2, ptr3); } -static void rbe_lookup_rats(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_lookup_rats(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; int type = argv[1].d.i; @@ -1316,7 +1316,7 @@ pcb_rubber_band_lookup_rat_lines(rbnd, type, ptr1, ptr2, ptr3); } -static void rbe_constrain_main_line(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void rbe_constrain_main_line(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rubber_ctx_t *rbnd = user_data; pcb_line_t *line = argv[1].d.p; @@ -1423,7 +1423,7 @@ void rb_uninit(void) { - pcb_event_unbind_allcookie(rubber_cookie); + rnd_event_unbind_allcookie(rubber_cookie); } int pplg_check_ver_rubberband_orig(int ver_needed) @@ -1433,7 +1433,7 @@ void pplg_uninit_rubberband_orig(void) { - pcb_event_unbind_allcookie(rubber_cookie); + rnd_event_unbind_allcookie(rubber_cookie); rnd_conf_unreg_fields("plugins/rubberband_orig/"); } @@ -1441,14 +1441,14 @@ { void *ctx = &rubber_band_state; PCB_API_CHK_VER; - pcb_event_bind(PCB_EVENT_RUBBER_RESET, rbe_reset, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_MOVE, rbe_move, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_MOVE_DRAW, rbe_draw, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_ROTATE90, rbe_rotate90, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_ROTATE, rbe_rotate, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_LOOKUP_LINES, rbe_lookup_lines, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_LOOKUP_RATS, rbe_lookup_rats, ctx, rubber_cookie); - pcb_event_bind(PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, rbe_constrain_main_line, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_RESET, rbe_reset, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_MOVE, rbe_move, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_MOVE_DRAW, rbe_draw, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_ROTATE90, rbe_rotate90, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_ROTATE, rbe_rotate, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_LOOKUP_LINES, rbe_lookup_lines, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_LOOKUP_RATS, rbe_lookup_rats, ctx, rubber_cookie); + rnd_event_bind(PCB_EVENT_RUBBER_CONSTRAIN_MAIN_LINE, rbe_constrain_main_line, ctx, rubber_cookie); #define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \ rnd_conf_reg_field(conf_rbo, field,isarray,type_name,cpath,cname,desc,flags); Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30966) +++ trunk/src_plugins/script/live_script.c (revision 30967) @@ -521,7 +521,7 @@ } -static void lvs_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void lvs_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_hid_cfg_map_anchor_menus(ANCH, lvs_install_menu, NULL); } @@ -529,7 +529,7 @@ void pcb_live_script_init(void) { htsp_init(&pcb_live_scripts, strhash, strkeyeq); - pcb_event_bind(PCB_EVENT_GUI_INIT, lvs_menu_init, NULL, lvs_cookie); + rnd_event_bind(RND_EVENT_GUI_INIT, lvs_menu_init, NULL, lvs_cookie); } void pcb_live_script_uninit(void) @@ -542,6 +542,6 @@ htsp_uninit(&pcb_live_scripts); if ((pcb_gui != NULL) && (pcb_gui->remove_menu != NULL)) pcb_gui->remove_menu(pcb_gui, lvs_cookie); - pcb_event_unbind_allcookie(lvs_cookie); + rnd_event_unbind_allcookie(lvs_cookie); } Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 30966) +++ trunk/src_plugins/shand_cmd/command.c (revision 30967) @@ -177,7 +177,7 @@ pcb_board_set_changed_flag(pcb_false); free(PCB->hidlib.filename); PCB->hidlib.filename = rnd_strdup(filename); - pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_FN_CHANGED, NULL); + rnd_event(&PCB->hidlib, RND_EVENT_BOARD_FN_CHANGED, NULL); } } Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 30966) +++ trunk/src_plugins/shape/shape.c (revision 30967) @@ -627,7 +627,7 @@ void pplg_uninit_shape(void) { - pcb_event_unbind_allcookie(pcb_shape_cookie); + rnd_event_unbind_allcookie(pcb_shape_cookie); rnd_remove_actions_by_cookie(pcb_shape_cookie); } @@ -636,7 +636,7 @@ PCB_API_CHK_VER; RND_REGISTER_ACTIONS(shape_action_list, pcb_shape_cookie) - pcb_event_bind(PCB_EVENT_LAYERVIS_CHANGED, shape_layer_chg, NULL, pcb_shape_cookie); + rnd_event_bind(PCB_EVENT_LAYERVIS_CHANGED, shape_layer_chg, NULL, pcb_shape_cookie); return 0; } Index: trunk/src_plugins/shape/shape_dialog.c =================================================================== --- trunk/src_plugins/shape/shape_dialog.c (revision 30966) +++ trunk/src_plugins/shape/shape_dialog.c (revision 30967) @@ -115,7 +115,7 @@ } -static void shape_layer_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void shape_layer_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { void *hid_ctx; int tab; Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 30966) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 30967) @@ -725,7 +725,7 @@ pcb_snprintf(name, sizeof(name), "%s: ERBS", layer->name); sk->ui_layer_erbs = pcb_uilayer_alloc(pcb_sketch_route_cookie, name, &layer->meta.real.color); sketch_update_erbs_layer(sk); - pcb_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); + rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } static sketch_t *sketch_alloc() Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 30966) +++ trunk/src_plugins/stroke/stroke.c (revision 30967) @@ -70,7 +70,7 @@ return 0; } -static void pcb_stroke_finish(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_stroke_finish(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { char msg[255]; int *handled = argv[1].d.p; @@ -83,7 +83,7 @@ *handled = pcb_stroke_exec(hidlib, msg); } -static void pcb_stroke_record(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_stroke_record(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; @@ -98,7 +98,7 @@ return; } -static void pcb_stroke_start(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void pcb_stroke_start(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; pcb_mid_stroke = pcb_true; @@ -161,7 +161,7 @@ rnd_conf_unreg_file(STROKE_CONF_FN, stroke_conf_internal); rnd_conf_unreg_fields("plugins/stroke/"); rnd_remove_actions_by_cookie(pcb_stroke_cookie); - pcb_event_unbind_allcookie(pcb_stroke_cookie); + rnd_event_unbind_allcookie(pcb_stroke_cookie); return 0; } @@ -177,9 +177,9 @@ RND_REGISTER_ACTIONS(stroke_action_list, pcb_stroke_cookie) - pcb_event_bind(PCB_EVENT_STROKE_START, pcb_stroke_start, NULL, pcb_stroke_cookie); - pcb_event_bind(PCB_EVENT_STROKE_RECORD, pcb_stroke_record, NULL, pcb_stroke_cookie); - pcb_event_bind(PCB_EVENT_STROKE_FINISH, pcb_stroke_finish, NULL, pcb_stroke_cookie); + rnd_event_bind(RND_EVENT_STROKE_START, pcb_stroke_start, NULL, pcb_stroke_cookie); + rnd_event_bind(RND_EVENT_STROKE_RECORD, pcb_stroke_record, NULL, pcb_stroke_cookie); + rnd_event_bind(RND_EVENT_STROKE_FINISH, pcb_stroke_finish, NULL, pcb_stroke_cookie); return 0; } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 30966) +++ trunk/src_plugins/vendordrill/vendor.c (revision 30967) @@ -640,12 +640,12 @@ } /* Tune newly placed padstacks */ -static void vendor_new_pstk(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) +static void vendor_new_pstk(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_pstk_t *ps; rnd_cardinal_t dummy; - if ((argc < 2) || (argv[1].type != PCB_EVARG_PTR)) + if ((argc < 2) || (argv[1].type != RND_EVARG_PTR)) return; ps = argv[1].d.p; @@ -656,7 +656,7 @@ void pplg_uninit_vendordrill(void) { - pcb_event_unbind_allcookie(vendor_cookie); + rnd_event_unbind_allcookie(vendor_cookie); rnd_remove_actions_by_cookie(vendor_cookie); vendor_free_all(); rnd_conf_unreg_fields("plugins/vendor/"); @@ -669,7 +669,7 @@ rnd_conf_reg_field(conf_vendor, field,isarray,type_name,cpath,cname,desc,flags); #include "vendor_conf_fields.h" - pcb_event_bind(PCB_EVENT_NEW_PSTK, vendor_new_pstk, NULL, vendor_cookie); + rnd_event_bind(PCB_EVENT_NEW_PSTK, vendor_new_pstk, NULL, vendor_cookie); RND_REGISTER_ACTIONS(vendor_action_list, vendor_cookie) return 0; }