Introduce platform services interface

This commit is contained in:
2026-06-03 03:59:59 +02:00
parent 6960bd3410
commit 4ed72ebc80
10 changed files with 259 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
# PanoPainter Modernization Roadmap
Status: live
Last updated: 2026-06-02
Last updated: 2026-06-03
This is the living roadmap for modernizing PanoPainter into independently
testable C++23 components while retaining all existing functionality. Keep this
@@ -87,6 +87,8 @@ Intended responsibilities:
- `pp_ui_core`: `Node`, layout, generic controls, text/image primitives.
- `pp_panopainter_ui`: panels, dialogs, `NodeCanvas`, and app-specific
workflows.
- `pp_platform_api`: SDK-free service interfaces for clipboard, cursor,
virtual keyboard, file pickers, sharing, and future platform automation.
- `pp_platform_*`: Windows, macOS/iOS, Android, Linux, and WebGL shells.
- `panopainter_app`: composition root only.
@@ -466,6 +468,11 @@ cursor bridges continue.
`pano_cli plan-clipboard-read` and `pano_cli plan-clipboard-write` expose the
app-core clipboard text decisions used by live clipboard get/set requests
before retained platform clipboard bridges continue.
`pp_platform_api` now owns a headless `PlatformServices` interface for
clipboard text, cursor visibility, and virtual-keyboard visibility. Live app
clipboard/cursor/keyboard execution routes through a debt-tracked legacy
adapter in `app_events.cpp`, so behavior is preserved while later platform
shell implementations can replace direct bridge calls.
`pano_cli plan-cloud-upload` exposes the app-core cloud upload decision used by
the live cloud upload command for missing-canvas, new-document warning, publish
prompt, and dirty-document save-before-upload states before legacy UI, canvas,
@@ -494,8 +501,9 @@ Implementation tasks:
7. `pp_paint_renderer`
8. `pp_ui_core`
9. `pp_panopainter_ui`
10. `pp_platform_*`
11. `panopainter_app`
10. `pp_platform_api`
11. `pp_platform_*`
12. `panopainter_app`
- Remove renderer/platform dependencies from pure headers first, especially:
- `Brush`
- document/layer model
@@ -975,6 +983,11 @@ Results:
`pano_cli_plan_clipboard_write_smoke`, and
`pano_cli_plan_clipboard_write_empty_smoke` passed and expose app-core
clipboard decisions as JSON, including empty write text.
- `pp_platform_api_tests` passed, covering the SDK-free `PlatformServices`
interface for clipboard read/write, empty clipboard writes, cursor
visibility dispatch, and virtual-keyboard visibility dispatch. The live app
now consumes this interface through the legacy platform adapter for
clipboard/cursor/keyboard execution.
- `panopainter_validate_shaders` passed, validating 25 shader programs and 7
shader includes for stage markers and include graph integrity.
- `pp_renderer_gl_capabilities_tests` passed on default MSVC, vcpkg-headless,