comparison dwt/internal/cocoa/NSEvent.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.NSEvent; 14 module dwt.internal.cocoa.NSEvent;
15 15
16 import dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.CGEventTypes; 16 import dwt.internal.cocoa.CGEventTypes;
18 import dwt.internal.cocoa.CGFloat; 17 import dwt.internal.cocoa.CGFloat;
18 import dwt.internal.cocoa.id;
19 import dwt.internal.cocoa.IOLLEvent;
19 import dwt.internal.cocoa.NSDate : NSTimeInterval; 20 import dwt.internal.cocoa.NSDate : NSTimeInterval;
20 import dwt.internal.cocoa.NSGraphicsContext; 21 import dwt.internal.cocoa.NSGraphicsContext;
21 import dwt.internal.cocoa.NSInteger; 22 import dwt.internal.cocoa.NSInteger;
22 import dwt.internal.cocoa.NSObject; 23 import dwt.internal.cocoa.NSObject;
23 import dwt.internal.cocoa.NSPoint; 24 import dwt.internal.cocoa.NSPoint;
52 NSOtherMouseDown = 25, 53 NSOtherMouseDown = 25,
53 NSOtherMouseUp = 26, 54 NSOtherMouseUp = 26,
54 NSOtherMouseDragged = 27 55 NSOtherMouseDragged = 27
55 } 56 }
56 57
58 alias NSEventType.NSLeftMouseDown NSLeftMouseDown;
59 alias NSEventType.NSLeftMouseUp NSLeftMouseUp;
60 alias NSEventType.NSRightMouseDown NSRightMouseDown;
61 alias NSEventType.NSRightMouseUp NSRightMouseUp;
62 alias NSEventType.NSMouseMoved NSMouseMoved;
63 alias NSEventType.NSLeftMouseDragged NSLeftMouseDragged;
64 alias NSEventType.NSRightMouseDragged NSRightMouseDragged;
65 alias NSEventType.NSMouseEntered NSMouseEntered;
66 alias NSEventType.NSMouseExited NSMouseExited;
67 alias NSEventType.NSKeyDown NSKeyDown;
68 alias NSEventType.NSKeyUp NSKeyUp;
69 alias NSEventType.NSFlagsChanged NSFlagsChanged;
70 alias NSEventType.NSAppKitDefined NSAppKitDefined;
71 alias NSEventType.NSSystemDefined NSSystemDefined;
72 alias NSEventType.NSApplicationDefined NSApplicationDefined;
73 alias NSEventType.NSPeriodic NSPeriodic;
74 alias NSEventType.NSCursorUpdate NSCursorUpdate;
75 alias NSEventType.NSScrollWheel NSScrollWheel;
76 alias NSEventType.NSTabletPoint NSTabletPoint;
77 alias NSEventType.NSTabletProximity NSTabletProximity;
78 alias NSEventType.NSOtherMouseDown NSOtherMouseDown;
79 alias NSEventType.NSOtherMouseUp NSOtherMouseUp;
80 alias NSEventType.NSOtherMouseDragged NSOtherMouseDragged;
81
57 enum NSPointingDeviceType 82 enum NSPointingDeviceType
58 { 83 {
59 NSUnknownPointingDevice = NX_TABLET_POINTER_UNKNOWN, 84 NSUnknownPointingDevice = NX_TABLET_POINTER_UNKNOWN,
60 NSPenPointingDevice = NX_TABLET_POINTER_PEN, 85 NSPenPointingDevice = NX_TABLET_POINTER_PEN,
61 NSCursorPointingDevice = NX_TABLET_POINTER_CURSOR, 86 NSCursorPointingDevice = NX_TABLET_POINTER_CURSOR,
62 NSEraserPointingDevice = NX_TABLET_POINTER_ERASER 87 NSEraserPointingDevice = NX_TABLET_POINTER_ERASER
63 } 88 }
64 89
90 alias NSPointingDeviceType.NSUnknownPointingDevice NSUnknownPointingDevice;
91 alias NSPointingDeviceType.NSPenPointingDevice NSPenPointingDevice;
92 alias NSPointingDeviceType.NSCursorPointingDevice NSCursorPointingDevice;
93 alias NSPointingDeviceType.NSEraserPointingDevice NSEraserPointingDevice;
94
65 public class NSEvent : NSObject 95 public class NSEvent : NSObject
66 { 96 {
67 public this () 97 public this ()
68 { 98 {
69 super(); 99 super();
74 super(id); 104 super(id);
75 } 105 }
76 106
77 public CGEventRef CGEvent () 107 public CGEventRef CGEvent ()
78 { 108 {
79 return OS.objc_msgSend(this.id, OS.sel_CGEvent); 109 return cast(CGEventRef) OS.objc_msgSend(this.id_, OS.sel_CGEvent);
80 } 110 }
81 111
82 public NSInteger absoluteX () 112 public NSInteger absoluteX ()
83 { 113 {
84 return OS.objc_msgSend(this.id, OS.sel_absoluteX); 114 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteX);
85 } 115 }
86 116
87 public NSInteger absoluteY () 117 public NSInteger absoluteY ()
88 { 118 {
89 return OS.objc_msgSend(this.id, OS.sel_absoluteY); 119 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteY);
90 } 120 }
91 121
92 public NSInteger absoluteZ () 122 public NSInteger absoluteZ ()
93 { 123 {
94 return OS.objc_msgSend(this.id, OS.sel_absoluteZ); 124 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteZ);
95 } 125 }
96 126
97 public NSUInteger buttonMask () 127 public NSUInteger buttonMask ()
98 { 128 {
99 return OS.objc_msgSend(this.id, OS.sel_buttonMask); 129 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_buttonMask);
100 } 130 }
101 131
102 public NSInteger buttonNumber () 132 public NSInteger buttonNumber ()
103 { 133 {
104 return OS.objc_msgSend(this.id, OS.sel_buttonNumber); 134 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_buttonNumber);
105 } 135 }
106 136
107 public NSUInteger capabilityMask () 137 public NSUInteger capabilityMask ()
108 { 138 {
109 return OS.objc_msgSend(this.id, OS.sel_capabilityMask); 139 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_capabilityMask);
110 } 140 }
111 141
112 public NSString characters () 142 public NSString characters ()
113 { 143 {
114 objc.id result = OS.objc_msgSend(this.id, OS.sel_characters); 144 objc.id result = OS.objc_msgSend(this.id_, OS.sel_characters);
115 return result !is null ? new NSString(result) : null; 145 return result !is null ? new NSString(result) : null;
116 } 146 }
117 147
118 public NSString charactersIgnoringModifiers () 148 public NSString charactersIgnoringModifiers ()
119 { 149 {
120 objc.id result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers); 150 objc.id result = OS.objc_msgSend(this.id_, OS.sel_charactersIgnoringModifiers);
121 return result !is null ? new NSString(result) : null; 151 return result !is null ? new NSString(result) : null;
122 } 152 }
123 153
124 public NSInteger clickCount () 154 public NSInteger clickCount ()
125 { 155 {
126 return OS.objc_msgSend(this.id, OS.sel_clickCount); 156 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_clickCount);
127 } 157 }
128 158
129 public NSGraphicsContext context () 159 public NSGraphicsContext context ()
130 { 160 {
131 objc.id result = OS.objc_msgSend(this.id, OS.sel_context); 161 objc.id result = OS.objc_msgSend(this.id_, OS.sel_context);
132 return result !is null ? new NSGraphicsContext(result) : null; 162 return result !is null ? new NSGraphicsContext(result) : null;
133 } 163 }
134 164
135 public NSInteger data1 () 165 public NSInteger data1 ()
136 { 166 {
137 return OS.objc_msgSend(this.id, OS.sel_data1); 167 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_data1);
138 } 168 }
139 169
140 public NSInteger data2 () 170 public NSInteger data2 ()
141 { 171 {
142 return OS.objc_msgSend(this.id, OS.sel_data2); 172 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_data2);
143 } 173 }
144 174
145 public CGFloat deltaX () 175 public CGFloat deltaX ()
146 { 176 {
147 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_deltaX); 177 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaX);
148 } 178 }
149 179
150 public CGFloat deltaY () 180 public CGFloat deltaY ()
151 { 181 {
152 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_deltaY); 182 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaY);
153 } 183 }
154 184
155 public CGFloat deltaZ () 185 public CGFloat deltaZ ()
156 { 186 {
157 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_deltaZ); 187 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaZ);
158 } 188 }
159 189
160 public NSUInteger deviceID () 190 public NSUInteger deviceID ()
161 { 191 {
162 return OS.objc_msgSend(this.id, OS.sel_deviceID); 192 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_deviceID);
163 } 193 }
164 194
165 public static NSEvent enterExitEventWithType (objc.id type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, 195 public static NSEvent enterExitEventWithType (objc.id type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
166 NSGraphicsContext context, NSInteger eNum, NSInteger tNum, void* data) 196 NSGraphicsContext context, NSInteger eNum, NSInteger tNum, void* data)
167 { 197 {
168 objc.id result = OS.objc_msgSend(OS.class_NSEvent, 198 objc.id result = OS.objc_msgSend(OS.class_NSEvent,
169 OS.sel_enterExitEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1trackingNumber_1userData_1, 199 OS.sel_enterExitEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1trackingNumber_1userData_1,
170 type, location, flags, time, wNum, context !is null ? context.id : null, eNum, tNum, data); 200 type, location, flags, time, wNum, context !is null ? context.id_ : null, eNum, tNum, data);
171 return result !is null ? new NSEvent(result) : null; 201 return result !is null ? new NSEvent(result) : null;
172 } 202 }
173 203
174 public NSInteger eventNumber () 204 public NSInteger eventNumber ()
175 { 205 {
176 return OS.objc_msgSend(this.id, OS.sel_eventNumber); 206 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_eventNumber);
177 } 207 }
178 208
179 public /*const*/void* eventRef () 209 public /*const*/void* eventRef ()
180 { 210 {
181 return OS.objc_msgSend(this.id, OS.sel_eventRef); 211 return OS.objc_msgSend(this.id_, OS.sel_eventRef);
182 } 212 }
183 213
184 public static NSEvent eventWithCGEvent (CGEvent cgEvent) 214 public static NSEvent eventWithCGEvent (CGEventRef cgEvent)
185 { 215 {
186 objc.id result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_eventWithCGEvent_1, cgEvent); 216 objc.id result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_eventWithCGEvent_1, cgEvent);
187 return result !is null ? new NSEvent(result) : null; 217 return result !is null ? new NSEvent(result) : null;
188 } 218 }
189 219
193 return result !is null ? new NSEvent(result) : null; 223 return result !is null ? new NSEvent(result) : null;
194 } 224 }
195 225
196 public bool isARepeat () 226 public bool isARepeat ()
197 { 227 {
198 return OS.objc_msgSend(this.id, OS.sel_isARepeat) !is null; 228 return OS.objc_msgSend(this.id_, OS.sel_isARepeat) !is null;
199 } 229 }
200 230
201 public bool isEnteringProximity () 231 public bool isEnteringProximity ()
202 { 232 {
203 return OS.objc_msgSend(this.id, OS.sel_isEnteringProximity) !is null; 233 return OS.objc_msgSend(this.id_, OS.sel_isEnteringProximity) !is null;
204 } 234 }
205 235
206 public static bool isMouseCoalescingEnabled () 236 public static bool isMouseCoalescingEnabled ()
207 { 237 {
208 return OS.objc_msgSend(OS.class_NSEvent, OS.sel_isMouseCoalescingEnabled) !is null; 238 return OS.objc_msgSend(OS.class_NSEvent, OS.sel_isMouseCoalescingEnabled) !is null;
209 } 239 }
210 240
211 public short keyCode () 241 public short keyCode ()
212 { 242 {
213 return cast(short) OS.objc_msgSend(this.id, OS.sel_keyCode); 243 return cast(short) OS.objc_msgSend(this.id_, OS.sel_keyCode);
214 } 244 }
215 245
216 public static NSEvent keyEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, 246 public static NSEvent keyEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
217 NSGraphicsContext context, NSString keys, NSString ukeys, bool flag, short code) 247 NSGraphicsContext context, NSString keys, NSString ukeys, bool flag, short code)
218 { 248 {
219 objc.id 249 objc.id
220 result = OS.objc_msgSend( 250 result = OS.objc_msgSend(
221 OS.class_NSEvent, 251 OS.class_NSEvent,
222 OS.sel_keyEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1characters_1charactersIgnoringModifiers_1isARepeat_1keyCode_1, 252 OS.sel_keyEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1characters_1charactersIgnoringModifiers_1isARepeat_1keyCode_1,
223 type, location, flags, time, wNum, context !is null ? context.id : null, keys !is null ? keys.id : null, 253 type, location, flags, time, wNum, context !is null ? context.id_ : null, keys !is null ? keys.id_ : null,
224 ukeys !is null ? ukeys.id : null, flag, code); 254 ukeys !is null ? ukeys.id_ : null, flag, code);
225 return result !is null ? new NSEvent(result) : null; 255 return result !is null ? new NSEvent(result) : null;
226 } 256 }
227 257
228 public NSPoint locationInWindow () 258 public NSPoint locationInWindow ()
229 { 259 {
230 NSPoint result; 260 NSPoint result;
231 OS.objc_msgSend_struct(result, this.id, OS.sel_locationInWindow); 261 OS.objc_msgSend_struct(&result, this.id_, OS.sel_locationInWindow);
232 return result; 262 return result;
233 } 263 }
234 264
235 public NSUInteger modifierFlags () 265 public NSUInteger modifierFlags ()
236 { 266 {
237 return OS.objc_msgSend(this.id, OS.sel_modifierFlags); 267 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_modifierFlags);
238 } 268 }
239 269
240 public static NSEvent mouseEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, 270 public static NSEvent mouseEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
241 NSGraphicsContext context, NSInteger eNum, NSInteger cNum, float pressure) 271 NSGraphicsContext context, NSInteger eNum, NSInteger cNum, float pressure)
242 { 272 {
243 objc.id result = OS.objc_msgSend(OS.class_NSEvent, 273 objc.id result = OS.objc_msgSend(OS.class_NSEvent,
244 OS.sel_mouseEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1clickCount_1pressure_1, type, 274 OS.sel_mouseEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1clickCount_1pressure_1, type,
245 location, flags, time, wNum, context !is null ? context.id : null, eNum, cNum, pressure); 275 location, flags, time, wNum, context !is null ? context.id_ : null, eNum, cNum, pressure);
246 return result !is null ? new NSEvent(result) : null; 276 return result !is null ? new NSEvent(result) : null;
247 } 277 }
248 278
249 public static NSPoint mouseLocation () 279 public static NSPoint mouseLocation ()
250 { 280 {
251 NSPoint result; 281 NSPoint result;
252 OS.objc_msgSend_struct(result, OS.class_NSEvent, OS.sel_mouseLocation); 282 OS.objc_msgSend_struct(&result, OS.class_NSEvent, OS.sel_mouseLocation);
253 return result; 283 return result;
254 } 284 }
255 285
256 public static NSEvent otherEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, NSGraphicsContext context, 286 public static NSEvent otherEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, NSGraphicsContext context,
257 short subtype, NSInteger d1, NSInteger d2) 287 short subtype, NSInteger d1, NSInteger d2)
258 { 288 {
259 objc.id result = OS.objc_msgSend(OS.class_NSEvent, 289 objc.id result = OS.objc_msgSend(OS.class_NSEvent,
260 OS.sel_otherEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1subtype_1data1_1data2_1, type, location, flags, 290 OS.sel_otherEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1subtype_1data1_1data2_1, type, location, flags,
261 time, wNum, context !is null ? context.id : null, subtype, d1, d2); 291 time, wNum, context !is null ? context.id_ : null, subtype, d1, d2);
262 return result !is null ? new NSEvent(result) : null; 292 return result !is null ? new NSEvent(result) : null;
263 } 293 }
264 294
265 public NSUInteger pointingDeviceID () 295 public NSUInteger pointingDeviceID ()
266 { 296 {
267 return OS.objc_msgSend(this.id, OS.sel_pointingDeviceID); 297 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceID);
268 } 298 }
269 299
270 public NSUInteger pointingDeviceSerialNumber () 300 public NSUInteger pointingDeviceSerialNumber ()
271 { 301 {
272 return OS.objc_msgSend(this.id, OS.sel_pointingDeviceSerialNumber); 302 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceSerialNumber);
273 } 303 }
274 304
275 public NSPointingDeviceType pointingDeviceType () 305 public NSPointingDeviceType pointingDeviceType ()
276 { 306 {
277 return OS.objc_msgSend(this.id, OS.sel_pointingDeviceType); 307 return cast(NSPointingDeviceType) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceType);
278 } 308 }
279 309
280 public float pressure () 310 public float pressure ()
281 { 311 {
282 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_pressure); 312 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_pressure);
283 } 313 }
284 314
285 public float rotation () 315 public float rotation ()
286 { 316 {
287 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_rotation); 317 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_rotation);
288 } 318 }
289 319
290 public static void setMouseCoalescingEnabled (bool flag) 320 public static void setMouseCoalescingEnabled (bool flag)
291 { 321 {
292 OS.objc_msgSend(OS.class_NSEvent, OS.sel_setMouseCoalescingEnabled_1, flag); 322 OS.objc_msgSend(OS.class_NSEvent, OS.sel_setMouseCoalescingEnabled_1, flag);
302 OS.objc_msgSend(OS.class_NSEvent, OS.sel_stopPeriodicEvents); 332 OS.objc_msgSend(OS.class_NSEvent, OS.sel_stopPeriodicEvents);
303 } 333 }
304 334
305 public short subtype () 335 public short subtype ()
306 { 336 {
307 return cast(short) OS.objc_msgSend(this.id, OS.sel_subtype); 337 return cast(short) OS.objc_msgSend(this.id_, OS.sel_subtype);
308 } 338 }
309 339
310 public NSUInteger systemTabletID () 340 public NSUInteger systemTabletID ()
311 { 341 {
312 return OS.objc_msgSend(this.id, OS.sel_systemTabletID); 342 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_systemTabletID);
313 } 343 }
314 344
315 public NSUInteger tabletID () 345 public NSUInteger tabletID ()
316 { 346 {
317 return OS.objc_msgSend(this.id, OS.sel_tabletID); 347 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_tabletID);
318 } 348 }
319 349
320 public float tangentialPressure () 350 public float tangentialPressure ()
321 { 351 {
322 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_tangentialPressure); 352 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_tangentialPressure);
323 } 353 }
324 354
325 public NSPoint tilt () 355 public NSPoint tilt ()
326 { 356 {
327 NSPoint result; 357 NSPoint result;
328 OS.objc_msgSend_stret(result, this.id, OS.sel_tilt); 358 OS.objc_msgSend_stret(&result, this.id_, OS.sel_tilt);
329 return result; 359 return result;
330 } 360 }
331 361
332 public NSTimeInterval timestamp () 362 public NSTimeInterval timestamp ()
333 { 363 {
334 return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp); 364 return OS.objc_msgSend_fpret(this.id_, OS.sel_timestamp);
335 } 365 }
336 366
337 public NSTrackingArea trackingArea () 367 public NSTrackingArea trackingArea ()
338 { 368 {
339 objc.id result = OS.objc_msgSend(this.id, OS.sel_trackingArea); 369 objc.id result = OS.objc_msgSend(this.id_, OS.sel_trackingArea);
340 return result !is null ? new NSTrackingArea(result) : null; 370 return result !is null ? new NSTrackingArea(result) : null;
341 } 371 }
342 372
343 public NSInteger trackingNumber () 373 public NSInteger trackingNumber ()
344 { 374 {
345 return OS.objc_msgSend(this.id, OS.sel_trackingNumber); 375 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_trackingNumber);
346 } 376 }
347 377
348 public NSEventType type () 378 public NSEventType type ()
349 { 379 {
350 return OS.objc_msgSend(this.id, OS.sel_type); 380 return cast(NSEventType) OS.objc_msgSend(this.id_, OS.sel_type);
351 } 381 }
352 382
353 public long uniqueID () 383 public long uniqueID ()
354 { 384 {
355 return cast(long) OS.objc_msgSend(this.id, OS.sel_uniqueID); 385 return cast(long) OS.objc_msgSend(this.id_, OS.sel_uniqueID);
356 } 386 }
357 387
358 public void* userData () 388 public void* userData ()
359 { 389 {
360 return OS.objc_msgSend(this.id, OS.sel_userData); 390 return OS.objc_msgSend(this.id_, OS.sel_userData);
361 } 391 }
362 392
363 public id vendorDefined () 393 public id vendorDefined ()
364 { 394 {
365 objc.id result = OS.objc_msgSend(this.id, OS.sel_vendorDefined); 395 objc.id result = OS.objc_msgSend(this.id_, OS.sel_vendorDefined);
366 return result !is null ? new id(result) : null; 396 return result !is null ? new id(result) : null;
367 } 397 }
368 398
369 public NSUInteger vendorID () 399 public NSUInteger vendorID ()
370 { 400 {
371 return OS.objc_msgSend(this.id, OS.sel_vendorID); 401 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_vendorID);
372 } 402 }
373 403
374 public NSUInteger vendorPointingDeviceType () 404 public NSUInteger vendorPointingDeviceType ()
375 { 405 {
376 return OS.objc_msgSend(this.id, OS.sel_vendorPointingDeviceType); 406 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_vendorPointingDeviceType);
377 } 407 }
378 408
379 public NSWindow window () 409 public NSWindow window ()
380 { 410 {
381 objc.id result = OS.objc_msgSend(this.id, OS.sel_window); 411 objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
382 return result !is null ? new NSWindow(result) : null; 412 return result !is null ? new NSWindow(result) : null;
383 } 413 }
384 414
385 public NSInteger windowNumber () 415 public NSInteger windowNumber ()
386 { 416 {
387 return OS.objc_msgSend(this.id, OS.sel_windowNumber); 417 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_windowNumber);
388 } 418 }
389 419
390 } 420 }