Add new MacOSX 10.4 methods and constants to NSWindow. Requires

recompilation of all applications!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2007-09-09 12:19:01 +00:00
parent 9540819e1f
commit 1d293756e0
28 changed files with 1377 additions and 958 deletions

View file

@ -1,3 +1,32 @@
2007-09-08 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSBitmapImageRep.h,
* Headers/AppKit/NSResponder.h: Correct conditional compilation.
* Headers/AppKit/NSWindow.h: Add new MacOSX 10.4 methods and constants.
* Source/NSWindow.m: Basic implementation of new methods.
* Source/GSStandardWindowDecorationView.m
(-initWithFrame:window:): Get buttons from NSWindow.
* Source/NSClipView.m,
* Source/NSColorPanel.m,
* Source/NSColorWell.m,
* Source/NSComboBoxCell.m,
* Source/NSDataLinkPanel.m,
* Source/NSMatrix.m,
* Source/NSMenuItemCell.m,
* Source/NSPopUpButton.m:
* Source/NSPopUpButtonCell.m:
* Source/NSPanel.m:
* Source/NSSavePanel.m:
* Source/NSScrollView.m,
* Source/NSScroller.m,
* Source/NSTabView.m,
* Source/NSTextField.m,
* Source/GSInfoPanel.m,
* Source/GSDragView.m,
* Source/GSTitleView.m,
* Source/GSToolTips.m,
* Source/NSButton.m: Clean up includes.
2007-09-07 Fred Kiefer <FredKiefer@gmx.de> 2007-09-07 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSFontManager.m (-convertFont:toHaveTrait:, * Source/NSFontManager.m (-convertFont:toHaveTrait:,
@ -483,7 +512,7 @@
2007-04-27 Fred Kiefer <FredKiefer@gmx.de> 2007-04-27 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSDragging.h: Added a few MacOSX 10.2 methods * Headers/AppKit/NSDragging.h: Added a few MacOSX 10.2 methods
* Source/GSSlideView.m: (-_handleDrag:slidePoint:): Call new * Source/GSDragView.m: (-_handleDrag:slidePoint:): Call new
MacOSX method on destionation when available. MacOSX method on destionation when available.
Patch by Yen-Ju Chen <yjchenx@gmail.com> Patch by Yen-Ju Chen <yjchenx@gmail.com>

View file

@ -127,13 +127,17 @@ APPKIT_EXPORT NSString *NSImageEXIFData; // No GNUstep support yet; for reading
unsigned int _bytesPerRow; unsigned int _bytesPerRow;
unsigned int _numColors; unsigned int _numColors;
unsigned int _bitsPerPixel; unsigned int _bitsPerPixel;
unsigned short _compression; unsigned short _compression;
float _comp_factor; float _comp_factor;
NSMutableDictionary *_properties; NSMutableDictionary *_properties;
BOOL _isPlanar; BOOL _isPlanar;
unsigned char **_imagePlanes; unsigned char **_imagePlanes;
NSMutableData *_imageData; NSMutableData *_imageData;
NSBitmapFormat _format; #if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
NSBitmapFormat _format;
#else
unsigned int _format;
#endif
} }
// //

View file

