| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef SAURA_OS_HPP_
- #define SAURA_OS_HPP_
- #include <SDL3/SDL.h>
- #include <filesystem>
- #include <memory>
- #include "saura/core/os/os_types.hpp"
- #include "saura/core/ui/ui.hpp"
- namespace fs = std::filesystem;
- namespace saura::os {
- class Context {
- private:
- std::shared_ptr<Window_Context> root_window_ctx;
- std::unique_ptr<ui::Context> ui_ctx;
- public:
- Context();
- ~Context();
- void draw_begin();
- void draw_end();
- void update();
- bool update_events();
- void sleep(double ms);
- int get_root_window_width();
- int get_root_window_height();
- void set_root_window_title(std::string title);
- double get_performance_frequency();
- double get_performance_counter();
- uint32_t get_dpi_scale();
- static std::string get_safe_getenv(const std::string key);
- static fs::path get_home_config_path();
- static std::string get_user_name();
- };
- } // namespace saura::os
- #endif
|