mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-08-14 06:39:45 +00:00
26 lines
374 B
C++
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
|