refactor(new_editor): tighten app dependency boundaries
This commit is contained in:
28
new_editor/app/Host/TextureHost.h
Normal file
28
new_editor/app/Host/TextureHost.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
namespace XCEngine::UI::Editor::Host {
|
||||
|
||||
class TextureHost {
|
||||
public:
|
||||
virtual ~TextureHost() = default;
|
||||
|
||||
virtual bool LoadTextureFromFile(
|
||||
const std::filesystem::path& path,
|
||||
::XCEngine::UI::UITextureHandle& outTexture,
|
||||
std::string& outError) = 0;
|
||||
virtual bool LoadTextureFromMemory(
|
||||
const std::uint8_t* data,
|
||||
std::size_t size,
|
||||
::XCEngine::UI::UITextureHandle& outTexture,
|
||||
std::string& outError) = 0;
|
||||
virtual void ReleaseTexture(::XCEngine::UI::UITextureHandle& texture) = 0;
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::Host
|
||||
Reference in New Issue
Block a user