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