Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSWindow.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSWindow; | |
15 | |
16 import dwt.internal.cocoa.CGFloat; | |
17 import dwt.internal.cocoa.id; | |
18 import dwt.internal.cocoa.NSArray; | |
19 import dwt.internal.cocoa.NSButton; | |
20 import dwt.internal.cocoa.NSButtonCell; | |
21 import dwt.internal.cocoa.NSCloseCommand; | |
22 import dwt.internal.cocoa.NSColor; | |
23 import dwt.internal.cocoa.NSData; | |
24 import dwt.internal.cocoa.NSDate; | |
25 import dwt.internal.cocoa.NSDictionary; | |
26 import dwt.internal.cocoa.NSDockTile; | |
27 import dwt.internal.cocoa.NSEvent; | |
28 import dwt.internal.cocoa.NSGraphicsContext; | |
29 import dwt.internal.cocoa.NSImage; | |
30 import dwt.internal.cocoa.NSInteger; | |
31 import dwt.internal.cocoa.NSMenu; | |
32 import dwt.internal.cocoa.NSPasteboard; | |
33 import dwt.internal.cocoa.NSPoint; | |
34 import dwt.internal.cocoa.NSRect; | |
35 import dwt.internal.cocoa.NSResponder; | |
36 import dwt.internal.cocoa.NSScreen; | |
37 import dwt.internal.cocoa.NSScriptCommand; | |
38 import dwt.internal.cocoa.NSSize; | |
39 import dwt.internal.cocoa.NSString; | |
40 import dwt.internal.cocoa.NSText; | |
41 import dwt.internal.cocoa.NSToolbar; | |
42 import dwt.internal.cocoa.NSURL; | |
43 import dwt.internal.cocoa.NSView; | |
44 import dwt.internal.cocoa.NSWindowController; | |
45 import dwt.internal.cocoa.OS; | |
46 import objc = dwt.internal.objc.runtime; | |
47 | |
48 alias int NSWindowDepth; | |
49 | |
50 enum NSWindowOrderingMode | |
51 { | |
52 NSWindowAbove = 1, | |
53 NSWindowBelow = -1, | |
54 NSWindowOut = 0 | |
55 } | |
56 | |
57 alias NSWindowOrderingMode.NSWindowAbove NSWindowAbove; | |
58 alias NSWindowOrderingMode.NSWindowBelow NSWindowBelow; | |
59 alias NSWindowOrderingMode.NSWindowOut NSWindowOut; | |
60 | |
61 enum NSWindowBackingLocation : NSUInteger | |
62 { | |
63 NSWindowBackingLocationDefault = 0, | |
64 NSWindowBackingLocationVideoMemory = 1, | |
65 NSWindowBackingLocationMainMemory = 2 | |
66 } | |
67 | |
68 alias NSWindowBackingLocation.NSWindowBackingLocationDefault NSWindowBackingLocationDefault; | |
69 alias NSWindowBackingLocation.NSWindowBackingLocationVideoMemory NSWindowBackingLocationVideoMemory; | |
70 alias NSWindowBackingLocation.NSWindowBackingLocationMainMemory NSWindowBackingLocationMainMemory; | |
71 | |
72 enum NSBackingStoreType | |
73 { | |
74 NSBackingStoreRetained = 0, | |
75 NSBackingStoreNonretained = 1, | |
76 NSBackingStoreBuffered = 2 | |
77 } | |
78 | |
79 alias NSBackingStoreType.NSBackingStoreRetained NSBackingStoreRetained; | |
80 alias NSBackingStoreType.NSBackingStoreNonretained NSBackingStoreNonretained; | |
81 alias NSBackingStoreType.NSBackingStoreBuffered NSBackingStoreBuffered; | |
82 | |
83 enum NSWindowCollectionBehavior : NSUInteger | |
84 { | |
85 NSWindowCollectionBehaviorDefault = 0, | |
86 NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0, | |
87 NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1 | |
88 } | |
89 | |
90 alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorDefault NSWindowCollectionBehaviorDefault; | |
91 alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorCanJoinAllSpaces NSWindowCollectionBehaviorCanJoinAllSpaces; | |
92 alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorMoveToActiveSpace NSWindowCollectionBehaviorMoveToActiveSpace; | |
93 | |
94 enum NSSelectionDirection | |
95 { | |
96 NSDirectSelection = 0, | |
97 NSSelectingNext, | |
98 NSSelectingPrevious | |
99 } | |
100 | |
101 alias NSSelectionDirection.NSDirectSelection NSDirectSelection; | |
102 alias NSSelectionDirection.NSSelectingNext NSSelectingNext; | |
103 alias NSSelectionDirection.NSSelectingPrevious NSSelectingPrevious; | |
104 | |
105 enum NSWindowSharingType : NSUInteger | |
106 { | |
107 NSWindowSharingNone = 0, | |
108 NSWindowSharingReadOnly = 1, | |
109 NSWindowSharingReadWrite = 2 | |
110 } | |
111 | |
112 alias NSWindowSharingType.NSWindowSharingNone NSWindowSharingNone; | |
113 alias NSWindowSharingType.NSWindowSharingReadOnly NSWindowSharingReadOnly; | |
114 alias NSWindowSharingType.NSWindowSharingReadWrite NSWindowSharingReadWrite; | |
115 | |
116 enum NSWindowButton | |
117 { | |
118 NSWindowCloseButton, | |
119 NSWindowMiniaturizeButton, | |
120 NSWindowZoomButton, | |
121 NSWindowToolbarButton, | |
122 NSWindowDocumentIconButton | |
123 } | |
124 | |
125 alias NSWindowButton.NSWindowCloseButton NSWindowCloseButton; | |
126 alias NSWindowButton.NSWindowMiniaturizeButton NSWindowMiniaturizeButton; | |
127 alias NSWindowButton.NSWindowZoomButton NSWindowZoomButton; | |
128 alias NSWindowButton.NSWindowToolbarButton NSWindowToolbarButton; | |
129 alias NSWindowButton.NSWindowDocumentIconButton NSWindowDocumentIconButton; | |
130 | |
131 public class NSWindow : NSResponder | |
132 { | |
133 | |
134 public this () | |
135 { | |
136 super(); | |
137 } | |
138 | |
139 public this (objc.id id) | |
140 { | |
141 super(id); | |
142 } | |
143 | |
144 public bool acceptsMouseMovedEvents () | |
145 { | |
146 return OS.objc_msgSend(this.id, OS.sel_acceptsMouseMovedEvents) !is null; | |
147 } | |
148 | |
149 public void addChildWindow (NSWindow childWin, NSWindowOrderingMode place) | |
150 { | |
151 OS.objc_msgSend(this.id, OS.sel_addChildWindow_1ordered_1, childWin !is null ? childWin.id : null, place); | |
152 } | |
153 | |
154 public bool allowsToolTipsWhenApplicationIsInactive () | |
155 { | |
156 return OS.objc_msgSend(this.id, OS.sel_allowsToolTipsWhenApplicationIsInactive) !is null; | |
157 } | |
158 | |
159 public CGFloat alphaValue () | |
160 { | |
161 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue); | |
162 } | |
163 | |
164 public NSTimeInterval animationResizeTime (NSRect newFrame) | |
165 { | |
166 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id, OS.sel_animationResizeTime_1, newFrame); | |
167 } | |
168 | |
169 public bool areCursorRectsEnabled () | |
170 { | |
171 return OS.objc_msgSend(this.id, OS.sel_areCursorRectsEnabled) !is null; | |
172 } | |
173 | |
174 public NSSize aspectRatio () | |
175 { | |
176 NSSize result; | |
177 OS.objc_msgSend_stret(result, this.id, OS.sel_aspectRatio); | |
178 return result; | |
179 } | |
180 | |
181 public NSWindow attachedSheet () | |
182 { | |
183 objc.id result = OS.objc_msgSend(this.id, OS.sel_attachedSheet); | |
184 return result is this.id ? this : (result !is null ? new NSWindow(result) : null); | |
185 } | |
186 | |
187 public bool autorecalculatesContentBorderThicknessForEdge (NSRectEdge edge) | |
188 { | |
189 return OS.objc_msgSend(this.id, OS.sel_autorecalculatesContentBorderThicknessForEdge_1, edge) !is null; | |
190 } | |
191 | |
192 public bool autorecalculatesKeyViewLoop () | |
193 { | |
194 return OS.objc_msgSend(this.id, OS.sel_autorecalculatesKeyViewLoop) !is null; | |
195 } | |
196 | |
197 public NSColor backgroundColor () | |
198 { | |
199 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | |
200 return result !is null ? new NSColor(result) : null; | |
201 } | |
202 | |
203 public NSWindowBackingLocation backingLocation () | |
204 { | |
205 return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id, OS.sel_backingLocation); | |
206 } | |
207 | |
208 public NSBackingStoreType backingType () | |
209 { | |
210 return cast(NSBackingStoreType) OS.objc_msgSend(this.id, OS.sel_backingType); | |
211 } | |
212 | |
213 public void becomeKeyWindow () | |
214 { | |
215 OS.objc_msgSend(this.id, OS.sel_becomeKeyWindow); | |
216 } | |
217 | |
218 public void becomeMainWindow () | |
219 { | |
220 OS.objc_msgSend(this.id, OS.sel_becomeMainWindow); | |
221 } | |
222 | |
223 public void cacheImageInRect (NSRect aRect) | |
224 { | |
225 OS.objc_msgSend(this.id, OS.sel_cacheImageInRect_1, aRect); | |
226 } | |
227 | |
228 public bool canBeVisibleOnAllSpaces () | |
229 { | |
230 return OS.objc_msgSend(this.id, OS.sel_canBeVisibleOnAllSpaces) !is null; | |
231 } | |
232 | |
233 public bool canBecomeKeyWindow () | |
234 { | |
235 return OS.objc_msgSend(this.id, OS.sel_canBecomeKeyWindow) !is null; | |
236 } | |
237 | |
238 public bool canBecomeMainWindow () | |
239 { | |
240 return OS.objc_msgSend(this.id, OS.sel_canBecomeMainWindow) !is null; | |
241 } | |
242 | |
243 public bool canBecomeVisibleWithoutLogin () | |
244 { | |
245 return OS.objc_msgSend(this.id, OS.sel_canBecomeVisibleWithoutLogin) !is null; | |
246 } | |
247 | |
248 public bool canHide () | |
249 { | |
250 return OS.objc_msgSend(this.id, OS.sel_canHide) !is null; | |
251 } | |
252 | |
253 public bool canStoreColor () | |
254 { | |
255 return OS.objc_msgSend(this.id, OS.sel_canStoreColor) !is null; | |
256 } | |
257 | |
258 public NSPoint cascadeTopLeftFromPoint (NSPoint topLeftPoint) | |
259 { | |
260 NSPoint result; | |
261 OS.objc_msgSend_struct(result, this.id, OS.sel_cascadeTopLeftFromPoint_1, topLeftPoint); | |
262 return result; | |
263 } | |
264 | |
265 public void center () | |
266 { | |
267 OS.objc_msgSend(this.id, OS.sel_center); | |
268 } | |
269 | |
270 public NSArray childWindows () | |
271 { | |
272 objc.id result = OS.objc_msgSend(this.id, OS.sel_childWindows); | |
273 return result !is null ? new NSArray(result) : null; | |
274 } | |
275 | |
276 public void close () | |
277 { | |
278 OS.objc_msgSend(this.id, OS.sel_close); | |
279 } | |
280 | |
281 public NSWindowCollectionBehavior collectionBehavior () | |
282 { | |
283 return cast(NSWindowCollectionBehavior) OS.objc_msgSend(this.id, OS.sel_collectionBehavior); | |
284 } | |
285 | |
286 public NSRect constrainFrameRect (NSRect frameRect, NSScreen screen) | |
287 { | |
288 NSRect result; | |
289 OS.objc_msgSend_stret(result, this.id, OS.sel_constrainFrameRect_1toScreen_1, frameRect, screen !is null ? screen.id : null); | |
290 return result; | |
291 } | |
292 | |
293 public NSSize contentAspectRatio () | |
294 { | |
295 NSSize result; | |
296 OS.objc_msgSend_stret(result, this.id, OS.sel_contentAspectRatio); | |
297 return result; | |
298 } | |
299 | |
300 public CGFloat contentBorderThicknessForEdge (NSRectEdge edge) | |
301 { | |
302 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_contentBorderThicknessForEdge_1, edge); | |
303 } | |
304 | |
305 public NSSize contentMaxSize () | |
306 { | |
307 NSSize result; | |
308 OS.objc_msgSend_stret(result, this.id, OS.sel_contentMaxSize); | |
309 return result; | |
310 } | |
311 | |
312 public NSSize contentMinSize () | |
313 { | |
314 NSSize result; | |
315 OS.objc_msgSend_stret(result, this.id, OS.sel_contentMinSize); | |
316 return result; | |
317 } | |
318 | |
319 public NSRect contentRectForFrameRect_ (NSRect frameRect) | |
320 { | |
321 NSRect result; | |
322 OS.objc_msgSend_stret(result, this.id, OS.sel_contentRectForFrameRect_1, frameRect); | |
323 return result; | |
324 } | |
325 | |
326 public static NSRect static_contentRectForFrameRect_styleMask_ (NSRect fRect, NSUInteger aStyle) | |
327 { | |
328 NSRect result; | |
329 OS.objc_msgSend_stret(result, OS.class_NSWindow, OS.sel_contentRectForFrameRect_1styleMask_1, fRect, aStyle); | |
330 return result; | |
331 } | |
332 | |
333 public NSSize contentResizeIncrements () | |
334 { | |
335 NSSize result; | |
336 OS.objc_msgSend_stret(result, this.id, OS.sel_contentResizeIncrements); | |
337 return result; | |
338 } | |
339 | |
340 public NSView contentView () | |
341 { | |
342 objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView); | |
343 return result !is null ? new NSView(result) : null; | |
344 } | |
345 | |
346 public NSPoint convertBaseToScreen (NSPoint aPoint) | |
347 { | |
348 NSPoint result; | |
349 OS.objc_msgSend_struct(result, this.id, OS.sel_convertBaseToScreen_1, aPoint); | |
350 return result; | |
351 } | |
352 | |
353 public NSPoint convertScreenToBase (NSPoint aPoint) | |
354 { | |
355 NSPoint result; | |
356 OS.objc_msgSend_struct(result, this.id, OS.sel_convertScreenToBase_1, aPoint); | |
357 return result; | |
358 } | |
359 | |
360 public NSEvent currentEvent () | |
361 { | |
362 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEvent); | |
363 return result !is null ? new NSEvent(result) : null; | |
364 } | |
365 | |
366 public NSData dataWithEPSInsideRect (NSRect rect) | |
367 { | |
368 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithEPSInsideRect_1, rect); | |
369 return result !is null ? new NSData(result) : null; | |
370 } | |
371 | |
372 public NSData dataWithPDFInsideRect (NSRect rect) | |
373 { | |
374 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithPDFInsideRect_1, rect); | |
375 return result !is null ? new NSData(result) : null; | |
376 } | |
377 | |
378 public NSScreen deepestScreen () | |
379 { | |
380 objc.id result = OS.objc_msgSend(this.id, OS.sel_deepestScreen); | |
381 return result !is null ? new NSScreen(result) : null; | |
382 } | |
383 | |
384 public NSButtonCell defaultButtonCell () | |
385 { | |
386 objc.id result = OS.objc_msgSend(this.id, OS.sel_defaultButtonCell); | |
387 return result !is null ? new NSButtonCell(result) : null; | |
388 } | |
389 | |
390 public static NSWindowDepth defaultDepthLimit () | |
391 { | |
392 return cast(NSWindowDepth) OS.objc_msgSend(OS.class_NSWindow, OS.sel_defaultDepthLimit); | |
393 } | |
394 | |
395 public id delegatee () | |
396 { | |
397 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | |
398 return result !is null ? new id(result) : null; | |
399 } | |
400 | |
401 public void deminiaturize (id sender) | |
402 { | |
403 OS.objc_msgSend(this.id, OS.sel_deminiaturize_1, sender !is null ? sender.id : null); | |
404 } | |
405 | |
406 public NSWindowDepth depthLimit () | |
407 { | |
408 return cast(NSWindowDepth) OS.objc_msgSend(this.id, OS.sel_depthLimit); | |
409 } | |
410 | |
411 public NSDictionary deviceDescription () | |
412 { | |
413 objc.id result = OS.objc_msgSend(this.id, OS.sel_deviceDescription); | |
414 return result !is null ? new NSDictionary(result) : null; | |
415 } | |
416 | |
417 public void disableCursorRects () | |
418 { | |
419 OS.objc_msgSend(this.id, OS.sel_disableCursorRects); | |
420 } | |
421 | |
422 public void disableFlushWindow () | |
423 { | |
424 OS.objc_msgSend(this.id, OS.sel_disableFlushWindow); | |
425 } | |
426 | |
427 public void disableKeyEquivalentForDefaultButtonCell () | |
428 { | |
429 OS.objc_msgSend(this.id, OS.sel_disableKeyEquivalentForDefaultButtonCell); | |
430 } | |
431 | |
432 public void disableScreenUpdatesUntilFlush () | |
433 { | |
434 OS.objc_msgSend(this.id, OS.sel_disableScreenUpdatesUntilFlush); | |
435 } | |
436 | |
437 public void discardCachedImage () | |
438 { | |
439 OS.objc_msgSend(this.id, OS.sel_discardCachedImage); | |
440 } | |
441 | |
442 public void discardCursorRects () | |
443 { | |
444 OS.objc_msgSend(this.id, OS.sel_discardCursorRects); | |
445 } | |
446 | |
447 public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent) | |
448 { | |
449 OS.objc_msgSend(this.id, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id : null); | |
450 } | |
451 | |
452 public void display () | |
453 { | |
454 OS.objc_msgSend(this.id, OS.sel_display); | |
455 } | |
456 | |
457 public void displayIfNeeded () | |
458 { | |
459 OS.objc_msgSend(this.id, OS.sel_displayIfNeeded); | |
460 } | |
461 | |
462 public bool displaysWhenScreenProfileChanges () | |
463 { | |
464 return OS.objc_msgSend(this.id, OS.sel_displaysWhenScreenProfileChanges) !is null; | |
465 } | |
466 | |
467 public NSDockTile dockTile () | |
468 { | |
469 objc.id result = OS.objc_msgSend(this.id, OS.sel_dockTile); | |
470 return result !is null ? new NSDockTile(result) : null; | |
471 } | |
472 | |
473 public void dragImage (NSImage anImage, NSPoint baseLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, id sourceObj, | |
474 bool slideFlag) | |
475 { | |
476 OS.objc_msgSend(this.id, OS.sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, anImage !is null ? anImage.id : null, | |
477 baseLocation, initialOffset, event !is null ? event.id : null, pboard !is null ? pboard.id : null, | |
478 sourceObj !is null ? sourceObj.id : null, slideFlag); | |
479 } | |
480 | |
481 public NSArray drawers () | |
482 { | |
483 objc.id result = OS.objc_msgSend(this.id, OS.sel_drawers); | |
484 return result !is null ? new NSArray(result) : null; | |
485 } | |
486 | |
487 public void enableCursorRects () | |
488 { | |
489 OS.objc_msgSend(this.id, OS.sel_enableCursorRects); | |
490 } | |
491 | |
492 public void enableFlushWindow () | |
493 { | |
494 OS.objc_msgSend(this.id, OS.sel_enableFlushWindow); | |
495 } | |
496 | |
497 public void enableKeyEquivalentForDefaultButtonCell () | |
498 { | |
499 OS.objc_msgSend(this.id, OS.sel_enableKeyEquivalentForDefaultButtonCell); | |
500 } | |
501 | |
502 public void endEditingFor (id anObject) | |
503 { | |
504 OS.objc_msgSend(this.id, OS.sel_endEditingFor_1, anObject !is null ? anObject.id : null); | |
505 } | |
506 | |
507 public NSText fieldEditor (bool createFlag, id anObject) | |
508 { | |
509 objc.id result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_1forObject_1, createFlag, anObject !is null ? anObject.id : null); | |
510 return result !is null ? new NSText(result) : null; | |
511 } | |
512 | |
513 public NSResponder firstResponder () | |
514 { | |
515 objc.id result = OS.objc_msgSend(this.id, OS.sel_firstResponder); | |
516 return result !is null ? new NSResponder(result) : null; | |
517 } | |
518 | |
519 public void flushWindow () | |
520 { | |
521 OS.objc_msgSend(this.id, OS.sel_flushWindow); | |
522 } | |
523 | |
524 public void flushWindowIfNeeded () | |
525 { | |
526 OS.objc_msgSend(this.id, OS.sel_flushWindowIfNeeded); | |
527 } | |
528 | |
529 public NSRect frame () | |
530 { | |
531 NSRect result; | |
532 OS.objc_msgSend_stret(result, this.id, OS.sel_frame); | |
533 return result; | |
534 } | |
535 | |
536 public NSString frameAutosaveName () | |
537 { | |
538 objc.id result = OS.objc_msgSend(this.id, OS.sel_frameAutosaveName); | |
539 return result !is null ? new NSString(result) : null; | |
540 } | |
541 | |
542 public NSRect frameRectForContentRect_ (NSRect contentRect) | |
543 { | |
544 NSRect result; | |
545 OS.objc_msgSend_stret(result, this.id, OS.sel_frameRectForContentRect_1, contentRect); | |
546 return result; | |
547 } | |
548 | |
549 public static NSRect static_frameRectForContentRect_styleMask_ (NSRect cRect, NSUInteger aStyle) | |
550 { | |
551 NSRect result; | |
552 OS.objc_msgSend_stret(result, OS.class_NSWindow, OS.sel_frameRectForContentRect_1styleMask_1, cRect, aStyle); | |
553 return result; | |
554 } | |
555 | |
556 public NSInteger gState () | |
557 { | |
558 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_gState); | |
559 } | |
560 | |
561 public NSGraphicsContext graphicsContext () | |
562 { | |
563 objc.id result = OS.objc_msgSend(this.id, OS.sel_graphicsContext); | |
564 return result !is null ? new NSGraphicsContext(result) : null; | |
565 } | |
566 | |
567 public id handleCloseScriptCommand (NSCloseCommand command) | |
568 { | |
569 objc.id result = OS.objc_msgSend(this.id, OS.sel_handleCloseScriptCommand_1, command !is null ? command.id : null); | |
570 return result !is null ? new id(result) : null; | |
571 } | |
572 | |
573 public id handlePrintScriptCommand (NSScriptCommand command) | |
574 { | |
575 objc.id result = OS.objc_msgSend(this.id, OS.sel_handlePrintScriptCommand_1, command !is null ? command.id : null); | |
576 return result !is null ? new id(result) : null; | |
577 } | |
578 | |
579 public id handleSaveScriptCommand (NSScriptCommand command) | |
580 { | |
581 objc.id result = OS.objc_msgSend(this.id, OS.sel_handleSaveScriptCommand_1, command !is null ? command.id : null); | |
582 return result !is null ? new id(result) : null; | |
583 } | |
584 | |
585 public bool hasCloseBox () | |
586 { | |
587 return OS.objc_msgSend(this.id, OS.sel_hasCloseBox) !is null; | |
588 } | |
589 | |
590 public bool hasDynamicDepthLimit () | |
591 { | |
592 return OS.objc_msgSend(this.id, OS.sel_hasDynamicDepthLimit) !is null; | |
593 } | |
594 | |
595 public bool hasShadow () | |
596 { | |
597 return OS.objc_msgSend(this.id, OS.sel_hasShadow) !is null; | |
598 } | |
599 | |
600 public bool hasTitleBar () | |
601 { | |
602 return OS.objc_msgSend(this.id, OS.sel_hasTitleBar) !is null; | |
603 } | |
604 | |
605 public bool hidesOnDeactivate () | |
606 { | |
607 return OS.objc_msgSend(this.id, OS.sel_hidesOnDeactivate) !is null; | |
608 } | |
609 | |
610 public bool ignoresMouseEvents () | |
611 { | |
612 return OS.objc_msgSend(this.id, OS.sel_ignoresMouseEvents) !is null; | |
613 } | |
614 | |
615 public NSWindow initWithContentRect_styleMask_backing_defer_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag) | |
616 { | |
617 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1, contentRect, aStyle, bufferingType, flag); | |
618 return result !is null ? this : null; | |
619 } | |
620 | |
621 public NSWindow initWithContentRect_styleMask_backing_defer_screen_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, | |
622 bool flag, NSScreen screen) | |
623 { | |
624 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1screen_1, contentRect, aStyle, | |
625 bufferingType, flag, screen !is null ? screen.id : null); | |
626 return result !is null ? this : null; | |
627 } | |
628 | |
629 public NSWindow initWithWindowRef (void* windowRef) | |
630 { | |
631 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindowRef_1, windowRef); | |
632 return result is this.id ? this : (result !is null ? new NSWindow(result) : null); | |
633 } | |
634 | |
635 public NSView initialFirstResponder () | |
636 { | |
637 objc.id result = OS.objc_msgSend(this.id, OS.sel_initialFirstResponder); | |
638 return result !is null ? new NSView(result) : null; | |
639 } | |
640 | |
641 public void invalidateCursorRectsForView (NSView aView) | |
642 { | |
643 OS.objc_msgSend(this.id, OS.sel_invalidateCursorRectsForView_1, aView !is null ? aView.id : null); | |
644 } | |
645 | |
646 public void invalidateShadow () | |
647 { | |
648 OS.objc_msgSend(this.id, OS.sel_invalidateShadow); | |
649 } | |
650 | |
651 public bool isAutodisplay () | |
652 { | |
653 return OS.objc_msgSend(this.id, OS.sel_isAutodisplay) !is null; | |
654 } | |
655 | |
656 public bool isDocumentEdited () | |
657 { | |
658 return OS.objc_msgSend(this.id, OS.sel_isDocumentEdited) !is null; | |
659 } | |
660 | |
661 public bool isExcludedFromWindowsMenu () | |
662 { | |
663 return OS.objc_msgSend(this.id, OS.sel_isExcludedFromWindowsMenu) !is null; | |
664 } | |
665 | |
666 public bool isFloatingPanel () | |
667 { | |
668 return OS.objc_msgSend(this.id, OS.sel_isFloatingPanel) !is null; | |
669 } | |
670 | |
671 public bool isFlushWindowDisabled () | |
672 { | |
673 return OS.objc_msgSend(this.id, OS.sel_isFlushWindowDisabled) !is null; | |
674 } | |
675 | |
676 public bool isKeyWindow () | |
677 { | |
678 return OS.objc_msgSend(this.id, OS.sel_isKeyWindow) !is null; | |
679 } | |
680 | |
681 public bool isMainWindow () | |
682 { | |
683 return OS.objc_msgSend(this.id, OS.sel_isMainWindow) !is null; | |
684 } | |
685 | |
686 public bool isMiniaturizable () | |
687 { | |
688 return OS.objc_msgSend(this.id, OS.sel_isMiniaturizable) !is null; | |
689 } | |
690 | |
691 public bool isMiniaturized () | |
692 { | |
693 return OS.objc_msgSend(this.id, OS.sel_isMiniaturized) !is null; | |
694 } | |
695 | |
696 public bool isModalPanel () | |
697 { | |
698 return OS.objc_msgSend(this.id, OS.sel_isModalPanel) !is null; | |
699 } | |
700 | |
701 public bool isMovableByWindowBackground () | |
702 { | |
703 return OS.objc_msgSend(this.id, OS.sel_isMovableByWindowBackground) !is null; | |
704 } | |
705 | |
706 public bool isOneShot () | |
707 { | |
708 return OS.objc_msgSend(this.id, OS.sel_isOneShot) !is null; | |
709 } | |
710 | |
711 public bool isOpaque () | |
712 { | |
713 return OS.objc_msgSend(this.id, OS.sel_isOpaque) !is null; | |
714 } | |
715 | |
716 public bool isReleasedWhenClosed () | |
717 { | |
718 return OS.objc_msgSend(this.id, OS.sel_isReleasedWhenClosed) !is null; | |
719 } | |
720 | |
721 public bool isResizable () | |
722 { | |
723 return OS.objc_msgSend(this.id, OS.sel_isResizable) !is null; | |
724 } | |
725 | |
726 public bool isSheet () | |
727 { | |
728 return OS.objc_msgSend(this.id, OS.sel_isSheet) !is null; | |
729 } | |
730 | |
731 public bool isVisible () | |
732 { | |
733 return OS.objc_msgSend(this.id, OS.sel_isVisible) !is null; | |
734 } | |
735 | |
736 public bool isZoomable () | |
737 { | |
738 return OS.objc_msgSend(this.id, OS.sel_isZoomable) !is null; | |
739 } | |
740 | |
741 public bool isZoomed () | |
742 { | |
743 return OS.objc_msgSend(this.id, OS.sel_isZoomed) !is null; | |
744 } | |
745 | |
746 public void keyDown (NSEvent theEvent) | |
747 { | |
748 OS.objc_msgSend(this.id, OS.sel_keyDown_1, theEvent !is null ? theEvent.id : null); | |
749 } | |
750 | |
751 public NSSelectionDirection keyViewSelectionDirection () | |
752 { | |
753 return cast(NSSelectionDirection) OS.objc_msgSend(this.id, OS.sel_keyViewSelectionDirection); | |
754 } | |
755 | |
756 public NSInteger level () | |
757 { | |
758 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_level); | |
759 } | |
760 | |
761 public bool makeFirstResponder (NSResponder aResponder) | |
762 { | |
763 return OS.objc_msgSend(this.id, OS.sel_makeFirstResponder_1, aResponder !is null ? aResponder.id : null) !is null; | |
764 } | |
765 | |
766 public void makeKeyAndOrderFront (id sender) | |
767 { | |
768 OS.objc_msgSend(this.id, OS.sel_makeKeyAndOrderFront_1, sender !is null ? sender.id : null); | |
769 } | |
770 | |
771 public void makeKeyWindow () | |
772 { | |
773 OS.objc_msgSend(this.id, OS.sel_makeKeyWindow); | |
774 } | |
775 | |
776 public void makeMainWindow () | |
777 { | |
778 OS.objc_msgSend(this.id, OS.sel_makeMainWindow); | |
779 } | |
780 | |
781 public NSSize maxSize () | |
782 { | |
783 NSSize result; | |
784 OS.objc_msgSend_stret(result, this.id, OS.sel_maxSize); | |
785 return result; | |
786 } | |
787 | |
788 public static void menuChanged (NSMenu menu) | |
789 { | |
790 OS.objc_msgSend(OS.class_NSWindow, OS.sel_menuChanged_1, menu !is null ? menu.id : null); | |
791 } | |
792 | |
793 public static CGFloat minFrameWidthWithTitle (NSString aTitle, NSUInteger aStyle) | |
794 { | |
795 return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSWindow, OS.sel_minFrameWidthWithTitle_1styleMask_1, aTitle !is null ? aTitle.id : null, | |
796 aStyle); | |
797 } | |
798 | |
799 public NSSize minSize () | |
800 { | |
801 NSSize result; | |
802 OS.objc_msgSend_stret(result, this.id, OS.sel_minSize); | |
803 return result; | |
804 } | |
805 | |
806 public void miniaturize (id sender) | |
807 { | |
808 OS.objc_msgSend(this.id, OS.sel_miniaturize_1, sender !is null ? sender.id : null); | |
809 } | |
810 | |
811 public NSImage miniwindowImage () | |
812 { | |
813 objc.id result = OS.objc_msgSend(this.id, OS.sel_miniwindowImage); | |
814 return result !is null ? new NSImage(result) : null; | |
815 } | |
816 | |
817 public NSString miniwindowTitle () | |
818 { | |
819 objc.id result = OS.objc_msgSend(this.id, OS.sel_miniwindowTitle); | |
820 return result !is null ? new NSString(result) : null; | |
821 } | |
822 | |
823 public NSPoint mouseLocationOutsideOfEventStream () | |
824 { | |
825 NSPoint result; | |
826 OS.objc_msgSend_struct(result, this.id, OS.sel_mouseLocationOutsideOfEventStream); | |
827 return result; | |
828 } | |
829 | |
830 public NSEvent nextEventMatchingMask_ (NSUInteger mask) | |
831 { | |
832 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_1, mask); | |
833 return result !is null ? new NSEvent(result) : null; | |
834 } | |
835 | |
836 public NSEvent nextEventMatchingMask_untilDate_inMode_dequeue_ (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag) | |
837 { | |
838 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask, | |
839 expiration !is null ? expiration.id : null, mode !is null ? mode.id : null, deqFlag); | |
840 return result !is null ? new NSEvent(result) : null; | |
841 } | |
842 | |
843 public void orderBack (id sender) | |
844 { | |
845 OS.objc_msgSend(this.id, OS.sel_orderBack_1, sender !is null ? sender.id : null); | |
846 } | |
847 | |
848 public void orderFront (id sender) | |
849 { | |
850 OS.objc_msgSend(this.id, OS.sel_orderFront_1, sender !is null ? sender.id : null); | |
851 } | |
852 | |
853 public void orderFrontRegardless () | |
854 { | |
855 OS.objc_msgSend(this.id, OS.sel_orderFrontRegardless); | |
856 } | |
857 | |
858 public void orderOut (id sender) | |
859 { | |
860 OS.objc_msgSend(this.id, OS.sel_orderOut_1, sender !is null ? sender.id : null); | |
861 } | |
862 | |
863 public void orderWindow (NSWindowOrderingMode place, NSInteger otherWin) | |
864 { | |
865 OS.objc_msgSend(this.id, OS.sel_orderWindow_1relativeTo_1, place, otherWin); | |
866 } | |
867 | |
868 public int orderedIndex () | |
869 { | |
870 return cast(int) OS.objc_msgSend(this.id, OS.sel_orderedIndex); | |
871 } | |
872 | |
873 public NSWindow parentWindow () | |
874 { | |
875 objc.id result = OS.objc_msgSend(this.id, OS.sel_parentWindow); | |
876 return result is this.id ? this : (result !is null ? new NSWindow(result) : null); | |
877 } | |
878 | |
879 public void performClose (id sender) | |
880 { | |
881 OS.objc_msgSend(this.id, OS.sel_performClose_1, sender !is null ? sender.id : null); | |
882 } | |
883 | |
884 public void performMiniaturize (id sender) | |
885 { | |
886 OS.objc_msgSend(this.id, OS.sel_performMiniaturize_1, sender !is null ? sender.id : null); | |
887 } | |
888 | |
889 public void performZoom (id sender) | |
890 { | |
891 OS.objc_msgSend(this.id, OS.sel_performZoom_1, sender !is null ? sender.id : null); | |
892 } | |
893 | |
894 public void postEvent (NSEvent event, bool flag) | |
895 { | |
896 OS.objc_msgSend(this.id, OS.sel_postEvent_1atStart_1, event !is null ? event.id : null, flag); | |
897 } | |
898 | |
899 public NSWindowBackingLocation preferredBackingLocation () | |
900 { | |
901 return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id, OS.sel_preferredBackingLocation); | |
902 } | |
903 | |
904 public bool preservesContentDuringLiveResize () | |
905 { | |
906 return OS.objc_msgSend(this.id, OS.sel_preservesContentDuringLiveResize) !is null; | |
907 } | |
908 | |
909 public void print (id sender) | |
910 { | |
911 OS.objc_msgSend(this.id, OS.sel_print_1, sender !is null ? sender.id : null); | |
912 } | |
913 | |
914 public void recalculateKeyViewLoop () | |
915 { | |
916 OS.objc_msgSend(this.id, OS.sel_recalculateKeyViewLoop); | |
917 } | |
918 | |
919 public void registerForDraggedTypes (NSArray newTypes) | |
920 { | |
921 OS.objc_msgSend(this.id, OS.sel_registerForDraggedTypes_1, newTypes !is null ? newTypes.id : null); | |
922 } | |
923 | |
924 public void removeChildWindow (NSWindow childWin) | |
925 { | |
926 OS.objc_msgSend(this.id, OS.sel_removeChildWindow_1, childWin !is null ? childWin.id : null); | |
927 } | |
928 | |
929 public static void removeFrameUsingName (NSString name) | |
930 { | |
931 OS.objc_msgSend(OS.class_NSWindow, OS.sel_removeFrameUsingName_1, name !is null ? name.id : null); | |
932 } | |
933 | |
934 public NSString representedFilename () | |
935 { | |
936 objc.id result = OS.objc_msgSend(this.id, OS.sel_representedFilename); | |
937 return result !is null ? new NSString(result) : null; | |
938 } | |
939 | |
940 public NSURL representedURL () | |
941 { | |
942 objc.id result = OS.objc_msgSend(this.id, OS.sel_representedURL); | |
943 return result !is null ? new NSURL(result) : null; | |
944 } | |
945 | |
946 public void resetCursorRects () | |
947 { | |
948 OS.objc_msgSend(this.id, OS.sel_resetCursorRects); | |
949 } | |
950 | |
951 public void resignKeyWindow () | |
952 { | |
953 OS.objc_msgSend(this.id, OS.sel_resignKeyWindow); | |
954 } | |
955 | |
956 public void resignMainWindow () | |
957 { | |
958 OS.objc_msgSend(this.id, OS.sel_resignMainWindow); | |
959 } | |
960 | |
961 public NSInteger resizeFlags () | |
962 { | |
963 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_resizeFlags); | |
964 } | |
965 | |
966 public NSSize resizeIncrements () | |
967 { | |
968 NSSize result; | |
969 OS.objc_msgSend_stret(result, this.id, OS.sel_resizeIncrements); | |
970 return result; | |
971 } | |
972 | |
973 public void restoreCachedImage () | |
974 { | |
975 OS.objc_msgSend(this.id, OS.sel_restoreCachedImage); | |
976 } | |
977 | |
978 public void runToolbarCustomizationPalette (id sender) | |
979 { | |
980 OS.objc_msgSend(this.id, OS.sel_runToolbarCustomizationPalette_1, sender !is null ? sender.id : null); | |
981 } | |
982 | |
983 public void saveFrameUsingName (NSString name) | |
984 { | |
985 OS.objc_msgSend(this.id, OS.sel_saveFrameUsingName_1, name !is null ? name.id : null); | |
986 } | |
987 | |
988 public NSScreen screen () | |
989 { | |
990 objc.id result = OS.objc_msgSend(this.id, OS.sel_screen); | |
991 return result !is null ? new NSScreen(result) : null; | |
992 } | |
993 | |
994 public void selectKeyViewFollowingView (NSView aView) | |
995 { | |
996 OS.objc_msgSend(this.id, OS.sel_selectKeyViewFollowingView_1, aView !is null ? aView.id : null); | |
997 } | |
998 | |
999 public void selectKeyViewPrecedingView (NSView aView) | |
1000 { | |
1001 OS.objc_msgSend(this.id, OS.sel_selectKeyViewPrecedingView_1, aView !is null ? aView.id : null); | |
1002 } | |
1003 | |
1004 public void selectNextKeyView (id sender) | |
1005 { | |
1006 OS.objc_msgSend(this.id, OS.sel_selectNextKeyView_1, sender !is null ? sender.id : null); | |
1007 } | |
1008 | |
1009 public void selectPreviousKeyView (id sender) | |
1010 { | |
1011 OS.objc_msgSend(this.id, OS.sel_selectPreviousKeyView_1, sender !is null ? sender.id : null); | |
1012 } | |
1013 | |
1014 public void sendEvent (NSEvent theEvent) | |
1015 { | |
1016 OS.objc_msgSend(this.id, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id : null); | |
1017 } | |
1018 | |
1019 public void setAcceptsMouseMovedEvents (bool flag) | |
1020 { | |
1021 OS.objc_msgSend(this.id, OS.sel_setAcceptsMouseMovedEvents_1, flag); | |
1022 } | |
1023 | |
1024 public void setAllowsToolTipsWhenApplicationIsInactive (bool allowWhenInactive) | |
1025 { | |
1026 OS.objc_msgSend(this.id, OS.sel_setAllowsToolTipsWhenApplicationIsInactive_1, allowWhenInactive); | |
1027 } | |
1028 | |
1029 public void setAlphaValue (CGFloat windowAlpha) | |
1030 { | |
1031 OS.objc_msgSend(this.id, OS.sel_setAlphaValue_1, windowAlpha); | |
1032 } | |
1033 | |
1034 public void setAspectRatio (NSSize ratio) | |
1035 { | |
1036 OS.objc_msgSend(this.id, OS.sel_setAspectRatio_1, ratio); | |
1037 } | |
1038 | |
1039 public void setAutodisplay (bool flag) | |
1040 { | |
1041 OS.objc_msgSend(this.id, OS.sel_setAutodisplay_1, flag); | |
1042 } | |
1043 | |
1044 public void setAutorecalculatesContentBorderThickness (bool flag, NSRectEdge edge) | |
1045 { | |
1046 OS.objc_msgSend(this.id, OS.sel_setAutorecalculatesContentBorderThickness_1forEdge_1, flag, edge); | |
1047 } | |
1048 | |
1049 public void setAutorecalculatesKeyViewLoop (bool flag) | |
1050 { | |
1051 OS.objc_msgSend(this.id, OS.sel_setAutorecalculatesKeyViewLoop_1, flag); | |
1052 } | |
1053 | |
1054 public void setBackgroundColor (NSColor color) | |
1055 { | |
1056 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | |
1057 } | |
1058 | |
1059 public void setBackingType (NSBackingStoreType bufferingType) | |
1060 { | |
1061 OS.objc_msgSend(this.id, OS.sel_setBackingType_1, bufferingType); | |
1062 } | |
1063 | |
1064 public void setCanBeVisibleOnAllSpaces (bool flag) | |
1065 { | |
1066 OS.objc_msgSend(this.id, OS.sel_setCanBeVisibleOnAllSpaces_1, flag); | |
1067 } | |
1068 | |
1069 public void setCanBecomeVisibleWithoutLogin (bool flag) | |
1070 { | |
1071 OS.objc_msgSend(this.id, OS.sel_setCanBecomeVisibleWithoutLogin_1, flag); | |
1072 } | |
1073 | |
1074 public void setCanHide (bool flag) | |
1075 { | |
1076 OS.objc_msgSend(this.id, OS.sel_setCanHide_1, flag); | |
1077 } | |
1078 | |
1079 public void setCollectionBehavior (NSWindowCollectionBehavior behavior) | |
1080 { | |
1081 OS.objc_msgSend(this.id, OS.sel_setCollectionBehavior_1, behavior); | |
1082 } | |
1083 | |
1084 public void setContentAspectRatio (NSSize ratio) | |
1085 { | |
1086 OS.objc_msgSend(this.id, OS.sel_setContentAspectRatio_1, ratio); | |
1087 } | |
1088 | |
1089 public void setContentBorderThickness (CGFloat thickness, NSRectEdge edge) | |
1090 { | |
1091 OS.objc_msgSend(this.id, OS.sel_setContentBorderThickness_1forEdge_1, thickness, edge); | |
1092 } | |
1093 | |
1094 public void setContentMaxSize (NSSize size) | |
1095 { | |
1096 OS.objc_msgSend(this.id, OS.sel_setContentMaxSize_1, size); | |
1097 } | |
1098 | |
1099 public void setContentMinSize (NSSize size) | |
1100 { | |
1101 OS.objc_msgSend(this.id, OS.sel_setContentMinSize_1, size); | |
1102 } | |
1103 | |
1104 public void setContentResizeIncrements (NSSize increments) | |
1105 { | |
1106 OS.objc_msgSend(this.id, OS.sel_setContentResizeIncrements_1, increments); | |
1107 } | |
1108 | |
1109 public void setContentSize (NSSize aSize) | |
1110 { | |
1111 OS.objc_msgSend(this.id, OS.sel_setContentSize_1, aSize); | |
1112 } | |
1113 | |
1114 public void setContentView (NSView aView) | |
1115 { | |
1116 OS.objc_msgSend(this.id, OS.sel_setContentView_1, aView !is null ? aView.id : null); | |
1117 } | |
1118 | |
1119 public void setDefaultButtonCell (NSButtonCell defButt) | |
1120 { | |
1121 OS.objc_msgSend(this.id, OS.sel_setDefaultButtonCell_1, defButt !is null ? defButt.id : null); | |
1122 } | |
1123 | |
1124 public void setDelegate (id anObject) | |
1125 { | |
1126 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | |
1127 } | |
1128 | |
1129 public void setDepthLimit (NSWindowDepth limit) | |
1130 { | |
1131 OS.objc_msgSend(this.id, OS.sel_setDepthLimit_1, limit); | |
1132 } | |
1133 | |
1134 public void setDisplaysWhenScreenProfileChanges (bool flag) | |
1135 { | |
1136 OS.objc_msgSend(this.id, OS.sel_setDisplaysWhenScreenProfileChanges_1, flag); | |
1137 } | |
1138 | |
1139 public void setDocumentEdited (bool flag) | |
1140 { | |
1141 OS.objc_msgSend(this.id, OS.sel_setDocumentEdited_1, flag); | |
1142 } | |
1143 | |
1144 public void setDynamicDepthLimit (bool flag) | |
1145 { | |
1146 OS.objc_msgSend(this.id, OS.sel_setDynamicDepthLimit_1, flag); | |
1147 } | |
1148 | |
1149 public void setExcludedFromWindowsMenu (bool flag) | |
1150 { | |
1151 OS.objc_msgSend(this.id, OS.sel_setExcludedFromWindowsMenu_1, flag); | |
1152 } | |
1153 | |
1154 public void setFrame_display_ (NSRect frameRect, bool flag) | |
1155 { | |
1156 OS.objc_msgSend(this.id, OS.sel_setFrame_1display_1, frameRect, flag); | |
1157 } | |
1158 | |
1159 public void setFrame_display_animate_ (NSRect frameRect, bool displayFlag, bool animateFlag) | |
1160 { | |
1161 OS.objc_msgSend(this.id, OS.sel_setFrame_1display_1animate_1, frameRect, displayFlag, animateFlag); | |
1162 } | |
1163 | |
1164 public bool setFrameAutosaveName (NSString name) | |
1165 { | |
1166 return OS.objc_msgSend(this.id, OS.sel_setFrameAutosaveName_1, name !is null ? name.id : null) !is null; | |
1167 } | |
1168 | |
1169 public void setFrameFromString (NSString string) | |
1170 { | |
1171 OS.objc_msgSend(this.id, OS.sel_setFrameFromString_1, string !is null ? string.id : null); | |
1172 } | |
1173 | |
1174 public void setFrameOrigin (NSPoint aPoint) | |
1175 { | |
1176 OS.objc_msgSend(this.id, OS.sel_setFrameOrigin_1, aPoint); | |
1177 } | |
1178 | |
1179 public void setFrameTopLeftPoint (NSPoint aPoint) | |
1180 { | |
1181 OS.objc_msgSend(this.id, OS.sel_setFrameTopLeftPoint_1, aPoint); | |
1182 } | |
1183 | |
1184 public bool setFrameUsingName_ (NSString name) | |
1185 { | |
1186 return OS.objc_msgSend(this.id, OS.sel_setFrameUsingName_1, name !is null ? name.id : null) !is null; | |
1187 } | |
1188 | |
1189 public bool setFrameUsingName_force_ (NSString name, bool force) | |
1190 { | |
1191 return OS.objc_msgSend(this.id, OS.sel_setFrameUsingName_1force_1, name !is null ? name.id : null, force) !is null; | |
1192 } | |
1193 | |
1194 public void setHasShadow (bool hasShadow) | |
1195 { | |
1196 OS.objc_msgSend(this.id, OS.sel_setHasShadow_1, hasShadow); | |
1197 } | |
1198 | |
1199 public void setHidesOnDeactivate (bool flag) | |
1200 { | |
1201 OS.objc_msgSend(this.id, OS.sel_setHidesOnDeactivate_1, flag); | |
1202 } | |
1203 | |
1204 public void setIgnoresMouseEvents (bool flag) | |
1205 { | |
1206 OS.objc_msgSend(this.id, OS.sel_setIgnoresMouseEvents_1, flag); | |
1207 } | |
1208 | |
1209 public void setInitialFirstResponder (NSView view) | |
1210 { | |
1211 OS.objc_msgSend(this.id, OS.sel_setInitialFirstResponder_1, view !is null ? view.id : null); | |
1212 } | |
1213 | |
1214 public void setIsMiniaturized (bool flag) | |
1215 { | |
1216 OS.objc_msgSend(this.id, OS.sel_setIsMiniaturized_1, flag); | |
1217 } | |
1218 | |
1219 public void setIsVisible (bool flag) | |
1220 { | |
1221 OS.objc_msgSend(this.id, OS.sel_setIsVisible_1, flag); | |
1222 } | |
1223 | |
1224 public void setIsZoomed (bool flag) | |
1225 { | |
1226 OS.objc_msgSend(this.id, OS.sel_setIsZoomed_1, flag); | |
1227 } | |
1228 | |
1229 public void setLevel (NSInteger newLevel) | |
1230 { | |
1231 OS.objc_msgSend(this.id, OS.sel_setLevel_1, newLevel); | |
1232 } | |
1233 | |
1234 public void setMaxSize (NSSize size) | |
1235 { | |
1236 OS.objc_msgSend(this.id, OS.sel_setMaxSize_1, size); | |
1237 } | |
1238 | |
1239 public void setMinSize (NSSize size) | |
1240 { | |
1241 OS.objc_msgSend(this.id, OS.sel_setMinSize_1, size); | |
1242 } | |
1243 | |
1244 public void setMiniwindowImage (NSImage image) | |
1245 { | |
1246 OS.objc_msgSend(this.id, OS.sel_setMiniwindowImage_1, image !is null ? image.id : null); | |
1247 } | |
1248 | |
1249 public void setMiniwindowTitle (NSString title) | |
1250 { | |
1251 OS.objc_msgSend(this.id, OS.sel_setMiniwindowTitle_1, title !is null ? title.id : null); | |
1252 } | |
1253 | |
1254 public void setMovableByWindowBackground (bool flag) | |
1255 { | |
1256 OS.objc_msgSend(this.id, OS.sel_setMovableByWindowBackground_1, flag); | |
1257 } | |
1258 | |
1259 public void setOneShot (bool flag) | |
1260 { | |
1261 OS.objc_msgSend(this.id, OS.sel_setOneShot_1, flag); | |
1262 } | |
1263 | |
1264 public void setOpaque (bool isOpaque) | |
1265 { | |
1266 OS.objc_msgSend(this.id, OS.sel_setOpaque_1, isOpaque); | |
1267 } | |
1268 | |
1269 public void setOrderedIndex (int index) | |
1270 { | |
1271 OS.objc_msgSend(this.id, OS.sel_setOrderedIndex_1, index); | |
1272 } | |
1273 | |
1274 public void setParentWindow (NSWindow window) | |
1275 { | |
1276 OS.objc_msgSend(this.id, OS.sel_setParentWindow_1, window !is null ? window.id : null); | |
1277 } | |
1278 | |
1279 public void setPreferredBackingLocation (NSWindowBackingLocation backingLocation) | |
1280 { | |
1281 OS.objc_msgSend(this.id, OS.sel_setPreferredBackingLocation_1, backingLocation); | |
1282 } | |
1283 | |
1284 public void setPreservesContentDuringLiveResize (bool flag) | |
1285 { | |
1286 OS.objc_msgSend(this.id, OS.sel_setPreservesContentDuringLiveResize_1, flag); | |
1287 } | |
1288 | |
1289 public void setReleasedWhenClosed (bool flag) | |
1290 { | |
1291 OS.objc_msgSend(this.id, OS.sel_setReleasedWhenClosed_1, flag); | |
1292 } | |
1293 | |
1294 public void setRepresentedFilename (NSString aString) | |
1295 { | |
1296 OS.objc_msgSend(this.id, OS.sel_setRepresentedFilename_1, aString !is null ? aString.id : null); | |
1297 } | |
1298 | |
1299 public void setRepresentedURL (NSURL url) | |
1300 { | |
1301 OS.objc_msgSend(this.id, OS.sel_setRepresentedURL_1, url !is null ? url.id : null); | |
1302 } | |
1303 | |
1304 public void setResizeIncrements (NSSize increments) | |
1305 { | |
1306 OS.objc_msgSend(this.id, OS.sel_setResizeIncrements_1, increments); | |
1307 } | |
1308 | |
1309 public void setSharingType (NSWindowSharingType type) | |
1310 { | |
1311 OS.objc_msgSend(this.id, OS.sel_setSharingType_1, type); | |
1312 } | |
1313 | |
1314 public void setShowsResizeIndicator (bool show) | |
1315 { | |
1316 OS.objc_msgSend(this.id, OS.sel_setShowsResizeIndicator_1, show); | |
1317 } | |
1318 | |
1319 public void setShowsToolbarButton (bool show) | |
1320 { | |
1321 OS.objc_msgSend(this.id, OS.sel_setShowsToolbarButton_1, show); | |
1322 } | |
1323 | |
1324 public void setTitle (NSString aString) | |
1325 { | |
1326 OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null); | |
1327 } | |
1328 | |
1329 public void setTitleWithRepresentedFilename (NSString filename) | |
1330 { | |
1331 OS.objc_msgSend(this.id, OS.sel_setTitleWithRepresentedFilename_1, filename !is null ? filename.id : null); | |
1332 } | |
1333 | |
1334 public void setToolbar (NSToolbar toolbar) | |
1335 { | |
1336 OS.objc_msgSend(this.id, OS.sel_setToolbar_1, toolbar !is null ? toolbar.id : null); | |
1337 } | |
1338 | |
1339 public void setViewsNeedDisplay (bool flag) | |
1340 { | |
1341 OS.objc_msgSend(this.id, OS.sel_setViewsNeedDisplay_1, flag); | |
1342 } | |
1343 | |
1344 public void setWindowController (NSWindowController windowController) | |
1345 { | |
1346 OS.objc_msgSend(this.id, OS.sel_setWindowController_1, windowController !is null ? windowController.id : null); | |
1347 } | |
1348 | |
1349 public NSWindowSharingType sharingType () | |
1350 { | |
1351 return cast(NSWindowSharingType) OS.objc_msgSend(this.id, OS.sel_sharingType); | |
1352 } | |
1353 | |
1354 public bool showsResizeIndicator () | |
1355 { | |
1356 return OS.objc_msgSend(this.id, OS.sel_showsResizeIndicator) !is null; | |
1357 } | |
1358 | |
1359 public bool showsToolbarButton () | |
1360 { | |
1361 return OS.objc_msgSend(this.id, OS.sel_showsToolbarButton) !is null; | |
1362 } | |
1363 | |
1364 public NSButton standardWindowButton_ (NSWindowButton b) | |
1365 { | |
1366 objc.id result = OS.objc_msgSend(this.id, OS.sel_standardWindowButton_1, b); | |
1367 return result !is null ? new NSButton(result) : null; | |
1368 } | |
1369 | |
1370 public static NSButton static_standardWindowButton_forStyleMask_ (int b, int styleMask) | |
1371 { | |
1372 objc.id result = OS.objc_msgSend(OS.class_NSWindow, OS.sel_standardWindowButton_1forStyleMask_1, b, styleMask); | |
1373 return result !is null ? new NSButton(result) : null; | |
1374 } | |
1375 | |
1376 public NSString stringWithSavedFrame () | |
1377 { | |
1378 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringWithSavedFrame); | |
1379 return result !is null ? new NSString(result) : null; | |
1380 } | |
1381 | |
1382 public NSUInteger styleMask () | |
1383 { | |
1384 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_styleMask); | |
1385 } | |
1386 | |
1387 public NSString title () | |
1388 { | |
1389 objc.id result = OS.objc_msgSend(this.id, OS.sel_title); | |
1390 return result !is null ? new NSString(result) : null; | |
1391 } | |
1392 | |
1393 public void toggleToolbarShown (id sender) | |
1394 { | |
1395 OS.objc_msgSend(this.id, OS.sel_toggleToolbarShown_1, sender !is null ? sender.id : null); | |
1396 } | |
1397 | |
1398 public NSToolbar toolbar () | |
1399 { | |
1400 objc.id result = OS.objc_msgSend(this.id, OS.sel_toolbar); | |
1401 return result !is null ? new NSToolbar(result) : null; | |
1402 } | |
1403 | |
1404 public bool tryToPerform (objc.SEL anAction, id anObject) | |
1405 { | |
1406 return OS.objc_msgSend(this.id, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id : null) !is null; | |
1407 } | |
1408 | |
1409 public void unregisterDraggedTypes () | |
1410 { | |
1411 OS.objc_msgSend(this.id, OS.sel_unregisterDraggedTypes); | |
1412 } | |
1413 | |
1414 public void update () | |
1415 { | |
1416 OS.objc_msgSend(this.id, OS.sel_update); | |
1417 } | |
1418 | |
1419 public void useOptimizedDrawing (bool flag) | |
1420 { | |
1421 OS.objc_msgSend(this.id, OS.sel_useOptimizedDrawing_1, flag); | |
1422 } | |
1423 | |
1424 public CGFloat userSpaceScaleFactor () | |
1425 { | |
1426 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_userSpaceScaleFactor); | |
1427 } | |
1428 | |
1429 public id validRequestorForSendType (NSString sendType, NSString returnType) | |
1430 { | |
1431 objc.id result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id : null, | |
1432 returnType !is null ? returnType.id : null); | |
1433 return result !is null ? new id(result) : null; | |
1434 } | |
1435 | |
1436 public bool viewsNeedDisplay () | |
1437 { | |
1438 return OS.objc_msgSend(this.id, OS.sel_viewsNeedDisplay) !is null; | |
1439 } | |
1440 | |
1441 public id windowController () | |
1442 { | |
1443 objc.id result = OS.objc_msgSend(this.id, OS.sel_windowController); | |
1444 return result !is null ? new id(result) : null; | |
1445 } | |
1446 | |
1447 public NSInteger windowNumber () | |
1448 { | |
1449 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_windowNumber); | |
1450 } | |
1451 | |
1452 public void* windowRef () | |
1453 { | |
1454 return cast(void*) OS.objc_msgSend(this.id, OS.sel_windowRef); | |
1455 } | |
1456 | |
1457 public bool worksWhenModal () | |
1458 { | |
1459 return OS.objc_msgSend(this.id, OS.sel_worksWhenModal) !is null; | |
1460 } | |
1461 | |
1462 public void zoom (id sender) | |
1463 { | |
1464 OS.objc_msgSend(this.id, OS.sel_zoom_1, sender !is null ? sender.id : null); | |
1465 } | |
1466 | |
1467 } |