Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4857) +++ trunk/doc-rnd/hacking/renames (revision 4858) @@ -233,3 +233,17 @@ get_user_name -> pcb_get_user_name CopyPastebufferToLayout -> pcb_buffer_copy_to_layout CopyObject -> pcb_copy_obj +GridFit -> pcb_grid_fit +notify_crosshair_change -> pcb_notify_crosshair_change +notify_mark_change -> pcb_notify_mark_change +HideCrosshair -> pcb_crosshair_hide +RestoreCrosshair -> pcb_crosshair_restore +DrawAttached -> pcb_draw_attached +DrawMark -> pcb_draw_mark +MoveCrosshairRelative -> pcb_crosshair_move_relative +MoveCrosshairAbsolute -> pcb_crosshair_move_absolute +SetCrosshairRange -> pcb_crosshair_set_range +InitCrosshair -> pcb_crosshair_init +DestroyCrosshair -> pcb_crosshair_uninit +FitCrosshairIntoGrid -> pcb_crosshair_grid_fit +CenterDisplay -> pcb_center_display Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4857) +++ trunk/src/action_helper.c (revision 4858) @@ -117,8 +117,8 @@ GetGridLockCoordinates(Crosshair.AttachedObject.Type, Crosshair.AttachedObject.Ptr1, Crosshair.AttachedObject.Ptr2, Crosshair.AttachedObject.Ptr3, &mx, &my); - mx = GridFit(mx, PCB->Grid, PCB->GridOffsetX) - mx; - my = GridFit(my, PCB->Grid, PCB->GridOffsetY) - my; + mx = pcb_grid_fit(mx, PCB->Grid, PCB->GridOffsetX) - mx; + my = pcb_grid_fit(my, PCB->Grid, PCB->GridOffsetY) - my; } Crosshair.AttachedObject.X = PlaceX - mx; Crosshair.AttachedObject.Y = PlaceY - my; @@ -129,7 +129,7 @@ /* get boundingbox of object and set cursor range */ box = GetObjectBoundingBox(Crosshair.AttachedObject.Type, Crosshair.AttachedObject.Ptr1, Crosshair.AttachedObject.Ptr2, Crosshair.AttachedObject.Ptr3); - SetCrosshairRange(Crosshair.AttachedObject.X - box->X1, + pcb_crosshair_set_range(Crosshair.AttachedObject.X - box->X1, Crosshair.AttachedObject.Y - box->Y1, PCB->MaxWidth - (box->X2 - Crosshair.AttachedObject.X), PCB->MaxHeight - (box->Y2 - Crosshair.AttachedObject.Y)); @@ -298,7 +298,7 @@ static void click_cb(pcb_hidval_t hv) { if (Note.Click) { - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); Note.Click = pcb_false; if (Note.Moving && !gui->shift_is_pressed()) { Note.Buffer = conf_core.editor.buffer_number; @@ -353,7 +353,7 @@ Crosshair.AttachedBox.Point1.X = Note.X; Crosshair.AttachedBox.Point1.Y = Note.Y; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } } @@ -539,7 +539,7 @@ void pcb_notify_block(void) { - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); switch (Crosshair.AttachedBox.State) { case STATE_FIRST: /* setup first point */ Crosshair.AttachedBox.Point1.X = Crosshair.AttachedBox.Point2.X = Crosshair.X; @@ -551,7 +551,7 @@ Crosshair.AttachedBox.State = STATE_THIRD; break; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } void pcb_notify_mode(void) @@ -1240,10 +1240,10 @@ { if (mid_stroke) stub_stroke_record(ev_x, ev_y); - if (MoveCrosshairAbsolute(ev_x, ev_y)) { + if (pcb_crosshair_move_absolute(ev_x, ev_y)) { /* update object position and cursor location */ pcb_adjust_attached_objects(); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } } Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 4857) +++ trunk/src/board.c (revision 4858) @@ -233,13 +233,13 @@ * is enabled */ if (conf_core.editor.mode == PCB_MODE_PASTE_BUFFER) - SetCrosshairRange(PCB_PASTEBUFFER->X - PCB_PASTEBUFFER->BoundingBox.X1, + pcb_crosshair_set_range(PCB_PASTEBUFFER->X - PCB_PASTEBUFFER->BoundingBox.X1, PCB_PASTEBUFFER->Y - PCB_PASTEBUFFER->BoundingBox.Y1, MAX(0, Width - (PCB_PASTEBUFFER->BoundingBox.X2 - PCB_PASTEBUFFER->X)), MAX(0, Height - (PCB_PASTEBUFFER->BoundingBox.Y2 - PCB_PASTEBUFFER->Y))); else - SetCrosshairRange(0, 0, Width, Height); + pcb_crosshair_set_range(0, 0, Width, Height); if (gui != NULL) hid_action("PCBChanged"); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4857) +++ trunk/src/buffer.c (revision 4858) @@ -120,7 +120,7 @@ else ctx.buffer.extraflg = 0; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); ctx.buffer.src = PCB->Data; ctx.buffer.dst = Buffer->Data; SelectedOperation(&AddBufferFunctions, &ctx, pcb_false, PCB_TYPEMASK_ALL); @@ -134,7 +134,7 @@ Buffer->X = Crosshair.X; Buffer->Y = Crosshair.Y; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } /*---------------------------------------------------------------------------*/ @@ -371,9 +371,9 @@ else angle_s = argv[0]; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); Freepcb_buffer_rotate(PCB_PASTEBUFFER, strtod(angle_s, 0)); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } @@ -770,7 +770,7 @@ pcb_bool free_name = pcb_false; int force = (forces != NULL) && ((*forces == '1') || (*forces == 'y') || (*forces == 'Y')); - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (function) { switch (funchash_get(function, NULL)) { /* clear contents of paste buffer */ @@ -863,7 +863,7 @@ y += oldy; } else { - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); PCB_AFAIL(pastebuffer); } @@ -886,7 +886,7 @@ } } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4857) +++ trunk/src/crosshair.c (revision 4858) @@ -486,7 +486,7 @@ /* --------------------------------------------------------------------------- * draws additional stuff that follows the crosshair */ -void DrawAttached(void) +void pcb_draw_attached(void) { switch (conf_core.editor.mode) { case PCB_MODE_VIA: @@ -597,7 +597,7 @@ /* -------------------------------------------------------------------------- * draw the marker position */ -void DrawMark(void) +void pcb_draw_mark(void) { pcb_coord_t ms = conf_core.appearance.mark_size; @@ -612,7 +612,7 @@ /* --------------------------------------------------------------------------- * Returns the nearest grid-point to the given Coord */ -pcb_coord_t GridFit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset) +pcb_coord_t pcb_grid_fit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset) { x -= grid_offset; x = grid_spacing * pcb_round((double) x / grid_spacing); @@ -636,7 +636,7 @@ * (if necessary) mean repainting the whole screen if the GUI hasn't tracked the * location of existing attached drawing. */ -void notify_crosshair_change(pcb_bool changes_complete) +void pcb_notify_crosshair_change(pcb_bool changes_complete) { if (gui->notify_crosshair_change) gui->notify_crosshair_change(changes_complete); @@ -657,7 +657,7 @@ * They should initiate a redraw of the mark - which may (if necessary) mean * repainting the whole screen if the GUI hasn't tracked the mark's location. */ -void notify_mark_change(pcb_bool changes_complete) +void pcb_notify_mark_change(pcb_bool changes_complete) { if (gui->notify_mark_change) gui->notify_mark_change(changes_complete); @@ -674,30 +674,30 @@ * warning at the time of their first use. * */ -void HideCrosshair(void) +void pcb_crosshair_hide(void) { static pcb_bool warned_old_api = pcb_false; if (!warned_old_api) { - Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API HideCrosshair().\n" + Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_hide().\n" " This API may be removed in a future release of PCB.\n")); warned_old_api = pcb_true; } - notify_crosshair_change(pcb_false); - notify_mark_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); + pcb_notify_mark_change(pcb_false); } -void RestoreCrosshair(void) +void pcb_crosshair_restore(void) { static pcb_bool warned_old_api = pcb_false; if (!warned_old_api) { - Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API RestoreCrosshair().\n" + Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_restore().\n" " This API may be removed in a future release of PCB.\n")); warned_old_api = pcb_true; } - notify_crosshair_change(pcb_true); - notify_mark_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); + pcb_notify_mark_change(pcb_true); } /* @@ -988,7 +988,7 @@ /* --------------------------------------------------------------------------- * recalculates the passed coordinates to fit the current grid setting */ -void FitCrosshairIntoGrid(pcb_coord_t X, pcb_coord_t Y) +void pcb_crosshair_grid_fit(pcb_coord_t X, pcb_coord_t Y) { pcb_coord_t nearest_grid_x, nearest_grid_y; void *ptr1, *ptr2, *ptr3; @@ -1003,8 +1003,8 @@ nearest_grid_y = -PCB_MIL_TO_COORD(6); } else { - nearest_grid_x = GridFit(Crosshair.X, PCB->Grid, PCB->GridOffsetX); - nearest_grid_y = GridFit(Crosshair.Y, PCB->Grid, PCB->GridOffsetY); + nearest_grid_x = pcb_grid_fit(Crosshair.X, PCB->Grid, PCB->GridOffsetX); + nearest_grid_y = pcb_grid_fit(Crosshair.Y, PCB->Grid, PCB->GridOffsetY); if (Marked.status && conf_core.editor.orthogonal_moves) { pcb_coord_t dx = Crosshair.X - Marked.X; @@ -1153,9 +1153,9 @@ /* --------------------------------------------------------------------------- * move crosshair relative (has to be switched off) */ -void MoveCrosshairRelative(pcb_coord_t DeltaX, pcb_coord_t DeltaY) +void pcb_crosshair_move_relative(pcb_coord_t DeltaX, pcb_coord_t DeltaY) { - FitCrosshairIntoGrid(Crosshair.X + DeltaX, Crosshair.Y + DeltaY); + pcb_crosshair_grid_fit(Crosshair.X + DeltaX, Crosshair.Y + DeltaY); } /* --------------------------------------------------------------------------- @@ -1162,12 +1162,12 @@ * move crosshair absolute * return pcb_true if the crosshair was moved from its existing position */ -pcb_bool MoveCrosshairAbsolute(pcb_coord_t X, pcb_coord_t Y) +pcb_bool pcb_crosshair_move_absolute(pcb_coord_t X, pcb_coord_t Y) { pcb_coord_t x, y, z; x = Crosshair.X; y = Crosshair.Y; - FitCrosshairIntoGrid(X, Y); + pcb_crosshair_grid_fit(X, Y); if (Crosshair.X != x || Crosshair.Y != y) { /* back up to old position to notify the GUI * (which might want to erase the old crosshair) */ @@ -1176,7 +1176,7 @@ x = z; z = Crosshair.Y; Crosshair.Y = y; - notify_crosshair_change(pcb_false); /* Our caller notifies when it has done */ + pcb_notify_crosshair_change(pcb_false); /* Our caller notifies when it has done */ /* now move forward again */ Crosshair.X = x; Crosshair.Y = z; @@ -1188,7 +1188,7 @@ /* --------------------------------------------------------------------------- * sets the valid range for the crosshair cursor */ -void SetCrosshairRange(pcb_coord_t MinX, pcb_coord_t MinY, pcb_coord_t MaxX, pcb_coord_t MaxY) +void pcb_crosshair_set_range(pcb_coord_t MinX, pcb_coord_t MinY, pcb_coord_t MaxX, pcb_coord_t MaxY) { Crosshair.MinX = MAX(0, MinX); Crosshair.MinY = MAX(0, MinY); @@ -1196,18 +1196,18 @@ Crosshair.MaxY = MIN(PCB->MaxHeight, MaxY); /* force update of position */ - MoveCrosshairRelative(0, 0); + pcb_crosshair_move_relative(0, 0); } /* --------------------------------------------------------------------------- * centers the displayed PCB around the specified point (X,Y) */ -void CenterDisplay(pcb_coord_t X, pcb_coord_t Y) +void pcb_center_display(pcb_coord_t X, pcb_coord_t Y) { pcb_coord_t save_grid = PCB->Grid; PCB->Grid = 1; - if (MoveCrosshairAbsolute(X, Y)) - notify_crosshair_change(pcb_true); + if (pcb_crosshair_move_absolute(X, Y)) + pcb_notify_crosshair_change(pcb_true); gui->set_crosshair(Crosshair.X, Crosshair.Y, HID_SC_WARP_POINTER); PCB->Grid = save_grid; } @@ -1216,7 +1216,7 @@ * initializes crosshair stuff * clears the struct, allocates to graphical contexts */ -void InitCrosshair(void) +void pcb_crosshair_init(void) { Crosshair.GC = gui->make_gc(); @@ -1244,7 +1244,7 @@ /* --------------------------------------------------------------------------- * exits crosshair routines, release GCs */ -void DestroyCrosshair(void) +void pcb_crosshair_uninit(void) { FreePolygonMemory(&Crosshair.AttachedPolygon); gui->destroy_gc(Crosshair.GC); Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 4857) +++ trunk/src/crosshair.h (revision 4858) @@ -96,19 +96,19 @@ #define STATE_SECOND 1 #define STATE_THIRD 2 -pcb_coord_t GridFit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset); -void notify_crosshair_change(pcb_bool changes_complete); -void notify_mark_change(pcb_bool changes_complete); -void HideCrosshair(void); -void RestoreCrosshair(void); -void DrawAttached(void); -void DrawMark(void); -void MoveCrosshairRelative(pcb_coord_t, pcb_coord_t); -pcb_bool MoveCrosshairAbsolute(pcb_coord_t, pcb_coord_t); -void SetCrosshairRange(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t); -void InitCrosshair(void); -void DestroyCrosshair(void); -void FitCrosshairIntoGrid(pcb_coord_t, pcb_coord_t); -void CenterDisplay(pcb_coord_t X, pcb_coord_t Y); +pcb_coord_t pcb_grid_fit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset); +void pcb_notify_crosshair_change(pcb_bool changes_complete); +void pcb_notify_mark_change(pcb_bool changes_complete); +void pcb_crosshair_hide(void); +void pcb_crosshair_restore(void); +void pcb_draw_attached(void); +void pcb_draw_mark(void); +void pcb_crosshair_move_relative(pcb_coord_t, pcb_coord_t); +pcb_bool pcb_crosshair_move_absolute(pcb_coord_t, pcb_coord_t); +void pcb_crosshair_set_range(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t); +void pcb_crosshair_init(void); +void pcb_crosshair_uninit(void); +void pcb_crosshair_grid_fit(pcb_coord_t, pcb_coord_t); +void pcb_center_display(pcb_coord_t X, pcb_coord_t Y); #endif Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 4857) +++ trunk/src/file_act.c (revision 4858) @@ -118,17 +118,17 @@ format = argv[2]; if (strcasecmp(function, "ElementToBuffer") == 0) { - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (LoadElementToBuffer(PCB_PASTEBUFFER, name)) SetMode(PCB_MODE_PASTE_BUFFER); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } else if (strcasecmp(function, "LayoutToBuffer") == 0) { - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (pcb_buffer_load_layout(PCB_PASTEBUFFER, name, format)) SetMode(PCB_MODE_PASTE_BUFFER); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } else if (strcasecmp(function, "Layout") == 0) { @@ -182,7 +182,7 @@ if (!name) return 1; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); /* do emergency saving * clear the old struct and allocate memory for the new one */ @@ -197,13 +197,13 @@ PCB->Name = name; ResetStackAndVisibility(); - SetCrosshairRange(0, 0, PCB->MaxWidth, PCB->MaxHeight); - CenterDisplay(PCB->MaxWidth / 2, PCB->MaxHeight / 2); + pcb_crosshair_set_range(0, 0, PCB->MaxWidth, PCB->MaxHeight); + pcb_center_display(PCB->MaxWidth / 2, PCB->MaxHeight / 2); Redraw(); if (gui != NULL) hid_action("PCBChanged"); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } return 1; Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4857) +++ trunk/src/find_drc.c (revision 4858) @@ -837,5 +837,5 @@ case PCB_TYPE_POLYGON: ChangeGroupVisibility(GetLayerNumber(PCB->Data, (pcb_layer_t *) thing_ptr1), pcb_true, pcb_true); } - CenterDisplay(X, Y); + pcb_center_display(X, Y); } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4857) +++ trunk/src/gui_act.c (revision 4858) @@ -279,7 +279,7 @@ break; case F_CycleClip: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (conf_core.editor.all_direction_lines) { conf_toggle_editor(all_direction_lines); conf_setf(CFR_DESIGN,"editor/line_refraction",-1,"%d",0); @@ -288,27 +288,27 @@ conf_setf(CFR_DESIGN,"editor/line_refraction",-1,"%d",(conf_core.editor.line_refraction +1) % 3); } pcb_adjust_attached_objects(); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_CycleCrosshair: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); Crosshair.shape = CrosshairShapeIncrement(Crosshair.shape); if (Crosshair_Shapes_Number == Crosshair.shape) Crosshair.shape = Basic_Crosshair_Shape; - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleRubberBandMode: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(rubber_band_mode); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleStartDirection: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(swap_start_direction); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleUniqueNames: @@ -316,21 +316,21 @@ break; case F_ToggleSnapPin: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(snap_pin); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleSnapOffGridLine: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(snap_offgrid_line); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleHighlightOnPoint: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(highlight_on_point); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleLocalRef: @@ -375,7 +375,7 @@ break; case F_ToggleAutoDRC: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); conf_toggle_editor(auto_drc); if (conf_core.editor.auto_drc && conf_core.editor.mode == PCB_MODE_LINE) { if (ResetConnections(pcb_true)) { @@ -385,7 +385,7 @@ if (Crosshair.AttachedLine.State != STATE_FIRST) LookupConnection(Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, pcb_true, 1, PCB_FLAG_FOUND); } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; case F_ToggleCheckPlanes: @@ -421,8 +421,8 @@ pcb_coord_t oldGrid = PCB->Grid; PCB->Grid = 1; - if (MoveCrosshairAbsolute(Crosshair.X, Crosshair.Y)) - notify_crosshair_change(pcb_true); /* first notify was in MoveCrosshairAbs */ + if (pcb_crosshair_move_absolute(Crosshair.X, Crosshair.Y)) + pcb_notify_crosshair_change(pcb_true); /* first notify was in MoveCrosshairAbs */ SetGrid(oldGrid, pcb_true); } break; @@ -614,7 +614,7 @@ if (function) { Note.X = Crosshair.X; Note.Y = Crosshair.Y; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); switch (funchash_get(function, NULL)) { case F_Arc: SetMode(PCB_MODE_ARC); @@ -788,7 +788,7 @@ SaveMode(); break; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } @@ -978,25 +978,25 @@ const char *function = PCB_ACTION_ARG(0); if (!function || !*function) { if (Marked.status) { - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); Marked.status = pcb_false; - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } else { - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); Marked.status = pcb_false; Marked.status = pcb_true; Marked.X = Crosshair.X; Marked.Y = Crosshair.Y; - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } } else if (funchash_get(function, NULL) == F_Center) { - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); Marked.status = pcb_true; Marked.X = Crosshair.X; Marked.Y = Crosshair.Y; - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } return 0; } @@ -1139,22 +1139,22 @@ /* set layer current and size from line or arc */ switch (type) { case PCB_TYPE_LINE: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); set_same_(((pcb_line_t *) ptr2)->Thickness, 0, 0, ((pcb_line_t *) ptr2)->Clearance / 2, NULL); layer = (pcb_layer_t *) ptr1; if (conf_core.editor.mode != PCB_MODE_LINE) SetMode(PCB_MODE_LINE); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); hid_action("RouteStylesChanged"); break; case PCB_TYPE_ARC: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); set_same_(((pcb_arc_t *) ptr2)->Thickness, 0, 0, ((pcb_arc_t *) ptr2)->Clearance / 2, NULL); layer = (pcb_layer_t *) ptr1; if (conf_core.editor.mode != PCB_MODE_ARC) SetMode(PCB_MODE_ARC); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); hid_action("RouteStylesChanged"); break; @@ -1163,11 +1163,11 @@ break; case PCB_TYPE_VIA: - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); set_same_(0, ((pcb_pin_t *) ptr2)->Thickness, ((pcb_pin_t *) ptr2)->DrillingHole, ((pcb_pin_t *) ptr2)->Clearance / 2, NULL); if (conf_core.editor.mode != PCB_MODE_VIA) SetMode(PCB_MODE_VIA); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); hid_action("RouteStylesChanged"); break; Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 4857) +++ trunk/src/hid_nogui.c (revision 4858) @@ -155,7 +155,7 @@ static int nogui_shift_is_pressed(void) { - /* This is called from FitCrosshairIntoGrid() when the board is loaded. */ + /* This is called from pcb_crosshair_grid_fit() when the board is loaded. */ return 0; } Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 4857) +++ trunk/src/main.c (revision 4858) @@ -451,7 +451,7 @@ ResetStackAndVisibility(); if (gui->gui) - InitCrosshair(); + pcb_crosshair_init(); InitHandler(); pcb_init_buffers(); @@ -501,7 +501,7 @@ /* init the next GUI */ gui->parse_arguments(&hid_argc, &hid_argv); if (gui->gui) - InitCrosshair(); + pcb_crosshair_init(); SetMode(PCB_MODE_ARROW); hid_action("LibraryChanged"); } Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 4857) +++ trunk/src/polygon_act.c (revision 4858) @@ -119,7 +119,7 @@ { const char *function = PCB_ACTION_ARG(0); if (function && conf_core.editor.mode == PCB_MODE_POLYGON) { - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); switch (funchash_get(function, NULL)) { /* close open polygon if possible */ case F_Close: @@ -131,7 +131,7 @@ GoToPreviousPoint(); break; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); } return 0; } Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 4857) +++ trunk/src/rats_act.c (revision 4858) @@ -107,7 +107,7 @@ SET_FLAG(PCB_FLAG_SELECTED, shorty); DrawRat(shorty); Draw(); - CenterDisplay((shorty->Point2.X + shorty->Point1.X) / 2, (shorty->Point2.Y + shorty->Point1.Y) / 2); + pcb_center_display((shorty->Point2.X + shorty->Point1.X) / 2, (shorty->Point2.Y + shorty->Point1.Y) / 2); } break; } Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 4857) +++ trunk/src/select_act.c (revision 4858) @@ -183,13 +183,13 @@ box.Y1 = MIN(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); box.X2 = MAX(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); pcb_notify_block(); if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_true)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; } @@ -223,8 +223,8 @@ SetBufferNumber(MAX_BUFFER - 1); pcb_buffer_clear(PCB_PASTEBUFFER); gui->get_coords(_("Select the Element's Mark Location"), &x, &y); - x = GridFit(x, PCB->Grid, PCB->GridOffsetX); - y = GridFit(y, PCB->Grid, PCB->GridOffsetY); + x = pcb_grid_fit(x, PCB->Grid, PCB->GridOffsetX); + y = pcb_grid_fit(y, PCB->Grid, PCB->GridOffsetY); pcb_buffer_add_selected(PCB_PASTEBUFFER, x, y, pcb_true); SaveUndoSerialNumber(); RemoveSelected(); @@ -335,13 +335,13 @@ box.Y1 = MIN(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); box.X2 = MAX(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); pcb_notify_block(); if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_false)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; } Index: trunk/src/set.c =================================================================== --- trunk/src/set.c (revision 4857) +++ trunk/src/set.c (revision 4858) @@ -74,7 +74,7 @@ if (Size >= MIN_LINESIZE && Size <= MAX_LINESIZE) { conf_set_design("design/line_thickness", "%$mS", Size); if (conf_core.editor.auto_drc) - FitCrosshairIntoGrid(Crosshair.X, Crosshair.Y); + pcb_crosshair_grid_fit(Crosshair.X, Crosshair.Y); } } @@ -136,7 +136,7 @@ { if (conf_core.editor.mode == PCB_MODE_PASTE_BUFFER) { pcb_set_buffer_bbox(PCB_PASTEBUFFER); - SetCrosshairRange(PCB_PASTEBUFFER->X - PCB_PASTEBUFFER->BoundingBox.X1, + pcb_crosshair_set_range(PCB_PASTEBUFFER->X - PCB_PASTEBUFFER->BoundingBox.X1, PCB_PASTEBUFFER->Y - PCB_PASTEBUFFER->BoundingBox.Y1, PCB->MaxWidth - (PCB_PASTEBUFFER->BoundingBox.X2 - PCB_PASTEBUFFER->X), @@ -191,7 +191,7 @@ if (recursing) return; recursing = pcb_true; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); addedLines = 0; Crosshair.AttachedObject.Type = PCB_TYPE_NONE; Crosshair.AttachedObject.State = STATE_FIRST; @@ -240,7 +240,7 @@ /* do an update on the crosshair range */ SetCrosshairRangeToBuffer(); else - SetCrosshairRange(0, 0, PCB->MaxWidth, PCB->MaxHeight); + pcb_crosshair_set_range(0, 0, PCB->MaxWidth, PCB->MaxHeight); recursing = pcb_false; @@ -247,8 +247,8 @@ /* force a crosshair grid update because the valid range * may have changed */ - MoveCrosshairRelative(0, 0); - notify_crosshair_change(pcb_true); + pcb_crosshair_move_relative(0, 0); + pcb_notify_crosshair_change(pcb_true); } void SetLocalRef(pcb_coord_t X, pcb_coord_t Y, pcb_bool Showing) @@ -257,7 +257,7 @@ static int count = 0; if (Showing) { - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); if (count == 0) old = Marked; Marked.X = X; @@ -264,12 +264,12 @@ Marked.Y = Y; Marked.status = pcb_true; count++; - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } else if (count > 0) { - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); count = 0; Marked = old; - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } } Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 4857) +++ trunk/src/undo_act.c (revision 4858) @@ -135,10 +135,10 @@ return 1; /* undo the last operation */ - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if ((conf_core.editor.mode == PCB_MODE_POLYGON || conf_core.editor.mode == PCB_MODE_POLYGON_HOLE) && Crosshair.AttachedPolygon.PointN) { GoToPreviousPoint(); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } /* move anchor point if undoing during line creation */ @@ -148,7 +148,7 @@ Undo(pcb_true); /* undo the connection find */ Crosshair.AttachedLine.State = STATE_FIRST; SetLocalRef(0, 0, pcb_false); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } if (Crosshair.AttachedLine.State == STATE_THIRD) { @@ -170,7 +170,7 @@ /* wrong undo type, restore anchor points */ Crosshair.AttachedLine.Point2.X = Crosshair.AttachedLine.Point1.X; Crosshair.AttachedLine.Point2.Y = Crosshair.AttachedLine.Point1.Y; - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } /* move to new anchor */ @@ -190,7 +190,7 @@ Crosshair.AttachedLine.Point1.X = Crosshair.AttachedLine.Point2.X = ptr2->Point2.X; Crosshair.AttachedLine.Point1.Y = Crosshair.AttachedLine.Point2.Y = ptr2->Point2.Y; } - FitCrosshairIntoGrid(Crosshair.X, Crosshair.Y); + pcb_crosshair_grid_fit(Crosshair.X, Crosshair.Y); pcb_adjust_attached_objects(); if (--addedLines == 0) { Crosshair.AttachedLine.State = STATE_SECOND; @@ -203,7 +203,7 @@ ptr2 = (pcb_line_t *) ptrtmp; lastLayer = (pcb_layer_t *) ptr1; } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } } @@ -210,7 +210,7 @@ if (conf_core.editor.mode == PCB_MODE_ARC) { if (Crosshair.AttachedBox.State == STATE_SECOND) { Crosshair.AttachedBox.State = STATE_FIRST; - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } if (Crosshair.AttachedBox.State == STATE_THIRD) { @@ -239,7 +239,7 @@ break; } } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } @@ -269,7 +269,7 @@ if (((conf_core.editor.mode == PCB_MODE_POLYGON || conf_core.editor.mode == PCB_MODE_POLYGON_HOLE) && Crosshair.AttachedPolygon.PointN) || Crosshair.AttachedLine.State == STATE_SECOND) return 1; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (Redo(pcb_true)) { SetChangedFlag(pcb_true); if (conf_core.editor.mode == PCB_MODE_LINE && Crosshair.AttachedLine.State != STATE_FIRST) { @@ -279,7 +279,7 @@ addedLines++; } } - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); return 0; } Index: trunk/src_plugins/gl/hidgl.c =================================================================== --- trunk/src_plugins/gl/hidgl.c (revision 4857) +++ trunk/src_plugins/gl/hidgl.c (revision 4858) @@ -107,10 +107,10 @@ if (!Settings.DrawGrid) return; - x1 = GridFit(MAX(0, drawn_area->X1), PCB->Grid, PCB->GridOffsetX); - y1 = GridFit(MAX(0, drawn_area->Y1), PCB->Grid, PCB->GridOffsetY); - x2 = GridFit(MIN(PCB->MaxWidth, drawn_area->X2), PCB->Grid, PCB->GridOffsetX); - y2 = GridFit(MIN(PCB->MaxHeight, drawn_area->Y2), PCB->Grid, PCB->GridOffsetY); + x1 = pcb_grid_fit(MAX(0, drawn_area->X1), PCB->Grid, PCB->GridOffsetX); + y1 = pcb_grid_fit(MAX(0, drawn_area->Y1), PCB->Grid, PCB->GridOffsetY); + x2 = pcb_grid_fit(MIN(PCB->MaxWidth, drawn_area->X2), PCB->Grid, PCB->GridOffsetX); + y2 = pcb_grid_fit(MIN(PCB->MaxHeight, drawn_area->Y2), PCB->Grid, PCB->GridOffsetY); if (x1 > x2) { pcb_coord_t tmp = x1; Index: trunk/src_plugins/hid_gtk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4857) +++ trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4858) @@ -135,10 +135,10 @@ static GdkPoint *points = NULL; static int npoints = 0; - x1 = GridFit(MAX(0, SIDE_X(gport->view.x0)), PCB->Grid, PCB->GridOffsetX); - y1 = GridFit(MAX(0, SIDE_Y(gport->view.y0)), PCB->Grid, PCB->GridOffsetY); - x2 = GridFit(MIN(PCB->MaxWidth, SIDE_X(gport->view.x0 + gport->view.width - 1)), PCB->Grid, PCB->GridOffsetX); - y2 = GridFit(MIN(PCB->MaxHeight, SIDE_Y(gport->view.y0 + gport->view.height - 1)), PCB->Grid, PCB->GridOffsetY); + x1 = pcb_grid_fit(MAX(0, SIDE_X(gport->view.x0)), PCB->Grid, PCB->GridOffsetX); + y1 = pcb_grid_fit(MAX(0, SIDE_Y(gport->view.y0)), PCB->Grid, PCB->GridOffsetY); + x2 = pcb_grid_fit(MIN(PCB->MaxWidth, SIDE_X(gport->view.x0 + gport->view.width - 1)), PCB->Grid, PCB->GridOffsetX); + y2 = pcb_grid_fit(MIN(PCB->MaxHeight, SIDE_Y(gport->view.y0 + gport->view.height - 1)), PCB->Grid, PCB->GridOffsetY); grd = PCB->Grid; @@ -819,11 +819,11 @@ /* In some cases we are called with the crosshair still off */ if (priv->attached_invalidate_depth == 0) - DrawAttached(); + pcb_draw_attached(); /* In some cases we are called with the mark still off */ if (priv->mark_invalidate_depth == 0) - DrawMark(); + pcb_draw_mark(); draw_lead_user(priv); @@ -888,7 +888,7 @@ } if (priv->attached_invalidate_depth == 0) - DrawAttached(); + pcb_draw_attached(); if (!changes_complete) { priv->attached_invalidate_depth++; @@ -922,7 +922,7 @@ } if (priv->mark_invalidate_depth == 0) - DrawMark(); + pcb_draw_mark(); if (!changes_complete) { priv->mark_invalidate_depth++; Index: trunk/src_plugins/hid_gtk/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4857) +++ trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4858) @@ -858,8 +858,8 @@ ghid_invalidate_current_gc(); - DrawAttached(); - DrawMark(); + pcb_draw_attached(); + pcb_draw_mark(); hidgl_flush_triangles(&buffer); ghid_show_crosshair(TRUE); Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4857) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4858) @@ -237,7 +237,7 @@ if (violation == NULL) return; - CenterDisplay(violation->x_coord, violation->y_coord); + pcb_center_display(violation->x_coord, violation->y_coord); } Index: trunk/src_plugins/hid_gtk/gui-misc.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-misc.c (revision 4857) +++ trunk/src_plugins/hid_gtk/gui-misc.c (revision 4858) @@ -279,12 +279,12 @@ oldObjState = Crosshair.AttachedObject.State; oldLineState = Crosshair.AttachedLine.State; oldBoxState = Crosshair.AttachedBox.State; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); Crosshair.AttachedObject.State = STATE_FIRST; Crosshair.AttachedLine.State = STATE_FIRST; Crosshair.AttachedBox.State = STATE_FIRST; ghid_hand_cursor(); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); /* Stop the top level GMainLoop from getting user input from keyboard | and mouse so we can install our own handlers here. Also set the @@ -310,11 +310,11 @@ ghid_interface_input_signals_connect(); /* return to normal */ ghid_interface_set_sensitive(TRUE); - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); Crosshair.AttachedObject.State = oldObjState; Crosshair.AttachedLine.State = oldLineState; Crosshair.AttachedBox.State = oldBoxState; - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); ghid_restore_cursor(); ghid_set_status_line_label(); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 4857) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 4858) @@ -1069,7 +1069,7 @@ conf_set_design("design/min_drill", "%s", sz_drc_drill); conf_set_design("design/min_ring", "%s", sz_drc_ring); - SetCrosshairRange(0, 0, PCB->MaxWidth, PCB->MaxHeight); + pcb_crosshair_set_range(0, 0, PCB->MaxWidth, PCB->MaxHeight); lesstif_pan_fixup(); } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4857) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4858) @@ -161,15 +161,15 @@ if (crosshair_on == show) return; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (Marked.status) - notify_mark_change(pcb_false); + pcb_notify_mark_change(pcb_false); crosshair_on = show; - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); if (Marked.status) - notify_mark_change(pcb_true); + pcb_notify_mark_change(pcb_true); } /* This is the size of the current PCB work area. */ @@ -770,8 +770,8 @@ static int Center(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - x = GridFit(x, PCB->Grid, PCB->GridOffsetX); - y = GridFit(y, PCB->Grid, PCB->GridOffsetY); + x = pcb_grid_fit(x, PCB->Grid, PCB->GridOffsetX); + y = pcb_grid_fit(y, PCB->Grid, PCB->GridOffsetY); view_left_x = x - (view_width * view_zoom) / 2; view_top_y = y - (view_height * view_zoom) / 2; lesstif_pan_fixup(); @@ -1254,12 +1254,12 @@ return; } in_move_event = 1; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); if (panning) Pan(2, e->x, e->y); pcb_event_move_crosshair(Px(e->x), Py(e->y)); pcb_adjust_attached_objects(); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); in_move_event = 0; } @@ -1300,7 +1300,7 @@ if (lesstif_button_event(w, e)) return; - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); pressed_button = e->xbutton.button; mods = ((e->xbutton.state & ShiftMask) ? M_Shift : 0) + ((e->xbutton.state & ControlMask) ? M_Ctrl : 0) @@ -1311,7 +1311,7 @@ #endif hid_cfg_mouse_action(&lesstif_mouse, lesstif_mb2cfg(e->xbutton.button) | mods); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; } @@ -1321,7 +1321,7 @@ if (e->xbutton.button != pressed_button) return; lesstif_button_event(w, e); - notify_crosshair_change(pcb_false); + pcb_notify_crosshair_change(pcb_false); pressed_button = 0; mods = ((e->xbutton.state & ShiftMask) ? M_Shift : 0) + ((e->xbutton.state & ControlMask) ? M_Ctrl : 0) @@ -1332,7 +1332,7 @@ #endif + M_Release; hid_cfg_mouse_action(&lesstif_mouse, lesstif_mb2cfg(e->xbutton.button) | mods); - notify_crosshair_change(pcb_true); + pcb_notify_crosshair_change(pcb_true); break; } @@ -2185,8 +2185,8 @@ XSetForeground(display, grid_gc, grid_color); } if (conf_core.editor.view.flip_x) { - x2 = GridFit(Px(0), PCB->Grid, PCB->GridOffsetX); - x1 = GridFit(Px(view_width), PCB->Grid, PCB->GridOffsetX); + x2 = pcb_grid_fit(Px(0), PCB->Grid, PCB->GridOffsetX); + x1 = pcb_grid_fit(Px(view_width), PCB->Grid, PCB->GridOffsetX); if (Vx(x2) < 0) x2 -= PCB->Grid; if (Vx(x1) >= view_width) @@ -2193,8 +2193,8 @@ x1 += PCB->Grid; } else { - x1 = GridFit(Px(0), PCB->Grid, PCB->GridOffsetX); - x2 = GridFit(Px(view_width), PCB->Grid, PCB->GridOffsetX); + x1 = pcb_grid_fit(Px(0), PCB->Grid, PCB->GridOffsetX); + x2 = pcb_grid_fit(Px(view_width), PCB->Grid, PCB->GridOffsetX); if (Vx(x1) < 0) x1 += PCB->Grid; if (Vx(x2) >= view_width) @@ -2201,8 +2201,8 @@ x2 -= PCB->Grid; } if (conf_core.editor.view.flip_y) { - y2 = GridFit(Py(0), PCB->Grid, PCB->GridOffsetY); - y1 = GridFit(Py(view_height), PCB->Grid, PCB->GridOffsetY); + y2 = pcb_grid_fit(Py(0), PCB->Grid, PCB->GridOffsetY); + y1 = pcb_grid_fit(Py(view_height), PCB->Grid, PCB->GridOffsetY); if (Vy(y2) < 0) y2 -= PCB->Grid; if (Vy(y1) >= view_height) @@ -2209,8 +2209,8 @@ y1 += PCB->Grid; } else { - y1 = GridFit(Py(0), PCB->Grid, PCB->GridOffsetY); - y2 = GridFit(Py(view_height), PCB->Grid, PCB->GridOffsetY); + y1 = pcb_grid_fit(Py(0), PCB->Grid, PCB->GridOffsetY); + y2 = pcb_grid_fit(Py(view_height), PCB->Grid, PCB->GridOffsetY); if (Vy(y1) < 0) y1 += PCB->Grid; if (Vy(y2) >= view_height) @@ -2436,8 +2436,8 @@ XCopyArea(display, main_pixmap, window, my_gc, 0, 0, view_width, view_height, 0, 0); pixmap = window; if (crosshair_on) { - DrawAttached(); - DrawMark(); + pcb_draw_attached(); + pcb_draw_mark(); } need_redraw = 0; } @@ -2769,7 +2769,7 @@ if (invalidate_depth == 0 && crosshair_on) { save_pixmap = pixmap; pixmap = window; - DrawAttached(); + pcb_draw_attached(); pixmap = save_pixmap; } @@ -2799,7 +2799,7 @@ if (invalidate_depth == 0 && crosshair_on) { save_pixmap = pixmap; pixmap = window; - DrawMark(); + pcb_draw_mark(); pixmap = save_pixmap; } @@ -3735,8 +3735,8 @@ XCopyArea(display, main_pixmap, window, my_gc, 0, 0, view_width, view_height, 0, 0); pixmap = window; if (crosshair_on) { - DrawAttached(); - DrawMark(); + pcb_draw_attached(); + pcb_draw_mark(); } pixmap = main_pixmap; } Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4857) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4858) @@ -217,7 +217,7 @@ PIN_LOOP(element); { if (strcmp(pin->Number, pname) == 0) { - MoveCrosshairAbsolute(pin->X, pin->Y); + pcb_crosshair_move_absolute(pin->X, pin->Y); free(ename); return; } Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4857) +++ trunk/src_plugins/jostle/jostle.c (revision 4858) @@ -48,7 +48,7 @@ t = (a)[1], (a)[1] = (b)[1], (b)[1] = t; \ } -/*{if (!Marked.status && side==NORTHWEST) { DrawMark(pcb_true); Marked.status = True; Marked.X = p[0]; Marked.Y = p[1]; DrawMark(False);} }*/ +/*{if (!Marked.status && side==NORTHWEST) { pcb_draw_mark(pcb_true); Marked.status = True; Marked.X = p[0]; Marked.Y = p[1]; pcb_draw_mark(False);} }*/ enum { JNORTH, Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 4857) +++ trunk/src_plugins/loghid/hid-logger.c (revision 4858) @@ -41,9 +41,9 @@ delegatee_->invalidate_all(); } -static void log_notify_mark_change(pcb_bool changes_complete) { - pcb_fprintf(out_, "notify_mark_change(%s)\n", changes_complete ? "true" : "false"); - delegatee_->notify_mark_change(changes_complete); +static void log_pcb_notify_mark_change(pcb_bool changes_complete) { + pcb_fprintf(out_, "pcb_notify_mark_change(%s)\n", changes_complete ? "true" : "false"); + delegatee_->pcb_notify_mark_change(changes_complete); } static int log_set_layer(const char *name, int group, int empty) { Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 4857) +++ trunk/src_plugins/stroke/stroke.c (revision 4858) @@ -127,7 +127,7 @@ z = MAX(z, 1 + log(fabs(StrokeBox.Y2 - StrokeBox.Y1) / PCB->MaxHeight) / log(2.0)); PCB->Zoom = z; - CenterDisplay(x, y); + pcb_center_display(x, y); break; }