projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up some comments.
[enjoyable.git]
/
TargetMouseScroll.m
diff --git
a/TargetMouseScroll.m
b/TargetMouseScroll.m
index
4d6f409
..
d840ba1
100644
(file)
--- a/
TargetMouseScroll.m
+++ b/
TargetMouseScroll.m
@@
-3,21
+3,18
@@
// Enjoy
//
// Created by Yifeng Huang on 7/28/12.
// Enjoy
//
// Created by Yifeng Huang on 7/28/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "TargetMouseScroll.h"
@implementation TargetMouseScroll
//
#import "TargetMouseScroll.h"
@implementation TargetMouseScroll
-@synthesize amount;
-
+ (NSString *)serializationCode {
return @"mscroll";
}
- (NSDictionary *)serialize {
+ (NSString *)serializationCode {
return @"mscroll";
}
- (NSDictionary *)serialize {
- return @{ @"type": @"mscroll", @"amount": @(
self.
amount) };
+ return @{ @"type": @"mscroll", @"amount": @(
_
amount) };
}
+ (Target *)targetDeserialize:(NSDictionary *)serialization
}
+ (Target *)targetDeserialize:(NSDictionary *)serialization
@@
-30,7
+27,7
@@
CGEventRef scroll = CGEventCreateScrollWheelEvent(NULL,
kCGScrollEventUnitLine,
1,
CGEventRef scroll = CGEventCreateScrollWheelEvent(NULL,
kCGScrollEventUnitLine,
1,
-
self.
amount);
+
_
amount);
CGEventPost(kCGHIDEventTap, scroll);
CFRelease(scroll);
}
CGEventPost(kCGHIDEventTap, scroll);
CFRelease(scroll);
}