Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro

This commit is contained in:
Robert Osfield
2010-02-10 12:44:59 +00:00
parent 6ab51c7c47
commit f17e401347
42 changed files with 884 additions and 884 deletions

View File

@@ -39,7 +39,7 @@ static pascal OSStatus GraphicsWindowEventHandler(EventHandlerCallRef nextHandle
Rect bounds;
OSStatus result = eventNotHandledErr; /* report failure by default */
NOTIFY(osg::INFO) << "GraphicsWindowEventHandler" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowEventHandler" << std::endl;
GraphicsWindowCarbon* w = (GraphicsWindowCarbon*)userData;
if (!w)
@@ -247,7 +247,7 @@ void GraphicsWindowCarbon::init()
_pixelFormat = PixelBufferCarbon::createPixelFormat(_traits.get());
if (!_pixelFormat)
{
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::init could not create a valid pixelformat" << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::init could not create a valid pixelformat" << std::endl;
}
_valid = (_pixelFormat != NULL);
_initialized = true;
@@ -276,7 +276,7 @@ bool GraphicsWindowCarbon::setWindowDecorationImplementation(bool flag)
if (err != noErr)
{
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl;
return false;
}
@@ -350,7 +350,7 @@ bool GraphicsWindowCarbon::realizeImplementation()
if (!_initialized) return false;
if (!_traits) return false;
NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: realizeIMplementation" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: realizeIMplementation" << std::endl;
setWindowDecoration(_traits->windowDecoration);
useCursor(_traits->useCursor);
@@ -377,10 +377,10 @@ bool GraphicsWindowCarbon::realizeImplementation()
err = CreateNewWindow(kDocumentWindowClass, attr, &bounds, &_window);
if (err) {
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation() failed creating a window: " << err << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation() failed creating a window: " << err << std::endl;
return false;
} else {
NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation() - window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation() - window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl;
}
}
else {
@@ -410,7 +410,7 @@ bool GraphicsWindowCarbon::realizeImplementation()
if (!_context) {
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation failed creating a context: " << aglGetError() << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation failed creating a context: " << aglGetError() << std::endl;
return false;
}
@@ -441,7 +441,7 @@ bool GraphicsWindowCarbon::realizeImplementation()
#endif
if (cgerr != kCGLNoError )
{
NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: Multi-threaded OpenGL Execution not available" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: Multi-threaded OpenGL Execution not available" << std::endl;
}
}
@@ -469,12 +469,12 @@ bool GraphicsWindowCarbon::releaseContextImplementation()
{
if (!_realized)
{
NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
// NOTIFY(osg::NOTICE)<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// NOTIFY(osg::NOTICE)<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
return (aglSetCurrentContext(NULL) == GL_TRUE);
}
@@ -482,7 +482,7 @@ bool GraphicsWindowCarbon::releaseContextImplementation()
void GraphicsWindowCarbon::closeImplementation()
{
// NOTIFY(osg::INFO) << "GraphicsWindowCarbon::closeImplementation" << std::endl;
// OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::closeImplementation" << std::endl;
_valid = false;
_realized = false;
@@ -741,7 +741,7 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent)
UInt32 rawkey;
GetEventParameter (theEvent,kEventParamKeyCode,typeUInt32, NULL,sizeof(rawkey), NULL,&rawkey);
// NOTIFY(osg::INFO) << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl;
// OSG_NOTIFY(osg::INFO) << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl;
UInt32 dataSize;
/* jbw check return status so that we don't allocate a huge array */
@@ -760,14 +760,14 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent)
case kEventRawKeyRepeat:
{
//getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl;
getEventQueue()->keyPress(keychar);
break;
}
case kEventRawKeyUp:
{
NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl;
//getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
getEventQueue()->keyRelease(keychar);
break;
@@ -940,7 +940,7 @@ void GraphicsWindowCarbon::grabFocus()
void GraphicsWindowCarbon::grabFocusIfPointerInWindow()
{
// TODO: implement
NOTIFY(osg::ALWAYS) << "GraphicsWindowCarbon::grabFocusIfPointerInWindow" << std::endl;
OSG_NOTIFY(osg::ALWAYS) << "GraphicsWindowCarbon::grabFocusIfPointerInWindow" << std::endl;
}
@@ -951,7 +951,7 @@ void GraphicsWindowCarbon::useCursor(bool cursorOn)
_traits->useCursor = cursorOn;
DarwinWindowingSystemInterface* wsi = dynamic_cast<DarwinWindowingSystemInterface*>(osg::GraphicsContext::getWindowingSystemInterface());
if (wsi == NULL) {
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl;
return;
}
@@ -967,7 +967,7 @@ void GraphicsWindowCarbon::useCursor(bool cursorOn)
break;
}
if (err != kCGErrorSuccess) {
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor failed with " << err << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor failed with " << err << std::endl;
}
}
@@ -1001,7 +1001,7 @@ void GraphicsWindowCarbon::setCursor(MouseCursor mouseCursor)
break;
default:
cursor = kThemeArrowCursor;
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl;
}
_currentCursor = mouseCursor;
@@ -1026,7 +1026,7 @@ void GraphicsWindowCarbon::requestWarpPointer(float x,float y)
DarwinWindowingSystemInterface* wsi = dynamic_cast<DarwinWindowingSystemInterface*>(osg::GraphicsContext::getWindowingSystemInterface());
if (wsi == NULL) {
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl;
return;
}