mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Change NSEvent to CGFloat, NSUInteger and NSInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36121 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5b3ec6a678
commit
d4f80c2258
15 changed files with 166 additions and 150 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
|||
2013-02-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSEvent.h
|
||||
* Source/NSEvent.m
|
||||
* Source/GSDragView.m
|
||||
* Source/GSTitleView.m
|
||||
* Source/NSComboBoxCell.m
|
||||
* Source/NSInputManager.m
|
||||
* Source/NSMatrix.m
|
||||
* Source/NSMenuView.m
|
||||
* Source/NSRulerMarker.m
|
||||
* Source/NSScroller.m
|
||||
* Source/NSSlider.m
|
||||
* Source/NSSliderCell.m
|
||||
* Source/NSTableHeaderView.m
|
||||
* Source/NSTableView.m:
|
||||
Change NSEvent to CGFloat, NSUInteger and NSInteger.
|
||||
|
||||
2013-02-10 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSSplitView.h
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
NSScrollWheel
|
||||
</example>
|
||||
*/
|
||||
typedef enum _NSEventType {
|
||||
enum _NSEventType {
|
||||
// Note - order IS significant as ranges of values
|
||||
// are used for testing for valid event types.
|
||||
NSLeftMouseDown = 1,
|
||||
|
@ -99,7 +99,8 @@ typedef enum _NSEventType {
|
|||
NSOtherMouseDown = 25,
|
||||
NSOtherMouseUp,
|
||||
NSOtherMouseDragged
|
||||
} NSEventType;
|
||||
};
|
||||
typedef NSUInteger NSEventType;
|
||||
|
||||
enum {
|
||||
NSLeftMouseDownMask = (1 << NSLeftMouseDown),
|
||||
|
@ -161,8 +162,10 @@ enum {
|
|||
* Convert an NSEvent Type to it's respective Event Mask
|
||||
*/
|
||||
// FIXME: Should we use the inline trick from NSGeometry.h here?
|
||||
static inline
|
||||
unsigned int
|
||||
static inline NSUInteger
|
||||
NSEventMaskFromType(NSEventType type);
|
||||
|
||||
static inline NSUInteger
|
||||
NSEventMaskFromType(NSEventType type)
|
||||
{
|
||||
return (1 << type);
|
||||
|
@ -225,21 +228,21 @@ enum
|
|||
{
|
||||
NSEventType event_type;
|
||||
NSPoint location_point;
|
||||
unsigned int modifier_flags;
|
||||
NSUInteger modifier_flags;
|
||||
NSTimeInterval event_time;
|
||||
int window_num;
|
||||
NSGraphicsContext *event_context;
|
||||
NSInteger window_num;
|
||||
NSGraphicsContext *event_context;
|
||||
union _MB_event_data
|
||||
{
|
||||
struct
|
||||
{
|
||||
int event_num;
|
||||
short click;
|
||||
short button;
|
||||
NSInteger event_num;
|
||||
NSInteger click;
|
||||
NSInteger button;
|
||||
float pressure;
|
||||
float deltaX;
|
||||
float deltaY;
|
||||
float deltaZ;
|
||||
CGFloat deltaX;
|
||||
CGFloat deltaY;
|
||||
CGFloat deltaZ;
|
||||
} mouse;
|
||||
struct
|
||||
{
|
||||
|
@ -250,34 +253,34 @@ enum
|
|||
} key;
|
||||
struct
|
||||
{
|
||||
int event_num;
|
||||
int tracking_num;
|
||||
NSInteger event_num;
|
||||
NSInteger tracking_num;
|
||||
void *user_data;
|
||||
} tracking;
|
||||
struct
|
||||
{
|
||||
short sub_type;
|
||||
int data1;
|
||||
int data2;
|
||||
NSInteger data1;
|
||||
NSInteger data2;
|
||||
} misc;
|
||||
} event_data;
|
||||
}
|
||||
|
||||
+ (NSEvent*) enterExitEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
trackingNumber: (int)trackingNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
trackingNumber: (NSInteger)trackingNum
|
||||
userData: (void *)userData;
|
||||
|
||||
+ (NSEvent*) keyEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
characters: (NSString *)keys
|
||||
charactersIgnoringModifiers: (NSString *)ukeys
|
||||
|
@ -286,41 +289,41 @@ enum
|
|||
|
||||
+ (NSEvent*) mouseEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
clickCount: (int)clickNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
clickCount: (NSInteger)clickNum
|
||||
pressure: (float)pressureValue;
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
+ (NSEvent*) mouseEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
clickCount: (int)clickNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
clickCount: (NSInteger)clickNum
|
||||
pressure: (float)pressureValue
|
||||
buttonNumber: (int)buttonNum
|
||||
deltaX: (float)deltaX
|
||||
deltaY: (float)deltaY
|
||||
deltaZ: (float)deltaZ;
|
||||
buttonNumber: (NSInteger)buttonNum
|
||||
deltaX: (CGFloat)deltaX
|
||||
deltaY: (CGFloat)deltaY
|
||||
deltaZ: (CGFloat)deltaZ;
|
||||
#endif
|
||||
|
||||
+ (NSPoint)mouseLocation;
|
||||
|
||||
+ (NSEvent*) otherEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
subtype: (short)subType
|
||||
data1: (int)data1
|
||||
data2: (int)data2;
|
||||
data1: (NSInteger)data1
|
||||
data2: (NSInteger)data2;
|
||||
|
||||
+ (void) startPeriodicEventsAfterDelay: (NSTimeInterval)delaySeconds
|
||||
withPeriod: (NSTimeInterval)periodSeconds;
|
||||
|
@ -328,53 +331,53 @@ enum
|
|||
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (int) buttonNumber;
|
||||
- (NSInteger) buttonNumber;
|
||||
#endif
|
||||
- (NSString *) characters;
|
||||
- (NSString *) charactersIgnoringModifiers;
|
||||
- (int) clickCount;
|
||||
- (NSInteger) clickCount;
|
||||
- (NSGraphicsContext*) context;
|
||||
- (int) data1;
|
||||
- (int) data2;
|
||||
- (NSInteger) data1;
|
||||
- (NSInteger) data2;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (float)deltaX;
|
||||
- (float)deltaY;
|
||||
- (float)deltaZ;
|
||||
- (CGFloat)deltaX;
|
||||
- (CGFloat)deltaY;
|
||||
- (CGFloat)deltaZ;
|
||||
#endif
|
||||
- (int) eventNumber;
|
||||
- (NSInteger) eventNumber;
|
||||
- (BOOL) isARepeat;
|
||||
- (unsigned short) keyCode;
|
||||
- (NSPoint) locationInWindow;
|
||||
- (unsigned int) modifierFlags;
|
||||
- (NSUInteger) modifierFlags;
|
||||
- (float) pressure;
|
||||
- (short) subtype;
|
||||
- (NSTimeInterval) timestamp;
|
||||
- (int) trackingNumber;
|
||||
- (NSInteger) trackingNumber;
|
||||
- (NSEventType) type;
|
||||
- (void *) userData;
|
||||
- (NSWindow *) window;
|
||||
- (int) windowNumber;
|
||||
- (NSInteger) windowNumber;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (int) absoluteX;
|
||||
- (int) absoluteY;
|
||||
- (int) absoluteZ;
|
||||
- (unsigned int) buttonMask;
|
||||
- (unsigned int) capabilityMask;
|
||||
- (unsigned int) deviceID;
|
||||
- (NSInteger) absoluteX;
|
||||
- (NSInteger) absoluteY;
|
||||
- (NSInteger) absoluteZ;
|
||||
- (NSUInteger) buttonMask;
|
||||
- (NSUInteger) capabilityMask;
|
||||
- (NSUInteger) deviceID;
|
||||
- (BOOL) isEnteringProximity;
|
||||
- (unsigned int) pointingDeviceID;
|
||||
- (unsigned int) pointingDeviceSerialNumber;
|
||||
- (NSUInteger) pointingDeviceID;
|
||||
- (NSUInteger) pointingDeviceSerialNumber;
|
||||
- (NSPointingDeviceType) pointingDeviceType;
|
||||
- (float) rotation;
|
||||
- (unsigned int) systemTabletID;
|
||||
- (unsigned int) tabletID;
|
||||
- (NSUInteger) systemTabletID;
|
||||
- (NSUInteger) tabletID;
|
||||
- (float) tangentialPressure;
|
||||
- (NSPoint) tilt;
|
||||
- (unsigned long long) uniqueID;
|
||||
- (id) vendorDefined;
|
||||
- (unsigned int) vendorID;
|
||||
- (unsigned int) vendorPointingDeviceType;
|
||||
- (NSUInteger) vendorID;
|
||||
- (NSUInteger) vendorPointingDeviceType;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
@ -454,11 +457,6 @@ enum {
|
|||
NSModeSwitchFunctionKey = 0xF747
|
||||
};
|
||||
|
||||
/*
|
||||
* Convert an Event Mask Type to a Mask
|
||||
*/
|
||||
unsigned int NSEventMaskFromType(NSEventType type);
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
typedef enum {
|
||||
GSAppKitWindowMoved = 1,
|
||||
|
|
|
@ -359,7 +359,7 @@ static GSDragView *sharedDragView = nil;
|
|||
- (NSWindow*) windowAcceptingDnDunder: (NSPoint)mouseLocation
|
||||
windowRef: (int*)mouseWindowRef
|
||||
{
|
||||
int win;
|
||||
NSInteger win;
|
||||
|
||||
*mouseWindowRef = 0;
|
||||
win = [GSServerForWindow(_window) findWindowAt: mouseLocation
|
||||
|
@ -389,7 +389,7 @@ static GSDragView *sharedDragView = nil;
|
|||
mousePosition: (NSPoint)mPoint
|
||||
imagePosition: (NSPoint)iPoint
|
||||
{
|
||||
NSSize imageSize;
|
||||
NSSize imageSize;
|
||||
|
||||
if (anImage == nil)
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ static GSDragView *sharedDragView = nil;
|
|||
*/
|
||||
- (BOOL) _updateOperationMask: (NSEvent*) theEvent
|
||||
{
|
||||
unsigned int mod = [theEvent modifierFlags];
|
||||
NSUInteger mod = [theEvent modifierFlags];
|
||||
NSDragOperation oldOperationMask = operationMask;
|
||||
|
||||
if (operationMask == NSDragOperationIgnoresModifiers)
|
||||
|
@ -580,7 +580,7 @@ static GSDragView *sharedDragView = nil;
|
|||
NSEvent *e;
|
||||
NSGraphicsContext *context = GSCurrentContext();
|
||||
// FIXME: Should store this once
|
||||
int dragWindowRef = (int)(intptr_t)[GSServerForWindow(_window) windowDevice: [_window windowNumber]];
|
||||
NSInteger dragWindowRef = (NSInteger)(intptr_t)[GSServerForWindow(_window) windowDevice: [_window windowNumber]];
|
||||
|
||||
eventLocation = [dWindow convertScreenToBase: eventLocation];
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
|
@ -623,7 +623,7 @@ static GSDragView *sharedDragView = nil;
|
|||
// Use eWindow for coordination transformation
|
||||
NSWindow *eWindow = [theEvent window];
|
||||
NSDate *theDistantFuture = [NSDate distantFuture];
|
||||
unsigned int eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
NSUInteger eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
| NSLeftMouseDraggedMask | NSMouseMovedMask
|
||||
| NSPeriodicMask | NSAppKitDefinedMask | NSFlagsChangedMask;
|
||||
NSPoint startPoint;
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
{
|
||||
NSPoint lastLocation;
|
||||
NSPoint location;
|
||||
unsigned eventMask = NSLeftMouseUpMask | NSPeriodicMask;
|
||||
NSUInteger eventMask = NSLeftMouseUpMask | NSPeriodicMask;
|
||||
BOOL done = NO;
|
||||
BOOL moved = NO;
|
||||
NSDate *theDistantFuture = [NSDate distantFuture];
|
||||
|
|
|
@ -1471,7 +1471,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
{
|
||||
NSEvent *e = theEvent;
|
||||
BOOL isMouseUp = NO;
|
||||
unsigned int eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
NSUInteger eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
| NSMouseMovedMask | NSLeftMouseDraggedMask | NSOtherMouseDraggedMask
|
||||
| NSRightMouseDraggedMask;
|
||||
NSPoint location;
|
||||
|
|
|
@ -85,12 +85,12 @@ static Class eventClass;
|
|||
*/
|
||||
+ (NSEvent*) enterExitEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
trackingNumber: (int)trackingNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
trackingNumber: (NSInteger)trackingNum
|
||||
userData: (void *)userData
|
||||
{
|
||||
NSEvent *e;
|
||||
|
@ -121,9 +121,9 @@ static Class eventClass;
|
|||
|
||||
+ (NSEvent*) keyEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext *)context
|
||||
characters: (NSString *)keys
|
||||
charactersIgnoringModifiers: (NSString *)ukeys
|
||||
|
@ -159,12 +159,12 @@ static Class eventClass;
|
|||
|
||||
+ (NSEvent*) mouseEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
clickCount: (int)clickNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
clickCount: (NSInteger)clickNum
|
||||
pressure: (float)pressureValue
|
||||
{
|
||||
NSEvent *e;
|
||||
|
@ -193,17 +193,17 @@ static Class eventClass;
|
|||
|
||||
+ (NSEvent*) mouseEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
eventNumber: (int)eventNum
|
||||
clickCount: (int)clickNum
|
||||
eventNumber: (NSInteger)eventNum
|
||||
clickCount: (NSInteger)clickNum
|
||||
pressure: (float)pressureValue
|
||||
buttonNumber: (int)buttonNum
|
||||
deltaX: (float)deltaX
|
||||
deltaY: (float)deltaY
|
||||
deltaZ: (float)deltaZ
|
||||
buttonNumber: (NSInteger)buttonNum
|
||||
deltaX: (CGFloat)deltaX
|
||||
deltaY: (CGFloat)deltaY
|
||||
deltaZ: (CGFloat)deltaZ
|
||||
{
|
||||
NSEvent *e;
|
||||
|
||||
|
@ -243,13 +243,13 @@ static Class eventClass;
|
|||
|
||||
+ (NSEvent*) otherEventWithType: (NSEventType)type
|
||||
location: (NSPoint)location
|
||||
modifierFlags: (unsigned int)flags
|
||||
modifierFlags: (NSUInteger)flags
|
||||
timestamp: (NSTimeInterval)time
|
||||
windowNumber: (int)windowNum
|
||||
windowNumber: (NSInteger)windowNum
|
||||
context: (NSGraphicsContext*)context
|
||||
subtype: (short)subType
|
||||
data1: (int)data1
|
||||
data2: (int)data2
|
||||
data1: (NSInteger)data1
|
||||
data2: (NSInteger)data2
|
||||
{
|
||||
NSEvent *e;
|
||||
|
||||
|
@ -381,7 +381,7 @@ static Class eventClass;
|
|||
* more buttons, and you want to know which button an 'other' mouse
|
||||
* event refers to.
|
||||
*/
|
||||
- (int) buttonNumber
|
||||
- (NSInteger) buttonNumber
|
||||
{
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseEventMask))
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ static Class eventClass;
|
|||
* <br />Raises an NSInternalInconsistencyException if applied to any
|
||||
* other type of event.
|
||||
*/
|
||||
- (int) clickCount
|
||||
- (NSInteger) clickCount
|
||||
{
|
||||
/* Make sure it is one of the right event types */
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseEventMask))
|
||||
|
@ -473,7 +473,7 @@ static Class eventClass;
|
|||
* of type NSAppKitDefined, NSSystemDefined, NSApplicationDefined,
|
||||
* or NSPeriodic
|
||||
*/
|
||||
- (int) data1
|
||||
- (NSInteger) data1
|
||||
{
|
||||
if (event_type < NSAppKitDefined || event_type > NSPeriodic)
|
||||
{
|
||||
|
@ -489,7 +489,7 @@ static Class eventClass;
|
|||
* of type NSAppKitDefined, NSSystemDefined, NSApplicationDefined,
|
||||
* or NSPeriodic
|
||||
*/
|
||||
- (int) data2
|
||||
- (NSInteger) data2
|
||||
{
|
||||
if (event_type < NSAppKitDefined || event_type > NSPeriodic)
|
||||
{
|
||||
|
@ -522,7 +522,7 @@ static Class eventClass;
|
|||
NSScrollWheel events, otherwise it will return 0.
|
||||
</p>
|
||||
*/
|
||||
- (float) deltaX
|
||||
- (CGFloat) deltaX
|
||||
{
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseMovedEventMask))
|
||||
{
|
||||
|
@ -540,7 +540,7 @@ static Class eventClass;
|
|||
NSScrollWheel events, otherwise it will return 0.
|
||||
</p>
|
||||
*/
|
||||
- (float) deltaY
|
||||
- (CGFloat) deltaY
|
||||
{
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseMovedEventMask))
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ static Class eventClass;
|
|||
The value returned is 0.0 in most cases.
|
||||
</p>
|
||||
*/
|
||||
- (float) deltaZ
|
||||
- (CGFloat) deltaZ
|
||||
{
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseMovedEventMask))
|
||||
{
|
||||
|
@ -763,7 +763,7 @@ static const char *eventTypes[] = {
|
|||
* <br />Raises an NSInternalInconsistencyException if applied to any
|
||||
* other type of event.
|
||||
*/
|
||||
- (int) eventNumber
|
||||
- (NSInteger) eventNumber
|
||||
{
|
||||
/* Make sure it is one of the right event types */
|
||||
if (!(NSEventMaskFromType(event_type) & GSMouseEventMask) &&
|
||||
|
@ -922,7 +922,7 @@ static const char *eventTypes[] = {
|
|||
/**
|
||||
* Returns the modifier flag bits associated with the event.
|
||||
*/
|
||||
- (unsigned int) modifierFlags
|
||||
- (NSUInteger) modifierFlags
|
||||
{
|
||||
return modifier_flags;
|
||||
}
|
||||
|
@ -987,7 +987,7 @@ static const char *eventTypes[] = {
|
|||
* <br />Raises an NSInternalInconsistencyException if applied to any
|
||||
* other type of event than a mouse entered or exited event.
|
||||
*/
|
||||
- (int) trackingNumber
|
||||
- (NSInteger) trackingNumber
|
||||
{
|
||||
if (event_type != NSMouseEntered && event_type != NSMouseExited
|
||||
&& event_type != NSCursorUpdate)
|
||||
|
@ -1038,7 +1038,7 @@ static const char *eventTypes[] = {
|
|||
* <br />Periodic events have no associated window, and you should not call
|
||||
* this method for those events.
|
||||
*/
|
||||
- (int) windowNumber
|
||||
- (NSInteger) windowNumber
|
||||
{
|
||||
return window_num;
|
||||
}
|
||||
|
@ -1046,37 +1046,37 @@ static const char *eventTypes[] = {
|
|||
/*
|
||||
* Methods for tablet events
|
||||
*/
|
||||
- (int) absoluteX
|
||||
- (NSInteger) absoluteX
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (int) absoluteY
|
||||
- (NSInteger) absoluteY
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (int) absoluteZ
|
||||
- (NSInteger) absoluteZ
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) buttonMask
|
||||
- (NSUInteger) buttonMask
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) capabilityMask
|
||||
- (NSUInteger) capabilityMask
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) deviceID
|
||||
- (NSUInteger) deviceID
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
|
@ -1088,13 +1088,13 @@ static const char *eventTypes[] = {
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (unsigned int) pointingDeviceID
|
||||
- (NSUInteger) pointingDeviceID
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) pointingDeviceSerialNumber
|
||||
- (NSUInteger) pointingDeviceSerialNumber
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
|
@ -1112,13 +1112,13 @@ static const char *eventTypes[] = {
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
- (unsigned int) systemTabletID
|
||||
- (NSUInteger) systemTabletID
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) tabletID
|
||||
- (NSUInteger) tabletID
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
|
@ -1148,13 +1148,13 @@ static const char *eventTypes[] = {
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (unsigned int) vendorID
|
||||
- (NSUInteger) vendorID
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int) vendorPointingDeviceType
|
||||
- (NSUInteger) vendorPointingDeviceType
|
||||
{
|
||||
// FIXME
|
||||
return 0;
|
||||
|
|
|
@ -496,7 +496,7 @@ static NSInputManager *currentInputManager = nil;
|
|||
NSString *characters = [theEvent characters];
|
||||
NSString *unmodifiedCharacters = [theEvent charactersIgnoringModifiers];
|
||||
unichar character = 0;
|
||||
unsigned flags = [theEvent modifierFlags] & (NSShiftKeyMask
|
||||
NSUInteger flags = [theEvent modifierFlags] & (NSShiftKeyMask
|
||||
| NSAlternateKeyMask
|
||||
| NSControlKeyMask
|
||||
| NSNumericPadKeyMask);
|
||||
|
|
|
@ -198,7 +198,7 @@ enum {
|
|||
|
||||
/* Class variables */
|
||||
static Class defaultCellClass = nil;
|
||||
static int mouseDownFlags = 0;
|
||||
static NSUInteger mouseDownFlags = 0;
|
||||
static SEL copySel;
|
||||
static SEL initSel;
|
||||
static SEL allocSel;
|
||||
|
@ -2248,7 +2248,7 @@ static SEL getSel;
|
|||
NSPoint mouseLocation;
|
||||
NSRect mouseCellFrame;
|
||||
NSCell *originallySelectedCell = _selectedCell;
|
||||
unsigned eventMask = NSLeftMouseUpMask | NSLeftMouseDownMask
|
||||
NSUInteger eventMask = NSLeftMouseUpMask | NSLeftMouseDownMask
|
||||
| NSMouseMovedMask | NSLeftMouseDraggedMask;
|
||||
|
||||
while (!mouseUp)
|
||||
|
@ -2368,7 +2368,7 @@ static SEL getSel;
|
|||
id mouseCell, previousCell = nil;
|
||||
BOOL onCell;
|
||||
BOOL isSelecting = YES;
|
||||
unsigned eventMask = NSLeftMouseUpMask | NSLeftMouseDownMask
|
||||
NSUInteger eventMask = NSLeftMouseUpMask | NSLeftMouseDownMask
|
||||
| NSMouseMovedMask | NSLeftMouseDraggedMask
|
||||
| NSPeriodicMask;
|
||||
|
||||
|
@ -2592,10 +2592,10 @@ static SEL getSel;
|
|||
*/
|
||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||
{
|
||||
NSString *keyEquivalent = [theEvent charactersIgnoringModifiers];
|
||||
unsigned int modifiers = [theEvent modifierFlags];
|
||||
int i;
|
||||
unsigned int relevantModifiersMask = NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask;
|
||||
NSString *keyEquivalent = [theEvent charactersIgnoringModifiers];
|
||||
NSUInteger modifiers = [theEvent modifierFlags];
|
||||
int i;
|
||||
NSUInteger relevantModifiersMask = NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask;
|
||||
|
||||
/* Take shift key into account only for control keys and arrow and function keys */
|
||||
if ((modifiers & NSFunctionKeyMask)
|
||||
|
@ -2607,19 +2607,19 @@ static SEL getSel;
|
|||
|
||||
for (i = 0; i < _numRows; i++)
|
||||
{
|
||||
int j;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < _numCols; j++)
|
||||
{
|
||||
NSCell *aCell = _cells[i][j];
|
||||
unsigned int mask = 0;
|
||||
NSCell *aCell = _cells[i][j];
|
||||
NSUInteger mask = 0;
|
||||
|
||||
if ([aCell respondsToSelector:@selector(keyEquivalentModifierMask)])
|
||||
mask = [(NSButtonCell *)aCell keyEquivalentModifierMask];
|
||||
if ([aCell respondsToSelector:@selector(keyEquivalentModifierMask)])
|
||||
mask = [(NSButtonCell *)aCell keyEquivalentModifierMask];
|
||||
|
||||
if ([aCell isEnabled]
|
||||
&& [[aCell keyEquivalent] isEqualToString: keyEquivalent]
|
||||
&& (mask & relevantModifiersMask) == (modifiers & relevantModifiersMask))
|
||||
&& (mask & relevantModifiersMask) == (modifiers & relevantModifiersMask))
|
||||
{
|
||||
NSCell *oldSelectedCell = _selectedCell;
|
||||
int oldSelectedRow = _selectedRow;
|
||||
|
@ -3685,7 +3685,7 @@ static SEL getSel;
|
|||
- (void) keyDown: (NSEvent *)theEvent
|
||||
{
|
||||
NSString *characters = [theEvent characters];
|
||||
unsigned modifiers = [theEvent modifierFlags];
|
||||
NSUInteger modifiers = [theEvent modifierFlags];
|
||||
unichar character = 0;
|
||||
|
||||
if ([characters length] > 0)
|
||||
|
|
|
@ -1445,7 +1445,7 @@ static NSMapTable *viewInfo = 0;
|
|||
- (BOOL) _trackWithEvent: (NSEvent*)event
|
||||
startingMenuView: (NSMenuView*)mainWindowMenuView
|
||||
{
|
||||
unsigned eventMask = NSPeriodicMask;
|
||||
NSUInteger eventMask = NSPeriodicMask;
|
||||
NSDate *theDistantFuture = [NSDate distantFuture];
|
||||
NSPoint lastLocation = {0,0};
|
||||
BOOL justAttachedNewSubmenu = NO;
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
{
|
||||
NSView *client = [_rulerView clientView];
|
||||
NSEvent *newEvent = nil;
|
||||
int eventMask = NSLeftMouseDraggedMask | NSLeftMouseUpMask;
|
||||
NSUInteger eventMask = NSLeftMouseDraggedMask | NSLeftMouseUpMask;
|
||||
BOOL isFar = NO;
|
||||
BOOL askedCanRemove = NO;
|
||||
BOOL canRemove = NO;
|
||||
|
|
|
@ -849,7 +849,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
|
||||
- (void) trackKnob: (NSEvent*)theEvent
|
||||
{
|
||||
unsigned int eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
NSUInteger eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
| NSLeftMouseDraggedMask | NSFlagsChangedMask;
|
||||
NSPoint point;
|
||||
float lastPosition;
|
||||
|
@ -860,7 +860,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
NSEvent *presentEvent = theEvent;
|
||||
NSEventType eventType = [theEvent type];
|
||||
NSRect knobRect;
|
||||
unsigned flags = [theEvent modifierFlags];
|
||||
NSUInteger flags = [theEvent modifierFlags];
|
||||
|
||||
knobRect = [self rectForPart: NSScrollerKnob];
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ static Class cellClass;
|
|||
double min = [_cell minValue];
|
||||
double max = [_cell maxValue];
|
||||
double altValue = [_cell altIncrementValue];
|
||||
int alt_down = ([ev modifierFlags] & NSAlternateKeyMask);
|
||||
NSUInteger alt_down = ([ev modifierFlags] & NSAlternateKeyMask);
|
||||
BOOL only_ticks = [_cell allowsTickMarkValuesOnly];
|
||||
BOOL valueChanged = NO;
|
||||
double diff;
|
||||
|
|
|
@ -811,7 +811,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
|
|||
float interval;
|
||||
id target = [self target];
|
||||
SEL action = [self action];
|
||||
unsigned int eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
NSUInteger eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
| NSLeftMouseDraggedMask | NSMouseMovedMask;
|
||||
NSEventType eventType = [theEvent type];
|
||||
BOOL isContinuous = [self isContinuous];
|
||||
|
|
|
@ -274,14 +274,14 @@
|
|||
float p;
|
||||
NSEvent *e;
|
||||
BOOL lit;
|
||||
unsigned int eventMask;
|
||||
NSUInteger eventMask;
|
||||
BOOL liveResize;
|
||||
|
||||
/* Width of the highlighted area. */
|
||||
const float divWidth = 4;
|
||||
/* Coordinates of visible part of table */
|
||||
float minVisCoord = NSMinX([self visibleRect]);
|
||||
float maxVisCoord = NSMaxX([self visibleRect]);
|
||||
CGFloat minVisCoord = NSMinX([self visibleRect]);
|
||||
CGFloat maxVisCoord = NSMaxX([self visibleRect]);
|
||||
|
||||
NSPoint unconverted = [event locationInWindow];
|
||||
NSArray *columns = [_tableView tableColumns];
|
||||
|
@ -463,10 +463,10 @@
|
|||
float *_cO;
|
||||
float *_cO_minus1;
|
||||
int numberOfColumns = [_tableView numberOfColumns];
|
||||
unsigned int eventMask = (NSLeftMouseUpMask
|
||||
NSUInteger eventMask = (NSLeftMouseUpMask
|
||||
| NSLeftMouseDraggedMask
|
||||
| NSPeriodicMask);
|
||||
unsigned int modifiers = [event modifierFlags];
|
||||
NSUInteger modifiers = [event modifierFlags];
|
||||
NSEvent *e;
|
||||
NSDate *distantFuture = [NSDate distantFuture];
|
||||
NSRect visibleRect = [self visibleRect];
|
||||
|
@ -719,7 +719,7 @@
|
|||
{
|
||||
NSRect cellFrame = [self headerRectOfColumn: columnIndex];
|
||||
NSApplication *theApp = [NSApplication sharedApplication];
|
||||
unsigned int modifiers = [event modifierFlags];
|
||||
NSUInteger modifiers = [event modifierFlags];
|
||||
NSPoint location = [event locationInWindow];
|
||||
NSPoint point = [self convertPoint: location fromView: nil];
|
||||
|
||||
|
|
|
@ -3616,8 +3616,8 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
|
|||
} while (0);
|
||||
|
||||
// Selection
|
||||
unsigned int modifiers = [theEvent modifierFlags];
|
||||
unsigned int eventMask = (NSLeftMouseUpMask
|
||||
NSUInteger modifiers = [theEvent modifierFlags];
|
||||
NSUInteger eventMask = (NSLeftMouseUpMask
|
||||
| NSLeftMouseDownMask
|
||||
| NSLeftMouseDraggedMask
|
||||
| NSPeriodicMask);
|
||||
|
@ -3635,8 +3635,8 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
|
|||
BOOL dragOperationPossible = [self _isDraggingSource];
|
||||
NSRect visibleRect = [self convertRect: [self visibleRect]
|
||||
toView: nil];
|
||||
float minYVisible = NSMinY (visibleRect);
|
||||
float maxYVisible = NSMaxY (visibleRect);
|
||||
CGFloat minYVisible = NSMinY (visibleRect);
|
||||
CGFloat maxYVisible = NSMaxY (visibleRect);
|
||||
float oldPeriod = 0;
|
||||
int originalRow = _clickedRow;
|
||||
int oldRow = -1;
|
||||
|
|
Loading…
Reference in a new issue