Last change
on this file since 56743 was 56335, checked in by vboxsync, 10 years ago |
*.def,*.sed,*.m,*.mm: whitespace and svn properties
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
777 bytes
|
Line | |
---|
1 |
|
---|
2 | /*******************************************************************************
|
---|
3 | * Header Files *
|
---|
4 | *******************************************************************************/
|
---|
5 | #define NO_SDL_H
|
---|
6 | #import "VBoxSDL.h"
|
---|
7 | #import <Cocoa/Cocoa.h>
|
---|
8 |
|
---|
9 | void *VBoxSDLGetDarwinWindowId(void)
|
---|
10 | {
|
---|
11 | NSView *pView = nil;
|
---|
12 | NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
|
---|
13 | {
|
---|
14 | NSApplication *pApp = NSApp;
|
---|
15 | NSWindow *pMainWnd;
|
---|
16 | pMainWnd = [pApp mainWindow];
|
---|
17 | if (!pMainWnd)
|
---|
18 | pMainWnd = pApp->_mainWindow; /* UGLY!! but mApp->_AppFlags._active = 0, so mainWindow() fails. */
|
---|
19 | pView = [pMainWnd contentView];
|
---|
20 | }
|
---|
21 | [pPool release];
|
---|
22 | return pView;
|
---|
23 | }
|
---|
24 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.