Isolate platform SDK includes from app header

This commit is contained in:
2026-06-04 18:58:02 +02:00
parent 08d8c1e82c
commit 63ea626cef
5 changed files with 30 additions and 8 deletions

View File

@@ -32,23 +32,23 @@ struct PlatformStoragePaths;
}
#if defined(__OBJC__) && defined(__IOS__)
#import <Foundation/Foundation.h>
#import "GameViewController.h"
#import "AppDelegate.h"
@class GameViewController;
@class AppDelegate;
#endif
#if defined(__OBJC__) && defined(__OSX__)
#import "main.h"
@class View;
@class AppOSX;
#endif
#ifdef __ANDROID__
#include "main.h"
struct android_app;
struct engine;
#endif
#ifdef __LINUX__
#include <GLFW/glfw3.h>
#if __LINUX__ || __WEB__
struct GLFWwindow;
#endif
struct VRController
{
enum class kButton : uint8_t

View File

@@ -7,6 +7,7 @@
#include "renderer_gl/opengl_capabilities.h"
#ifdef __ANDROID__
#include "main.h"
void displayKeyboard(bool pShow);
void android_async_lock();
void android_async_swap();
@@ -18,16 +19,26 @@ void android_pick_file_save(std::function<void(std::string)> callback);
std::string android_get_clipboard();
bool android_set_clipboard(const std::string& s);
#elif __APPLE__
#include <Foundation/Foundation.h>
#include "objc_utils.h"
#ifdef __IOS__
#include "AppDelegate.h"
#include "GameViewController.h"
#elif defined(__OSX__)
#include "main.h"
#endif
void delete_all_files_in_path(const std::string& source_path);
#ifdef __IOS__
void save_image_library(const std::string& path);
#endif
#elif __LINUX__
#include <GLFW/glfw3.h>
#include <tinyfiledialogs.h>
std::string linux_home_path();
int mkpath(const std::string& dir, mode_t mode = DEFFILEMODE);
void linux_update_fps(int frames);
#elif __WEB__
#include <GLFW/glfw3.h>
void webgl_pick_file(std::function<void(std::string)> callback);
void webgl_pick_file_save(
const std::string& path,