From 51d00541e555dee40a504ba1aab70276c1e94948 Mon Sep 17 00:00:00 2001 From: Carlos Aragones <> Date: Sun, 17 May 2020 19:53:06 +0200 Subject: [PATCH] OSX Refactor -> renamed OSXViewController to OSXViewDelegate --- CMakeLists.txt | 4 ++-- src/macosx/MacMiniFB.m | 4 ++-- src/macosx/{OSXViewController.h => OSXViewDelegate.h} | 2 +- src/macosx/{OSXViewController.m => OSXViewDelegate.m} | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/macosx/{OSXViewController.h => OSXViewDelegate.h} (93%) rename src/macosx/{OSXViewController.m => OSXViewDelegate.m} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd80ad9..3c0d13b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,8 @@ set(SrcMacOSX src/macosx/OSXWindow.m src/macosx/OSXView.h src/macosx/OSXView.m - src/macosx/OSXViewController.h - src/macosx/OSXViewController.m + src/macosx/OSXViewDelegate.h + src/macosx/OSXViewDelegate.m src/macosx/WindowData_OSX.h ) diff --git a/src/macosx/MacMiniFB.m b/src/macosx/MacMiniFB.m index dd9e7a4..f051b32 100644 --- a/src/macosx/MacMiniFB.m +++ b/src/macosx/MacMiniFB.m @@ -1,6 +1,6 @@ #include "OSXWindow.h" #include "OSXView.h" -#include "OSXViewController.h" +#include "OSXViewDelegate.h" #include "WindowData_OSX.h" #include #include @@ -129,7 +129,7 @@ mfb_open_ex(const char *title, unsigned width, unsigned height, unsigned flags) } #if defined(USE_METAL_API) - OSXViewController *viewController = [[OSXViewController alloc] initWithWindowData:window_data]; + OSXViewDelegate *viewController = [[OSXViewDelegate alloc] initWithWindowData:window_data]; MTKView* view = [[MTKView alloc] initWithFrame:rectangle]; view.device = viewController->metal_device; diff --git a/src/macosx/OSXViewController.h b/src/macosx/OSXViewDelegate.h similarity index 93% rename from src/macosx/OSXViewController.h rename to src/macosx/OSXViewDelegate.h index 235ba68..d4eb10a 100644 --- a/src/macosx/OSXViewController.h +++ b/src/macosx/OSXViewDelegate.h @@ -10,7 +10,7 @@ enum { MaxBuffersInFlight = 3 }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -@interface OSXViewController : NSViewController +@interface OSXViewDelegate : NSViewController { @public SWindowData *window_data; @public SWindowData_OSX *window_data_osx; diff --git a/src/macosx/OSXViewController.m b/src/macosx/OSXViewDelegate.m similarity index 99% rename from src/macosx/OSXViewController.m rename to src/macosx/OSXViewDelegate.m index 2b98fec..35db248 100644 --- a/src/macosx/OSXViewController.m +++ b/src/macosx/OSXViewDelegate.m @@ -1,4 +1,4 @@ -#include "OSXViewController.h" +#include "OSXViewDelegate.h" #if defined(USE_METAL_API) @@ -49,7 +49,7 @@ NSString *g_shader_src = kShader( ); //------------------------------------- -@implementation OSXViewController +@implementation OSXViewDelegate //------------------------------------- - (id) initWithWindowData:(SWindowData *) windowData {