add iOS AppViewController interface for MTKViewDelegate/NSWindowDelegate

This commit is contained in:
scawful
2024-08-02 15:36:02 -04:00
parent c1af4fbb4d
commit e67269e41e

View File

@@ -0,0 +1,25 @@
#ifndef YAZE_APP_CORE_PLATFORM_APP_VIEW_CONTROLLER_H
#define YAZE_APP_CORE_PLATFORM_APP_VIEW_CONTROLLER_H
#ifdef __APPLE__
#include <TargetConditionals.h>
#if TARGET_OS_OSX
#include "imgui_impl_osx.h"
@interface AppViewController : NSViewController <NSWindowDelegate>
@end
#else
@interface AppViewController : UIViewController <MTKViewDelegate>
@property(nonatomic) yaze::app::core::Controller *controller;
@end
#endif
@interface AppViewController () <MTKViewDelegate>
@property(nonatomic, readonly) MTKView *mtkView;
@property(nonatomic, strong) id<MTLDevice> device;
@property(nonatomic, strong) id<MTLCommandQueue> commandQueue;
@end
#endif // __APPLE__
#endif // YAZE_APP_CORE_PLATFORM_APP_VIEW_CONTROLLER_H