Extract platform policy catalog

This commit is contained in:
2026-06-05 11:39:21 +02:00
parent ab3637af9c
commit b1d71f2621
9 changed files with 401 additions and 100 deletions

View File

@@ -0,0 +1,51 @@
#pragma once
#include "platform_api/platform_services.h"
#include <string_view>
#include <vector>
namespace pp::platform {
enum class PlatformFamily {
generic_desktop,
windows,
macos,
ios,
android,
linux,
webgl,
};
[[nodiscard]] PlatformFamily current_platform_family() noexcept;
[[nodiscard]] bool platform_deletes_recorded_files_on_clear(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_publishes_exported_images(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_flushes_persistent_storage(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_enables_live_asset_reloading(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_supports_working_directory_picker(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_uses_prepared_file_writes(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_uses_work_directory_document_export_collections(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_uses_ppbr_export_data_directory_override(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_supports_sonarpen(PlatformFamily family) noexcept;
[[nodiscard]] int platform_default_canvas_resolution(PlatformFamily family) noexcept;
[[nodiscard]] bool platform_draws_canvas_tip_for_pointer(
PlatformFamily family,
bool is_mouse,
bool is_stylus,
bool is_left_button_release) noexcept;
[[nodiscard]] std::vector<std::string> platform_document_browse_roots(
PlatformFamily family,
std::string_view work_path,
std::string_view data_path);
[[nodiscard]] PreparedFileTarget plan_platform_writable_file(
PlatformFamily family,
std::string_view type,
std::string_view default_name,
std::string_view data_path,
std::string_view temporary_path);
}