Inject Windows platform services

This commit is contained in:
2026-06-03 04:14:47 +02:00
parent 0e77ca6ba8
commit ead7f58285
6 changed files with 166 additions and 82 deletions

View File

@@ -26,6 +26,10 @@
#include "layout.h"
#include "app_core/document_session.h"
namespace pp::platform {
class PlatformServices;
}
#if defined(__OBJC__) && defined(__IOS__)
#import <Foundation/Foundation.h>
#import "GameViewController.h"
@@ -156,6 +160,7 @@ public:
float display_density = 1.f;
float zoom = 1.f;
int idle_ms = 100;
pp::platform::PlatformServices* platform_services_ = nullptr;
#if defined(__IOS__) && defined(__OBJC__)
GameViewController* ios_view;
@@ -184,6 +189,8 @@ public:
void pick_dir(std::function<void(std::string path)> callback);
void display_file(std::string path);
void share_file(std::string path);
void set_platform_services(pp::platform::PlatformServices* services) noexcept;
[[nodiscard]] pp::platform::PlatformServices* platform_services() const noexcept;
void showKeyboard();
void hideKeyboard();
void initLog();