@ -46,10 +46,10 @@
@interface NSResponder : NSObject <NSCoding> @interface NSResponder : NSObject <NSCoding>
{ {
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
int _interface_style;
#else
NSInterfaceStyle _interface_style; NSInterfaceStyle _interface_style;
#else
int _interface_style;
#endif #endif
NSResponder *_next_responder; NSResponder *_next_responder;

View file

@ -34,11 +34,8 @@
#ifndef _GNUstep_H_NSWindow #ifndef _GNUstep_H_NSWindow
#define _GNUstep_H_NSWindow #define _GNUstep_H_NSWindow
#include <Foundation/NSDate.h>
#include <AppKit/NSGraphicsContext.h> #include <AppKit/NSGraphicsContext.h>
#include <AppKit/NSGraphics.h>
#include <AppKit/NSResponder.h> #include <AppKit/NSResponder.h>
#include <AppKit/NSEvent.h>
@class NSArray; @class NSArray;
@class NSData; @class NSData;
@ -49,6 +46,7 @@
@class NSString; @class NSString;
@class NSUndoManager; @class NSUndoManager;
@class NSButton;
@class NSButtonCell; @class NSButtonCell;
@class NSColor; @class NSColor;
@class NSEvent; @class NSEvent;
@ -69,19 +67,21 @@
* NSDesktopWindowLevel is copied from Window maker and is intended to be * NSDesktopWindowLevel is copied from Window maker and is intended to be
* the level at which things on the desktop sit ... so you should be able * the level at which things on the desktop sit ... so you should be able
* to put a desktop background just below it. * to put a desktop background just below it.
* FIXME: The hardcoded values here don't match the ones in Cocoa.
* But we cannot change them easily as the have to match the ones in Window maker.
*/ */
enum { enum {
NSDesktopWindowLevel = -1000, /* GNUstep addition */ NSDesktopWindowLevel = -1000, /* GNUstep addition */ // 2
NSNormalWindowLevel = 0, NSNormalWindowLevel = 0, // 3
NSFloatingWindowLevel = 3, NSFloatingWindowLevel = 3, // 4
NSSubmenuWindowLevel = 3, NSSubmenuWindowLevel = 3, // 5
NSTornOffMenuWindowLevel = 3, NSTornOffMenuWindowLevel = 3, // 5
NSMainMenuWindowLevel = 20, NSMainMenuWindowLevel = 20, // 7
NSDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */ NSDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */ // 6
NSStatusWindowLevel = 21, NSStatusWindowLevel = 21, // 8
NSModalPanelWindowLevel = 100, NSModalPanelWindowLevel = 100, // 9
NSPopUpMenuWindowLevel = 101, NSPopUpMenuWindowLevel = 101, // 10
NSScreenSaverWindowLevel = 1000 NSScreenSaverWindowLevel = 1000 // 12
}; };
enum { enum {
@ -90,6 +90,13 @@ enum {
NSClosableWindowMask = 2, NSClosableWindowMask = 2,
NSMiniaturizableWindowMask = 4, NSMiniaturizableWindowMask = 4,
NSResizableWindowMask = 8, NSResizableWindowMask = 8,
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
NSTexturedBackgroundWindowMask = 256,
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
NSUnscaledWindowMask = 2048,
NSUnifiedTitleAndToolbarWindowMask = 4096,
#endif
NSIconWindowMask = 64, /* GNUstep extension - app icon window */ NSIconWindowMask = 64, /* GNUstep extension - app icon window */
NSMiniWindowMask = 128 /* GNUstep extension - miniwindows */ NSMiniWindowMask = 128 /* GNUstep extension - miniwindows */
}; };
@ -100,6 +107,17 @@ typedef enum _NSSelectionDirection {
NSSelectingPrevious NSSelectingPrevious
} NSSelectionDirection; } NSSelectionDirection;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
typedef enum _NSWindowButton
{
NSWindowCloseButton = 0,
NSWindowMiniaturizeButton,
NSWindowZoomButton,
NSWindowToolbarButton,
NSWindowDocumentIconButton
} NSWindowButton;
#endif
APPKIT_EXPORT NSSize NSIconSize; APPKIT_EXPORT NSSize NSIconSize;
APPKIT_EXPORT NSSize NSTokenSize; APPKIT_EXPORT NSSize NSTokenSize;
@ -157,7 +175,9 @@ APPKIT_EXPORT NSSize NSTokenSize;
int _lastDragOperationMask; int _lastDragOperationMask;
int _windowNum; int _windowNum;
int _gstate; int _gstate;
void *_reserved_s; id _defaultButtonCell;
NSGraphicsContext *_context;
NSScreen *_screen; NSScreen *_screen;
NSColor *_backgroundColor; NSColor *_backgroundColor;
NSString *_representedFilename; NSString *_representedFilename;
@ -171,15 +191,14 @@ APPKIT_EXPORT NSSize NSTokenSize;
NSRect _rectNeedingFlush; NSRect _rectNeedingFlush;
NSMutableArray *_rectsBeingDrawn; NSMutableArray *_rectsBeingDrawn;
unsigned _disableFlushWindow; unsigned _disableFlushWindow;
NSSelectionDirection _selectionDirection;
NSWindowDepth _depthLimit; NSWindowDepth _depthLimit;
NSWindowController *_windowController; NSWindowController *_windowController;
int _counterpart; int _counterpart;
float _alphaValue; float _alphaValue;
NSToolbar *_toolbar; // Not used (see NSWindow+Toolbar now) NSMutableArray *_children;
id _toolbarView; // Not used (see NSWindow+Toolbar now) NSWindow *_parent;
NSCachedImageRep *_cachedImage; NSCachedImageRep *_cachedImage;
NSPoint _cachedImageOrigin; NSPoint _cachedImageOrigin;
@ -212,11 +231,20 @@ APPKIT_EXPORT NSSize NSTokenSize;
unsigned subclass_bool_one: 1; unsigned subclass_bool_one: 1;
unsigned subclass_bool_two: 1; unsigned subclass_bool_two: 1;
unsigned subclass_bool_three: 1; unsigned subclass_bool_three: 1;
unsigned selectionDirection: 2;
unsigned displays_when_screen_profile_changes: 1;
unsigned is_movable_by_window_background: 1;
unsigned allows_tooltips_when_inactive: 1;
// 4 used 28 available
unsigned shows_toolbar_button: 1;
unsigned autorecalculates_keyview_loop: 1;
unsigned ignores_mouse_events: 1;
unsigned preserves_content_during_live_resize: 1;
} _f; } _f;
id _defaultButtonCell; void *_reserved_s;
NSGraphicsContext *_context;
void *_reserved_1; void *_reserved_1;
} }
@ -254,7 +282,10 @@ APPKIT_EXPORT NSSize NSTokenSize;
+ (float) minFrameWidthWithTitle: (NSString *)aTitle + (float) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (unsigned int)aStyle; styleMask: (unsigned int)aStyle;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
- (NSRect) contentRectForFrameRect: (NSRect)frameRect;
- (NSRect) frameRectForContentRect: (NSRect)contentRect;
#endif
/* /*
* Initializing and getting a new NSWindow object * Initializing and getting a new NSWindow object
*/ */
@ -347,6 +378,10 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (BOOL) showsResizeIndicator; - (BOOL) showsResizeIndicator;
- (void) setShowsResizeIndicator: (BOOL)show; - (void) setShowsResizeIndicator: (BOOL)show;
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (BOOL) preservesContentDuringLiveResize;
- (void) setPreservesContentDuringLiveResize: (BOOL)flag;
#endif
/* /*
* Constraining size * Constraining size
@ -363,6 +398,16 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (NSSize) resizeIncrements; - (NSSize) resizeIncrements;
- (void) setResizeIncrements: (NSSize)aSize; - (void) setResizeIncrements: (NSSize)aSize;
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
- (NSSize) contentMaxSize;
- (void) setContentMaxSize: (NSSize)size;
- (NSSize) contentMinSize;
- (void) setContentMinSize: (NSSize)size;
- (NSSize) contentAspectRatio;
- (void) setContentAspectRatio: (NSSize)ratio;
- (NSSize) contentResizeIncrements;
- (void) setContentResizeIncrements: (NSSize)increments;
#endif
/* /*
* Saving and restoring the frame * Saving and restoring the frame
@ -447,6 +492,7 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (void) setOneShot: (BOOL)flag; - (void) setOneShot: (BOOL)flag;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (NSGraphicsContext*) graphicsContext; - (NSGraphicsContext*) graphicsContext;
- (float) userSpaceScaleFactor;
#endif #endif
@ -502,6 +548,10 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (NSPoint) mouseLocationOutsideOfEventStream; - (NSPoint) mouseLocationOutsideOfEventStream;
- (BOOL) acceptsMouseMovedEvents; - (BOOL) acceptsMouseMovedEvents;
- (void) setAcceptsMouseMovedEvents: (BOOL)flag; - (void) setAcceptsMouseMovedEvents: (BOOL)flag;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (BOOL) ignoresMouseEvents;
- (void) setIgnoresMouseEvents: (BOOL)flag;
#endif
/* /*
* The field editor * The field editor
@ -519,6 +569,11 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (void) selectPreviousKeyView: (id)sender; - (void) selectPreviousKeyView: (id)sender;
- (void) setInitialFirstResponder: (NSView*)aView; - (void) setInitialFirstResponder: (NSView*)aView;
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (BOOL) autorecalculatesKeyViewLoop;
- (void) setAutorecalculatesKeyViewLoop: (BOOL)flag;
- (void) recalculateKeyViewLoop;
#endif
/* /*
* Window graphics * Window graphics
@ -613,6 +668,9 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (void) setOpaque: (BOOL)isOpaque; - (void) setOpaque: (BOOL)isOpaque;
- (BOOL) isOpaque; - (BOOL) isOpaque;
#endif #endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (void) invalidateShadow;
#endif
/* /*
* Services menu support * Services menu support
@ -648,6 +706,44 @@ APPKIT_EXPORT NSSize NSTokenSize;
- (void *)windowRef; - (void *)windowRef;
- (void*) windowHandle; - (void*) windowHandle;
#endif #endif
/*
* Window butons
*/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
+ (NSButton *) standardWindowButton: (NSWindowButton)button
forStyleMask: (unsigned int) mask;
- (NSButton *) standardWindowButton: (NSWindowButton)button;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (BOOL) showsToolbarButton;
- (void) setShowsToolbarButton: (BOOL)flag;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (NSArray *) childWindows;
- (void) addChildWindow: (NSWindow *)child
ordered: (NSWindowOrderingMode)place;
- (void) removeChildWindow: (NSWindow *)child;
- (NSWindow *) parentWindow;
- (void) setParentWindow: (NSWindow *)window;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
- (BOOL) allowsToolTipsWhenApplicationIsInactive;
- (void) setAllowsToolTipsWhenApplicationIsInactive: (BOOL)flag;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (BOOL) isMovableByWindowBackground;
- (void) setMovableByWindowBackground: (BOOL)flag;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (BOOL) displaysWhenScreenProfileChanges;
- (void) setDisplaysWhenScreenProfileChanges: (BOOL)flag;
#endif
@end @end
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE) #if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
@ -694,17 +790,18 @@ APPKIT_EXPORT NSSize NSTokenSize;
@interface NSObject (NSWindowDelegate) @interface NSObject (NSWindowDelegate)
- (BOOL) windowShouldClose: (id)sender; - (BOOL) windowShouldClose: (id)sender;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (NSRect) window: (NSWindow*)window - (void) windowWillBeginSheet: (NSNotification*)aNotification;
willPositionSheet: (NSWindow*)sheet
usingRect: (NSRect)rect;
- (void) windowDidChangeScreenProfile: (NSNotification*)aNotification;
- (void) windowDidEndSheet: (NSNotification*)aNotification; - (void) windowDidEndSheet: (NSNotification*)aNotification;
- (BOOL) windowShouldZoom: (NSWindow*)sender - (BOOL) windowShouldZoom: (NSWindow*)sender
toFrame: (NSRect)aFrame; toFrame: (NSRect)aFrame;
- (void) windowWillBeginSheet: (NSNotification*)aNotification;
- (NSUndoManager*) windowWillReturnUndoManager: (NSWindow*)sender; - (NSUndoManager*) windowWillReturnUndoManager: (NSWindow*)sender;
- (NSRect) windowWillUseStandardFrame: (NSWindow*)sender - (NSRect) windowWillUseStandardFrame: (NSWindow*)sender
defaultFrame: (NSRect)aFrame; defaultFrame: (NSRect)aFrame;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
- (NSRect) window: (NSWindow *)window
willPositionSheet: (NSWindow *)sheet
usingRect: (NSRect)rect;
#endif #endif
- (NSSize) windowWillResize: (NSWindow*)sender - (NSSize) windowWillResize: (NSWindow*)sender
toSize: (NSSize)frameSize; toSize: (NSSize)frameSize;
@ -713,6 +810,9 @@ willPositionSheet: (NSWindow*)sheet
- (void) windowDidBecomeKey: (NSNotification*)aNotification; - (void) windowDidBecomeKey: (NSNotification*)aNotification;
- (void) windowDidBecomeMain: (NSNotification*)aNotification; - (void) windowDidBecomeMain: (NSNotification*)aNotification;
- (void) windowDidChangeScreen: (NSNotification*)aNotification; - (void) windowDidChangeScreen: (NSNotification*)aNotification;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (void) windowDidChangeScreenProfile: (NSNotification *)aNotification;
#endif
- (void) windowDidDeminiaturize: (NSNotification*)aNotification; - (void) windowDidDeminiaturize: (NSNotification*)aNotification;
- (void) windowDidExpose: (NSNotification*)aNotification; - (void) windowDidExpose: (NSNotification*)aNotification;
- (void) windowDidMiniaturize: (NSNotification*)aNotification; - (void) windowDidMiniaturize: (NSNotification*)aNotification;
@ -731,7 +831,13 @@ willPositionSheet: (NSWindow*)sheet
APPKIT_EXPORT NSString *NSWindowDidBecomeKeyNotification; APPKIT_EXPORT NSString *NSWindowDidBecomeKeyNotification;
APPKIT_EXPORT NSString *NSWindowDidBecomeMainNotification; APPKIT_EXPORT NSString *NSWindowDidBecomeMainNotification;
APPKIT_EXPORT NSString *NSWindowDidChangeScreenNotification; APPKIT_EXPORT NSString *NSWindowDidChangeScreenNotification;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
APPKIT_EXPORT NSString *NSWindowDidChangeScreenProfileNotification;
#endif
APPKIT_EXPORT NSString *NSWindowDidDeminiaturizeNotification; APPKIT_EXPORT NSString *NSWindowDidDeminiaturizeNotification;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
APPKIT_EXPORT NSString *NSWindowDidEndSheetNotification;
#endif
APPKIT_EXPORT NSString *NSWindowDidExposeNotification; APPKIT_EXPORT NSString *NSWindowDidExposeNotification;
APPKIT_EXPORT NSString *NSWindowDidMiniaturizeNotification; APPKIT_EXPORT NSString *NSWindowDidMiniaturizeNotification;
APPKIT_EXPORT NSString *NSWindowDidMoveNotification; APPKIT_EXPORT NSString *NSWindowDidMoveNotification;
@ -739,6 +845,9 @@ APPKIT_EXPORT NSString *NSWindowDidResignKeyNotification;
APPKIT_EXPORT NSString *NSWindowDidResignMainNotification; APPKIT_EXPORT NSString *NSWindowDidResignMainNotification;
APPKIT_EXPORT NSString *NSWindowDidResizeNotification; APPKIT_EXPORT NSString *NSWindowDidResizeNotification;
APPKIT_EXPORT NSString *NSWindowDidUpdateNotification; APPKIT_EXPORT NSString *NSWindowDidUpdateNotification;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
APPKIT_EXPORT NSString *NSWindowWillBeginSheetNotification;
#endif
APPKIT_EXPORT NSString *NSWindowWillCloseNotification; APPKIT_EXPORT NSString *NSWindowWillCloseNotification;
APPKIT_EXPORT NSString *NSWindowWillMiniaturizeNotification; APPKIT_EXPORT NSString *NSWindowWillMiniaturizeNotification;
APPKIT_EXPORT NSString *NSWindowWillMoveNotification; APPKIT_EXPORT NSString *NSWindowWillMoveNotification;

