NSScrollView: create stubs for inset properties

Create stubs for the content/scroller inset properties in NSScrollView.
This commit is contained in:
Daniel Ferreira 2017-07-18 03:43:49 +10:00 committed by Ivan Vučica
parent ecb4178417
commit 62ec654335
2 changed files with 66 additions and 0 deletions

View file

@ -164,6 +164,23 @@ typedef NSInteger NSScrollElasticity;
- (void)setAllowsMagnification:(BOOL)m;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
#if GS_HAS_DECLARED_PROPERTIES
@property BOOL automaticallyAdjustsContentInsets;
@property NSEdgeInsets contentInsets;
@property NSEdgeInsets scrollerInsets;
#else
- (BOOL)automaticallyAdjustsContentInsets;
- (void)setAutomaticallyAdjustsContentInsets: (BOOL)adjusts;
- (NSEdgeInsets)contentInsets;
- (void)setContentInsets:(NSEdgeInsets)edgeInsets;
- (NSEdgeInsets)scrollerInsets;
- (void)setScrollerInsets:(NSEdgeInsets)insets;
#endif
#endif
/* Updating display after scrolling */
- (void)reflectScrolledClipView:(NSClipView*)aClipView;

View file

@ -1755,6 +1755,55 @@ GSOppositeEdge(NSRectEdge edge)
return self;
}
- (BOOL)automaticallyAdjustsContentInsets
{
// FIXME
return NO;
}
- (void)setAutomaticallyAdjustsContentInsets: (BOOL)adjusts
{
static BOOL logged = NO;
if (!logged)
{
NSLog(@"warning: stub no-op implementation of"
"-[NSScrollView setAutomaticallyAdjustsContentInsets:]");
logged = YES;
}
}
- (NSEdgeInsets)contentInsets
{
// FIXME
return NSEdgeInsetsZero;
}
- (void)setContentInsets: (NSEdgeInsets)edgeInsets
{
static BOOL logged = NO;
if (!logged)
{
NSLog(@"warning: stub no-op implementation of"
"-[NSScrollView setContentInsets:]");
logged = YES;
}
}
- (NSEdgeInsets)scrollerInsets
{
// FIXME
return NSEdgeInsetsZero;
}
- (void)setScrollerInsets: (NSEdgeInsets)insets
{
static BOOL logged = NO;
if (!logged)
{
NSLog(@"warning: stub no-op implementation of"
"-[NSScrollView setScrollerInsets:]");
logged = YES;
}
}
@end
@implementation NSScrollView (GSPrivate)