comparison dwt/internal/cocoa/NSDistributedNotificationCenter.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
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSDistributedNotificationCenter; 14 module dwt.internal.cocoa.NSDistributedNotificationCenter;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.NSDictionary; 17 import dwt.internal.cocoa.NSDictionary;
17 import dwt.internal.cocoa.NSInteger; 18 import dwt.internal.cocoa.NSInteger;
18 import dwt.internal.cocoa.NSNotificationCenter; 19 import dwt.internal.cocoa.NSNotificationCenter;
19 import dwt.internal.cocoa.NSString; 20 import dwt.internal.cocoa.NSString;
20 import dwt.internal.cocoa.OS; 21 import dwt.internal.cocoa.OS;
33 super(id); 34 super(id);
34 } 35 }
35 36
36 public void addObserver_selector_name_object_ (id observer, objc.SEL aSelector, NSString aName, NSString anObject) 37 public void addObserver_selector_name_object_ (id observer, objc.SEL aSelector, NSString aName, NSString anObject)
37 { 38 {
38 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,
39 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);
40 } 41 }
41 42
42 public void addObserver_selector_name_object_suspensionBehavior_ (id observer, objc.SEL selector, NSString name, NSString object, 43 public void addObserver_selector_name_object_suspensionBehavior_ (id observer, objc.SEL selector, NSString name, NSString object,
43 objc.id suspensionBehavior) 44 objc.id suspensionBehavior)
44 { 45 {
45 OS.objc_msgSend(this.id, OS.sel_addObserver_1selector_1name_1object_1suspensionBehavior_1, observer !is null ? observer.id : null, selector, 46 OS.objc_msgSend(this.id_, OS.sel_addObserver_1selector_1name_1object_1suspensionBehavior_1, observer !is null ? observer.id_ : null, selector,
46 name !is null ? name.id : null, object !is null ? object.id : null, suspensionBehavior); 47 name !is null ? name.id_ : null, object !is null ? object.id_ : null, suspensionBehavior);
47 } 48 }
48 49
49 public static NSNotificationCenter defaultCenter () 50 public static NSNotificationCenter defaultCenter ()
50 { 51 {
51 objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_defaultCenter); 52 objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_defaultCenter);
53 } 54 }
54 55
55 public static NSDistributedNotificationCenter notificationCenterForType (NSString notificationCenterType) 56 public static NSDistributedNotificationCenter notificationCenterForType (NSString notificationCenterType)
56 { 57 {
57 objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_notificationCenterForType_1, 58 objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_notificationCenterForType_1,
58 notificationCenterType !is null ? notificationCenterType.id : null); 59 notificationCenterType !is null ? notificationCenterType.id_ : null);
59 return result !is null ? new NSDistributedNotificationCenter(result) : null; 60 return result !is null ? new NSDistributedNotificationCenter(result) : null;
60 } 61 }
61 62
62 public void postNotificationName_object_ (NSString aName, NSString anObject) 63 public void postNotificationName_object_ (NSString aName, NSString anObject)
63 { 64 {
64 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id : null, anObject !is null ? anObject.id : null); 65 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null);
65 } 66 }
66 67
67 public void postNotificationName_object_userInfo_ (NSString aName, NSString anObject, NSDictionary aUserInfo) 68 public void postNotificationName_object_userInfo_ (NSString aName, NSString anObject, NSDictionary aUserInfo)
68 { 69 {
69 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id : null, 70 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id_ : null,
70 anObject !is null ? anObject.id : null, aUserInfo !is null ? aUserInfo.id : null); 71 anObject !is null ? anObject.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null);
71 } 72 }
72 73
73 public void postNotificationName_object_userInfo_deliverImmediately_ (NSString name, NSString object, NSDictionary userInfo, 74 public void postNotificationName_object_userInfo_deliverImmediately_ (NSString name, NSString object, NSDictionary userInfo,
74 bool deliverImmediately) 75 bool deliverImmediately)
75 { 76 {
76 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1userInfo_1deliverImmediately_1, name !is null ? name.id : null, 77 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1deliverImmediately_1, name !is null ? name.id_ : null,
77 object !is null ? object.id : null, userInfo !is null ? userInfo.id : null, deliverImmediately); 78 object !is null ? object.id_ : null, userInfo !is null ? userInfo.id_ : null, deliverImmediately);
78 } 79 }
79 80
80 public void postNotificationName_object_userInfo_options_ (NSString name, NSString object, NSDictionary userInfo, NSUInteger options) 81 public void postNotificationName_object_userInfo_options_ (NSString name, NSString object, NSDictionary userInfo, NSUInteger options)
81 { 82 {
82 OS.objc_msgSend(this.id, OS.sel_postNotificationName_1object_1userInfo_1options_1, name !is null ? name.id : null, 83 OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1options_1, name !is null ? name.id_ : null,
83 object !is null ? object.id : null, userInfo !is null ? userInfo.id : null, options); 84 object !is null ? object.id_ : null, userInfo !is null ? userInfo.id_ : null, options);
84 } 85 }
85 86
86 public void removeObserver (id observer, NSString aName, NSString anObject) 87 public void removeObserver (id observer, NSString aName, NSString anObject)
87 { 88 {
88 OS.objc_msgSend(this.id, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id : null, aName !is null ? aName.id : null, 89 OS.objc_msgSend(this.id_, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id_ : null, aName !is null ? aName.id_ : null,
89 anObject !is null ? anObject.id : null); 90 anObject !is null ? anObject.id_ : null);
90 } 91 }
91 92
92 public void setSuspended (bool suspended) 93 public void setSuspended (bool suspended)
93 { 94 {
94 OS.objc_msgSend(this.id, OS.sel_setSuspended_1, suspended); 95 OS.objc_msgSend(this.id_, OS.sel_setSuspended_1, suspended);
95 } 96 }
96 97
97 public bool suspended () 98 public bool suspended ()
98 { 99 {
99 return OS.objc_msgSend(this.id, OS.sel_suspended) !is null; 100 return OS.objc_msgSend(this.id_, OS.sel_suspended) !is null;
100 } 101 }
101 102
102 } 103 }