-CFMutableArrayRef GetAutoReleaseArray()
-{
- static CFMutableArrayRef array = 0;
- if ( array == 0)
- array= CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);
- return array;
-}
-
-//
-//
-//
-
-
-//
-//
-//
-
-void wxApp::MacHandleOneEvent( WXEVENTREF evr )
-{
-#if wxOSX_USE_COCOA_OR_CARBON
- EventTargetRef theTarget;
- theTarget = GetEventDispatcherTarget();
- m_macCurrentEvent = evr ;
-
- OSStatus status = SendEventToEventTarget((EventRef) evr , theTarget);
- if (status == eventNotHandledErr)
- MacHandleUnhandledEvent(evr);
-
-#if wxUSE_THREADS
- wxMutexGuiLeaveOrEnter();
-#endif // wxUSE_THREADS
-
-#else
- // TODO Threads
-#endif
-
-
- CFArrayRemoveAllValues( GetAutoReleaseArray() );
-}
-
-void wxApp::MacAddToAutorelease( void* cfrefobj )
-{
- CFArrayAppendValue( GetAutoReleaseArray(), cfrefobj );
-}
-
-#if wxOSX_USE_COCOA_OR_CARBON