How to pass parameters to lv_obj_add_event_cb

Hello
I have two buttons
lv_obj_add_event_cb(ui_screenMusical, setMusicalMode, LV_EVENT_SCREEN_LOADED, NULL);
lv_obj_add_event_cb(ui_screenHistory, setHistoryMode, LV_EVENT_SCREEN_LOADED, NULL);

Functions are

void setMusicalMode(lv_event_t *e)
{
    currentFolder = "/m";
    setRootDirectory(currentFolder);
    playFirstMP3IfAvailable();
}

void setHistoryMode(lv_event_t *e)
{
    currentFolder = "/h";
    setRootDirectory(currentFolder);
    playFirstMP3IfAvailable();
}

I want to regroup those 2 functions in one called setMode

void setMode(const String &mode, lv_event_t event) {
    currentFolder = mode; // Set the current folder to /m or /h
    setRootDirectory(currentFolder);
    playFirstMP3IfAvailable();
}
const String musicalModeData = "/m";
const String historyModeData = "/h";
lv_obj_add_event_cb(ui_screenMusical, setMode, LV_EVENT_SCREEN_LOADED, &musicalModeData);
lv_obj_add_event_cb(ui_ScreenHistory, setMode, LV_EVENT_SCREEN_LOADED, &historyModeData);

But It does not work like I thought.
Can you tell me how to do that ?
Regards

uint32_t *args = (uint32_t *)malloc(sizeof(uint32_t) * 3); //Free it before you delete the widget.
args[0] = 1;
args[1] = 2;
args[2] = 3;
lv_obj_add_event_cb(ui_screenMusical, [](lv_event_t * e) {
		uint32_t *args = (uint32_t *)e->user_data;
		lv_event_code_t code = lv_event_get_code(e);
		if(code == LV_EVENT_CLICKED) {
				// Your code
		}
}, LV_EVENT_ALL, (void *)args);