Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSNotificationCenter.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 void addObserver (id observer, objc.SEL aSelector, NSString aName, id anObject) | 37 public void addObserver (id observer, objc.SEL aSelector, NSString aName, id anObject) |
38 { | 38 { |
39 OS.objc_msgSend(this.id, OS.sel_addObserver_1selector_1name_1object_1, observer !is null ? observer.id : null, aSelector, | 39 OS.objc_msgSend(this.id_, OS.sel_addObserver_1selector_1name_1object_1, observer !is null ? observer.id_ : null, aSelector, |
40 aName !is null ? aName.id : null, anObject !is null ? anObject.id : null); | 40 aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null); |
41 } | 41 } |
42 | 42 |
43 public static NSNotificationCenter defaultCenter () | 43 public static NSNotificationCenter defaultCenter () |
44 { | 44 { |
45 objc.id result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter); | 45 objc.id result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter); |
46 return result !is null ? new NSNotificationCenter(result) : null; | 46 return result !is null ? new NSNotificationCenter(result) : null; |
47 } | 47 } |
48 | 48 |
49 public void postNotification (NSNotification notification) | 49 public void postNotification (NSNotification notification) |
50 { | 50 { |
51 OS.objc_msgSend(this.id, OS.sel_postNotification_1, notification !is null ? notification.id : null); | 51 OS.objc_msgSend(this.id_, OS.sel_postNotification_1, notification !is null ? notification.id_ : null); |
52 } | 52 } |
53 | 53 |
54 public void postNotificationName_object_ (NSString aName, id anObject) | 54 public void postNotificationName_object_ (NSString aName, id anObject) |
55 { | 55 { |
56 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id : null, anObject !is null ? anObject.id : null); | 56 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null); |
57 } | 57 } |
58 | 58 |
59 public void postNotificationName_object_userInfo_ (NSString aName, id anObject, NSDictionary aUserInfo) | 59 public void postNotificationName_object_userInfo_ (NSString aName, id anObject, NSDictionary aUserInfo) |
60 { | 60 { |
61 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id : null, | 61 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id_ : null, |
62 anObject !is null ? anObject.id : null, aUserInfo !is null ? aUserInfo.id : null); | 62 anObject !is null ? anObject.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null); |
63 } | 63 } |
64 | 64 |
65 public void removeObserver_ (id observer) | 65 public void removeObserver_ (id observer) |
66 { | 66 { |
67 OS.objc_msgSend(this.id, OS.sel_removeObserver_1, observer !is null ? observer.id : null); | 67 OS.objc_msgSend(this.id_, OS.sel_removeObserver_1, observer !is null ? observer.id_ : null); |
68 } | 68 } |
69 | 69 |
70 public void removeObserver_name_object_ (id observer, NSString aName, id anObject) | 70 public void removeObserver_name_object_ (id observer, NSString aName, id anObject) |
71 { | 71 { |
72 OS.objc_msgSend(this.id, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id : null, aName !is null ? aName.id : null, | 72 OS.objc_msgSend(this.id_, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id_ : null, aName !is null ? aName.id_ : null, |
73 anObject !is null ? anObject.id : null); | 73 anObject !is null ? anObject.id_ : null); |
74 } | 74 } |
75 | 75 |
76 } | 76 } |