Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSColorList.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 |
---|---|
34 super(id); | 34 super(id); |
35 } | 35 } |
36 | 36 |
37 public NSArray allKeys () | 37 public NSArray allKeys () |
38 { | 38 { |
39 objc.id result = OS.objc_msgSend(this.id, OS.sel_allKeys); | 39 objc.id result = OS.objc_msgSend(this.id_, OS.sel_allKeys); |
40 return result !is null ? new NSArray(result) : null; | 40 return result !is null ? new NSArray(result) : null; |
41 } | 41 } |
42 | 42 |
43 public static NSArray availableColorLists () | 43 public static NSArray availableColorLists () |
44 { | 44 { |
46 return result !is null ? new NSArray(result) : null; | 46 return result !is null ? new NSArray(result) : null; |
47 } | 47 } |
48 | 48 |
49 public static NSColorList colorListNamed (NSString name) | 49 public static NSColorList colorListNamed (NSString name) |
50 { | 50 { |
51 objc.id result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_colorListNamed_1, name !is null ? name.id : null); | 51 objc.id result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_colorListNamed_1, name !is null ? name.id_ : null); |
52 return result !is null ? new NSColorList(result) : null; | 52 return result !is null ? new NSColorList(result) : null; |
53 } | 53 } |
54 | 54 |
55 public NSColor colorWithKey (NSString key) | 55 public NSColor colorWithKey (NSString key) |
56 { | 56 { |
57 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorWithKey_1, key !is null ? key.id : null); | 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorWithKey_1, key !is null ? key.id_ : null); |
58 return result !is null ? new NSColor(result) : null; | 58 return result !is null ? new NSColor(result) : null; |
59 } | 59 } |
60 | 60 |
61 public NSColorList initWithName_ (NSString name) | 61 public NSColorList initWithName_ (NSString name) |
62 { | 62 { |
63 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1, name !is null ? name.id : null); | 63 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, name !is null ? name.id_ : null); |
64 return result !is null ? this : null; | 64 return result !is null ? this : null; |
65 } | 65 } |
66 | 66 |
67 public NSColorList initWithName_fromFile_ (NSString name, NSString path) | 67 public NSColorList initWithName_fromFile_ (NSString name, NSString path) |
68 { | 68 { |
69 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1fromFile_1, name !is null ? name.id : null, path !is null ? path.id : null); | 69 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1fromFile_1, name !is null ? name.id_ : null, path !is null ? path.id_ : null); |
70 return result !is null ? this : null; | 70 return result !is null ? this : null; |
71 } | 71 } |
72 | 72 |
73 public void insertColor (NSColor color, NSString key, NSUInteger loc) | 73 public void insertColor (NSColor color, NSString key, NSUInteger loc) |
74 { | 74 { |
75 OS.objc_msgSend(this.id, OS.sel_insertColor_1key_1atIndex_1, color !is null ? color.id : null, key !is null ? key.id : null, loc); | 75 OS.objc_msgSend(this.id_, OS.sel_insertColor_1key_1atIndex_1, color !is null ? color.id_ : null, key !is null ? key.id_ : null, loc); |
76 } | 76 } |
77 | 77 |
78 public bool isEditable () | 78 public bool isEditable () |
79 { | 79 { |
80 return OS.objc_msgSend(this.id, OS.sel_isEditable) !is null; | 80 return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null; |
81 } | 81 } |
82 | 82 |
83 public NSString name () | 83 public NSString name () |
84 { | 84 { |
85 objc.id result = OS.objc_msgSend(this.id, OS.sel_name); | 85 objc.id result = OS.objc_msgSend(this.id_, OS.sel_name); |
86 return result !is null ? new NSString(result) : null; | 86 return result !is null ? new NSString(result) : null; |
87 } | 87 } |
88 | 88 |
89 public void removeColorWithKey (NSString key) | 89 public void removeColorWithKey (NSString key) |
90 { | 90 { |
91 OS.objc_msgSend(this.id, OS.sel_removeColorWithKey_1, key !is null ? key.id : null); | 91 OS.objc_msgSend(this.id_, OS.sel_removeColorWithKey_1, key !is null ? key.id_ : null); |
92 } | 92 } |
93 | 93 |
94 public void removeFile () | 94 public void removeFile () |
95 { | 95 { |
96 OS.objc_msgSend(this.id, OS.sel_removeFile); | 96 OS.objc_msgSend(this.id_, OS.sel_removeFile); |
97 } | 97 } |
98 | 98 |
99 public void setColor (NSColor color, NSString key) | 99 public void setColor (NSColor color, NSString key) |
100 { | 100 { |
101 OS.objc_msgSend(this.id, OS.sel_setColor_1forKey_1, color !is null ? color.id : null, key !is null ? key.id : null); | 101 OS.objc_msgSend(this.id_, OS.sel_setColor_1forKey_1, color !is null ? color.id_ : null, key !is null ? key.id_ : null); |
102 } | 102 } |
103 | 103 |
104 public bool writeToFile (NSString path) | 104 public bool writeToFile (NSString path) |
105 { | 105 { |
106 return OS.objc_msgSend(this.id, OS.sel_writeToFile_1, path !is null ? path.id : null) !is null; | 106 return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1, path !is null ? path.id_ : null) !is null; |
107 } | 107 } |
108 | 108 |
109 } | 109 } |