merge
commit
1a695c444b
@ -0,0 +1,79 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NL_DRIVER_OPENGL_MAC_COCOA_ADAPTER_H
|
||||
#define NL_DRIVER_OPENGL_MAC_COCOA_ADAPTER_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/event_server.h"
|
||||
#include "nel/3d/driver.h"
|
||||
|
||||
#include "cocoa_event_emitter.h"
|
||||
|
||||
/*
|
||||
* this cocoa adapter is a helper to call functions executing obj-c code
|
||||
* from driver_opengl.cpp
|
||||
*
|
||||
* please see this as a temporary solution... there is some stuff concerning
|
||||
* driver refactoring going on anyway as far as i know
|
||||
*
|
||||
* this can as well be seen as a preparation to pull platform specific code
|
||||
* out of driver_opengl.cpp ;)
|
||||
*
|
||||
* btw: we cannot simply use a c++ class here, because then NSWindow* and friends
|
||||
* would be members, but then we would need to add obj-c code here using an
|
||||
* include or a forward declaration. this again would break compiling cpp files
|
||||
* including this one (eg. driver_opengl.cpp)
|
||||
*/
|
||||
|
||||
namespace NL3D { namespace MAC {
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::CDriverGL()
|
||||
void ctor();
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::~CDriverGL()
|
||||
void dtor();
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::init()
|
||||
bool init(uint windowIcon = 0, emptyProc exitFunc = 0);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setDisplay()
|
||||
bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::getWindowSize()
|
||||
void getWindowSize(uint32 &width, uint32 &height);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::getWindowPos()
|
||||
void getWindowPos(uint32 &x, uint32 &y);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setWindowPos()
|
||||
void setWindowPos(uint32 x, uint32 y);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::setWindowTitle()
|
||||
void setWindowTitle(const ucstring &title);
|
||||
|
||||
/// mac specific stuff while calling CDriverGL::swapBuffers()
|
||||
void swapBuffers();
|
||||
|
||||
/// mac specific stuff while calling CCocoaEventEmitter::submitEvents()
|
||||
void submitEvents(NLMISC::CEventServer& server,
|
||||
bool allWindows, NLMISC::CCocoaEventEmitter* eventEmitter);
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,474 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "cocoa_adapter.h"
|
||||
|
||||
#include "nel/misc/events.h"
|
||||
#include "nel/3d/driver.h"
|
||||
|
||||
#include "cocoa_event_emitter.h"
|
||||
#include "cocoa_opengl_view.h"
|
||||
#include "cocoa_window.h"
|
||||
|
||||
// virtual key codes are only defined here. we still do not need to link carbon
|
||||
// see: http://lists.apple.com/archives/Cocoa-dev/2009/May/msg01180.html
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
namespace NL3D { namespace MAC {
|
||||
|
||||
static NSApplication* g_app = 0;
|
||||
static NSAutoreleasePool* g_pool = 0;
|
||||
static CocoaWindow* g_window = 0;
|
||||
static CocoaOpenGLView* g_glview = 0;
|
||||
static NSOpenGLContext* g_glctx = 0;
|
||||
|
||||
void ctor()
|
||||
{
|
||||
nldebug("mac cpp bridge called");
|
||||
|
||||
// create a pool, cocoa code would leak memory otherwise
|
||||
g_pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
// init the application object
|
||||
g_app = [NSApplication sharedApplication];
|
||||
}
|
||||
|
||||
void dtor()
|
||||
{
|
||||
nldebug("mac cpp bridge called");
|
||||
|
||||
// release the pool
|
||||
[g_pool release];
|
||||
}
|
||||
|
||||
bool init(uint windowIcon, emptyProc exitFunc)
|
||||
{
|
||||
nldebug("mac cpp bridge called with %u %u", windowIcon, exitFunc);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable)
|
||||
{
|
||||
nldebug("mac cpp bridge called with %u %u %u %u", wnd, &mode, show, resizeable);
|
||||
|
||||
// create a window
|
||||
/* TODO: NSBackingStoreBuffered ??? */
|
||||
g_window = [[CocoaWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1024, 768)
|
||||
styleMask:NSTitledWindowMask | NSResizableWindowMask |
|
||||
NSClosableWindowMask | NSMiniaturizableWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
|
||||
// setup opengl settings
|
||||
NSOpenGLPixelFormatAttribute att[] =
|
||||
{
|
||||
NSOpenGLPFAWindow,
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
NSOpenGLPFADepthSize, 24,
|
||||
NSOpenGLPFANoRecovery,
|
||||
NSOpenGLPFAAccelerated,
|
||||
0
|
||||
};
|
||||
|
||||
// put the settings into a format object
|
||||
NSOpenGLPixelFormat* format =
|
||||
[[NSOpenGLPixelFormat alloc] initWithAttributes:att];
|
||||
|
||||
// create a opengl view with the created format
|
||||
g_glview = [[CocoaOpenGLView alloc]
|
||||
initWithFrame:NSMakeRect(0, 0, 1024, 768) pixelFormat: format];
|
||||
|
||||
// create a opengl context for the view
|
||||
g_glctx = [g_glview openGLContext];
|
||||
|
||||
// setup some stuff in the window
|
||||
[g_window setContentView:g_glview];
|
||||
[g_window makeKeyAndOrderFront:nil];
|
||||
[g_window setAcceptsMouseMovedEvents:YES];
|
||||
|
||||
// make the views opengl context the currrent one
|
||||
[g_glctx makeCurrentContext];
|
||||
|
||||
// tell the application that we are running now
|
||||
[g_app finishLaunching];
|
||||
|
||||
// free the pixel format object
|
||||
[format release];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void getWindowSize(uint32 &width, uint32 &height)
|
||||
{
|
||||
NSRect rect = [g_glview bounds];
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
}
|
||||
|
||||
void getWindowPos(uint32 &x, uint32 &y)
|
||||
{
|
||||
NSRect screenRect = [[g_window screen] frame];
|
||||
NSRect windowRect = [g_window frame];
|
||||
x = windowRect.origin.x;
|
||||
y = screenRect.size.height - windowRect.size.height - windowRect.origin.y;
|
||||
}
|
||||
|
||||
void setWindowPos(uint32 x, uint32 y)
|
||||
{
|
||||
NSRect screenRect = [[g_window screen] frame];
|
||||
NSRect windowRect = [g_window frame];
|
||||
y = screenRect.size.height - y;
|
||||
[g_window setFrameTopLeftPoint:NSMakePoint(x, y)];
|
||||
}
|
||||
|
||||
void setWindowTitle(const ucstring &title)
|
||||
{
|
||||
[g_window setTitle:[NSString stringWithUTF8String:title.toUtf8().c_str()]];
|
||||
}
|
||||
|
||||
void swapBuffers()
|
||||
{
|
||||
[g_glctx flushBuffer];
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: this function has to be moved to a more central place to handle key
|
||||
mapping on mac x11 as well
|
||||
*/
|
||||
NLMISC::TKey virtualKeycodeToNelKey(unsigned short keycode)
|
||||
{
|
||||
switch(keycode)
|
||||
{
|
||||
case kVK_ANSI_0: return NLMISC::Key0;
|
||||
case kVK_ANSI_1: return NLMISC::Key1;
|
||||
case kVK_ANSI_2: return NLMISC::Key2;
|
||||
case kVK_ANSI_3: return NLMISC::Key3;
|
||||
case kVK_ANSI_4: return NLMISC::Key4;
|
||||
case kVK_ANSI_5: return NLMISC::Key6;
|
||||
case kVK_ANSI_6: return NLMISC::Key5;
|
||||
case kVK_ANSI_7: return NLMISC::Key7;
|
||||
case kVK_ANSI_8: return NLMISC::Key8;
|
||||
case kVK_ANSI_9: return NLMISC::Key9;
|
||||
case kVK_ANSI_A: return NLMISC::KeyA;
|
||||
case kVK_ANSI_B: return NLMISC::KeyB;
|
||||
case kVK_ANSI_C: return NLMISC::KeyC;
|
||||
case kVK_ANSI_D: return NLMISC::KeyD;
|
||||
case kVK_ANSI_E: return NLMISC::KeyE;
|
||||
case kVK_ANSI_F: return NLMISC::KeyF;
|
||||
case kVK_ANSI_G: return NLMISC::KeyG;
|
||||
case kVK_ANSI_H: return NLMISC::KeyH;
|
||||
case kVK_ANSI_I: return NLMISC::KeyI;
|
||||
case kVK_ANSI_J: return NLMISC::KeyJ;
|
||||
case kVK_ANSI_K: return NLMISC::KeyK;
|
||||
case kVK_ANSI_L: return NLMISC::KeyL;
|
||||
case kVK_ANSI_M: return NLMISC::KeyM;
|
||||
case kVK_ANSI_N: return NLMISC::KeyN;
|
||||
case kVK_ANSI_O: return NLMISC::KeyO;
|
||||
case kVK_ANSI_P: return NLMISC::KeyP;
|
||||
case kVK_ANSI_Q: return NLMISC::KeyQ;
|
||||
case kVK_ANSI_R: return NLMISC::KeyR;
|
||||
case kVK_ANSI_S: return NLMISC::KeyS;
|
||||
case kVK_ANSI_T: return NLMISC::KeyT;
|
||||
case kVK_ANSI_U: return NLMISC::KeyU;
|
||||
case kVK_ANSI_V: return NLMISC::KeyV;
|
||||
case kVK_ANSI_W: return NLMISC::KeyW;
|
||||
case kVK_ANSI_X: return NLMISC::KeyX;
|
||||
case kVK_ANSI_Y: return NLMISC::KeyY;
|
||||
case kVK_ANSI_Z: return NLMISC::KeyZ;
|
||||
case kVK_ANSI_Equal: return NLMISC::KeyEQUALS;
|
||||
case kVK_ANSI_Minus: return NLMISC::KeySUBTRACT;
|
||||
case kVK_ANSI_RightBracket: return NLMISC::KeyRBRACKET;
|
||||
case kVK_ANSI_LeftBracket: return NLMISC::KeyLBRACKET;
|
||||
case kVK_ANSI_Quote: return NLMISC::KeyAPOSTROPHE;
|
||||
case kVK_ANSI_Grave: return NLMISC::KeyPARAGRAPH;
|
||||
case kVK_ANSI_Slash: return NLMISC::KeySLASH;
|
||||
case kVK_ANSI_Backslash: return NLMISC::KeyBACKSLASH;
|
||||
case kVK_ANSI_Comma: return NLMISC::KeyCOMMA;
|
||||
case kVK_ANSI_Period: return NLMISC::KeyPERIOD;
|
||||
case kVK_ANSI_Semicolon: return NLMISC::KeySEMICOLON;
|
||||
case kVK_ANSI_KeypadDecimal: return NLMISC::KeyDECIMAL;
|
||||
case kVK_ANSI_KeypadMultiply: return NLMISC::KeyMULTIPLY;
|
||||
case kVK_ANSI_KeypadPlus: return NLMISC::KeyADD;
|
||||
case kVK_ANSI_KeypadClear: return NLMISC::KeyDELETE;
|
||||
case kVK_ANSI_KeypadDivide: return NLMISC::KeyDIVIDE;
|
||||
case kVK_ANSI_KeypadEnter: return NLMISC::KeyRETURN;
|
||||
case kVK_ANSI_KeypadMinus: return NLMISC::KeySUBTRACT;
|
||||
case kVK_ANSI_KeypadEquals: return NLMISC::KeySEPARATOR;
|
||||
case kVK_ANSI_Keypad0: return NLMISC::KeyNUMPAD0;
|
||||
case kVK_ANSI_Keypad1: return NLMISC::KeyNUMPAD1;
|
||||
case kVK_ANSI_Keypad2: return NLMISC::KeyNUMPAD2;
|
||||
case kVK_ANSI_Keypad3: return NLMISC::KeyNUMPAD3;
|
||||
case kVK_ANSI_Keypad4: return NLMISC::KeyNUMPAD4;
|
||||
case kVK_ANSI_Keypad5: return NLMISC::KeyNUMPAD5;
|
||||
case kVK_ANSI_Keypad6: return NLMISC::KeyNUMPAD6;
|
||||
case kVK_ANSI_Keypad7: return NLMISC::KeyNUMPAD7;
|
||||
case kVK_ANSI_Keypad8: return NLMISC::KeyNUMPAD8;
|
||||
case kVK_ANSI_Keypad9: return NLMISC::KeyNUMPAD9;
|
||||
case kVK_Return: return NLMISC::KeyRETURN;
|
||||
case kVK_Tab: return NLMISC::KeyTAB;
|
||||
case kVK_Space: return NLMISC::KeySPACE;
|
||||
case kVK_Delete: return NLMISC::KeyBACK;
|
||||
case kVK_ForwardDelete: return NLMISC::KeyDELETE;
|
||||
case kVK_Escape: return NLMISC::KeyESCAPE;
|
||||
case kVK_Shift: return NLMISC::KeySHIFT;
|
||||
case kVK_RightShift: return NLMISC::KeyRSHIFT;
|
||||
case kVK_CapsLock: return NLMISC::KeyCAPITAL;
|
||||
case kVK_Control: return NLMISC::KeyCONTROL;
|
||||
case kVK_RightControl: return NLMISC::KeyRCONTROL;
|
||||
case kVK_F1: return NLMISC::KeyF1;
|
||||
case kVK_F2: return NLMISC::KeyF2;
|
||||
case kVK_F3: return NLMISC::KeyF3;
|
||||
case kVK_F4: return NLMISC::KeyF4;
|
||||
case kVK_F5: return NLMISC::KeyF5;
|
||||
case kVK_F6: return NLMISC::KeyF6;
|
||||
case kVK_F7: return NLMISC::KeyF7;
|
||||
case kVK_F8: return NLMISC::KeyF8;
|
||||
case kVK_F9: return NLMISC::KeyF9;
|
||||
case kVK_F11: return NLMISC::KeyF11;
|
||||
case kVK_F13: return NLMISC::KeyF13;
|
||||
case kVK_F16: return NLMISC::KeyF16;
|
||||
case kVK_F14: return NLMISC::KeyF14;
|
||||
case kVK_F10: return NLMISC::KeyF10;
|
||||
case kVK_F12: return NLMISC::KeyF12;
|
||||
case kVK_F15: return NLMISC::KeyF15;
|
||||
case kVK_F17: return NLMISC::KeyF17;
|
||||
case kVK_F18: return NLMISC::KeyF18;
|
||||
case kVK_F19: return NLMISC::KeyF19;
|
||||
case kVK_F20: return NLMISC::KeyF20;
|
||||
case kVK_Home: return NLMISC::KeyHOME;
|
||||
case kVK_End: return NLMISC::KeyEND;
|
||||
case kVK_PageUp: return NLMISC::KeyPRIOR;
|
||||
case kVK_PageDown: return NLMISC::KeyNEXT;
|
||||
case kVK_LeftArrow: return NLMISC::KeyLEFT;
|
||||
case kVK_RightArrow: return NLMISC::KeyRIGHT;
|
||||
case kVK_DownArrow: return NLMISC::KeyDOWN;
|
||||
case kVK_UpArrow: return NLMISC::KeyUP;
|
||||
case kVK_Command:break;
|
||||
case kVK_Option:break;
|
||||
case kVK_RightOption:break;
|
||||
case kVK_Function:break;
|
||||
case kVK_VolumeUp:break;
|
||||
case kVK_VolumeDown:break;
|
||||
case kVK_Mute:break;
|
||||
case kVK_Help:break;
|
||||
case kVK_ISO_Section:break;
|
||||
case kVK_JIS_Yen:break;
|
||||
case kVK_JIS_Underscore:break;
|
||||
case kVK_JIS_KeypadComma:break;
|
||||
case kVK_JIS_Eisu:break;
|
||||
case kVK_JIS_Kana:break;
|
||||
default:break;
|
||||
}
|
||||
return NLMISC::KeyNOKEY;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: this function has to be moved to a more central place to handle key
|
||||
mapping on mac x11 as well
|
||||
*/
|
||||
NLMISC::TKeyButton modifierFlagsToNelKeyButton(unsigned int modifierFlags)
|
||||
{
|
||||
unsigned int buttons = 0;
|
||||
if (modifierFlags & NSControlKeyMask) buttons |= NLMISC::ctrlKeyButton;
|
||||
if (modifierFlags & NSShiftKeyMask) buttons |= NLMISC::shiftKeyButton;
|
||||
if (modifierFlags & NSAlternateKeyMask) buttons |= NLMISC::altKeyButton;
|
||||
return (NLMISC::TKeyButton)buttons;
|
||||
}
|
||||
|
||||
bool isTextKeyEvent(NSEvent* event)
|
||||
{
|
||||
// if there are no characters provided with this event, is is not a text event
|
||||
if([[event characters] length] == 0)
|
||||
return false;
|
||||
|
||||
NLMISC::TKey nelKey = virtualKeycodeToNelKey([event keyCode]);
|
||||
|
||||
// ryzom ui wants to have "escape key string" to leave text box
|
||||
if(nelKey == NLMISC::KeyESCAPE)
|
||||
return true;
|
||||
|
||||
// ryzom ui wants to have "return key string" to submit text box (send chat)
|
||||
if(nelKey == NLMISC::KeyRETURN)
|
||||
return true;
|
||||
|
||||
// get the character reported by cocoa
|
||||
unsigned int character = [[event characters] characterAtIndex:0];
|
||||
|
||||
// printable ascii characters
|
||||
if(isprint(character))
|
||||
return true;
|
||||
|
||||
/*
|
||||
TODO check why iswprint(character) does not solve it.
|
||||
it always returns false, even for π é ...
|
||||
*/
|
||||
// > 127 but not printable
|
||||
if( nelKey == NLMISC::KeyF1 || nelKey == NLMISC::KeyF2 ||
|
||||
nelKey == NLMISC::KeyF3 || nelKey == NLMISC::KeyF4 ||
|
||||
nelKey == NLMISC::KeyF5 || nelKey == NLMISC::KeyF6 ||
|
||||
nelKey == NLMISC::KeyF7 || nelKey == NLMISC::KeyF8 ||
|
||||
nelKey == NLMISC::KeyF9 || nelKey == NLMISC::KeyF10 ||
|
||||
nelKey == NLMISC::KeyF11 || nelKey == NLMISC::KeyF12 ||
|
||||
nelKey == NLMISC::KeyF13 || nelKey == NLMISC::KeyF14 ||
|
||||
nelKey == NLMISC::KeyF15 || nelKey == NLMISC::KeyF16 ||
|
||||
nelKey == NLMISC::KeyF17 || nelKey == NLMISC::KeyF18 ||
|
||||
nelKey == NLMISC::KeyF19 || nelKey == NLMISC::KeyF20 ||
|
||||
nelKey == NLMISC::KeyUP || nelKey == NLMISC::KeyDOWN ||
|
||||
nelKey == NLMISC::KeyLEFT || nelKey == NLMISC::KeyRIGHT ||
|
||||
nelKey == NLMISC::KeyHOME || nelKey == NLMISC::KeyEND ||
|
||||
nelKey == NLMISC::KeyPRIOR || nelKey == NLMISC::KeyNEXT ||
|
||||
nelKey == NLMISC::KeyDELETE)
|
||||
return false;
|
||||
|
||||
// all the fancy wide characters
|
||||
if(character > 127)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void submitEvents(NLMISC::CEventServer& server,
|
||||
bool allWindows, NLMISC::CCocoaEventEmitter* eventEmitter)
|
||||
{
|
||||
// cocoa style memory cleanup
|
||||
[g_pool release];
|
||||
g_pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
// we break if there was no event to handle
|
||||
/* TODO maximum? */
|
||||
while(true)
|
||||
{
|
||||
// get the next event to handle
|
||||
NSEvent* event = [g_app nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:nil /*[NSDate distantFuture]*/
|
||||
inMode:NSDefaultRunLoopMode dequeue:YES];
|
||||
|
||||
// stop, if there was no event
|
||||
if(!event)
|
||||
break;
|
||||
|
||||
// NSLog(@"%@", event);
|
||||
|
||||
uint32 width, height;
|
||||
/* TODO cache? */
|
||||
getWindowSize(width, height);
|
||||
|
||||
// get the mouse position in nel style (relative)
|
||||
float mouseX = event.locationInWindow.x / (float)width;
|
||||
float mouseY = event.locationInWindow.y / (float)height;
|
||||
|
||||
switch(event.type)
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
server.postEvent(new NLMISC::CEventMouseDown(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSLeftMouseUp:
|
||||
server.postEvent(new NLMISC::CEventMouseUp(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSRightMouseDown:
|
||||
server.postEvent(new NLMISC::CEventMouseDown(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSRightMouseUp:
|
||||
server.postEvent(new NLMISC::CEventMouseUp(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSMouseMoved:
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, (NLMISC::TMouseButton)0 /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSLeftMouseDragged:
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, NLMISC::leftButton /* modifiers */, eventEmitter));
|
||||
break;
|
||||
case NSRightMouseDragged:break;
|
||||
server.postEvent(new NLMISC::CEventMouseMove(
|
||||
mouseX, mouseY, NLMISC::rightButton /* modifiers */, eventEmitter));
|
||||
case NSMouseEntered:break;
|
||||
case NSMouseExited:break;
|
||||
case NSKeyDown:
|
||||
/*
|
||||
TODO dead keys
|
||||
http://developer.apple.com/mac/library/documentation/Carbon/Reference/
|
||||
Unicode_Utilities_Ref/Reference/reference.html#//apple_ref/c/func/
|
||||
UCKeyTranslate
|
||||
*/
|
||||
|
||||
// push the key press event to the new event server
|
||||
server.postEvent(new NLMISC::CEventKeyDown(
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
[event isARepeat] == NO,
|
||||
eventEmitter));
|
||||
|
||||
if(isTextKeyEvent(event))
|
||||
{
|
||||
ucstring ucstr;
|
||||
|
||||
// get the string associated with the key press event
|
||||
ucstr.fromUtf8([[event characters] UTF8String]);
|
||||
|
||||
// push to event server
|
||||
server.postEvent(new NLMISC::CEventChar(
|
||||
ucstr[0],
|
||||
NLMISC::noKeyButton,
|
||||
eventEmitter));
|
||||
}
|
||||
break;
|
||||
case NSKeyUp:
|
||||
server.postEvent(new NLMISC::CEventKeyUp(
|
||||
virtualKeycodeToNelKey([event keyCode]),
|
||||
modifierFlagsToNelKeyButton([event modifierFlags]),
|
||||
eventEmitter));
|
||||
break;
|
||||
case NSFlagsChanged:break;
|
||||
case NSAppKitDefined:break;
|
||||
case NSSystemDefined:break;
|
||||
case NSApplicationDefined:break;
|
||||
case NSPeriodic:break;
|
||||
case NSCursorUpdate:break;
|
||||
case NSScrollWheel:break;
|
||||
case NSTabletPoint:break;
|
||||
case NSTabletProximity:break;
|
||||
case NSOtherMouseDown:break;
|
||||
case NSOtherMouseUp:break;
|
||||
case NSOtherMouseDragged:break;
|
||||
case NSEventTypeGesture:break;
|
||||
case NSEventTypeMagnify:break;
|
||||
case NSEventTypeSwipe:break;
|
||||
case NSEventTypeRotate:break;
|
||||
case NSEventTypeBeginGesture:break;
|
||||
case NSEventTypeEndGesture:break;
|
||||
default:
|
||||
nlwarning("Unknown event type. dropping.");
|
||||
// NSLog(@"%@", event);
|
||||
break;
|
||||
}
|
||||
|
||||
[g_app sendEvent:event];
|
||||
[g_app updateWindows];
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
@ -0,0 +1,30 @@
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "cocoa_event_emitter.h"
|
||||
|
||||
#include "cocoa_adapter.h"
|
||||
|
||||
namespace NLMISC
|
||||
{
|
||||
|
||||
void CCocoaEventEmitter::submitEvents(CEventServer & server, bool allWindows)
|
||||
{
|
||||
// just forwarding to our cocoa adapter
|
||||
NL3D::MAC::submitEvents(server, allWindows, this);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef NL_COCOA_EVENT_EMITTER_H
|
||||
#define NL_COCOA_EVENT_EMITTER_H
|
||||
|
||||
#include <nel/misc/event_emitter.h>
|
||||
|
||||
namespace NLMISC
|
||||
{
|
||||
|
||||
class CCocoaEventEmitter : public IEventEmitter
|
||||
{
|
||||
public:
|
||||
virtual void submitEvents(CEventServer & server, bool allWindows);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
/**
|
||||
* derived to configure the NSOpenGLView
|
||||
*/
|
||||
@interface CocoaOpenGLView : NSOpenGLView
|
||||
{
|
||||
}
|
||||
|
||||
-(BOOL)acceptsFirstResponder;
|
||||
-(BOOL)needsPanelToBecomeKey;
|
||||
-(void)keyDown:(NSEvent*)event;
|
||||
|
||||
@end
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import "cocoa_opengl_view.h"
|
||||
|
||||
@implementation CocoaOpenGLView
|
||||
|
||||
-(BOOL)acceptsFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(BOOL)needsPanelToBecomeKey
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
-(void)keyDown:(NSEvent*)event
|
||||
{
|
||||
// we handle the key here, so os x does not make a sound :)
|
||||
/*
|
||||
TODO do it in the event emitter? eg do not forward key down?
|
||||
does command+q / command+m still work then?
|
||||
*/
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,31 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
/**
|
||||
* derived to configure the NSWindow
|
||||
*/
|
||||
@interface CocoaWindow : NSWindow
|
||||
{
|
||||
}
|
||||
-(BOOL)canBecomeKeyWindow;
|
||||
-(BOOL)canBecomeMainWindow;
|
||||
-(BOOL)needsPanelToBecomeKey;
|
||||
-(BOOL)acceptsFirstResponder;
|
||||
@end
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import "cocoa_window.h"
|
||||
|
||||
@implementation CocoaWindow
|
||||
|
||||
-(BOOL)canBecomeKeyWindow
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(BOOL)canBecomeMainWindow
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(BOOL)needsPanelToBecomeKey
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
-(BOOL)acceptsFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
File diff suppressed because it is too large
Load Diff
@ -1,707 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="nel_vertex_tree_paint"
|
||||
ProjectGUID="{2D2D6DAE-D4DB-41CC-A732-E913EE21F228}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Hybrid|Win32"
|
||||
OutputDirectory=".\Hybrid"
|
||||
IntermediateDirectory=".\Hybrid"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Hybrid/nel_vertex_tree_paint.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Hybrid/nel_vertex_tree_paint.pch"
|
||||
AssemblerListingLocation=".\Hybrid/"
|
||||
ObjectFile=".\Hybrid/"
|
||||
ProgramDataBaseFileName="nel_vertex_tree_paint.pdb"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="core.lib geom.lib maxutil.lib mesh.lib COMCTL32.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB odbc32.lib odbccp32.lib freetype231.lib"
|
||||
OutputFile=".\Hybrid\nel_vertex_tree_paint.dlm"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\vertex_tree_paint.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Hybrid/nel_vertex_tree_paint.pdb"
|
||||
SubSystem="2"
|
||||
BaseAddress="0x05D10000"
|
||||
ImportLibrary=".\Hybrid/nel_vertex_tree_paint.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/nel_vertex_tree_paint.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug/nel_vertex_tree_paint.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName="nel_vertex_tree_paint.pdb"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="core.lib geom.lib maxutil.lib mesh.lib COMCTL32.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB odbc32.lib odbccp32.lib freetype231.lib"
|
||||
OutputFile=".\Debug\nel_vertex_tree_paint.dlm"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\vertex_tree_paint.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/nel_vertex_tree_paint.pdb"
|
||||
SubSystem="2"
|
||||
BaseAddress="0x05D10000"
|
||||
ImportLibrary=".\Debug/nel_vertex_tree_paint.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/nel_vertex_tree_paint.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Release/nel_vertex_tree_paint.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName="nel_vertex_tree_paint.pdb"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="core.lib geom.lib maxutil.lib mesh.lib COMCTL32.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB odbc32.lib odbccp32.lib freetype231.lib"
|
||||
OutputFile=".\Release\nel_vertex_tree_paint.dlm"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\vertex_tree_paint.def"
|
||||
ProgramDatabaseFile=".\Release/nel_vertex_tree_paint.pdb"
|
||||
SubSystem="2"
|
||||
SetChecksum="true"
|
||||
BaseAddress="0x05D10000"
|
||||
ImportLibrary=".\Release/nel_vertex_tree_paint.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugFast|Win32"
|
||||
OutputDirectory=".\DebugFast"
|
||||
IntermediateDirectory=".\DebugFast"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\DebugFast/nel_vertex_tree_paint.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\DebugFast/nel_vertex_tree_paint.pch"
|
||||
AssemblerListingLocation=".\DebugFast/"
|
||||
ObjectFile=".\DebugFast/"
|
||||
ProgramDataBaseFileName="nel_vertex_tree_paint.pdb"
|
||||
BrowseInformation="1"
|
||||
BrowseInformationFile=".\DebugFast/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="core.lib geom.lib maxutil.lib mesh.lib COMCTL32.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB odbc32.lib odbccp32.lib freetype231.lib"
|
||||
OutputFile=".\DebugFast\nel_vertex_tree_paint.dlm"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\vertex_tree_paint.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\DebugFast/nel_vertex_tree_paint.pdb"
|
||||
SubSystem="2"
|
||||
BaseAddress="0x05D10000"
|
||||
ImportLibrary=".\DebugFast/nel_vertex_tree_paint.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseDebug|Win32"
|
||||
OutputDirectory=".\ReleaseDebug"
|
||||
IntermediateDirectory=".\ReleaseDebug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\ReleaseDebug/nel_vertex_tree_paint.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="_WINDOWS;NL_RELEASE_DEBUG;WIN32;NDEBUG"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\ReleaseDebug/nel_vertex_tree_paint.pch"
|
||||
AssemblerListingLocation=".\ReleaseDebug/"
|
||||
ObjectFile=".\ReleaseDebug/"
|
||||
ProgramDataBaseFileName="nel_vertex_tree_paint.pdb"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="core.lib geom.lib maxutil.lib mesh.lib COMCTL32.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB odbc32.lib odbccp32.lib freetype219.lib"
|
||||
OutputFile=".\ReleaseDebug\nel_vertex_tree_paint.dlm"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ModuleDefinitionFile=".\vertex_tree_paint.def"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\ReleaseDebug/nel_vertex_tree_paint.pdb"
|
||||
SubSystem="2"
|
||||
SetChecksum="true"
|
||||
BaseAddress="0x05D10000"
|
||||
ImportLibrary=".\ReleaseDebug/nel_vertex_tree_paint.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="dllmain.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Hybrid|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseDebug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="_WINDOWS;NL_RELEASE_DEBUG;WIN32;NDEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Paint.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Hybrid|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseDebug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="_WINDOWS;NL_RELEASE_DEBUG;WIN32;NDEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="vertex_tree_paint.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Hybrid|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;__STL_DEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseDebug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="_WINDOWS;NL_RELEASE_DEBUG;WIN32;NDEBUG;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath="resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="vertex_tree_paint.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath="buttonmask.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Buttons.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="dropcurs.cur"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="paintcur.cur"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="vertex_tree_paint.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="vertex_tree_paint.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -0,0 +1,39 @@
|
||||
# - Find zlib
|
||||
# Find the native ZLIB includes and library
|
||||
#
|
||||
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
# ZLIB_FOUND - True if zlib found.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF (ZLIB_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
ENDIF (ZLIB_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
|
||||
|
||||
SET(ZLIB_NAMES z zlib zdll)
|
||||
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
|
||||
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
|
||||
|
||||
# Per-recommendation
|
||||
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
|
||||
SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
|
Loading…
Reference in New Issue