In case of Arduino I think the simplest would be to disable generating ui_events.c and add teh functions manually to the INO file.
ui_events.c
Set “Call function export path” to “don’t export” in Project settings: