Mercurial > projects > dwt-mac
comparison dwt/dnd/DragSource.d @ 46:cfa563df4fdd
Updated Widget and Display to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 05 Dec 2008 16:00:41 +0100 |
parents | d8635bb48c7c |
children | 52007db1276d |
comparison
equal
deleted
inserted
replaced
45:d8635bb48c7c | 46:cfa563df4fdd |
---|---|
362 NSSize imageSize = dragImage.size(); | 362 NSSize imageSize = dragImage.size(); |
363 viewPt.x -= (imageSize.width / 2); | 363 viewPt.x -= (imageSize.width / 2); |
364 viewPt.y -= (imageSize.height / 2); | 364 viewPt.y -= (imageSize.height / 2); |
365 | 365 |
366 // The third argument to dragImage is ignored as of 10.4. | 366 // The third argument to dragImage is ignored as of 10.4. |
367 NSSize ignored = new NSSize(); | 367 NSSize ignored = NSSize(); |
368 ignored.width = 0; | 368 ignored.width = 0; |
369 ignored.height = 0; | 369 ignored.height = 0; |
370 | 370 |
371 dragStarted = false; | 371 dragStarted = false; |
372 control.view.dragImage(dragImage, viewPt, ignored, NSApplication.sharedApplication().currentEvent(), dragBoard, dragSourceDelegate, true); | 372 control.view.dragImage(dragImage, viewPt, ignored, NSApplication.sharedApplication().currentEvent(), dragBoard, dragSourceDelegate, true); |
479 | 479 |
480 if (ds is null) return 0; | 480 if (ds is null) return 0; |
481 | 481 |
482 if (sel is OS.sel_draggedImage_endedAt_operation_) { | 482 if (sel is OS.sel_draggedImage_endedAt_operation_) { |
483 NSImage image = new NSImage(arg0); | 483 NSImage image = new NSImage(arg0); |
484 NSPoint point = new NSPoint(); | 484 NSPoint point = NSPoint(); |
485 OS.memmove(point, arg1, NSPoint.sizeof); | 485 OS.memmove(point, arg1, NSPoint.sizeof); |
486 ds.draggedImage_endedAt_operation(image, point, arg2); | 486 ds.draggedImage_endedAt_operation(image, point, arg2); |
487 } | 487 } |
488 | 488 |
489 return 0; | 489 return 0; |