Add some enums and the method -momentumPhase to NSEvent.

This commit is contained in:
fredkiefer 2017-07-22 20:17:00 +02:00
parent 79d6582884
commit a02b40a9dd
3 changed files with 43 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2017-07-22 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSEvent.h
* Source/NSEvent.m: Add some newer Cocoa enums and one method with
dummy implementation.
2017-07-09 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSEvent.h

View file

@ -229,6 +229,33 @@ enum
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
enum {
NSEventPhaseNone = 0,
NSEventPhaseBegan = 1,
NSEventPhaseStationary = 2,
NSEventPhaseChanged = 4,
NSEventPhaseEnded = 8,
NSEventPhaseCancelled = 16,
NSEventPhaseMayBegin = 32
};
typedef NSUInteger NSEventPhase;
enum {
NSEventGestureAxisNone = 0,
NSEventGestureAxisHorizontal,
NSEventGestureAxisVertical
};
typedef NSInteger NSEventGestureAxis;
enum {
NSEventSwipeTrackingLockDirection = 1,
NSEventSwipeTrackingClampGestureAmount = 2
};
typedef NSUInteger NSEventSwipeTrackingOptions;
#endif
@interface NSEvent : NSObject <NSCoding, NSCopying>
{
NSEventType event_type;
@ -405,6 +432,10 @@ enum
+ (NSUInteger) pressedMouseButtons;
+ (NSTimeInterval) doubleClickInterval;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
- (NSEventPhase) momentumPhase;
#endif
@end
enum {

View file

@ -1234,4 +1234,10 @@ static const char *eventTypes[] = {
return 0;
}
- (NSEventPhase) momentumPhase
{
// FIXME
return NSEventPhaseNone;
}
@end