NSText: define new NSTextAlignment constants

Define new-style NSTextAlignment* constants on GUI for compatibility
purposes with new macOS versions.
This commit is contained in:
Daniel Ferreira 2017-08-05 01:10:42 +10:00 committed by Ivan Vučica
parent 78be5ef0ea
commit 5ce4348754

View file

@ -69,13 +69,24 @@
@class NSColor;
@class NSFont;
typedef enum _NSTextAlignment {
typedef NSInteger NSTextAlignment;
enum {
NSLeftTextAlignment = 0,
NSRightTextAlignment,
NSCenterTextAlignment,
NSJustifiedTextAlignment,
NSNaturalTextAlignment
} NSTextAlignment;
};
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
enum {
NSTextAlignmentLeft = NSLeftTextAlignment,
NSTextAlignmentRight = NSRightTextAlignment,
NSTextAlignmentCenter = NSCenterTextAlignment,
NSTextAlignmentJustified = NSJustifiedTextAlignment,
NSTextAlignmentNatural = NSNaturalTextAlignment
};
#endif
enum {
NSTextWritingDirectionEmbedding = (0 << 1),