May 2003
Intermediate to advanced
566 pages
27h 29m
English
NSEvent — Mac OS X 10.0
This class encapsulates the data related to all events in a Cocoa
application. NSEvent objects are dispatched by
NSApplication to the appropriate receiver using
the method sendEvent:. Both key and mouse events
are represented by NSEvent. All classes that wish
to respond to events must inherit from
NSResponder.
|
![]()
|
@interface NSEvent : NSObject <NSCoding, NSCopying>
|
// Class Methods
|
+ (NSEvent *)enterExitEventWithType:(NSEventType)type location:(NSPoint)location modifierFlags:(unsigned int)flags timestamp:(NSTimeInterval)time windowNumber:(int)wNum context:(NSGraphicsContext*)context eventNumber:(int)eNum trackingNumber:(int)tNum userData:(void *)data; |
+ (NSEvent *)keyEventWithType:(NSEventType)type location:(NSPoint)location modifierFlags:(unsigned int)flags timestamp:(NSTimeInterval)time windowNumber:(int)wNum context:(NSGraphicsContext*)context characters:(NSString *)keys charactersIgnoringModifiers:(NSString *)ukeys |
+ (NSEvent *)mouseEventWithType:(NSEventType)type location:(NSPoint)location modifierFlags:(unsigned int)flags timestamp:(NSTimeInterval)time windowNumber:(int)wNum context:(NSGraphicsContext*)context eventNumber:(int)eNum clickCount:(int)cNum pressure:(float)pressure; |
+ (NSPoint)mouseLocation;
|
+ (NSEvent *)otherEventWithType:(NSEventType)type location:(NSPoint)location modifierFlags:(unsigned int)flags timestamp:(NSTimeInterval) ... |
Read now
Unlock full access