Allow compilation with -std=c++11 on Mac OS X

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-02-08 06:48:19 +00:00
parent 4dce3a5ed5
commit 1dd0cdcee9
6 changed files with 9 additions and 9 deletions

View File

@ -283,7 +283,7 @@ void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscr
CGImageRef img = CGImageCreate( sw, sh, 8, 4*8, 4*sw, lut, alpha,
src_bytes, 0L, false, kCGRenderingIntentDefault);
// fl_push_clip();
CGRect rect = { { x, y }, { w, h } };
CGRect rect = CGRectMake(x, y, w, h);
Fl_X::q_begin_image(rect, srcx, srcy, sw, sh);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();

View File

@ -587,7 +587,7 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP,
CGColorSpaceRelease(lut);
CGDataProviderRelease(src);
}
CGRect rect = { { X, Y }, { W, H } };
CGRect rect = CGRectMake(X, Y, W, H);
Fl_X::q_begin_image(rect, cx, cy, img->w(), img->h());
CGContextDrawImage(fl_gc, rect, (CGImageRef)img->id_);
Fl_X::q_end_image();

View File

@ -327,7 +327,7 @@ void Fl_System_Printer::print_window_part(Fl_Window *win, int x, int y, int w, i
CGImageRef img = Fl_X::CGImage_from_window_rect(win, x, y, w, h);
if (save_front != win) save_front->show();
current->set_current();
CGRect rect = { { delta_x, delta_y }, { w, h } };
CGRect rect = CGRectMake(delta_x, delta_y, w, h);
Fl_X::q_begin_image(rect, 0, 0, w, h);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();

View File

@ -3051,8 +3051,8 @@ void Fl_Window::size_range_() {
int bx, by, bt;
get_window_frame_sizes(bx, by, bt);
size_range_set = 1;
NSSize minSize = { minw, minh + bt };
NSSize maxSize = { maxw?maxw:32000, maxh?maxh + bt:32000 };
NSSize minSize = NSMakeSize(minw, minh + bt);
NSSize maxSize = NSMakeSize(maxw?maxw:32000, maxh?maxh + bt:32000);
if (i && i->xid) {
[i->xid setMinSize:minSize];
[i->xid setMaxSize:maxSize];
@ -4392,7 +4392,7 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
win->label(title); // put back the window title
this->set_current(); // back to the Fl_Paged_Device
if (img && to_quartz) { // print the title bar
CGRect rect = { { x_offset, y_offset }, { win->w(), bt } };
CGRect rect = NSMakeRect(x_offset, y_offset, win->w(), bt);
Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
@ -4417,7 +4417,7 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
NSSize size = [title_s sizeWithAttributes:attr];
int x = x_offset + win->w()/2 - size.width/2;
if (x < x_offset+skip) x = x_offset+skip;
NSRect r = {{x, y_offset+bt/2+4}, {win->w() - skip, bt}};
NSRect r = NSMakeRect(x, y_offset+bt/2+4, win->w() - skip, bt);
[[NSGraphicsContext currentContext] setShouldAntialias:YES];
[title_s drawWithRect:r options:(NSStringDrawingOptions)0 attributes:attr]; // 10.4
[[NSGraphicsContext currentContext] setShouldAntialias:NO];

View File

@ -88,7 +88,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
src, 0L, false, kCGRenderingIntentDefault);
// draw the image into the destination context
if (img) {
CGRect rect = { { X, Y }, { W, H } };
CGRect rect = CGRectMake( X, Y, W, H);
Fl_X::q_begin_image(rect, 0, 0, W, H);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();

View File

@ -144,7 +144,7 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
#elif defined(__APPLE_QUARTZ__)
CGImageRef img = Fl_X::CGImage_from_window_rect(Fl_Window::current(), src_x, src_y, src_w, src_h);
if (img) {
CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
CGRect rect = CGRectMake(dest_x, dest_y, src_w, src_h);
Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();