42 lines
999 B
C++
42 lines
999 B
C++
/*
|
|
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <turbine/clipboard.hpp>
|
|
#include <turbine/context.hpp>
|
|
#include <turbine/gfx.hpp>
|
|
#include <turbine/event.hpp>
|
|
#include <turbine/turbine.hpp>
|
|
|
|
namespace turbine {
|
|
|
|
class Context {
|
|
public:
|
|
UpdateHandler updateHandler = [](Context&) -> int {return 0;};
|
|
keel::Context keelCtx;
|
|
KeyEventHandler keyEventHandler = nullptr;
|
|
ox::AnyPtr applicationData;
|
|
|
|
// GLFW impl data ////////////////////////////////////////////////////////
|
|
int uninterruptedRefreshes = 3;
|
|
ox::UPtr<BaseClipboardObject> clipboard;
|
|
struct GLFWwindow *window = nullptr;
|
|
int refreshWithinMs = 0;
|
|
ox::Vector<gl::Drawer*, 5> drawers;
|
|
TimeMs startTime = 0;
|
|
uint64_t wakeupTime = 0;
|
|
uint64_t keysDown = 0;
|
|
uint64_t prevFpsCheckTime = 0;
|
|
uint64_t draws = 0;
|
|
|
|
Context() noexcept = default;
|
|
|
|
Context(Context const&other) noexcept = delete;
|
|
Context(Context const&&other) noexcept = delete;
|
|
|
|
};
|
|
|
|
}
|