Added stubs for new MacOSX methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18634 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2004-02-20 13:18:51 +00:00
parent e306a85d80
commit 31cde10bcd
3 changed files with 162 additions and 4 deletions

View file

@ -1,3 +1,16 @@
2004-02-20 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSView.h:
* Source/NSView.m: (+defaultFocusRingType,
-setKeyboardFocusRingNeedsDisplayInRect:, -setFocusRingType:,
-focusRingType, -setHidden:, -isHidden,
-isHiddenOrHasHiddenAncestor, -wantsDefaultClipping,
-needsToDrawRect:, -getRectsBeingDrawn:count:, -inLiveResize,
-viewWillStartLiveResize, -viewDidEndLiveResize,
-mouseDownCanMoveWindow, -dragPromisedFilesOfTypes:...event:,
-canBecomeKeyView)
Stups for new MacOSX methods.
2004-02-17 00:18 Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/NSNib.h: Improved documentation.

View file

@ -78,6 +78,15 @@ enum {
NSViewMaxYMargin = 32 // top margin between views can stretch
};
/*
* constants defining if and how a view (or cell) should draw a focus ring
*/
typedef enum _NSFocusRingType {
NSFocusRingTypeDefault = 0,
NSFocusRingTypeNone = 1,
NSFocusRingTypeExterior = 2
} NSFocusRingType;
@interface NSView : NSResponder
{
NSRect _frame;
@ -240,11 +249,36 @@ enum {
- (void) setNeedsDisplay: (BOOL)flag;
- (void) setNeedsDisplayInRect: (NSRect)invalidRect;
- (BOOL) isOpaque;
#ifndef STRICT_OPENSTEP
+ (NSFocusRingType) defaultFocusRingType;
- (void) setKeyboardFocusRingNeedsDisplayInRect: (NSRect)rect;
- (void) setFocusRingType: (NSFocusRingType)focusRingType;
- (NSFocusRingType) focusRingType;
/*
* Hidding Views
*/
- (void) setHidden: (BOOL)flag;
- (BOOL) isHidden;
- (BOOL) isHiddenOrHasHiddenAncestor;
#endif
- (void) drawRect: (NSRect)rect;
- (NSRect) visibleRect;
- (BOOL) canDraw;
- (BOOL) shouldDrawColor;
#ifndef STRICT_OPENSTEP
- (BOOL) wantsDefaultClipping;
- (BOOL) needsToDrawRect: (NSRect)aRect;
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count;
/*
* Live resize support
*/
- (BOOL) inLiveResize;
- (void) viewWillStartLiveResize;
- (void) viewDidEndLiveResize;
#endif
/*
* Graphics State Objects
@ -262,6 +296,7 @@ enum {
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent;
#ifndef STRICT_OPENSTEP
- (BOOL) performMnemonic: (NSString *)aString;
- (BOOL) mouseDownCanMoveWindow;
#endif
/*
@ -281,6 +316,13 @@ enum {
- (void) registerForDraggedTypes: (NSArray*)newTypes;
- (void) unregisterDraggedTypes;
- (BOOL) shouldDelayWindowOrderingForEvent: (NSEvent*)anEvent;
#ifndef STRICT_OPENSTEP
- (BOOL) dragPromisedFilesOfTypes: (NSArray *)typeArray
fromRect: (NSRect)aRect
source: (id)sourceObject
slideBack: (BOOL)slideBack
event: (NSEvent *)theEvent;
#endif
/*
* Managing the Cursor
@ -347,6 +389,9 @@ enum {
- (void) setPreviousKeyView: (NSView*)aView;
- (NSView*) previousKeyView;
- (NSView*) previousValidKeyView;
#ifndef STRICT_OPENSTEP
- (BOOL) canBecomeKeyView;
#endif
/*
* Printing

View file

@ -2096,6 +2096,25 @@ GSSetDragTypes(NSView* obj, NSArray *types)
return _visibleRect;
}
- (BOOL) wantsDefaultClipping
{
return YES;
}
- (BOOL) needsToDrawRect: (NSRect)aRect
{
// FIXME
return YES;
}
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count
{
// FIXME
if (count != NULL)
{
*count = 0;
}
}
extern NSThread *GSAppKitThread; /* TODO */
@ -2213,6 +2232,65 @@ in the main thread.
DESTROY(v);
}
+ (NSFocusRingType) defaultFocusRingType
{
return NSFocusRingTypeDefault;
}
- (void) setKeyboardFocusRingNeedsDisplayInRect: (NSRect)rect
{
// FIXME
[self setNeedsDisplayInRect: rect];
}
- (void) setFocusRingType: (NSFocusRingType)focusRingType
{
// FIXME
}
- (NSFocusRingType) focusRingType
{
// FIXME
return NSFocusRingTypeDefault;
}
/*
* Hidding Views
*/
- (void) setHidden: (BOOL)flag
{
// FIXME
}
- (BOOL) isHidden
{
// FIXME
return NO;
}
- (BOOL) isHiddenOrHasHiddenAncestor
{
return ([self isHidden] || [_super_view isHiddenOrHasHiddenAncestor]);
}
/*
* Live resize support
*/
- (BOOL) inLiveResize
{
// FIXME
return NO;
}
- (void) viewWillStartLiveResize
{
// FIXME
}
- (void) viewDidEndLiveResize
{
// FIXME
}
/*
* Scrolling
@ -2590,6 +2668,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
return NO;
}
- (BOOL) mouseDownCanMoveWindow
{
// FIXME
return NO;
}
- (void) removeTrackingRect: (NSTrackingRectTag)tag
{
unsigned i, j;
@ -2858,8 +2942,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
theView = [self nextKeyView];
while (1)
{
if ([theView acceptsFirstResponder] || (theView == nil)
|| (theView == self))
if ((theView == nil) || (theView == self) ||
[theView canBecomeKeyView])
{
return theView;
}
@ -2913,8 +2997,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
theView = [self previousKeyView];
while (1)
{
if ([theView acceptsFirstResponder] || (theView == nil)
|| (theView == self))
if ((theView == nil) || (theView == self) ||
[theView canBecomeKeyView])
{
return theView;
}
@ -2922,6 +3006,12 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
}
}
- (BOOL) canBecomeKeyView
{
// FIXME
return [self acceptsFirstResponder] && ![self isHidden];
}
/*
* Dragging
*/
@ -3026,6 +3116,16 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
}
}
- (BOOL) dragPromisedFilesOfTypes: (NSArray *)typeArray
fromRect: (NSRect)aRect
source: (id)sourceObject
slideBack: (BOOL)slideBack
event: (NSEvent *)theEvent
{
// FIXME
return NO;
}
/*
* Printing
*/