diff --git a/ui/cocoa/ebiten_content_view.h b/ui/cocoa/ebiten_content_view.h deleted file mode 100644 index bd4e69cea..000000000 --- a/ui/cocoa/ebiten_content_view.h +++ /dev/null @@ -1,13 +0,0 @@ -// -*- objc -*- - -#ifndef GO_EBITEN_UI_COCOA_EBITEN_OPENGL_VIEW_H_ -#define GO_EBITEN_UI_COCOA_EBITEN_OPENGL_VIEW_H_ - -#import -#import - -@interface EbitenContentView : NSView - -@end - -#endif diff --git a/ui/cocoa/ebiten_content_view.c b/ui/cocoa/ebiten_game_content_view.c similarity index 80% rename from ui/cocoa/ebiten_content_view.c rename to ui/cocoa/ebiten_game_content_view.c index 347ec74b0..846d10851 100644 --- a/ui/cocoa/ebiten_content_view.c +++ b/ui/cocoa/ebiten_game_content_view.c @@ -1,13 +1,13 @@ // -*- objc -*- -#include "ebiten_content_view.h" +#include "ebiten_game_content_view.h" #include "input.h" -void ebiten_KeyDown(void* nativeWindow, int keyCode); -void ebiten_KeyUp(void* nativeWindow, int keyCode); -void ebiten_MouseStateUpdated(void* nativeWindow, InputType inputType, int x, int y); +void ebiten_KeyDown(NSWindow* nativeWindow, int keyCode); +void ebiten_KeyUp(NSWindow* nativeWindow, int keyCode); +void ebiten_MouseStateUpdated(NSWindow* nativeWindow, InputType inputType, int x, int y); -@implementation EbitenContentView { +@implementation EbitenGameContentView { } - (BOOL)acceptsFirstResponder { diff --git a/ui/cocoa/ebiten_game_content_view.h b/ui/cocoa/ebiten_game_content_view.h new file mode 100644 index 000000000..a14ac37f8 --- /dev/null +++ b/ui/cocoa/ebiten_game_content_view.h @@ -0,0 +1,13 @@ +// -*- objc -*- + +#ifndef GO_EBITEN_UI_COCOA_EBITEN_GAME_CONTENT_VIEW_H_ +#define GO_EBITEN_UI_COCOA_EBITEN_GAME_CONTENT_VIEW_H_ + +#import +#import + +@interface EbitenGameContentView : NSView + +@end + +#endif diff --git a/ui/cocoa/ebiten_window.c b/ui/cocoa/ebiten_game_window.c similarity index 92% rename from ui/cocoa/ebiten_window.c rename to ui/cocoa/ebiten_game_window.c index 350c0a02a..24bf027b2 100644 --- a/ui/cocoa/ebiten_window.c +++ b/ui/cocoa/ebiten_game_window.c @@ -1,14 +1,14 @@ // -*- objc -*- -#import "ebiten_window.h" +#import "ebiten_game_window.h" -#import "ebiten_content_view.h" +#import "ebiten_game_content_view.h" @class NSOpenGLContext; void ebiten_WindowClosed(void* nativeWindow); -@implementation EbitenWindow { +@implementation EbitenGameWindow { @private NSOpenGLContext* glContext_; } @@ -37,7 +37,7 @@ void ebiten_WindowClosed(void* nativeWindow); [self setDocumentEdited:YES]; NSRect rect = NSMakeRect(0, 0, size.width, size.height); - NSView* contentView = [[EbitenContentView alloc] initWithFrame:rect]; + NSView* contentView = [[EbitenGameContentView alloc] initWithFrame:rect]; [self setContentView:contentView]; [contentView release]; } diff --git a/ui/cocoa/ebiten_window.h b/ui/cocoa/ebiten_game_window.h similarity index 52% rename from ui/cocoa/ebiten_window.h rename to ui/cocoa/ebiten_game_window.h index c4e6baf8f..0fd755bb7 100644 --- a/ui/cocoa/ebiten_window.h +++ b/ui/cocoa/ebiten_game_window.h @@ -1,11 +1,11 @@ // -*- objc -*- -#ifndef GO_EBITEN_UI_COCOA_EBITEN_WINDOW_H_ -#define GO_EBITEN_UI_COCOA_EBITEN_WINDOW_H_ +#ifndef GO_EBITEN_UI_COCOA_EBITEN_GAME_WINDOW_H_ +#define GO_EBITEN_UI_COCOA_EBITEN_GAME_WINDOW_H_ #import -@interface EbitenWindow : NSWindow +@interface EbitenGameWindow : NSWindow - (id)initWithSize:(NSSize)size glContext:(NSOpenGLContext*)glContext; diff --git a/ui/cocoa/mainloop.c b/ui/cocoa/mainloop.c index 761747667..579995e70 100644 --- a/ui/cocoa/mainloop.c +++ b/ui/cocoa/mainloop.c @@ -3,7 +3,7 @@ #include #include -#import "ebiten_window.h" +#import "ebiten_game_window.h" void initMenu(void) { NSString* processName = [[NSProcessInfo processInfo] processName]; @@ -53,9 +53,9 @@ NSOpenGLContext* CreateGLContext(NSOpenGLContext* sharedGLContext) { NSWindow* CreateWindow(size_t width, size_t height, const char* title, NSOpenGLContext* glContext) { NSSize size = NSMakeSize(width, height); - EbitenWindow* window = [[EbitenWindow alloc] - initWithSize:size - glContext:glContext]; + EbitenGameWindow* window = [[EbitenGameWindow alloc] + initWithSize:size + glContext:glContext]; [glContext release]; NSString* nsTitle = [[NSString alloc] @@ -101,5 +101,5 @@ void UnuseGLContext(void) { } NSOpenGLContext* GetGLContext(NSWindow* window) { - return [(EbitenWindow*)window glContext]; + return [(EbitenGameWindow*)window glContext]; }