comparison dwt/internal/cocoa/NSIndexPath.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
33 super(id); 33 super(id);
34 } 34 }
35 35
36 public NSComparisonResult compare (NSIndexPath otherObject) 36 public NSComparisonResult compare (NSIndexPath otherObject)
37 { 37 {
38 return OS.objc_msgSend(this.id, OS.sel_compare_1, otherObject !is null ? otherObject.id : null); 38 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, otherObject !is null ? otherObject.id_ : null);
39 } 39 }
40 40
41 public void getIndexes (NSUInteger* indexes) 41 public void getIndexes (NSUInteger* indexes)
42 { 42 {
43 OS.objc_msgSend(this.id, OS.sel_getIndexes_1, indexes); 43 OS.objc_msgSend(this.id_, OS.sel_getIndexes_1, indexes);
44 } 44 }
45 45
46 public NSUInteger indexAtPosition (NSUInteger position) 46 public NSUInteger indexAtPosition (NSUInteger position)
47 { 47 {
48 return OS.objc_msgSend(this.id, OS.sel_indexAtPosition_1, position); 48 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexAtPosition_1, position);
49 } 49 }
50 50
51 public NSIndexPath indexPathByAddingIndex (NSUInteger index) 51 public NSIndexPath indexPathByAddingIndex (NSUInteger index)
52 { 52 {
53 objc.id result = OS.objc_msgSend(this.id, OS.sel_indexPathByAddingIndex_1, index); 53 objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPathByAddingIndex_1, index);
54 return result is this.id ? this : (result !is null ? new NSIndexPath(result) : null); 54 return result is this.id_ ? this : (result !is null ? new NSIndexPath(result) : null);
55 } 55 }
56 56
57 public NSIndexPath indexPathByRemovingLastIndex () 57 public NSIndexPath indexPathByRemovingLastIndex ()
58 { 58 {
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_indexPathByRemovingLastIndex); 59 objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPathByRemovingLastIndex);
60 return result is this.id ? this : (result !is null ? new NSIndexPath(result) : null); 60 return result is this.id_ ? this : (result !is null ? new NSIndexPath(result) : null);
61 } 61 }
62 62
63 public static id indexPathWithIndex (NSUInteger index) 63 public static id indexPathWithIndex (NSUInteger index)
64 { 64 {
65 objc.id result = OS.objc_msgSend(OS.class_NSIndexPath, OS.sel_indexPathWithIndex_1, index); 65 objc.id result = OS.objc_msgSend(OS.class_NSIndexPath, OS.sel_indexPathWithIndex_1, index);
72 return result !is null ? new id(result) : null; 72 return result !is null ? new id(result) : null;
73 } 73 }
74 74
75 public id initWithIndex (NSUInteger index) 75 public id initWithIndex (NSUInteger index)
76 { 76 {
77 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIndex_1, index); 77 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndex_1, index);
78 return result !is null ? new id(result) : null; 78 return result !is null ? new id(result) : null;
79 } 79 }
80 80
81 public id initWithIndexes (NSUInteger* indexes, NSUInteger length) 81 public id initWithIndexes (NSUInteger* indexes, NSUInteger length)
82 { 82 {
83 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIndexes_1length_1, indexes, length); 83 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndexes_1length_1, indexes, length);
84 return result !is null ? new id(result) : null; 84 return result !is null ? new id(result) : null;
85 } 85 }
86 86
87 public NSUInteger length () 87 public NSUInteger length ()
88 { 88 {
89 return OS.objc_msgSend(this.id, OS.sel_length); 89 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length);
90 } 90 }
91 91
92 } 92 }