backend-infra-engineer: Release v0.3.2 snapshot
This commit is contained in:
33
src/app/platform/window.h
Normal file
33
src/app/platform/window.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef YAZE_CORE_WINDOW_H_
|
||||
#define YAZE_CORE_WINDOW_H_
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "util/sdl_deleter.h"
|
||||
#include "app/gfx/core/bitmap.h"
|
||||
#include "app/gfx/backend/irenderer.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace core {
|
||||
|
||||
struct Window {
|
||||
std::shared_ptr<SDL_Window> window_;
|
||||
SDL_AudioDeviceID audio_device_;
|
||||
std::shared_ptr<int16_t> audio_buffer_;
|
||||
bool active_ = true;
|
||||
};
|
||||
|
||||
// Legacy CreateWindow (deprecated - use Controller::OnEntry instead)
|
||||
// Kept for backward compatibility with test code
|
||||
absl::Status CreateWindow(Window& window, gfx::IRenderer* renderer = nullptr,
|
||||
int flags = SDL_WINDOW_RESIZABLE);
|
||||
absl::Status HandleEvents(Window &window);
|
||||
absl::Status ShutdownWindow(Window &window);
|
||||
|
||||
} // namespace core
|
||||
} // namespace yaze
|
||||
#endif // YAZE_CORE_WINDOW_H_
|
||||
Reference in New Issue
Block a user