Mercurial > projects > dwt-mac
view 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 |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * * Port to the D Programming language: * Jacob Carlborg <jacob.carlborg@gmail.com> *******************************************************************************/ module dwt.internal.cocoa.NSWindow; import dwt.internal.cocoa.CGFloat; import dwt.internal.cocoa.id; import dwt.internal.cocoa.NSArray; import dwt.internal.cocoa.NSButton; import dwt.internal.cocoa.NSButtonCell; import dwt.internal.cocoa.NSCloseCommand; import dwt.internal.cocoa.NSColor; import dwt.internal.cocoa.NSData; import dwt.internal.cocoa.NSDate; import dwt.internal.cocoa.NSDictionary; import dwt.internal.cocoa.NSDockTile; import dwt.internal.cocoa.NSEvent; import dwt.internal.cocoa.NSGraphicsContext; import dwt.internal.cocoa.NSImage; import dwt.internal.cocoa.NSInteger; import dwt.internal.cocoa.NSMenu; import dwt.internal.cocoa.NSPasteboard; import dwt.internal.cocoa.NSPoint; import dwt.internal.cocoa.NSRect; import dwt.internal.cocoa.NSResponder; import dwt.internal.cocoa.NSScreen; import dwt.internal.cocoa.NSScriptCommand; import dwt.internal.cocoa.NSSize; import dwt.internal.cocoa.NSString; import dwt.internal.cocoa.NSText; import dwt.internal.cocoa.NSToolbar; import dwt.internal.cocoa.NSURL; import dwt.internal.cocoa.NSView; import dwt.internal.cocoa.NSWindowController; import dwt.internal.cocoa.OS; import objc = dwt.internal.objc.runtime; alias int NSWindowDepth; enum NSWindowOrderingMode { NSWindowAbove = 1, NSWindowBelow = -1, NSWindowOut = 0 } alias NSWindowOrderingMode.NSWindowAbove NSWindowAbove; alias NSWindowOrderingMode.NSWindowBelow NSWindowBelow; alias NSWindowOrderingMode.NSWindowOut NSWindowOut; enum NSWindowBackingLocation : NSUInteger { NSWindowBackingLocationDefault = 0, NSWindowBackingLocationVideoMemory = 1, NSWindowBackingLocationMainMemory = 2 } alias NSWindowBackingLocation.NSWindowBackingLocationDefault NSWindowBackingLocationDefault; alias NSWindowBackingLocation.NSWindowBackingLocationVideoMemory NSWindowBackingLocationVideoMemory; alias NSWindowBackingLocation.NSWindowBackingLocationMainMemory NSWindowBackingLocationMainMemory; enum NSBackingStoreType { NSBackingStoreRetained = 0, NSBackingStoreNonretained = 1, NSBackingStoreBuffered = 2 } alias NSBackingStoreType.NSBackingStoreRetained NSBackingStoreRetained; alias NSBackingStoreType.NSBackingStoreNonretained NSBackingStoreNonretained; alias NSBackingStoreType.NSBackingStoreBuffered NSBackingStoreBuffered; enum NSWindowCollectionBehavior : NSUInteger { NSWindowCollectionBehaviorDefault = 0, NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0, NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1 } alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorDefault NSWindowCollectionBehaviorDefault; alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorCanJoinAllSpaces NSWindowCollectionBehaviorCanJoinAllSpaces; alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorMoveToActiveSpace NSWindowCollectionBehaviorMoveToActiveSpace; enum NSSelectionDirection { NSDirectSelection = 0, NSSelectingNext, NSSelectingPrevious } alias NSSelectionDirection.NSDirectSelection NSDirectSelection; alias NSSelectionDirection.NSSelectingNext NSSelectingNext; alias NSSelectionDirection.NSSelectingPrevious NSSelectingPrevious; enum NSWindowSharingType : NSUInteger { NSWindowSharingNone = 0, NSWindowSharingReadOnly = 1, NSWindowSharingReadWrite = 2 } alias NSWindowSharingType.NSWindowSharingNone NSWindowSharingNone; alias NSWindowSharingType.NSWindowSharingReadOnly NSWindowSharingReadOnly; alias NSWindowSharingType.NSWindowSharingReadWrite NSWindowSharingReadWrite; enum NSWindowButton { NSWindowCloseButton, NSWindowMiniaturizeButton, NSWindowZoomButton, NSWindowToolbarButton, NSWindowDocumentIconButton } alias NSWindowButton.NSWindowCloseButton NSWindowCloseButton; alias NSWindowButton.NSWindowMiniaturizeButton NSWindowMiniaturizeButton; alias NSWindowButton.NSWindowZoomButton NSWindowZoomButton; alias NSWindowButton.NSWindowToolbarButton NSWindowToolbarButton; alias NSWindowButton.NSWindowDocumentIconButton NSWindowDocumentIconButton; public class NSWindow : NSResponder { public this () { super(); } public this (objc.id id) { super(id); } public bool acceptsMouseMovedEvents () { return OS.objc_msgSend(this.id, OS.sel_acceptsMouseMovedEvents) !is null; } public void addChildWindow (NSWindow childWin, NSWindowOrderingMode place) { OS.objc_msgSend(this.id, OS.sel_addChildWindow_1ordered_1, childWin !is null ? childWin.id : null, place); } public bool allowsToolTipsWhenApplicationIsInactive () { return OS.objc_msgSend(this.id, OS.sel_allowsToolTipsWhenApplicationIsInactive) !is null; } public CGFloat alphaValue () { return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue); } public NSTimeInterval animationResizeTime (NSRect newFrame) { return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id, OS.sel_animationResizeTime_1, newFrame); } public bool areCursorRectsEnabled () { return OS.objc_msgSend(this.id, OS.sel_areCursorRectsEnabled) !is null; } public NSSize aspectRatio () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_aspectRatio); return result; } public NSWindow attachedSheet () { objc.id result = OS.objc_msgSend(this.id, OS.sel_attachedSheet); return result is this.id ? this : (result !is null ? new NSWindow(result) : null); } public bool autorecalculatesContentBorderThicknessForEdge (NSRectEdge edge) { return OS.objc_msgSend(this.id, OS.sel_autorecalculatesContentBorderThicknessForEdge_1, edge) !is null; } public bool autorecalculatesKeyViewLoop () { return OS.objc_msgSend(this.id, OS.sel_autorecalculatesKeyViewLoop) !is null; } public NSColor backgroundColor () { objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); return result !is null ? new NSColor(result) : null; } public NSWindowBackingLocation backingLocation () { return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id, OS.sel_backingLocation); } public NSBackingStoreType backingType () { return cast(NSBackingStoreType) OS.objc_msgSend(this.id, OS.sel_backingType); } public void becomeKeyWindow () { OS.objc_msgSend(this.id, OS.sel_becomeKeyWindow); } public void becomeMainWindow () { OS.objc_msgSend(this.id, OS.sel_becomeMainWindow); } public void cacheImageInRect (NSRect aRect) { OS.objc_msgSend(this.id, OS.sel_cacheImageInRect_1, aRect); } public bool canBeVisibleOnAllSpaces () { return OS.objc_msgSend(this.id, OS.sel_canBeVisibleOnAllSpaces) !is null; } public bool canBecomeKeyWindow () { return OS.objc_msgSend(this.id, OS.sel_canBecomeKeyWindow) !is null; } public bool canBecomeMainWindow () { return OS.objc_msgSend(this.id, OS.sel_canBecomeMainWindow) !is null; } public bool canBecomeVisibleWithoutLogin () { return OS.objc_msgSend(this.id, OS.sel_canBecomeVisibleWithoutLogin) !is null; } public bool canHide () { return OS.objc_msgSend(this.id, OS.sel_canHide) !is null; } public bool canStoreColor () { return OS.objc_msgSend(this.id, OS.sel_canStoreColor) !is null; } public NSPoint cascadeTopLeftFromPoint (NSPoint topLeftPoint) { NSPoint result; OS.objc_msgSend_struct(result, this.id, OS.sel_cascadeTopLeftFromPoint_1, topLeftPoint); return result; } public void center () { OS.objc_msgSend(this.id, OS.sel_center); } public NSArray childWindows () { objc.id result = OS.objc_msgSend(this.id, OS.sel_childWindows); return result !is null ? new NSArray(result) : null; } public void close () { OS.objc_msgSend(this.id, OS.sel_close); } public NSWindowCollectionBehavior collectionBehavior () { return cast(NSWindowCollectionBehavior) OS.objc_msgSend(this.id, OS.sel_collectionBehavior); } public NSRect constrainFrameRect (NSRect frameRect, NSScreen screen) { NSRect result; OS.objc_msgSend_stret(result, this.id, OS.sel_constrainFrameRect_1toScreen_1, frameRect, screen !is null ? screen.id : null); return result; } public NSSize contentAspectRatio () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_contentAspectRatio); return result; } public CGFloat contentBorderThicknessForEdge (NSRectEdge edge) { return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_contentBorderThicknessForEdge_1, edge); } public NSSize contentMaxSize () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_contentMaxSize); return result; } public NSSize contentMinSize () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_contentMinSize); return result; } public NSRect contentRectForFrameRect_ (NSRect frameRect) { NSRect result; OS.objc_msgSend_stret(result, this.id, OS.sel_contentRectForFrameRect_1, frameRect); return result; } public static NSRect static_contentRectForFrameRect_styleMask_ (NSRect fRect, NSUInteger aStyle) { NSRect result; OS.objc_msgSend_stret(result, OS.class_NSWindow, OS.sel_contentRectForFrameRect_1styleMask_1, fRect, aStyle); return result; } public NSSize contentResizeIncrements () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_contentResizeIncrements); return result; } public NSView contentView () { objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView); return result !is null ? new NSView(result) : null; } public NSPoint convertBaseToScreen (NSPoint aPoint) { NSPoint result; OS.objc_msgSend_struct(result, this.id, OS.sel_convertBaseToScreen_1, aPoint); return result; } public NSPoint convertScreenToBase (NSPoint aPoint) { NSPoint result; OS.objc_msgSend_struct(result, this.id, OS.sel_convertScreenToBase_1, aPoint); return result; } public NSEvent currentEvent () { objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEvent); return result !is null ? new NSEvent(result) : null; } public NSData dataWithEPSInsideRect (NSRect rect) { objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithEPSInsideRect_1, rect); return result !is null ? new NSData(result) : null; } public NSData dataWithPDFInsideRect (NSRect rect) { objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithPDFInsideRect_1, rect); return result !is null ? new NSData(result) : null; } public NSScreen deepestScreen () { objc.id result = OS.objc_msgSend(this.id, OS.sel_deepestScreen); return result !is null ? new NSScreen(result) : null; } public NSButtonCell defaultButtonCell () { objc.id result = OS.objc_msgSend(this.id, OS.sel_defaultButtonCell); return result !is null ? new NSButtonCell(result) : null; } public static NSWindowDepth defaultDepthLimit () { return cast(NSWindowDepth) OS.objc_msgSend(OS.class_NSWindow, OS.sel_defaultDepthLimit); } public id delegatee () { objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); return result !is null ? new id(result) : null; } public void deminiaturize (id sender) { OS.objc_msgSend(this.id, OS.sel_deminiaturize_1, sender !is null ? sender.id : null); } public NSWindowDepth depthLimit () { return cast(NSWindowDepth) OS.objc_msgSend(this.id, OS.sel_depthLimit); } public NSDictionary deviceDescription () { objc.id result = OS.objc_msgSend(this.id, OS.sel_deviceDescription); return result !is null ? new NSDictionary(result) : null; } public void disableCursorRects () { OS.objc_msgSend(this.id, OS.sel_disableCursorRects); } public void disableFlushWindow () { OS.objc_msgSend(this.id, OS.sel_disableFlushWindow); } public void disableKeyEquivalentForDefaultButtonCell () { OS.objc_msgSend(this.id, OS.sel_disableKeyEquivalentForDefaultButtonCell); } public void disableScreenUpdatesUntilFlush () { OS.objc_msgSend(this.id, OS.sel_disableScreenUpdatesUntilFlush); } public void discardCachedImage () { OS.objc_msgSend(this.id, OS.sel_discardCachedImage); } public void discardCursorRects () { OS.objc_msgSend(this.id, OS.sel_discardCursorRects); } public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent) { OS.objc_msgSend(this.id, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id : null); } public void display () { OS.objc_msgSend(this.id, OS.sel_display); } public void displayIfNeeded () { OS.objc_msgSend(this.id, OS.sel_displayIfNeeded); } public bool displaysWhenScreenProfileChanges () { return OS.objc_msgSend(this.id, OS.sel_displaysWhenScreenProfileChanges) !is null; } public NSDockTile dockTile () { objc.id result = OS.objc_msgSend(this.id, OS.sel_dockTile); return result !is null ? new NSDockTile(result) : null; } public void dragImage (NSImage anImage, NSPoint baseLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, id sourceObj, bool slideFlag) { OS.objc_msgSend(this.id, OS.sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, anImage !is null ? anImage.id : null, baseLocation, initialOffset, event !is null ? event.id : null, pboard !is null ? pboard.id : null, sourceObj !is null ? sourceObj.id : null, slideFlag); } public NSArray drawers () { objc.id result = OS.objc_msgSend(this.id, OS.sel_drawers); return result !is null ? new NSArray(result) : null; } public void enableCursorRects () { OS.objc_msgSend(this.id, OS.sel_enableCursorRects); } public void enableFlushWindow () { OS.objc_msgSend(this.id, OS.sel_enableFlushWindow); } public void enableKeyEquivalentForDefaultButtonCell () { OS.objc_msgSend(this.id, OS.sel_enableKeyEquivalentForDefaultButtonCell); } public void endEditingFor (id anObject) { OS.objc_msgSend(this.id, OS.sel_endEditingFor_1, anObject !is null ? anObject.id : null); } public NSText fieldEditor (bool createFlag, id anObject) { objc.id result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_1forObject_1, createFlag, anObject !is null ? anObject.id : null); return result !is null ? new NSText(result) : null; } public NSResponder firstResponder () { objc.id result = OS.objc_msgSend(this.id, OS.sel_firstResponder); return result !is null ? new NSResponder(result) : null; } public void flushWindow () { OS.objc_msgSend(this.id, OS.sel_flushWindow); } public void flushWindowIfNeeded () { OS.objc_msgSend(this.id, OS.sel_flushWindowIfNeeded); } public NSRect frame () { NSRect result; OS.objc_msgSend_stret(result, this.id, OS.sel_frame); return result; } public NSString frameAutosaveName () { objc.id result = OS.objc_msgSend(this.id, OS.sel_frameAutosaveName); return result !is null ? new NSString(result) : null; } public NSRect frameRectForContentRect_ (NSRect contentRect) { NSRect result; OS.objc_msgSend_stret(result, this.id, OS.sel_frameRectForContentRect_1, contentRect); return result; } public static NSRect static_frameRectForContentRect_styleMask_ (NSRect cRect, NSUInteger aStyle) { NSRect result; OS.objc_msgSend_stret(result, OS.class_NSWindow, OS.sel_frameRectForContentRect_1styleMask_1, cRect, aStyle); return result; } public NSInteger gState () { return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_gState); } public NSGraphicsContext graphicsContext () { objc.id result = OS.objc_msgSend(this.id, OS.sel_graphicsContext); return result !is null ? new NSGraphicsContext(result) : null; } public id handleCloseScriptCommand (NSCloseCommand command) { objc.id result = OS.objc_msgSend(this.id, OS.sel_handleCloseScriptCommand_1, command !is null ? command.id : null); return result !is null ? new id(result) : null; } public id handlePrintScriptCommand (NSScriptCommand command) { objc.id result = OS.objc_msgSend(this.id, OS.sel_handlePrintScriptCommand_1, command !is null ? command.id : null); return result !is null ? new id(result) : null; } public id handleSaveScriptCommand (NSScriptCommand command) { objc.id result = OS.objc_msgSend(this.id, OS.sel_handleSaveScriptCommand_1, command !is null ? command.id : null); return result !is null ? new id(result) : null; } public bool hasCloseBox () { return OS.objc_msgSend(this.id, OS.sel_hasCloseBox) !is null; } public bool hasDynamicDepthLimit () { return OS.objc_msgSend(this.id, OS.sel_hasDynamicDepthLimit) !is null; } public bool hasShadow () { return OS.objc_msgSend(this.id, OS.sel_hasShadow) !is null; } public bool hasTitleBar () { return OS.objc_msgSend(this.id, OS.sel_hasTitleBar) !is null; } public bool hidesOnDeactivate () { return OS.objc_msgSend(this.id, OS.sel_hidesOnDeactivate) !is null; } public bool ignoresMouseEvents () { return OS.objc_msgSend(this.id, OS.sel_ignoresMouseEvents) !is null; } public NSWindow initWithContentRect_styleMask_backing_defer_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag) { objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1, contentRect, aStyle, bufferingType, flag); return result !is null ? this : null; } public NSWindow initWithContentRect_styleMask_backing_defer_screen_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag, NSScreen screen) { objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1screen_1, contentRect, aStyle, bufferingType, flag, screen !is null ? screen.id : null); return result !is null ? this : null; } public NSWindow initWithWindowRef (void* windowRef) { objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindowRef_1, windowRef); return result is this.id ? this : (result !is null ? new NSWindow(result) : null); } public NSView initialFirstResponder () { objc.id result = OS.objc_msgSend(this.id, OS.sel_initialFirstResponder); return result !is null ? new NSView(result) : null; } public void invalidateCursorRectsForView (NSView aView) { OS.objc_msgSend(this.id, OS.sel_invalidateCursorRectsForView_1, aView !is null ? aView.id : null); } public void invalidateShadow () { OS.objc_msgSend(this.id, OS.sel_invalidateShadow); } public bool isAutodisplay () { return OS.objc_msgSend(this.id, OS.sel_isAutodisplay) !is null; } public bool isDocumentEdited () { return OS.objc_msgSend(this.id, OS.sel_isDocumentEdited) !is null; } public bool isExcludedFromWindowsMenu () { return OS.objc_msgSend(this.id, OS.sel_isExcludedFromWindowsMenu) !is null; } public bool isFloatingPanel () { return OS.objc_msgSend(this.id, OS.sel_isFloatingPanel) !is null; } public bool isFlushWindowDisabled () { return OS.objc_msgSend(this.id, OS.sel_isFlushWindowDisabled) !is null; } public bool isKeyWindow () { return OS.objc_msgSend(this.id, OS.sel_isKeyWindow) !is null; } public bool isMainWindow () { return OS.objc_msgSend(this.id, OS.sel_isMainWindow) !is null; } public bool isMiniaturizable () { return OS.objc_msgSend(this.id, OS.sel_isMiniaturizable) !is null; } public bool isMiniaturized () { return OS.objc_msgSend(this.id, OS.sel_isMiniaturized) !is null; } public bool isModalPanel () { return OS.objc_msgSend(this.id, OS.sel_isModalPanel) !is null; } public bool isMovableByWindowBackground () { return OS.objc_msgSend(this.id, OS.sel_isMovableByWindowBackground) !is null; } public bool isOneShot () { return OS.objc_msgSend(this.id, OS.sel_isOneShot) !is null; } public bool isOpaque () { return OS.objc_msgSend(this.id, OS.sel_isOpaque) !is null; } public bool isReleasedWhenClosed () { return OS.objc_msgSend(this.id, OS.sel_isReleasedWhenClosed) !is null; } public bool isResizable () { return OS.objc_msgSend(this.id, OS.sel_isResizable) !is null; } public bool isSheet () { return OS.objc_msgSend(this.id, OS.sel_isSheet) !is null; } public bool isVisible () { return OS.objc_msgSend(this.id, OS.sel_isVisible) !is null; } public bool isZoomable () { return OS.objc_msgSend(this.id, OS.sel_isZoomable) !is null; } public bool isZoomed () { return OS.objc_msgSend(this.id, OS.sel_isZoomed) !is null; } public void keyDown (NSEvent theEvent) { OS.objc_msgSend(this.id, OS.sel_keyDown_1, theEvent !is null ? theEvent.id : null); } public NSSelectionDirection keyViewSelectionDirection () { return cast(NSSelectionDirection) OS.objc_msgSend(this.id, OS.sel_keyViewSelectionDirection); } public NSInteger level () { return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_level); } public bool makeFirstResponder (NSResponder aResponder) { return OS.objc_msgSend(this.id, OS.sel_makeFirstResponder_1, aResponder !is null ? aResponder.id : null) !is null; } public void makeKeyAndOrderFront (id sender) { OS.objc_msgSend(this.id, OS.sel_makeKeyAndOrderFront_1, sender !is null ? sender.id : null); } public void makeKeyWindow () { OS.objc_msgSend(this.id, OS.sel_makeKeyWindow); } public void makeMainWindow () { OS.objc_msgSend(this.id, OS.sel_makeMainWindow); } public NSSize maxSize () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_maxSize); return result; } public static void menuChanged (NSMenu menu) { OS.objc_msgSend(OS.class_NSWindow, OS.sel_menuChanged_1, menu !is null ? menu.id : null); } public static CGFloat minFrameWidthWithTitle (NSString aTitle, NSUInteger aStyle) { return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSWindow, OS.sel_minFrameWidthWithTitle_1styleMask_1, aTitle !is null ? aTitle.id : null, aStyle); } public NSSize minSize () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_minSize); return result; } public void miniaturize (id sender) { OS.objc_msgSend(this.id, OS.sel_miniaturize_1, sender !is null ? sender.id : null); } public NSImage miniwindowImage () { objc.id result = OS.objc_msgSend(this.id, OS.sel_miniwindowImage); return result !is null ? new NSImage(result) : null; } public NSString miniwindowTitle () { objc.id result = OS.objc_msgSend(this.id, OS.sel_miniwindowTitle); return result !is null ? new NSString(result) : null; } public NSPoint mouseLocationOutsideOfEventStream () { NSPoint result; OS.objc_msgSend_struct(result, this.id, OS.sel_mouseLocationOutsideOfEventStream); return result; } public NSEvent nextEventMatchingMask_ (NSUInteger mask) { objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_1, mask); return result !is null ? new NSEvent(result) : null; } public NSEvent nextEventMatchingMask_untilDate_inMode_dequeue_ (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag) { objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask, expiration !is null ? expiration.id : null, mode !is null ? mode.id : null, deqFlag); return result !is null ? new NSEvent(result) : null; } public void orderBack (id sender) { OS.objc_msgSend(this.id, OS.sel_orderBack_1, sender !is null ? sender.id : null); } public void orderFront (id sender) { OS.objc_msgSend(this.id, OS.sel_orderFront_1, sender !is null ? sender.id : null); } public void orderFrontRegardless () { OS.objc_msgSend(this.id, OS.sel_orderFrontRegardless); } public void orderOut (id sender) { OS.objc_msgSend(this.id, OS.sel_orderOut_1, sender !is null ? sender.id : null); } public void orderWindow (NSWindowOrderingMode place, NSInteger otherWin) { OS.objc_msgSend(this.id, OS.sel_orderWindow_1relativeTo_1, place, otherWin); } public int orderedIndex () { return cast(int) OS.objc_msgSend(this.id, OS.sel_orderedIndex); } public NSWindow parentWindow () { objc.id result = OS.objc_msgSend(this.id, OS.sel_parentWindow); return result is this.id ? this : (result !is null ? new NSWindow(result) : null); } public void performClose (id sender) { OS.objc_msgSend(this.id, OS.sel_performClose_1, sender !is null ? sender.id : null); } public void performMiniaturize (id sender) { OS.objc_msgSend(this.id, OS.sel_performMiniaturize_1, sender !is null ? sender.id : null); } public void performZoom (id sender) { OS.objc_msgSend(this.id, OS.sel_performZoom_1, sender !is null ? sender.id : null); } public void postEvent (NSEvent event, bool flag) { OS.objc_msgSend(this.id, OS.sel_postEvent_1atStart_1, event !is null ? event.id : null, flag); } public NSWindowBackingLocation preferredBackingLocation () { return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id, OS.sel_preferredBackingLocation); } public bool preservesContentDuringLiveResize () { return OS.objc_msgSend(this.id, OS.sel_preservesContentDuringLiveResize) !is null; } public void print (id sender) { OS.objc_msgSend(this.id, OS.sel_print_1, sender !is null ? sender.id : null); } public void recalculateKeyViewLoop () { OS.objc_msgSend(this.id, OS.sel_recalculateKeyViewLoop); } public void registerForDraggedTypes (NSArray newTypes) { OS.objc_msgSend(this.id, OS.sel_registerForDraggedTypes_1, newTypes !is null ? newTypes.id : null); } public void removeChildWindow (NSWindow childWin) { OS.objc_msgSend(this.id, OS.sel_removeChildWindow_1, childWin !is null ? childWin.id : null); } public static void removeFrameUsingName (NSString name) { OS.objc_msgSend(OS.class_NSWindow, OS.sel_removeFrameUsingName_1, name !is null ? name.id : null); } public NSString representedFilename () { objc.id result = OS.objc_msgSend(this.id, OS.sel_representedFilename); return result !is null ? new NSString(result) : null; } public NSURL representedURL () { objc.id result = OS.objc_msgSend(this.id, OS.sel_representedURL); return result !is null ? new NSURL(result) : null; } public void resetCursorRects () { OS.objc_msgSend(this.id, OS.sel_resetCursorRects); } public void resignKeyWindow () { OS.objc_msgSend(this.id, OS.sel_resignKeyWindow); } public void resignMainWindow () { OS.objc_msgSend(this.id, OS.sel_resignMainWindow); } public NSInteger resizeFlags () { return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_resizeFlags); } public NSSize resizeIncrements () { NSSize result; OS.objc_msgSend_stret(result, this.id, OS.sel_resizeIncrements); return result; } public void restoreCachedImage () { OS.objc_msgSend(this.id, OS.sel_restoreCachedImage); } public void runToolbarCustomizationPalette (id sender) { OS.objc_msgSend(this.id, OS.sel_runToolbarCustomizationPalette_1, sender !is null ? sender.id : null); } public void saveFrameUsingName (NSString name) { OS.objc_msgSend(this.id, OS.sel_saveFrameUsingName_1, name !is null ? name.id : null); } public NSScreen screen () { objc.id result = OS.objc_msgSend(this.id, OS.sel_screen); return result !is null ? new NSScreen(result) : null; } public void selectKeyViewFollowingView (NSView aView) { OS.objc_msgSend(this.id, OS.sel_selectKeyViewFollowingView_1, aView !is null ? aView.id : null); } public void selectKeyViewPrecedingView (NSView aView) { OS.objc_msgSend(this.id, OS.sel_selectKeyViewPrecedingView_1, aView !is null ? aView.id : null); } public void selectNextKeyView (id sender) { OS.objc_msgSend(this.id, OS.sel_selectNextKeyView_1, sender !is null ? sender.id : null); } public void selectPreviousKeyView (id sender) { OS.objc_msgSend(this.id, OS.sel_selectPreviousKeyView_1, sender !is null ? sender.id : null); } public void sendEvent (NSEvent theEvent) { OS.objc_msgSend(this.id, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id : null); } public void setAcceptsMouseMovedEvents (bool flag) { OS.objc_msgSend(this.id, OS.sel_setAcceptsMouseMovedEvents_1, flag); } public void setAllowsToolTipsWhenApplicationIsInactive (bool allowWhenInactive) { OS.objc_msgSend(this.id, OS.sel_setAllowsToolTipsWhenApplicationIsInactive_1, allowWhenInactive); } public void setAlphaValue (CGFloat windowAlpha) { OS.objc_msgSend(this.id, OS.sel_setAlphaValue_1, windowAlpha); } public void setAspectRatio (NSSize ratio) { OS.objc_msgSend(this.id, OS.sel_setAspectRatio_1, ratio); } public void setAutodisplay (bool flag) { OS.objc_msgSend(this.id, OS.sel_setAutodisplay_1, flag); } public void setAutorecalculatesContentBorderThickness (bool flag, NSRectEdge edge) { OS.objc_msgSend(this.id, OS.sel_setAutorecalculatesContentBorderThickness_1forEdge_1, flag, edge); } public void setAutorecalculatesKeyViewLoop (bool flag) { OS.objc_msgSend(this.id, OS.sel_setAutorecalculatesKeyViewLoop_1, flag); } public void setBackgroundColor (NSColor color) { OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); } public void setBackingType (NSBackingStoreType bufferingType) { OS.objc_msgSend(this.id, OS.sel_setBackingType_1, bufferingType); } public void setCanBeVisibleOnAllSpaces (bool flag) { OS.objc_msgSend(this.id, OS.sel_setCanBeVisibleOnAllSpaces_1, flag); } public void setCanBecomeVisibleWithoutLogin (bool flag) { OS.objc_msgSend(this.id, OS.sel_setCanBecomeVisibleWithoutLogin_1, flag); } public void setCanHide (bool flag) { OS.objc_msgSend(this.id, OS.sel_setCanHide_1, flag); } public void setCollectionBehavior (NSWindowCollectionBehavior behavior) { OS.objc_msgSend(this.id, OS.sel_setCollectionBehavior_1, behavior); } public void setContentAspectRatio (NSSize ratio) { OS.objc_msgSend(this.id, OS.sel_setContentAspectRatio_1, ratio); } public void setContentBorderThickness (CGFloat thickness, NSRectEdge edge) { OS.objc_msgSend(this.id, OS.sel_setContentBorderThickness_1forEdge_1, thickness, edge); } public void setContentMaxSize (NSSize size) { OS.objc_msgSend(this.id, OS.sel_setContentMaxSize_1, size); } public void setContentMinSize (NSSize size) { OS.objc_msgSend(this.id, OS.sel_setContentMinSize_1, size); } public void setContentResizeIncrements (NSSize increments) { OS.objc_msgSend(this.id, OS.sel_setContentResizeIncrements_1, increments); } public void setContentSize (NSSize aSize) { OS.objc_msgSend(this.id, OS.sel_setContentSize_1, aSize); } public void setContentView (NSView aView) { OS.objc_msgSend(this.id, OS.sel_setContentView_1, aView !is null ? aView.id : null); } public void setDefaultButtonCell (NSButtonCell defButt) { OS.objc_msgSend(this.id, OS.sel_setDefaultButtonCell_1, defButt !is null ? defButt.id : null); } public void setDelegate (id anObject) { OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); } public void setDepthLimit (NSWindowDepth limit) { OS.objc_msgSend(this.id, OS.sel_setDepthLimit_1, limit); } public void setDisplaysWhenScreenProfileChanges (bool flag) { OS.objc_msgSend(this.id, OS.sel_setDisplaysWhenScreenProfileChanges_1, flag); } public void setDocumentEdited (bool flag) { OS.objc_msgSend(this.id, OS.sel_setDocumentEdited_1, flag); } public void setDynamicDepthLimit (bool flag) { OS.objc_msgSend(this.id, OS.sel_setDynamicDepthLimit_1, flag); } public void setExcludedFromWindowsMenu (bool flag) { OS.objc_msgSend(this.id, OS.sel_setExcludedFromWindowsMenu_1, flag); } public void setFrame_display_ (NSRect frameRect, bool flag) { OS.objc_msgSend(this.id, OS.sel_setFrame_1display_1, frameRect, flag); } public void setFrame_display_animate_ (NSRect frameRect, bool displayFlag, bool animateFlag) { OS.objc_msgSend(this.id, OS.sel_setFrame_1display_1animate_1, frameRect, displayFlag, animateFlag); } public bool setFrameAutosaveName (NSString name) { return OS.objc_msgSend(this.id, OS.sel_setFrameAutosaveName_1, name !is null ? name.id : null) !is null; } public void setFrameFromString (NSString string) { OS.objc_msgSend(this.id, OS.sel_setFrameFromString_1, string !is null ? string.id : null); } public void setFrameOrigin (NSPoint aPoint) { OS.objc_msgSend(this.id, OS.sel_setFrameOrigin_1, aPoint); } public void setFrameTopLeftPoint (NSPoint aPoint) { OS.objc_msgSend(this.id, OS.sel_setFrameTopLeftPoint_1, aPoint); } public bool setFrameUsingName_ (NSString name) { return OS.objc_msgSend(this.id, OS.sel_setFrameUsingName_1, name !is null ? name.id : null) !is null; } public bool setFrameUsingName_force_ (NSString name, bool force) { return OS.objc_msgSend(this.id, OS.sel_setFrameUsingName_1force_1, name !is null ? name.id : null, force) !is null; } public void setHasShadow (bool hasShadow) { OS.objc_msgSend(this.id, OS.sel_setHasShadow_1, hasShadow); } public void setHidesOnDeactivate (bool flag) { OS.objc_msgSend(this.id, OS.sel_setHidesOnDeactivate_1, flag); } public void setIgnoresMouseEvents (bool flag) { OS.objc_msgSend(this.id, OS.sel_setIgnoresMouseEvents_1, flag); } public void setInitialFirstResponder (NSView view) { OS.objc_msgSend(this.id, OS.sel_setInitialFirstResponder_1, view !is null ? view.id : null); } public void setIsMiniaturized (bool flag) { OS.objc_msgSend(this.id, OS.sel_setIsMiniaturized_1, flag); } public void setIsVisible (bool flag) { OS.objc_msgSend(this.id, OS.sel_setIsVisible_1, flag); } public void setIsZoomed (bool flag) { OS.objc_msgSend(this.id, OS.sel_setIsZoomed_1, flag); } public void setLevel (NSInteger newLevel) { OS.objc_msgSend(this.id, OS.sel_setLevel_1, newLevel); } public void setMaxSize (NSSize size) { OS.objc_msgSend(this.id, OS.sel_setMaxSize_1, size); } public void setMinSize (NSSize size) { OS.objc_msgSend(this.id, OS.sel_setMinSize_1, size); } public void setMiniwindowImage (NSImage image) { OS.objc_msgSend(this.id, OS.sel_setMiniwindowImage_1, image !is null ? image.id : null); } public void setMiniwindowTitle (NSString title) { OS.objc_msgSend(this.id, OS.sel_setMiniwindowTitle_1, title !is null ? title.id : null); } public void setMovableByWindowBackground (bool flag) { OS.objc_msgSend(this.id, OS.sel_setMovableByWindowBackground_1, flag); } public void setOneShot (bool flag) { OS.objc_msgSend(this.id, OS.sel_setOneShot_1, flag); } public void setOpaque (bool isOpaque) { OS.objc_msgSend(this.id, OS.sel_setOpaque_1, isOpaque); } public void setOrderedIndex (int index) { OS.objc_msgSend(this.id, OS.sel_setOrderedIndex_1, index); } public void setParentWindow (NSWindow window) { OS.objc_msgSend(this.id, OS.sel_setParentWindow_1, window !is null ? window.id : null); } public void setPreferredBackingLocation (NSWindowBackingLocation backingLocation) { OS.objc_msgSend(this.id, OS.sel_setPreferredBackingLocation_1, backingLocation); } public void setPreservesContentDuringLiveResize (bool flag) { OS.objc_msgSend(this.id, OS.sel_setPreservesContentDuringLiveResize_1, flag); } public void setReleasedWhenClosed (bool flag) { OS.objc_msgSend(this.id, OS.sel_setReleasedWhenClosed_1, flag); } public void setRepresentedFilename (NSString aString) { OS.objc_msgSend(this.id, OS.sel_setRepresentedFilename_1, aString !is null ? aString.id : null); } public void setRepresentedURL (NSURL url) { OS.objc_msgSend(this.id, OS.sel_setRepresentedURL_1, url !is null ? url.id : null); } public void setResizeIncrements (NSSize increments) { OS.objc_msgSend(this.id, OS.sel_setResizeIncrements_1, increments); } public void setSharingType (NSWindowSharingType type) { OS.objc_msgSend(this.id, OS.sel_setSharingType_1, type); } public void setShowsResizeIndicator (bool show) { OS.objc_msgSend(this.id, OS.sel_setShowsResizeIndicator_1, show); } public void setShowsToolbarButton (bool show) { OS.objc_msgSend(this.id, OS.sel_setShowsToolbarButton_1, show); } public void setTitle (NSString aString) { OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null); } public void setTitleWithRepresentedFilename (NSString filename) { OS.objc_msgSend(this.id, OS.sel_setTitleWithRepresentedFilename_1, filename !is null ? filename.id : null); } public void setToolbar (NSToolbar toolbar) { OS.objc_msgSend(this.id, OS.sel_setToolbar_1, toolbar !is null ? toolbar.id : null); } public void setViewsNeedDisplay (bool flag) { OS.objc_msgSend(this.id, OS.sel_setViewsNeedDisplay_1, flag); } public void setWindowController (NSWindowController windowController) { OS.objc_msgSend(this.id, OS.sel_setWindowController_1, windowController !is null ? windowController.id : null); } public NSWindowSharingType sharingType () { return cast(NSWindowSharingType) OS.objc_msgSend(this.id, OS.sel_sharingType); } public bool showsResizeIndicator () { return OS.objc_msgSend(this.id, OS.sel_showsResizeIndicator) !is null; } public bool showsToolbarButton () { return OS.objc_msgSend(this.id, OS.sel_showsToolbarButton) !is null; } public NSButton standardWindowButton_ (NSWindowButton b) { objc.id result = OS.objc_msgSend(this.id, OS.sel_standardWindowButton_1, b); return result !is null ? new NSButton(result) : null; } public static NSButton static_standardWindowButton_forStyleMask_ (int b, int styleMask) { objc.id result = OS.objc_msgSend(OS.class_NSWindow, OS.sel_standardWindowButton_1forStyleMask_1, b, styleMask); return result !is null ? new NSButton(result) : null; } public NSString stringWithSavedFrame () { objc.id result = OS.objc_msgSend(this.id, OS.sel_stringWithSavedFrame); return result !is null ? new NSString(result) : null; } public NSUInteger styleMask () { return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_styleMask); } public NSString title () { objc.id result = OS.objc_msgSend(this.id, OS.sel_title); return result !is null ? new NSString(result) : null; } public void toggleToolbarShown (id sender) { OS.objc_msgSend(this.id, OS.sel_toggleToolbarShown_1, sender !is null ? sender.id : null); } public NSToolbar toolbar () { objc.id result = OS.objc_msgSend(this.id, OS.sel_toolbar); return result !is null ? new NSToolbar(result) : null; } public bool tryToPerform (objc.SEL anAction, id anObject) { return OS.objc_msgSend(this.id, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id : null) !is null; } public void unregisterDraggedTypes () { OS.objc_msgSend(this.id, OS.sel_unregisterDraggedTypes); } public void update () { OS.objc_msgSend(this.id, OS.sel_update); } public void useOptimizedDrawing (bool flag) { OS.objc_msgSend(this.id, OS.sel_useOptimizedDrawing_1, flag); } public CGFloat userSpaceScaleFactor () { return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_userSpaceScaleFactor); } public id validRequestorForSendType (NSString sendType, NSString returnType) { objc.id result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id : null, returnType !is null ? returnType.id : null); return result !is null ? new id(result) : null; } public bool viewsNeedDisplay () { return OS.objc_msgSend(this.id, OS.sel_viewsNeedDisplay) !is null; } public id windowController () { objc.id result = OS.objc_msgSend(this.id, OS.sel_windowController); return result !is null ? new id(result) : null; } public NSInteger windowNumber () { return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_windowNumber); } public void* windowRef () { return cast(void*) OS.objc_msgSend(this.id, OS.sel_windowRef); } public bool worksWhenModal () { return OS.objc_msgSend(this.id, OS.sel_worksWhenModal) !is null; } public void zoom (id sender) { OS.objc_msgSend(this.id, OS.sel_zoom_1, sender !is null ? sender.id : null); } }