View file

@ -35,6 +35,8 @@
#include <AppKit/NSApplication.h> #include <AppKit/NSApplication.h>
#include <AppKit/NSCell.h> #include <AppKit/NSCell.h>
#include <AppKit/NSCursor.h> #include <AppKit/NSCursor.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSGraphics.h>
#include <AppKit/NSImage.h> #include <AppKit/NSImage.h>
#include <AppKit/NSPasteboard.h> #include <AppKit/NSPasteboard.h>
#include <AppKit/NSView.h> #include <AppKit/NSView.h>

View file

@ -25,15 +25,17 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "AppKit/NSApplication.h"
#include "AppKit/NSButton.h"
#include "AppKit/NSFont.h"
#include "AppKit/NSImage.h"
#include "AppKit/NSTextField.h"
#include <Foundation/NSBundle.h> #include <Foundation/NSBundle.h>
#include <Foundation/NSDictionary.h> #include <Foundation/NSDictionary.h>
#include <Foundation/NSString.h> #include <Foundation/NSString.h>
#include <Foundation/NSProcessInfo.h> #include <Foundation/NSProcessInfo.h>
#include "AppKit/NSApplication.h"
#include "AppKit/NSButton.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSFont.h"
#include "AppKit/NSImage.h"
#include "AppKit/NSTextField.h"
#include "GNUstepGUI/GSInfoPanel.h" #include "GNUstepGUI/GSInfoPanel.h"
#include "GNUstepGUI/GSTheme.h" #include "GNUstepGUI/GSTheme.h"

