comparison dwt/internal/cocoa/NSDrawer.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
14 module dwt.internal.cocoa.NSDrawer; 14 module dwt.internal.cocoa.NSDrawer;
15 15
16 import dwt.internal.cocoa.CGFloat; 16 import dwt.internal.cocoa.CGFloat;
17 import dwt.internal.cocoa.id; 17 import dwt.internal.cocoa.id;
18 import dwt.internal.cocoa.NSInteger; 18 import dwt.internal.cocoa.NSInteger;
19 import dwt.internal.cocoa.NSRect : NSRectEdge;
19 import dwt.internal.cocoa.NSResponder; 20 import dwt.internal.cocoa.NSResponder;
20 import dwt.internal.cocoa.NSSize; 21 import dwt.internal.cocoa.NSSize;
21 import dwt.internal.cocoa.NSView; 22 import dwt.internal.cocoa.NSView;
22 import dwt.internal.cocoa.NSWindow; 23 import dwt.internal.cocoa.NSWindow;
23 import dwt.internal.cocoa.OS; 24 import dwt.internal.cocoa.OS;
37 super(id); 38 super(id);
38 } 39 }
39 40
40 public void close () 41 public void close ()
41 { 42 {
42 OS.objc_msgSend(this.id, OS.sel_close); 43 OS.objc_msgSend(this.id_, OS.sel_close);
43 } 44 }
44 45
45 public void close_ (id sender) 46 public void close_ (id sender)
46 { 47 {
47 OS.objc_msgSend(this.id, OS.sel_close_1, sender !is null ? sender.id : null); 48 OS.objc_msgSend(this.id_, OS.sel_close_1, sender !is null ? sender.id_ : null);
48 } 49 }
49 50
50 public NSSize contentSize () 51 public NSSize contentSize ()
51 { 52 {
52 NSSize result; 53 NSSize result;
53 OS.objc_msgSend_stret(result, this.id, OS.sel_contentSize); 54 OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentSize);
54 return result; 55 return result;
55 } 56 }
56 57
57 public NSView contentView () 58 public NSView contentView ()
58 { 59 {
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView); 60 objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
60 return result !is null ? new NSView(result) : null; 61 return result !is null ? new NSView(result) : null;
61 } 62 }
62 63
63 public id delegatee () 64 public id delegatee ()
64 { 65 {
65 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 66 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
66 return result !is null ? new id(result) : null; 67 return result !is null ? new id(result) : null;
67 } 68 }
68 69
69 public NSRectEdge edge () 70 public NSRectEdge edge ()
70 { 71 {
71 return OS.objc_msgSend(this.id, OS.sel_edge); 72 return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_edge);
72 } 73 }
73 74
74 public NSDrawer initWithContentSize (NSSize contentSize, NSRectEdge edge) 75 public NSDrawer initWithContentSize (NSSize contentSize, NSRectEdge edge)
75 { 76 {
76 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentSize_1preferredEdge_1, contentSize, edge); 77 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentSize_1preferredEdge_1, contentSize, edge);
77 return result !is null ? this : null; 78 return result !is null ? this : null;
78 } 79 }
79 80
80 public CGFloat leadingOffset () 81 public CGFloat leadingOffset ()
81 { 82 {
82 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_leadingOffset); 83 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_leadingOffset);
83 } 84 }
84 85
85 public NSSize maxContentSize () 86 public NSSize maxContentSize ()
86 { 87 {
87 NSSize result; 88 NSSize result;
88 OS.objc_msgSend_stret(result, this.id, OS.sel_maxContentSize); 89 OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxContentSize);
89 return result; 90 return result;
90 } 91 }
91 92
92 public NSSize minContentSize () 93 public NSSize minContentSize ()
93 { 94 {
94 NSSize result; 95 NSSize result;
95 OS.objc_msgSend_stret(result, this.id, OS.sel_minContentSize); 96 OS.objc_msgSend_stret(&result, this.id_, OS.sel_minContentSize);
96 return result; 97 return result;
97 } 98 }
98 99
99 public void open () 100 public void open ()
100 { 101 {
101 OS.objc_msgSend(this.id, OS.sel_open); 102 OS.objc_msgSend(this.id_, OS.sel_open);
102 } 103 }
103 104
104 public void open_ (id sender) 105 public void open_ (id sender)
105 { 106 {
106 OS.objc_msgSend(this.id, OS.sel_open_1, sender !is null ? sender.id : null); 107 OS.objc_msgSend(this.id_, OS.sel_open_1, sender !is null ? sender.id_ : null);
107 } 108 }
108 109
109 public void openOnEdge (NSRectEdge edge) 110 public void openOnEdge (NSRectEdge edge)
110 { 111 {
111 OS.objc_msgSend(this.id, OS.sel_openOnEdge_1, edge); 112 OS.objc_msgSend(this.id_, OS.sel_openOnEdge_1, edge);
112 } 113 }
113 114
114 public NSWindow parentWindow () 115 public NSWindow parentWindow ()
115 { 116 {
116 objc.id result = OS.objc_msgSend(this.id, OS.sel_parentWindow); 117 objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentWindow);
117 return result !is null ? new NSWindow(result) : null; 118 return result !is null ? new NSWindow(result) : null;
118 } 119 }
119 120
120 public NSRectEdge preferredEdge () 121 public NSRectEdge preferredEdge ()
121 { 122 {
122 return OS.objc_msgSend(this.id, OS.sel_preferredEdge); 123 return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_preferredEdge);
123 } 124 }
124 125
125 public void setContentSize (NSSize size) 126 public void setContentSize (NSSize size)
126 { 127 {
127 OS.objc_msgSend(this.id, OS.sel_setContentSize_1, size); 128 OS.objc_msgSend(this.id_, OS.sel_setContentSize_1, size);
128 } 129 }
129 130
130 public void setContentView (NSView aView) 131 public void setContentView (NSView aView)
131 { 132 {
132 OS.objc_msgSend(this.id, OS.sel_setContentView_1, aView !is null ? aView.id : null); 133 OS.objc_msgSend(this.id_, OS.sel_setContentView_1, aView !is null ? aView.id_ : null);
133 } 134 }
134 135
135 public void setDelegate (id anObject) 136 public void setDelegate (id anObject)
136 { 137 {
137 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); 138 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
138 } 139 }
139 140
140 public void setLeadingOffset (CGFloat offset) 141 public void setLeadingOffset (CGFloat offset)
141 { 142 {
142 OS.objc_msgSend(this.id, OS.sel_setLeadingOffset_1, offset); 143 OS.objc_msgSend(this.id_, OS.sel_setLeadingOffset_1, offset);
143 } 144 }
144 145
145 public void setMaxContentSize (NSSize size) 146 public void setMaxContentSize (NSSize size)
146 { 147 {
147 OS.objc_msgSend(this.id, OS.sel_setMaxContentSize_1, size); 148 OS.objc_msgSend(this.id_, OS.sel_setMaxContentSize_1, size);
148 } 149 }
149 150
150 public void setMinContentSize (NSSize size) 151 public void setMinContentSize (NSSize size)
151 { 152 {
152 OS.objc_msgSend(this.id, OS.sel_setMinContentSize_1, size); 153 OS.objc_msgSend(this.id_, OS.sel_setMinContentSize_1, size);
153 } 154 }
154 155
155 public void setParentWindow (NSWindow parent) 156 public void setParentWindow (NSWindow parent)
156 { 157 {
157 OS.objc_msgSend(this.id, OS.sel_setParentWindow_1, parent !is null ? parent.id : null); 158 OS.objc_msgSend(this.id_, OS.sel_setParentWindow_1, parent !is null ? parent.id_ : null);
158 } 159 }
159 160
160 public void setPreferredEdge (NSRectEdge edge) 161 public void setPreferredEdge (NSRectEdge edge)
161 { 162 {
162 OS.objc_msgSend(this.id, OS.sel_setPreferredEdge_1, edge); 163 OS.objc_msgSend(this.id_, OS.sel_setPreferredEdge_1, edge);
163 } 164 }
164 165
165 public void setTrailingOffset (CGFloat offset) 166 public void setTrailingOffset (CGFloat offset)
166 { 167 {
167 OS.objc_msgSend(this.id, OS.sel_setTrailingOffset_1, offset); 168 OS.objc_msgSend(this.id_, OS.sel_setTrailingOffset_1, offset);
168 } 169 }
169 170
170 public NSInteger state () 171 public NSInteger state ()
171 { 172 {
172 return OS.objc_msgSend(this.id, OS.sel_state); 173 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_state);
173 } 174 }
174 175
175 public void toggle (id sender) 176 public void toggle (id sender)
176 { 177 {
177 OS.objc_msgSend(this.id, OS.sel_toggle_1, sender !is null ? sender.id : null); 178 OS.objc_msgSend(this.id_, OS.sel_toggle_1, sender !is null ? sender.id_ : null);
178 } 179 }
179 180
180 public CGFloat trailingOffset () 181 public CGFloat trailingOffset ()
181 { 182 {
182 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_trailingOffset); 183 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_trailingOffset);
183 } 184 }
184 185
185 } 186 }