Skip to content
Browse files

Merge pull request #35 from github/rename-touch-to-mouse

Rename all 'touch' references to 'mouse' references, in keeping with OS ...
  • Loading branch information...
2 parents 5045e66 + 8e8357d commit e8ebb200e3f318637fa8ae8171e1c460020d9214 @joshaber joshaber committed Jul 31, 2012
Showing with 12 additions and 12 deletions.
  1. +1 −1 lib/UIKit/TUIControl+Accessibility.m
  2. +5 −5 lib/UIKit/TUIControl.h
  3. +4 −4 lib/UIKit/TUIControl.m
  4. +1 −1 lib/UIKit/TUITextField.m
  5. +1 −1 lib/UIKit/TUIView.h
View
2 lib/UIKit/TUIControl+Accessibility.m
@@ -31,7 +31,7 @@ - (NSString *)accessibilityActionDescription:(NSString *)action
- (void)accessibilityPerformAction:(NSString *)action
{
if([action isEqualToString:NSAccessibilityPressAction]) {
- [self sendActionsForControlEvents:TUIControlEventAllTouchEvents];
+ [self sendActionsForControlEvents:TUIControlEventAllMouseEvents];
}
}
View
10 lib/UIKit/TUIControl.h
@@ -17,13 +17,13 @@
#import "TUIView.h"
enum {
- TUIControlEventTouchDown = 1 << 0,
- TUIControlEventTouchDownRepeat = 1 << 1,
- TUIControlEventTouchUpInside = 1 << 6,
- TUIControlEventTouchUpOutside = 1 << 7,
+ TUIControlEventMouseDown = 1 << 0,
+ TUIControlEventMouseDownRepeat = 1 << 1,
+ TUIControlEventMouseUpInside = 1 << 6,
+ TUIControlEventMouseUpOutside = 1 << 7,
TUIControlEventValueChanged = 1 << 12,
TUIControlEventEditingDidEndOnExit = 1 << 19,
- TUIControlEventAllTouchEvents = 0x00000FFF,
+ TUIControlEventAllMouseEvents = 0x00000FFF,
TUIControlEventAllEditingEvents = 0x000F0000,
TUIControlEventApplicationReserved = 0x0F000000,
TUIControlEventSystemReserved = 0xF0000000,
View
8 lib/UIKit/TUIControl.m
@@ -134,9 +134,9 @@ - (void)mouseDown:(NSEvent *)event
// handle touch down
if([event clickCount] < 2) {
- [self sendActionsForControlEvents:TUIControlEventTouchDown];
+ [self sendActionsForControlEvents:TUIControlEventMouseDown];
} else {
- [self sendActionsForControlEvents:TUIControlEventTouchDownRepeat];
+ [self sendActionsForControlEvents:TUIControlEventMouseDownRepeat];
}
// needs display
@@ -154,10 +154,10 @@ - (void)mouseUp:(NSEvent *)event
if([self eventInside:event]) {
if(![self didDrag]) {
- [self sendActionsForControlEvents:TUIControlEventTouchUpInside];
+ [self sendActionsForControlEvents:TUIControlEventMouseUpInside];
}
} else {
- [self sendActionsForControlEvents:TUIControlEventTouchUpOutside];
+ [self sendActionsForControlEvents:TUIControlEventMouseUpOutside];
}
// needs display
View
2 lib/UIKit/TUITextField.m
@@ -79,7 +79,7 @@ - (TUIButton *)clearButton
{
TUIButton *b = [TUIButton button];
[b setImage:[NSImage imageNamed:@"clear-button.png"] forState:TUIControlStateNormal];
- [b addTarget:self action:@selector(clear:) forControlEvents:TUIControlEventTouchUpInside];
+ [b addTarget:self action:@selector(clear:) forControlEvents:TUIControlEventMouseUpInside];
return b;
}
View
2 lib/UIKit/TUIView.h
@@ -148,7 +148,7 @@ extern CGRect(^TUIViewCenteredLayout)(TUIView*);
- (id)initWithFrame:(CGRect)frame;
/**
- Default is YES. if set to NO, user events (touch, keys) are ignored and removed from the event queue.
+ Default is YES. if set to NO, user events (clicks, keys) are ignored and removed from the event queue.
*/
@property (nonatomic,getter=isUserInteractionEnabled) BOOL userInteractionEnabled;

0 comments on commit e8ebb20

Please sign in to comment.
Something went wrong with that request. Please try again.