View file

@ -23,13 +23,12 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "GSWindowDecorationView.h"
#include <Foundation/NSException.h> #include <Foundation/NSException.h>
#include "AppKit/NSApplication.h" #include "AppKit/NSApplication.h"
#include "AppKit/NSAttributedString.h" #include "AppKit/NSAttributedString.h"
#include "AppKit/NSButton.h" #include "AppKit/NSButton.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSParagraphStyle.h" #include "AppKit/NSParagraphStyle.h"
#include "AppKit/NSScreen.h" #include "AppKit/NSScreen.h"
@ -37,7 +36,7 @@
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"
#include "AppKit/PSOperators.h" #include "AppKit/PSOperators.h"
#include "GNUstepGUI/GSDisplayServer.h" #include "GNUstepGUI/GSDisplayServer.h"
#include "GSWindowDecorationView.h"
@implementation GSStandardWindowDecorationView @implementation GSStandardWindowDecorationView
@ -169,40 +168,19 @@ static NSColor *titleColor[3];
{ {
hasCloseButton = YES; hasCloseButton = YES;
closeButton = [[NSButton alloc] init]; closeButton = [NSWindow standardWindowButton: NSWindowCloseButton
[closeButton setRefusesFirstResponder: YES]; forStyleMask: [w styleMask]];
[closeButton setButtonType: NSMomentaryChangeButton];
[closeButton setImagePosition: NSImageOnly];
[closeButton setBordered: YES];
[closeButton setImage: [NSImage imageNamed: @"common_Close"]];
[closeButton setAlternateImage: [NSImage imageNamed: @"common_CloseH"]];
[closeButton setTarget: window]; [closeButton setTarget: window];
/* TODO: -performClose: should (but doesn't currently) highlight the
button, which is wrong here. When -performClose: is fixed, we'll need a
different method here. */
[closeButton setAction: @selector(performClose:)];
[self addSubview: closeButton]; [self addSubview: closeButton];
RELEASE(closeButton);
} }
if ([w styleMask] & NSMiniaturizableWindowMask) if ([w styleMask] & NSMiniaturizableWindowMask)
{ {
hasMiniaturizeButton = YES; hasMiniaturizeButton = YES;
miniaturizeButton = [[NSButton alloc] init]; miniaturizeButton = [NSWindow standardWindowButton: NSWindowMiniaturizeButton
[miniaturizeButton setRefusesFirstResponder: YES]; forStyleMask: [w styleMask]];
[miniaturizeButton setButtonType: NSMomentaryChangeButton];
[miniaturizeButton setImagePosition: NSImageOnly];
[miniaturizeButton setBordered: YES];
[miniaturizeButton setImage:
[NSImage imageNamed: @"common_Miniaturize"]];
[miniaturizeButton setAlternateImage:
[NSImage imageNamed: @"common_MiniaturizeH"]];
[miniaturizeButton setTarget: window]; [miniaturizeButton setTarget: window];
/* TODO: -performMiniaturize: should (but doesn't currently) highlight
the button, which is wrong here, just like -performClose: above. */
[miniaturizeButton setAction: @selector(performMiniaturize:)];
[self addSubview: miniaturizeButton]; [self addSubview: miniaturizeButton];
RELEASE(miniaturizeButton);
} }
if ([w styleMask] & NSResizableWindowMask) if ([w styleMask] & NSResizableWindowMask)
{ {

View file

@ -26,15 +26,16 @@
#include <Foundation/NSDebug.h> #include <Foundation/NSDebug.h>
#include <Foundation/NSRunLoop.h> #include <Foundation/NSRunLoop.h>
#include <AppKit/NSApplication.h>
#include "AppKit/NSAttributedString.h" #include "AppKit/NSAttributedString.h"
#include <AppKit/NSView.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSButton.h> #include <AppKit/NSButton.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSImage.h> #include <AppKit/NSImage.h>
#include <AppKit/NSMenu.h> #include <AppKit/NSMenu.h>
#include <AppKit/NSMenuView.h> #include <AppKit/NSMenuView.h>
#include <AppKit/NSApplication.h> #include <AppKit/NSPanel.h>
#include <AppKit/NSView.h>
#include <AppKit/NSWindow.h>
#include <GNUstepGUI/GSTitleView.h> #include <GNUstepGUI/GSTitleView.h>
#include "GNUstepGUI/GSTheme.h" #include "GNUstepGUI/GSTheme.h"

View file

@ -25,11 +25,13 @@
*/ */
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include "AppKit/NSAttributedString.h" #include "AppKit/NSAttributedString.h"
#include "AppKit/NSBezierPath.h" #include "AppKit/NSBezierPath.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSScreen.h"
#include "AppKit/NSView.h" #include "AppKit/NSView.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"
#include "AppKit/NSScreen.h"
#include "GNUstepGUI/GSTrackingRect.h" #include "GNUstepGUI/GSTrackingRect.h"
#include "GSToolTips.h" #include "GSToolTips.h"

View file

@ -28,10 +28,11 @@
#include "config.h" #include "config.h"
#include "AppKit/NSButton.h"
#include "AppKit/NSWindow.h"
#include "AppKit/NSButtonCell.h"
#include "AppKit/NSApplication.h" #include "AppKit/NSApplication.h"
#include "AppKit/NSButton.h"
#include "AppKit/NSButtonCell.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSWindow.h"
// //
// class variables // class variables

View file

@ -30,6 +30,7 @@
#include "AppKit/NSClipView.h" #include "AppKit/NSClipView.h"
#include "AppKit/NSCursor.h" #include "AppKit/NSCursor.h"
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphics.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSTableView.h" #include "AppKit/NSTableView.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"

View file

@ -38,6 +38,8 @@
#include "AppKit/NSColorPicker.h" #include "AppKit/NSColorPicker.h"
#include "AppKit/NSColorPicking.h" #include "AppKit/NSColorPicking.h"
#include "AppKit/NSColorWell.h" #include "AppKit/NSColorWell.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSPasteboard.h" #include "AppKit/NSPasteboard.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"

View file

@ -34,6 +34,7 @@
#include "AppKit/NSColorWell.h" #include "AppKit/NSColorWell.h"
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSDragging.h" #include "AppKit/NSDragging.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphics.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSPasteboard.h" #include "AppKit/NSPasteboard.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"

View file

@ -40,6 +40,7 @@
#include "AppKit/NSButtonCell.h" #include "AppKit/NSButtonCell.h"
#include "AppKit/NSComboBox.h" #include "AppKit/NSComboBox.h"
#include "AppKit/NSComboBoxCell.h" #include "AppKit/NSComboBoxCell.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphicsContext.h" #include "AppKit/NSGraphicsContext.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSMatrix.h" #include "AppKit/NSMatrix.h"

View file

@ -28,6 +28,7 @@
#include "AppKit/NSDataLinkPanel.h" #include "AppKit/NSDataLinkPanel.h"
#include "AppKit/NSDataLinkManager.h" #include "AppKit/NSDataLinkManager.h"
#include "AppKit/NSDataLink.h" #include "AppKit/NSDataLink.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSView.h" #include "AppKit/NSView.h"
#include "AppKit/NSNibLoading.h" #include "AppKit/NSNibLoading.h"
#include "GSGuiPrivate.h" #include "GSGuiPrivate.h"

View file

@ -62,12 +62,14 @@
#include <Foundation/NSString.h> #include <Foundation/NSString.h>
#include <Foundation/NSZone.h> #include <Foundation/NSZone.h>
#include "AppKit/NSActionCell.h"
#include "AppKit/NSApplication.h"
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSCursor.h" #include "AppKit/NSCursor.h"
#include "AppKit/NSActionCell.h" #include "AppKit/NSEvent.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSApplication.h"
#include "AppKit/NSMatrix.h" #include "AppKit/NSMatrix.h"
#include "AppKit/NSWindow.h"
#include <math.h> #include <math.h>

View file

@ -36,6 +36,7 @@
#include "AppKit/NSAttributedString.h" #include "AppKit/NSAttributedString.h"
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSFont.h" #include "AppKit/NSFont.h"
#include "AppKit/NSGraphics.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"

View file

@ -28,10 +28,11 @@
#include "config.h" #include "config.h"
#include <Foundation/NSCoder.h> #include <Foundation/NSCoder.h>
#include "AppKit/NSPanel.h"
#include "AppKit/NSButton.h" #include "AppKit/NSButton.h"
#include "AppKit/NSTextField.h" #include "AppKit/NSEvent.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSPanel.h"
#include "AppKit/NSTextField.h"
@implementation NSPanel @implementation NSPanel

View file

@ -28,9 +28,10 @@
*/ */
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include "AppKit/NSApplication.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSPopUpButton.h" #include "AppKit/NSPopUpButton.h"
#include "AppKit/NSPopUpButtonCell.h" #include "AppKit/NSPopUpButtonCell.h"
#include "AppKit/NSApplication.h"
#include "AppKit/NSMenu.h" #include "AppKit/NSMenu.h"
#include "AppKit/NSMenuItem.h" #include "AppKit/NSMenuItem.h"
#include "AppKit/NSMenuView.h" #include "AppKit/NSMenuView.h"

View file

@ -27,6 +27,7 @@
#include "config.h" #include "config.h"
#include "AppKit/NSApplication.h" #include "AppKit/NSApplication.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphics.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSMenu.h" #include "AppKit/NSMenu.h"

View file

@ -43,6 +43,7 @@
#include "AppKit/NSBrowser.h" #include "AppKit/NSBrowser.h"
#include "AppKit/NSBrowserCell.h" #include "AppKit/NSBrowserCell.h"
#include "AppKit/NSButton.h" #include "AppKit/NSButton.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSFont.h" #include "AppKit/NSFont.h"
#include "AppKit/NSForm.h" #include "AppKit/NSForm.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"

View file

@ -32,13 +32,16 @@
#include <Foundation/NSDebug.h> #include <Foundation/NSDebug.h>
#include <Foundation/NSException.h> #include <Foundation/NSException.h>
#include <Foundation/NSNotification.h> #include <Foundation/NSNotification.h>
#include "AppKit/NSScroller.h"
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSCell.h" #include "AppKit/NSCell.h"
#include "AppKit/NSClipView.h" #include "AppKit/NSClipView.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSInterfaceStyle.h" #include "AppKit/NSInterfaceStyle.h"
#include "AppKit/NSScrollView.h"
#include "AppKit/NSRulerView.h" #include "AppKit/NSRulerView.h"
#include "AppKit/NSScroller.h"
#include "AppKit/NSScrollView.h"
#include "AppKit/NSTableHeaderView.h" #include "AppKit/NSTableHeaderView.h"
#include "AppKit/NSTableView.h" #include "AppKit/NSTableView.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"

View file

@ -33,14 +33,15 @@
#include <Foundation/NSRunLoop.h> #include <Foundation/NSRunLoop.h>
#include <Foundation/NSDebug.h> #include <Foundation/NSDebug.h>
#include "AppKit/NSApplication.h"
#include "AppKit/NSButtonCell.h"
#include "AppKit/NSColor.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSImage.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSScroller.h" #include "AppKit/NSScroller.h"
#include "AppKit/NSScrollView.h" #include "AppKit/NSScrollView.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"
#include "AppKit/NSButtonCell.h"
#include "AppKit/NSApplication.h"
#include "AppKit/NSImage.h"
#include "AppKit/NSColor.h"
#include "AppKit/NSGraphics.h"
/**<p>TODO Description</p> /**<p>TODO Description</p>
*/ */

View file

@ -26,14 +26,15 @@
*/ */
#include "AppKit/NSColor.h" #include "AppKit/NSColor.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSFont.h" #include "AppKit/NSFont.h"
#include "AppKit/NSForm.h"
#include "AppKit/NSGraphics.h" #include "AppKit/NSGraphics.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSForm.h"
#include "AppKit/NSMatrix.h" #include "AppKit/NSMatrix.h"
#include "AppKit/NSWindow.h"
#include "AppKit/NSTabView.h" #include "AppKit/NSTabView.h"
#include "AppKit/NSTabViewItem.h" #include "AppKit/NSTabViewItem.h"
#include "AppKit/NSWindow.h"
#include "AppKit/PSOperators.h" #include "AppKit/PSOperators.h"
#include "GNUstepGUI/GSTheme.h" #include "GNUstepGUI/GSTheme.h"

View file

@ -38,6 +38,7 @@
#include "AppKit/NSApplication.h" #include "AppKit/NSApplication.h"
#include "AppKit/NSCursor.h" #include "AppKit/NSCursor.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSTextField.h" #include "AppKit/NSTextField.h"
#include "AppKit/NSTextFieldCell.h" #include "AppKit/NSTextFieldCell.h"
#include "AppKit/NSWindow.h" #include "AppKit/NSWindow.h"

View file

@ -67,6 +67,7 @@
#include "AppKit/NSDragging.h" #include "AppKit/NSDragging.h"
#include "AppKit/NSEvent.h" #include "AppKit/NSEvent.h"
#include "AppKit/NSFileWrapper.h" #include "AppKit/NSFileWrapper.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSImage.h" #include "AppKit/NSImage.h"
#include "AppKit/NSLayoutManager.h" #include "AppKit/NSLayoutManager.h"
#include "AppKit/NSParagraphStyle.h" #include "AppKit/NSParagraphStyle.h"

File diff suppressed because it is too large Load diff

View file

@ -410,7 +410,9 @@ NSString *NSOutlineViewItemWillCollapseNotification = @"OutlineViewItemWillColla
NSString *NSWindowDidBecomeKeyNotification = @"WindowDidBecomeKey"; NSString *NSWindowDidBecomeKeyNotification = @"WindowDidBecomeKey";
NSString *NSWindowDidBecomeMainNotification = @"WindowDidBecomeMain"; NSString *NSWindowDidBecomeMainNotification = @"WindowDidBecomeMain";
NSString *NSWindowDidChangeScreenNotification = @"WindowDidChangeScreen"; NSString *NSWindowDidChangeScreenNotification = @"WindowDidChangeScreen";
NSString *NSWindowDidChangeScreenProfileNotification = @"NSWindowDidChangeScreenProfile";
NSString *NSWindowDidDeminiaturizeNotification = @"WindowDidDeminiaturize"; NSString *NSWindowDidDeminiaturizeNotification = @"WindowDidDeminiaturize";
NSString *NSWindowDidEndSheetNotification = @"NSWindowDidEndSheet";
NSString *NSWindowDidExposeNotification = @"WindowDidExpose"; NSString *NSWindowDidExposeNotification = @"WindowDidExpose";
NSString *NSWindowDidMiniaturizeNotification = @"WindowDidMiniaturize"; NSString *NSWindowDidMiniaturizeNotification = @"WindowDidMiniaturize";
NSString *NSWindowDidMoveNotification = @"WindowDidMove"; NSString *NSWindowDidMoveNotification = @"WindowDidMove";
@ -418,6 +420,7 @@ NSString *NSWindowDidResignKeyNotification = @"WindowDidResignKey";
NSString *NSWindowDidResignMainNotification = @"WindowDidResignMain"; NSString *NSWindowDidResignMainNotification = @"WindowDidResignMain";
NSString *NSWindowDidResizeNotification = @"WindowDidResize"; NSString *NSWindowDidResizeNotification = @"WindowDidResize";
NSString *NSWindowDidUpdateNotification = @"WindowDidUpdate"; NSString *NSWindowDidUpdateNotification = @"WindowDidUpdate";
NSString *NSWindowWillBeginSheetNotification = @"NSWindowWillBeginSheet";
NSString *NSWindowWillCloseNotification = @"WindowWillClose"; NSString *NSWindowWillCloseNotification = @"WindowWillClose";
NSString *NSWindowWillMiniaturizeNotification = @"WindowWillMiniaturize"; NSString *NSWindowWillMiniaturizeNotification = @"WindowWillMiniaturize";
NSString *NSWindowWillMoveNotification = @"WindowWillMove"; NSString *NSWindowWillMoveNotification = @"WindowWillMove";