From 75de20e4ccda60e4de555cb6f44151c909533ba5 Mon Sep 17 00:00:00 2001 From: Carlos Aragones <> Date: Sun, 17 May 2020 18:39:51 +0200 Subject: [PATCH] OSX refactor -> renamed OSXWindowFrameView to OSXView --- .gitignore | 1 + CMakeLists.txt | 4 ++-- src/macosx/MacMiniFB.m | 2 +- src/macosx/{OSXWindowFrameView.h => OSXView.h} | 2 +- src/macosx/{OSXWindowFrameView.m => OSXView.m} | 4 ++-- src/macosx/OSXWindow.m | 12 ++++++------ 6 files changed, 13 insertions(+), 12 deletions(-) rename src/macosx/{OSXWindowFrameView.h => OSXView.h} (77%) rename src/macosx/{OSXWindowFrameView.m => OSXView.m} (95%) diff --git a/.gitignore b/.gitignore index 0836cf7..4fb9383 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ t2-output /linux /build /.history +/xcode \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ab37f0..bd80ad9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,8 +36,8 @@ set(SrcMacOSX src/macosx/MacMiniFB.m src/macosx/OSXWindow.h src/macosx/OSXWindow.m - src/macosx/OSXWindowFrameView.h - src/macosx/OSXWindowFrameView.m + src/macosx/OSXView.h + src/macosx/OSXView.m src/macosx/OSXViewController.h src/macosx/OSXViewController.m src/macosx/WindowData_OSX.h diff --git a/src/macosx/MacMiniFB.m b/src/macosx/MacMiniFB.m index b9ea357..b2e077c 100644 --- a/src/macosx/MacMiniFB.m +++ b/src/macosx/MacMiniFB.m @@ -1,5 +1,5 @@ #include "OSXWindow.h" -#include "OSXWindowFrameView.h" +#include "OSXView.h" #include "OSXViewController.h" #include "WindowData_OSX.h" #include diff --git a/src/macosx/OSXWindowFrameView.h b/src/macosx/OSXView.h similarity index 77% rename from src/macosx/OSXWindowFrameView.h rename to src/macosx/OSXView.h index fe97db8..73ed1f4 100644 --- a/src/macosx/OSXWindowFrameView.h +++ b/src/macosx/OSXView.h @@ -2,7 +2,7 @@ #include "WindowData.h" -@interface OSXWindowFrameView : NSView +@interface OSXView : NSView { @public SWindowData *window_data; #if defined(USE_METAL_API) diff --git a/src/macosx/OSXWindowFrameView.m b/src/macosx/OSXView.m similarity index 95% rename from src/macosx/OSXWindowFrameView.m rename to src/macosx/OSXView.m index e6c419e..a7b8991 100644 --- a/src/macosx/OSXWindowFrameView.m +++ b/src/macosx/OSXView.m @@ -1,9 +1,9 @@ -#import "OSXWindowFrameView.h" +#import "OSXView.h" #import "OSXWindow.h" #include //------------------------------------- -@implementation OSXWindowFrameView +@implementation OSXView #if defined(USE_METAL_API) diff --git a/src/macosx/OSXWindow.m b/src/macosx/OSXWindow.m index a8f0add..26e2a5d 100644 --- a/src/macosx/OSXWindow.m +++ b/src/macosx/OSXWindow.m @@ -1,5 +1,5 @@ #import "OSXWindow.h" -#import "OSXWindowFrameView.h" +#import "OSXView.h" #include "WindowData_OSX.h" #include #include @@ -28,7 +28,7 @@ self.delegate = self; self->window_data = windowData; - OSXWindowFrameView *view = (OSXWindowFrameView *) self->childContentView.superview; + OSXView *view = (OSXView *) self->childContentView.superview; view->window_data = windowData; } return self; @@ -38,7 +38,7 @@ - (void) removeWindowData { self->window_data = 0x0; - OSXWindowFrameView *view = (OSXWindowFrameView *) self->childContentView.superview; + OSXView *view = (OSXView *) self->childContentView.superview; view->window_data = 0x0; } @@ -60,7 +60,7 @@ sizeDelta.width -= childBoundsSize.width; sizeDelta.height -= childBoundsSize.height; - OSXWindowFrameView *frameView = [super contentView]; + OSXView *frameView = [super contentView]; NSSize newFrameSize = [frameView bounds].size; newFrameSize.width += sizeDelta.width; newFrameSize.height += sizeDelta.height; @@ -208,10 +208,10 @@ NSRect bounds = [self frame]; bounds.origin = NSZeroPoint; - OSXWindowFrameView *frameView = [super contentView]; + OSXView *frameView = [super contentView]; if (!frameView) { - frameView = [[[OSXWindowFrameView alloc] initWithFrame:bounds] autorelease]; + frameView = [[[OSXView alloc] initWithFrame:bounds] autorelease]; [super setContentView:frameView]; }