Files
vicliuandGitHub d320b6511d Unify PlatformIO and ESP-IDF around a shared UI/runtime shellRefactor/repo structure (#11)
* Unify PlatformIO and ESP-IDF around a shared UI/runtime shell
2026-03-12 01:17:46 +08:00

26 lines
374 B
C++

/**
* @file page_host.h
* @brief Generic shared page host hooks
*/
#pragma once
namespace ui::page
{
struct Host
{
void* user_data = nullptr;
void (*request_exit)(void* user_data) = nullptr;
};
inline void request_exit(const Host* host)
{
if (host && host->request_exit)
{
host->request_exit(host->user_data);
}
}
} // namespace ui::page