OSX refactor -> renamed OSXWindowFrameView to OSXView

This commit is contained in:
Carlos Aragones 2020-05-17 18:39:51 +02:00
parent 235dc1e670
commit 75de20e4cc
6 changed files with 13 additions and 12 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ t2-output
/linux /linux
/build /build
/.history /.history
/xcode

View File

@ -36,8 +36,8 @@ set(SrcMacOSX
src/macosx/MacMiniFB.m src/macosx/MacMiniFB.m
src/macosx/OSXWindow.h src/macosx/OSXWindow.h
src/macosx/OSXWindow.m src/macosx/OSXWindow.m
src/macosx/OSXWindowFrameView.h src/macosx/OSXView.h
src/macosx/OSXWindowFrameView.m src/macosx/OSXView.m
src/macosx/OSXViewController.h src/macosx/OSXViewController.h
src/macosx/OSXViewController.m src/macosx/OSXViewController.m
src/macosx/WindowData_OSX.h src/macosx/WindowData_OSX.h

View File

@ -1,5 +1,5 @@
#include "OSXWindow.h" #include "OSXWindow.h"
#include "OSXWindowFrameView.h" #include "OSXView.h"
#include "OSXViewController.h" #include "OSXViewController.h"
#include "WindowData_OSX.h" #include "WindowData_OSX.h"
#include <MiniFB.h> #include <MiniFB.h>

View File

@ -2,7 +2,7 @@
#include "WindowData.h" #include "WindowData.h"
@interface OSXWindowFrameView : NSView @interface OSXView : NSView
{ {
@public SWindowData *window_data; @public SWindowData *window_data;
#if defined(USE_METAL_API) #if defined(USE_METAL_API)

View File

@ -1,9 +1,9 @@
#import "OSXWindowFrameView.h" #import "OSXView.h"
#import "OSXWindow.h" #import "OSXWindow.h"
#include <MiniFB_internal.h> #include <MiniFB_internal.h>
//------------------------------------- //-------------------------------------
@implementation OSXWindowFrameView @implementation OSXView
#if defined(USE_METAL_API) #if defined(USE_METAL_API)

View File

@ -1,5 +1,5 @@
#import "OSXWindow.h" #import "OSXWindow.h"
#import "OSXWindowFrameView.h" #import "OSXView.h"
#include "WindowData_OSX.h" #include "WindowData_OSX.h"
#include <MiniFB_internal.h> #include <MiniFB_internal.h>
#include <MiniFB_enums.h> #include <MiniFB_enums.h>
@ -28,7 +28,7 @@
self.delegate = self; self.delegate = self;
self->window_data = windowData; self->window_data = windowData;
OSXWindowFrameView *view = (OSXWindowFrameView *) self->childContentView.superview; OSXView *view = (OSXView *) self->childContentView.superview;
view->window_data = windowData; view->window_data = windowData;
} }
return self; return self;
@ -38,7 +38,7 @@
- (void) removeWindowData { - (void) removeWindowData {
self->window_data = 0x0; self->window_data = 0x0;
OSXWindowFrameView *view = (OSXWindowFrameView *) self->childContentView.superview; OSXView *view = (OSXView *) self->childContentView.superview;
view->window_data = 0x0; view->window_data = 0x0;
} }
@ -60,7 +60,7 @@
sizeDelta.width -= childBoundsSize.width; sizeDelta.width -= childBoundsSize.width;
sizeDelta.height -= childBoundsSize.height; sizeDelta.height -= childBoundsSize.height;
OSXWindowFrameView *frameView = [super contentView]; OSXView *frameView = [super contentView];
NSSize newFrameSize = [frameView bounds].size; NSSize newFrameSize = [frameView bounds].size;
newFrameSize.width += sizeDelta.width; newFrameSize.width += sizeDelta.width;
newFrameSize.height += sizeDelta.height; newFrameSize.height += sizeDelta.height;
@ -208,10 +208,10 @@
NSRect bounds = [self frame]; NSRect bounds = [self frame];
bounds.origin = NSZeroPoint; bounds.origin = NSZeroPoint;
OSXWindowFrameView *frameView = [super contentView]; OSXView *frameView = [super contentView];
if (!frameView) if (!frameView)
{ {
frameView = [[[OSXWindowFrameView alloc] initWithFrame:bounds] autorelease]; frameView = [[[OSXView alloc] initWithFrame:bounds] autorelease];
[super setContentView:frameView]; [super setContentView:frameView];
} }