summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-12-17 10:43:41 +0000
committerManolo Gouy <Manolo>2010-12-17 10:43:41 +0000
commitf3c7efc8d2feb9a67b6fdff09f4f428125eb5b79 (patch)
tree63543707427edef3bfc49af7bee60ede908527fe /src/Fl.cxx
parentff4cafeb303cd8e9d24b62c45661f6da5067d556 (diff)
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
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx17
1 files changed, 4 insertions, 13 deletions
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 <stdlib.h>
#include "flstring.h"
-#if defined(__APPLE__)
-#import <Cocoa/Cocoa.h>
-#endif
-
#if defined(DEBUG) || defined(DEBUG_WATCH)
# include <stdio.h>
#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
//