OLD | NEW |
1 /* | 1 /* |
2 * Cocoa's event loop must be in main thread. | 2 * Cocoa's event loop must be in main thread. |
3 * | 3 * |
4 * Unless otherwise stated, all coordinate systems | 4 * Unless otherwise stated, all coordinate systems |
5 * are bottom-left-based. | 5 * are bottom-left-based. |
6 */ | 6 */ |
7 | 7 |
8 #define Cursor OSXCursor | 8 #define Cursor OSXCursor |
9 #define Point OSXPoint | 9 #define Point OSXPoint |
10 #define Rect OSXRect | 10 #define Rect OSXRect |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 colorSpaceName:NSDeviceRGBColorSpace | 392 colorSpaceName:NSDeviceRGBColorSpace |
393 bytesPerRow:bytesperline(r, 32) | 393 bytesPerRow:bytesperline(r, 32) |
394 bitsPerPixel:32]; | 394 bitsPerPixel:32]; |
395 ptsize = winsizepoints(); | 395 ptsize = winsizepoints(); |
396 [win.img setSize: ptsize]; | 396 [win.img setSize: ptsize]; |
397 win.topixelscale = size.width / ptsize.width; | 397 win.topixelscale = size.width / ptsize.width; |
398 win.topointscale = 1.0f / win.topixelscale; | 398 win.topointscale = 1.0f / win.topixelscale; |
399 return i; | 399 return i; |
400 } | 400 } |
401 | 401 |
402 static void | 402 void |
403 resizeimg() | 403 resizeimg(void) |
404 { | 404 { |
405 [win.img release]; | 405 [win.img release]; |
406 _drawreplacescreenimage(initimg()); | 406 _drawreplacescreenimage(initimg()); |
407 | 407 |
408 mouseresized = 1; | 408 mouseresized = 1; |
409 sendmouse(); | 409 sendmouse(); |
410 } | 410 } |
411 | 411 |
412 static void | 412 static void |
413 waitimg(int msec) | 413 waitimg(int msec) |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 return r; | 1442 return r; |
1443 } | 1443 } |
1444 | 1444 |
1445 static NSPoint | 1445 static NSPoint |
1446 scalepoint(NSPoint pt, CGFloat scale) | 1446 scalepoint(NSPoint pt, CGFloat scale) |
1447 { | 1447 { |
1448 pt.x *= scale; | 1448 pt.x *= scale; |
1449 pt.y *= scale; | 1449 pt.y *= scale; |
1450 return pt; | 1450 return pt; |
1451 } | 1451 } |
OLD | NEW |