diff options
Diffstat (limited to 'FL/mac.H')
| -rw-r--r-- | FL/mac.H | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,19 +73,19 @@ struct XPoint { int x, y; }; struct XRectangle {int x, y, width, height;}; #ifdef __APPLE_COCOA__ -// necessary so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes -#define FL_CGRECTMAKE_COCOA(x,y,w,h) CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0) typedef void *Window; // this is really a pter to the subclass FLWindow of NSWindow typedef struct flCocoaRegion { int count; CGRect *rects; } *Fl_Region; // a region is the union of a series of rectangles +extern CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h); + inline Fl_Region XRectangleRegion(int x, int y, int w, int h) { Fl_Region R = (Fl_Region)malloc(sizeof(*R)); R->count = 1; R->rects = (CGRect *)malloc(sizeof(CGRect)); - *(R->rects) = FL_CGRECTMAKE_COCOA(x, y, w, h); + *(R->rects) = fl_cgrectmake_cocoa(x, y, w, h); return R; } inline void XDestroyRegion(Fl_Region r) { |
