Returns a new NSEvent object describing a mouse-down, -up, -moved, or -dragged event.
Original signature is '+ (NSEvent *)mouseEventWithType:(NSEventType)type location:(NSPoint)location modifierFlags:(NSUInteger)flags timestamp:(NSTimeInterval)time windowNumber:(NSInteger)windowNum context:(NSGraphicsContext *)context eventNumber:(NSInteger)eventNumber clickCount:(NSInteger)clickNumber pressure:(float)pressure'
Available in Mac OS X v10.0 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static NSEvent MouseEventWithTypeLocationModifierFlagsTimestampWindowNumberContextEventNumberClickCountPressure( NSEventType type, NSPoint location, NSUInteger flags, double time, NSInteger windowNum, NSGraphicsContext context, NSInteger eventNumber, NSInteger clickNumber, float pressure )
Public Shared Function MouseEventWithTypeLocationModifierFlagsTimestampWindowNumberContextEventNumberClickCountPressure ( _ type As NSEventType, _ location As NSPoint, _ flags As NSUInteger, _ time As Double, _ windowNum As NSInteger, _ context As NSGraphicsContext, _ eventNumber As NSInteger, _ clickNumber As NSInteger, _ pressure As Single _ ) As NSEvent
public: static NSEvent^ MouseEventWithTypeLocationModifierFlagsTimestampWindowNumberContextEventNumberClickCountPressure( NSEventType type, NSPoint location, NSUInteger flags, double time, NSInteger windowNum, NSGraphicsContext^ context, NSInteger eventNumber, NSInteger clickNumber, float pressure )
Parameters
- type (NSEventType)
- One of the modifier key masks described in “Constants,” or an NSInternalInconsistencyException is raised.
- location (NSPoint)
- The cursor location in the base coordinate system of the window specified by windowNum.
- flags (NSUInteger)
- An integer bit field containing any of the modifier key masks described in “Constants,” combined using the C bitwise OR operator.
- time (Double)
- The time the event occurred in seconds since system startup.
- windowNum (NSInteger)
- An integer that identifies the window device associated with the event, which is associated with the NSWindow that will receive the event.
- context (NSGraphicsContext)
- The display graphics context of the event.
- eventNumber (NSInteger)
- An identifier for the new event. It’s normally taken from a counter for mouse events, which continually increases as the application runs.
- clickNumber (NSInteger)
- The number of mouse clicks associated with the mouse event.
- pressure (Single)
- A value from 0.0 to 1.0 indicating the pressure applied to the input device on a mouse event, used for an appropriate device such as a graphics tablet. For devices that aren’t pressure-sensitive, the value should be either 0.0 or 1.0.
Return Value
The created NSEvent instance or nil if the instance could not be created.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)