Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 5664) +++ trunk/src/crosshair.c (revision 5665) @@ -637,42 +637,6 @@ } -/* --------------------------------------------------------------------------- - * Convenience for plugins using the old {Hide,Restore}pcb_crosshair API. - * This links up to notify the GUI of the expected changes using the new APIs. - * - * Use of this old API is deprecated, as the names don't necessarily reflect - * what all GUIs may do in response to the notifications. Keeping these APIs - * is aimed at easing transition to the newer API, they will emit a harmless - * warning at the time of their first use. - * - */ -void pcb_crosshair_hide(void) -{ - static pcb_bool warned_old_api = pcb_false; - if (!warned_old_api) { - pcb_message(PCB_MSG_WARNING, _("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; - } - - pcb_notify_crosshair_change(pcb_false); - pcb_notify_mark_change(pcb_false); -} - -void pcb_crosshair_restore(void) -{ - static pcb_bool warned_old_api = pcb_false; - if (!warned_old_api) { - pcb_message(PCB_MSG_WARNING, _("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; - } - - pcb_notify_crosshair_change(pcb_true); - pcb_notify_mark_change(pcb_true); -} - /* * Below is the implementation of the "highlight on endpoint" functionality. * This highlights lines and arcs when the crosshair is on of their (two) Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 5664) +++ trunk/src/crosshair.h (revision 5665) @@ -101,8 +101,6 @@ 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); Index: trunk/src_plugins/lib_legacy_func/lib_legacy_func.c =================================================================== --- trunk/src_plugins/lib_legacy_func/lib_legacy_func.c (revision 5664) +++ trunk/src_plugins/lib_legacy_func/lib_legacy_func.c (revision 5665) @@ -95,7 +95,43 @@ gds_append(DS, '"'); } +/* --------------------------------------------------------------------------- + * Convenience for plugins using the old {Hide,Restore}pcb_crosshair API. + * This links up to notify the GUI of the expected changes using the new APIs. + * + * Use of this old API is deprecated, as the names don't necessarily reflect + * what all GUIs may do in response to the notifications. Keeping these APIs + * is aimed at easing transition to the newer API, they will emit a harmless + * warning at the time of their first use. + * + */ +void pcb_crosshair_hide(void) +{ + static pcb_bool warned_old_api = pcb_false; + if (!warned_old_api) { + pcb_message(PCB_MSG_WARNING, "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; + } + pcb_notify_crosshair_change(pcb_false); + pcb_notify_mark_change(pcb_false); +} + +void pcb_crosshair_restore(void) +{ + static pcb_bool warned_old_api = pcb_false; + if (!warned_old_api) { + pcb_message(PCB_MSG_WARNING, "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; + } + + pcb_notify_crosshair_change(pcb_true); + pcb_notify_mark_change(pcb_true); +} + + pcb_uninit_t hid_lib_legacy_func_init(void) { return NULL; Index: trunk/src_plugins/lib_legacy_func/lib_legacy_func.h =================================================================== --- trunk/src_plugins/lib_legacy_func/lib_legacy_func.h (revision 5664) +++ trunk/src_plugins/lib_legacy_func/lib_legacy_func.h (revision 5665) @@ -35,3 +35,6 @@ * some special characters are quoted */ void CreateQuotedString(gds_t *, char *); + +void pcb_crosshair_hide(void); +void pcb_crosshair_restore(void);