Gents,

Can't test the latest svn on this 10.4 mac because:

=== making src ===
Compiling Fl.cxx...
Fl_cocoa.mm: In function 'void handleUpdateEvent(Fl_Window*)':
Fl_cocoa.mm:1549: error: 'NSRectFromCGRect' was not declared in this  
scope
make[1]: *** [Fl.o] Error 1
make: *** [all] Error 1


It seems that NSRectFromCGRect was added in 10.5...
It also seems that a CGRect and NSRect are actually the same  
structure internally, but just given different names to annoy folks  
(so far as I can make out.)

I went with this nasty cast hack for now - seems to compile but...

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
         NSRect rect = NSRectFromCGRect(rgn->rects[ix]);
#else
         NSRect rect = *(NSRect *)&(rgn->rects[ix]);//NSRectFromCGRect 
(rgn->rects[ix]);
#endif
         [view setNeedsDisplayInRect:rect];


I am told that the neater thing to do is make a union like:

typedef union
{
     NSRect nsrect;
     CGRect cgrect;
} NSCGRect;

And use that to transform between the two rect types, but...



_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to