Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSValue.d @ 60:62202ce0039f
Updated and fixed many modules to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 22 Dec 2008 15:10:19 +0100 |
parents | d8635bb48c7c |
children |
comparison
equal
deleted
inserted
replaced
59:83b0ad9d9238 | 60:62202ce0039f |
---|---|
20 import dwt.internal.cocoa.NSRect; | 20 import dwt.internal.cocoa.NSRect; |
21 import dwt.internal.cocoa.NSRange; | 21 import dwt.internal.cocoa.NSRange; |
22 import dwt.internal.cocoa.NSSize; | 22 import dwt.internal.cocoa.NSSize; |
23 import dwt.internal.cocoa.OS; | 23 import dwt.internal.cocoa.OS; |
24 import objc = dwt.internal.objc.runtime; | 24 import objc = dwt.internal.objc.runtime; |
25 import bindings = dwt.internal.objc.bindings; | |
25 | 26 |
26 public class NSValue : NSObject { | 27 public class NSValue : NSObject { |
27 | 28 |
28 public this() { | 29 public this() { |
29 super(); | 30 super(); |
37 super(id); | 38 super(id); |
38 } | 39 } |
39 | 40 |
40 public NSPoint pointValue() { | 41 public NSPoint pointValue() { |
41 NSPoint result = NSPoint(); | 42 NSPoint result = NSPoint(); |
42 OS.objc_msgSend_stret(result, this.id, OS.sel_pointValue); | 43 OS.objc_msgSend_stret(&result, this.id, OS.sel_pointValue); |
43 return result; | 44 return result; |
44 } | 45 } |
45 | 46 |
46 public NSRange rangeValue() { | 47 public NSRange rangeValue() { |
47 NSRange result = NSRange(); | 48 NSRange result = NSRange(); |
48 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeValue); | 49 OS.objc_msgSend_stret(&result, this.id, OS.sel_rangeValue); |
49 return result; | 50 return result; |
50 } | 51 } |
51 | 52 |
52 public NSSize sizeValue() { | 53 public NSSize sizeValue() { |
53 NSSize result = NSSize(); | 54 NSSize result = NSSize(); |
54 OS.objc_msgSend_stret(result, this.id, OS.sel_sizeValue); | 55 OS.objc_msgSend_stret(&result, this.id, OS.sel_sizeValue); |
55 return result; | 56 return result; |
56 } | 57 } |
57 | 58 |
58 public static NSValue valueWithPoint(NSPoint point) { | 59 public static NSValue valueWithPoint(NSPoint point) { |
59 objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_, point); | 60 objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_, point); |
72 | 73 |
73 public static NSValue valueWithSize(NSSize size) { | 74 public static NSValue valueWithSize(NSSize size) { |
74 objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_, size); | 75 objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_, size); |
75 return result !is null ? new NSValue(result) : null; | 76 return result !is null ? new NSValue(result) : null; |
76 } | 77 } |
77 | 78 |
78 } | 79 } |