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 <SDL.h>
5
6#include <memory>
7
8#include "absl/status/status.h"
9#include "absl/strings/str_format.h"
10#include "util/sdl_deleter.h"
11#include "app/gfx/bitmap.h"
13
14namespace yaze {
15namespace core {
16
17struct Window {
18 std::shared_ptr<SDL_Window> window_;
19 SDL_AudioDeviceID audio_device_;
20 std::shared_ptr<int16_t> audio_buffer_;
21 bool active_ = true;
22};
23
24// Legacy CreateWindow (deprecated - use Controller::OnEntry instead)
25// Kept for backward compatibility with test code
26absl::Status CreateWindow(Window& window, gfx::IRenderer* renderer = nullptr,
27 int flags = SDL_WINDOW_RESIZABLE);
28absl::Status HandleEvents(Window &window);
29absl::Status ShutdownWindow(Window &window);
30
31} // namespace core
32} // namespace yaze
33#endif // YAZE_CORE_WINDOW_H_
Defines an abstract interface for all rendering operations.
Definition irenderer.h:35
absl::Status ShutdownWindow(Window &window)
Definition window.cc:137
absl::Status HandleEvents(Window &window)
Definition window.cc:177
absl::Status CreateWindow(Window &window, gfx::IRenderer *renderer, int flags)
Definition window.cc:57
Main namespace for the application.
std::shared_ptr< SDL_Window > window_
Definition window.h:18
std::shared_ptr< int16_t > audio_buffer_
Definition window.h:20
SDL_AudioDeviceID audio_device_
Definition window.h:19