Thin Windows runtime globals and legacy GLFW hooks
This commit is contained in:
@@ -9,20 +9,15 @@ struct GLFWwindow;
|
||||
namespace pp::platform::legacy {
|
||||
|
||||
#if defined(__LINUX__) || defined(__WEB__)
|
||||
struct RetainedLegacyGlfwWindowHooks final {
|
||||
std::function<void()> acquire_render_context;
|
||||
std::function<void()> present_render_context;
|
||||
std::function<void()> request_app_close;
|
||||
};
|
||||
|
||||
struct RetainedLegacyGlfwWindowState final {
|
||||
GLFWwindow* window = nullptr;
|
||||
RetainedLegacyGlfwWindowHooks hooks;
|
||||
};
|
||||
|
||||
[[nodiscard]] RetainedLegacyGlfwWindowState& active_legacy_glfw_window_state();
|
||||
[[nodiscard]] RetainedLegacyGlfwWindowHooks& active_legacy_glfw_window_hooks();
|
||||
void set_legacy_glfw_window(GLFWwindow* window);
|
||||
void acquire_legacy_glfw_render_context();
|
||||
void present_legacy_glfw_render_context();
|
||||
void request_legacy_glfw_app_close();
|
||||
#endif
|
||||
|
||||
[[nodiscard]] pp::platform::WebPlatformServices& active_legacy_web_platform_services();
|
||||
|
||||
Reference in New Issue
Block a user