Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSSet.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 |
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSSet.d Sat Aug 09 17:00:02 2008 +0200 +++ b/dwt/internal/cocoa/NSSet.d Tue Aug 19 17:35:17 2008 +0200 @@ -39,120 +39,120 @@ public void addObserver (NSObject observer, NSString keyPath, NSKeyValueObservingOptions options, void* context) { - OS.objc_msgSend(this.id, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id : null, - keyPath !is null ? keyPath.id : null, options, context); + OS.objc_msgSend(this.id_, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null, + keyPath !is null ? keyPath.id_ : null, options, context); } public NSArray allObjects () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_allObjects); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects); return result !is null ? new NSArray(result) : null; } public id anyObject () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_anyObject); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_anyObject); return result !is null ? new id(result) : null; } public bool containsObject (id anObject) { - return OS.objc_msgSend(this.id, OS.sel_containsObject_1, anObject !is null ? anObject.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null; } public NSUInteger count () { - return OS.objc_msgSend(this.id, OS.sel_count); + return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count); } public NSString description () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_description); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_description); return result !is null ? new NSString(result) : null; } public NSString descriptionWithLocale (id locale) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null); return result !is null ? new NSString(result) : null; } public NSSet filteredSetUsingPredicate (NSPredicate predicate) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_filteredSetUsingPredicate_1, predicate !is null ? predicate.id : null); - return result is this.id ? this : (result !is null ? new NSSet(result) : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_filteredSetUsingPredicate_1, predicate !is null ? predicate.id_ : null); + return result is this.id_ ? this : (result !is null ? new NSSet(result) : null); } public NSSet initWithArray (NSArray array) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithArray_1, array !is null ? array.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1, array !is null ? array.id_ : null); return result !is null ? this : null; } public NSSet initWithObjects_ (id initWithObjects) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id_ : null); return result !is null ? this : null; } public NSSet initWithObjects_count_ (objc.id* objects, NSUInteger cnt) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithObjects_1count_1, objects, cnt); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1count_1, objects, cnt); return result !is null ? this : null; } public NSSet initWithSet_ (NSSet set) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithSet_1, set !is null ? set.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSet_1, set !is null ? set.id_ : null); return result !is null ? this : null; } public NSSet initWithSet_copyItems_ (NSSet set, bool flag) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithSet_1copyItems_1, set !is null ? set.id : null, flag); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSet_1copyItems_1, set !is null ? set.id_ : null, flag); return result !is null ? this : null; } public bool intersectsSet (NSSet otherSet) { - return OS.objc_msgSend(this.id, OS.sel_intersectsSet_1, otherSet !is null ? otherSet.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_intersectsSet_1, otherSet !is null ? otherSet.id_ : null) !is null; } public bool isEqualToSet (NSSet otherSet) { - return OS.objc_msgSend(this.id, OS.sel_isEqualToSet_1, otherSet !is null ? otherSet.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isEqualToSet_1, otherSet !is null ? otherSet.id_ : null) !is null; } public bool isSubsetOfSet (NSSet otherSet) { - return OS.objc_msgSend(this.id, OS.sel_isSubsetOfSet_1, otherSet !is null ? otherSet.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isSubsetOfSet_1, otherSet !is null ? otherSet.id_ : null) !is null; } public void makeObjectsPerformSelector_ (objc.SEL aSelector) { - OS.objc_msgSend(this.id, OS.sel_makeObjectsPerformSelector_1, aSelector); + OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1, aSelector); } public void makeObjectsPerformSelector_withObject_ (objc.SEL aSelector, id argument) { - OS.objc_msgSend(this.id, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id : null); + OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id_ : null); } public id member (id object) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_member_1, object !is null ? object.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_member_1, object !is null ? object.id_ : null); return result !is null ? new id(result) : null; } public NSEnumerator objectEnumerator () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator); return result !is null ? new NSEnumerator(result) : null; } public void removeObserver (NSObject observer, NSString keyPath) { - OS.objc_msgSend(this.id, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id : null, keyPath !is null ? keyPath.id : null); + OS.objc_msgSend(this.id_, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id_ : null, keyPath !is null ? keyPath.id_ : null); } public static id set () @@ -163,42 +163,42 @@ public NSSet setByAddingObject (id anObject) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_setByAddingObject_1, anObject !is null ? anObject.id : null); - return result is this.id ? this : (result !is null ? new NSSet(result) : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObject_1, anObject !is null ? anObject.id_ : null); + return result is this.id_ ? this : (result !is null ? new NSSet(result) : null); } public NSSet setByAddingObjectsFromArray (NSArray other) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_setByAddingObjectsFromArray_1, other !is null ? other.id : null); - return result is this.id ? this : (result !is null ? new NSSet(result) : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObjectsFromArray_1, other !is null ? other.id_ : null); + return result is this.id_ ? this : (result !is null ? new NSSet(result) : null); } public NSSet setByAddingObjectsFromSet (NSSet other) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_setByAddingObjectsFromSet_1, other !is null ? other.id : null); - return result is this.id ? this : (result !is null ? new NSSet(result) : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObjectsFromSet_1, other !is null ? other.id_ : null); + return result is this.id_ ? this : (result !is null ? new NSSet(result) : null); } public void setValue (id value, NSString key) { - OS.objc_msgSend(this.id, OS.sel_setValue_1forKey_1, value !is null ? value.id : null, key !is null ? key.id : null); + OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null); } public static id setWithArray (NSArray array) { - objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithArray_1, array !is null ? array.id : null); + objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithArray_1, array !is null ? array.id_ : null); return result !is null ? new id(result) : null; } public static id setWithObject (id object) { - objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObject_1, object !is null ? object.id : null); + objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObject_1, object !is null ? object.id_ : null); return result !is null ? new id(result) : null; } public static id static_setWithObjects_ (id setWithObjects) { - objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObjects_1, setWithObjects !is null ? setWithObjects.id : null); + objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObjects_1, setWithObjects !is null ? setWithObjects.id_ : null); return result !is null ? new id(result) : null; } @@ -210,13 +210,13 @@ public static id setWithSet (NSSet set) { - objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithSet_1, set !is null ? set.id : null); + objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithSet_1, set !is null ? set.id_ : null); return result !is null ? new id(result) : null; } public id valueForKey (NSString key) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_valueForKey_1, key !is null ? key.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null); return result !is null ? new id(result) : null; }