comparison dwt/internal/cocoa/NSPort.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
40 super(id); 40 super(id);
41 } 41 }
42 42
43 public void addConnection (NSConnection conn, NSRunLoop runLoop, NSString mode) 43 public void addConnection (NSConnection conn, NSRunLoop runLoop, NSString mode)
44 { 44 {
45 OS.objc_msgSend(this.id, OS.sel_addConnection_1toRunLoop_1forMode_1, conn !is null ? conn.id : null, runLoop !is null ? runLoop.id : null, 45 OS.objc_msgSend(this.id_, OS.sel_addConnection_1toRunLoop_1forMode_1, conn !is null ? conn.id_ : null, runLoop !is null ? runLoop.id_ : null,
46 mode !is null ? mode.id : null); 46 mode !is null ? mode.id_ : null);
47 } 47 }
48 48
49 public static id allocWithZone (NSZone* zone) 49 public static id allocWithZone (NSZone* zone)
50 { 50 {
51 objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_allocWithZone_1, zone); 51 objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_allocWithZone_1, zone);
52 return result !is null ? new id(result) : null; 52 return result !is null ? new id(result) : null;
53 } 53 }
54 54
55 public id delegatee () 55 public id delegatee ()
56 { 56 {
57 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
58 return result !is null ? new id(result) : null; 58 return result !is null ? new id(result) : null;
59 } 59 }
60 60
61 public void invalidate () 61 public void invalidate ()
62 { 62 {
63 OS.objc_msgSend(this.id, OS.sel_invalidate); 63 OS.objc_msgSend(this.id_, OS.sel_invalidate);
64 } 64 }
65 65
66 public bool isValid () 66 public bool isValid ()
67 { 67 {
68 return OS.objc_msgSend(this.id, OS.sel_isValid) !is null; 68 return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
69 } 69 }
70 70
71 public static NSPort port () 71 public static NSPort port ()
72 { 72 {
73 objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_port); 73 objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_port);
74 return result !is null ? new NSPort(result) : null; 74 return result !is null ? new NSPort(result) : null;
75 } 75 }
76 76
77 public void removeConnection (NSConnection conn, NSRunLoop runLoop, NSString mode) 77 public void removeConnection (NSConnection conn, NSRunLoop runLoop, NSString mode)
78 { 78 {
79 OS.objc_msgSend(this.id, OS.sel_removeConnection_1fromRunLoop_1forMode_1, conn !is null ? conn.id : null, 79 OS.objc_msgSend(this.id_, OS.sel_removeConnection_1fromRunLoop_1forMode_1, conn !is null ? conn.id_ : null,
80 runLoop !is null ? runLoop.id : null, mode !is null ? mode.id : null); 80 runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
81 } 81 }
82 82
83 public void removeFromRunLoop (NSRunLoop runLoop, NSString mode) 83 public void removeFromRunLoop (NSRunLoop runLoop, NSString mode)
84 { 84 {
85 OS.objc_msgSend(this.id, OS.sel_removeFromRunLoop_1forMode_1, runLoop !is null ? runLoop.id : null, mode !is null ? mode.id : null); 85 OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
86 } 86 }
87 87
88 public NSUInteger reservedSpaceLength () 88 public NSUInteger reservedSpaceLength ()
89 { 89 {
90 return OS.objc_msgSend(this.id, OS.sel_reservedSpaceLength); 90 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_reservedSpaceLength);
91 } 91 }
92 92
93 public void scheduleInRunLoop (NSRunLoop runLoop, NSString mode) 93 public void scheduleInRunLoop (NSRunLoop runLoop, NSString mode)
94 { 94 {
95 OS.objc_msgSend(this.id, OS.sel_scheduleInRunLoop_1forMode_1, runLoop !is null ? runLoop.id : null, mode !is null ? mode.id : null); 95 OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
96 } 96 }
97 97
98 public bool sendBeforeDate_components_from_reserved_ (NSDate limitDate, NSMutableArray components, NSPort receivePort, NSUInteger headerSpaceReserved) 98 public bool sendBeforeDate_components_from_reserved_ (NSDate limitDate, NSMutableArray components, NSPort receivePort, NSUInteger headerSpaceReserved)
99 { 99 {
100 return OS.objc_msgSend(this.id, OS.sel_sendBeforeDate_1components_1from_1reserved_1, limitDate !is null ? limitDate.id : null, 100 return OS.objc_msgSend(this.id_, OS.sel_sendBeforeDate_1components_1from_1reserved_1, limitDate !is null ? limitDate.id_ : null,
101 components !is null ? components.id : null, receivePort !is null ? receivePort.id : null, headerSpaceReserved) !is null; 101 components !is null ? components.id_ : null, receivePort !is null ? receivePort.id_ : null, headerSpaceReserved) !is null;
102 } 102 }
103 103
104 public bool sendBeforeDate_msgid_components_from_reserved_ (NSDate limitDate, NSUInteger msgID, NSMutableArray components, NSPort receivePort, 104 public bool sendBeforeDate_msgid_components_from_reserved_ (NSDate limitDate, NSUInteger msgID, NSMutableArray components, NSPort receivePort,
105 NSUInteger headerSpaceReserved) 105 NSUInteger headerSpaceReserved)
106 { 106 {
107 return OS.objc_msgSend(this.id, OS.sel_sendBeforeDate_1msgid_1components_1from_1reserved_1, limitDate !is null ? limitDate.id : null, msgID, 107 return OS.objc_msgSend(this.id_, OS.sel_sendBeforeDate_1msgid_1components_1from_1reserved_1, limitDate !is null ? limitDate.id_ : null, msgID,
108 components !is null ? components.id : null, receivePort !is null ? receivePort.id : null, headerSpaceReserved) !is null; 108 components !is null ? components.id_ : null, receivePort !is null ? receivePort.id_ : null, headerSpaceReserved) !is null;
109 } 109 }
110 110
111 public void setDelegate (id anId) 111 public void setDelegate (id anId)
112 { 112 {
113 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anId !is null ? anId.id : null); 113 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anId !is null ? anId.id_ : null);
114 } 114 }
115 115
116 } 116 }