How to extract variable from a function to main.c?

Hi,
I was sent to you from SquareLine Studio.
There is a function in ui_events.c :

void FREQ(lv_event_t * e)
{
lv_obj_t * slider = lv_event_get_target(e);
int16_t v = lv_slider_get_value(slider);
printf(“FREQ:%d\n”, v);
}

How can I extract the v variable to main.c?

If your screens isnt temporary, you dont require this. Simply get VALUE in main or on any place…

lv_slider_get_value(ui_slider03);

exellent!!!