|
|
|
@ -108,65 +108,65 @@ namespace GUIEditor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined ( NL_OS_WINDOWS )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::winEvent( MSG *message, long *result )
|
|
|
|
|
{
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( iDriver != NULL )
|
|
|
|
|
{
|
|
|
|
|
winProc proc = (winProc)iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#elif defined( NL_OS_MAC )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event )
|
|
|
|
|
{
|
|
|
|
|
if( caller )
|
|
|
|
|
nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" );
|
|
|
|
|
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( iDriver != NULL )
|
|
|
|
|
{
|
|
|
|
|
cocoaProc proc = ( cocoaProc )iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, event );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#elif defined( NL_OS_UNIX )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::x11Event( XEvent *event )
|
|
|
|
|
{
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
x11Proc proc = ( x11Proc )iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, event );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#if defined ( NL_OS_WINDOWS )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::winEvent( MSG *message, long *result )
|
|
|
|
|
{
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( iDriver != NULL )
|
|
|
|
|
{
|
|
|
|
|
winProc proc = (winProc)iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#elif defined( NL_OS_MAC )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event )
|
|
|
|
|
{
|
|
|
|
|
if( caller )
|
|
|
|
|
nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" );
|
|
|
|
|
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( iDriver != NULL )
|
|
|
|
|
{
|
|
|
|
|
cocoaProc proc = ( cocoaProc )iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, event );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#elif defined( NL_OS_UNIX )
|
|
|
|
|
|
|
|
|
|
typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e );
|
|
|
|
|
|
|
|
|
|
bool Nel3DWidget::x11Event( XEvent *event )
|
|
|
|
|
{
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver();
|
|
|
|
|
if( driver != NULL )
|
|
|
|
|
{
|
|
|
|
|
x11Proc proc = ( x11Proc )iDriver->getWindowProc();
|
|
|
|
|
return proc( iDriver, event );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|