mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 17:54:05 +00:00
48533bb3db
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5269 8ced0084-cf51-0410-be5f-012b33b47a6e
38 lines
863 B
Plaintext
38 lines
863 B
Plaintext
#import <AppKit/NSWindow.h>
|
|
#import <AppKit/NSView.h>
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#include "OSXPrivate.h"
|
|
NSWindow* m_Window;
|
|
void OSX_Init(void *_View)
|
|
{
|
|
// _View is really a wxNSView
|
|
//m_Window is really a wxNSWindow
|
|
NSView *View = (NSView*)_View;
|
|
m_Window = [View window];
|
|
}
|
|
|
|
void OSX_UpdateKeys( int max, char* keys )
|
|
{
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
|
|
NSEvent *event = [[NSEvent alloc] init];
|
|
|
|
/*event = [m_Window nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES ];
|
|
|
|
if ( event != nil ) {
|
|
switch ([event type]) {
|
|
case NSKeyDown:
|
|
//case NSKeyUp:
|
|
//case NSFlagsChanged: // For Command
|
|
memcpy(keys, [[event characters] UTF8String], max);
|
|
break;
|
|
default:
|
|
[m_Window sendEvent:event];
|
|
break;
|
|
}
|
|
}*/
|
|
|
|
[event release];
|
|
[pool release];
|
|
} |