From f3c7efc8d2feb9a67b6fdff09f4f428125eb5b79 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 17 Dec 2010 10:43:41 +0000 Subject: The 3 objective-c++ files used for the Mac OS X support are no longer included by other files but added to the list of source files to be compiled for Mac OS X only. Support files for autoconf/configure/make, CMake and Xcode are also modified accordingly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/Fl.cxx') diff --git a/src/Fl.cxx b/src/Fl.cxx index 42d3fff03..845e7b7de 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -48,10 +48,6 @@ #include #include "flstring.h" -#if defined(__APPLE__) -#import -#endif - #if defined(DEBUG) || defined(DEBUG_WATCH) # include #endif // DEBUG || DEBUG_WATCH @@ -63,6 +59,8 @@ HBRUSH fl_brush_action(int action); void fl_cleanup_pens(void); void fl_release_dc(HWND,HDC); void fl_cleanup_dc_list(void); +#elif defined(__APPLE__) +extern double fl_MAC_flush_and_wait(double time_to_wait, char in_idle); #endif // WIN32 // @@ -420,13 +418,7 @@ double Fl::wait(double time_to_wait) { // the idle function may turn off idle, we can then wait: if (idle) time_to_wait = 0.0; } - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - flush(); - if (idle && !in_idle) // 'idle' may have been set within flush() - time_to_wait = 0.0; - double retval = fl_wait(time_to_wait); - [pool release]; - return retval; + return fl_MAC_flush_and_wait(time_to_wait, in_idle); #else @@ -1556,8 +1548,7 @@ void Fl_Window::flush() { #ifdef WIN32 # include "Fl_win32.cxx" -#elif defined(__APPLE__) -# include "Fl_cocoa.mm" +//#elif defined(__APPLE__) #endif // -- cgit v1.2.3