mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
Rename files
This commit is contained in:
parent
cc14882cb2
commit
1a7a8b340f
@ -1,13 +0,0 @@
|
||||
// -*- objc -*-
|
||||
|
||||
#ifndef GO_EBITEN_UI_COCOA_EBITEN_OPENGL_VIEW_H_
|
||||
#define GO_EBITEN_UI_COCOA_EBITEN_OPENGL_VIEW_H_
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface EbitenContentView : NSView
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
@ -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 {
|
13
ui/cocoa/ebiten_game_content_view.h
Normal file
13
ui/cocoa/ebiten_game_content_view.h
Normal file
@ -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 <Cocoa/Cocoa.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface EbitenGameContentView : NSView
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
@ -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];
|
||||
}
|
@ -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 <Cocoa/Cocoa.h>
|
||||
|
||||
@interface EbitenWindow : NSWindow<NSWindowDelegate>
|
||||
@interface EbitenGameWindow : NSWindow<NSWindowDelegate>
|
||||
|
||||
- (id)initWithSize:(NSSize)size
|
||||
glContext:(NSOpenGLContext*)glContext;
|
@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <OpenGL/gl.h>
|
||||
|
||||
#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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user