NS{Cell,View}: implement stubs for layout direction handling

Implement stubs for the layout direction properties in NSCell and
NSView. Currently, they default to left-to-right layouting.
This commit is contained in:
Daniel Ferreira 2017-07-18 03:57:41 +10:00 committed by Ivan Vučica
parent 05c58fe023
commit 758d524547
4 changed files with 44 additions and 0 deletions

View file

@ -41,6 +41,7 @@
#import <AppKit/NSText.h>
// for NSFocusRingType
#import <AppKit/NSView.h>
#import <AppKit/NSUserInterfaceLayout.h>
@class NSString;
@class NSMutableDictionary;
@ -278,6 +279,15 @@ enum {
- (void)setFocusRingType:(NSFocusRingType)type;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
#if GS_HAS_DECLARED_PROPERTIES
@property NSUserInterfaceLayoutDirection userInterfaceLayoutDirection;
#else
- (NSUserInterfaceLayoutDirection) userInterfaceLayoutDirection;
- (void) setUserInterfaceLayoutDirection: (NSUserInterfaceLayoutDirection)dir;
#endif
#endif
//
// Setting the NSCell's State
//

View file

@ -36,6 +36,7 @@
#import <AppKit/NSGraphicsContext.h>
#import <AppKit/NSResponder.h>
#import <AppKit/NSUserInterfaceLayout.h>
@class NSArray;
@class NSAttributedString;
@ -628,6 +629,15 @@ PACKAGE_SCOPE
#endif
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
#if GS_HAS_DECLARED_PROPERTIES
@property NSUserInterfaceLayoutDirection userInterfaceLayoutDirection;
#else
- (NSUserInterfaceLayoutDirection) userInterfaceLayoutDirection;
- (void) setUserInterfaceLayoutDirection: (NSUserInterfaceLayoutDirection)dir;
#endif
#endif
@end

View file

@ -2848,6 +2848,18 @@ static NSColor *dtxtCol;
}
return self;
}
- (NSUserInterfaceLayoutDirection) userInterfaceLayoutDirection
{
// FIXME
return NSUserInterfaceLayoutDirectionLeftToRight;
}
- (void) setUserInterfaceLayoutDirection: (NSUserInterfaceLayoutDirection)dir
{
// FIXME: implement this
return;
}
@end
@implementation NSCell (PrivateMethods)

View file

@ -5120,6 +5120,18 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
}
}
- (NSUserInterfaceLayoutDirection) userInterfaceLayoutDirection
{
// FIXME
return NSUserInterfaceLayoutDirectionLeftToRight;
}
- (void) setUserInterfaceLayoutDirection: (NSUserInterfaceLayoutDirection)dir
{
// FIXME: implement this
return;
}
@end
@implementation NSView(KeyViewLoop)