yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_WINDOW_H_
2#define YAZE_CORE_WINDOW_H_
3
4#include <memory>
5
7#include "absl/status/status.h"
8#include "absl/strings/str_format.h"
10#include "app/gfx/core/bitmap.h"
11#include "util/sdl_deleter.h"
12
13#ifdef CreateWindow
14#undef CreateWindow
15#endif
16
17namespace yaze {
18namespace core {
19
20struct Window {
21 std::shared_ptr<SDL_Window> window_;
22 SDL_AudioDeviceID audio_device_;
23 std::shared_ptr<int16_t> audio_buffer_;
24 bool active_ = true;
25};
26
27// Legacy CreateWindow (deprecated - use Controller::OnEntry instead)
28// Kept for backward compatibility with test code
29absl::Status CreateWindow(Window& window, gfx::IRenderer* renderer = nullptr,
30 int flags = SDL_WINDOW_RESIZABLE);
31absl::Status HandleEvents(Window& window);
32absl::Status ShutdownWindow(Window& window);
33
34} // namespace core
35} // namespace yaze
36#endif // YAZE_CORE_WINDOW_H_
Defines an abstract interface for all rendering operations.
Definition irenderer.h:40
absl::Status ShutdownWindow(Window &window)
Definition window.cc:155
absl::Status HandleEvents(Window &window)
Definition window.cc:200
absl::Status CreateWindow(Window &window, gfx::IRenderer *renderer, int flags)
Definition window.cc:62
SDL2/SDL3 compatibility layer.
std::shared_ptr< SDL_Window > window_
Definition window.h:21
std::shared_ptr< int16_t > audio_buffer_
Definition window.h:23
SDL_AudioDeviceID audio_device_
Definition window.h:22