Author: manolo
Date: 2011-10-20 04:56:45 -0700 (Thu, 20 Oct 2011)
New Revision: 9143
Log:
Mac OS: use more rigorous declaration of the OS-specific Window type.
Modified:
branches/branch-3.0/include/fltk3/osx.h
branches/branch-3.0/src/fltk3/cocoaQuartzPrinter.mm
Modified: branches/branch-3.0/include/fltk3/osx.h
===================================================================
--- branches/branch-3.0/include/fltk3/osx.h 2011-10-20 05:02:53 UTC (rev
9142)
+++ branches/branch-3.0/include/fltk3/osx.h 2011-10-20 11:56:45 UTC (rev
9143)
@@ -34,7 +34,12 @@
# error "Never use <fltk3/osx.h> directly; include <fltk3/x.h> instead."
#endif // !Fltk3_X_H
-typedef void* Window; // this is really a pointer to the subclass
FLWindow of NSWindow
+#ifdef __OBJC__
+ @class FLWindow; // a subclass of the NSWindow Cocoa class
+ typedef FLWindow *Window;
+#else
+ typedef class FLWindow_subclass_of_ObjectiveC_NSWindow_class *Window;
+#endif // __OBJC__
#if !(defined(FL_LIBRARY) || defined(FLTK3_INTERNALS)) // this part is used
when compiling an application program
#include <fltk3/Widget.h>
@@ -65,7 +70,7 @@
} *Region; // a region is the union of a series of rectangles
}
-# include "Window.h"
+# include <fltk3/Window.h>
// Some random X equivalents
struct XPoint { int x, y; };
Modified: branches/branch-3.0/src/fltk3/cocoaQuartzPrinter.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoaQuartzPrinter.mm 2011-10-20 05:02:53 UTC
(rev 9142)
+++ branches/branch-3.0/src/fltk3/cocoaQuartzPrinter.mm 2011-10-20 11:56:45 UTC
(rev 9143)
@@ -266,7 +266,7 @@
CGContextSaveGState(fl_gc);
CGContextSaveGState(fl_gc);
fltk3::line_style(fltk3::SOLID);
- fl_window = (void *)1; // TODO: something better
+ fl_window = (::Window)1; // TODO: something better
fltk3::clip_region(0);
if( status == noErr) gc = fl_gc;
return status != noErr;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit