Skip to content
This repository
Browse code

Add slide from top gestures

  • Loading branch information...
commit 0d0ce63fe5f8582877a49feb4a69cb70764d3130 1 parent 35597e7
Ryan Petrich authored
10 SlideEvents.x
@@ -160,6 +160,16 @@ static inline BOOL SlideGestureStartWithRotatedLocation(CGPoint location)
160 160 rectToEnterToSendSlideGesture = (CGRect){ { 0.0f, 0.0f }, { screenSize.width, screenSize.height - (kSlideGestureWindowHeight + 50.0f) }};
161 161 return YES;
162 162 }
  163 + if (location.y < kSlideGestureWindowHeight) {
  164 + if (location.x < screenSize.width * 0.25f)
  165 + startedSlideGestureName = LAEventNameSlideInFromTopLeft;
  166 + else if (location.x < screenSize.width * 0.75f)
  167 + startedSlideGestureName = LAEventNameSlideInFromTop;
  168 + else
  169 + startedSlideGestureName = LAEventNameSlideInFromTopRight;
  170 + rectToEnterToSendSlideGesture = (CGRect){ { 0.0f, kSlideGestureWindowHeight + 50.0f }, { screenSize.width, screenSize.height - (kSlideGestureWindowHeight + 50.0f) }};
  171 + return YES;
  172 + }
163 173 if (location.x < kSlideGestureWindowHeight) {
164 174 startedSlideGestureName = LAEventNameSlideInFromLeft;
165 175 rectToEnterToSendSlideGesture = (CGRect){ { kSlideGestureWindowHeight + 50.0f, 0.0f }, { screenSize.width - (kSlideGestureWindowHeight + 50.0f), screenSize.height }};
2  StatusBarEvents.x
@@ -81,7 +81,7 @@ static void StatusBarTapCallback(CFRunLoopTimerRef timer, void *info)
81 81 LASendEventWithName(LAEventNameStatusBarSwipeLeft);
82 82 }
83 83 } else {
84   - if (deltaY > kStatusBarVerticalSwipeThreshold) {
  84 + if (deltaY > kStatusBarVerticalSwipeThreshold && (kCFCoreFoundationVersionNumber < 675.00)) {
85 85 hasSentStatusBarEvent = YES;
86 86 LASendEventWithName(LAEventNameStatusBarSwipeDown);
87 87 }
2  layout/DEBIAN/control
... ... @@ -1,7 +1,7 @@
1 1 Package: libactivator
2 2 Depends: mobilesubstrate (>= 0.9.3228), preferenceloader (>= 2.0.2.99), firmware (>= 3.0)
3 3 Name: Activator
4   -Version: 1.5.8
  4 +Version: 1.5.9~beta1
5 5 Priority: optional
6 6 Architecture: iphoneos-arm
7 7 Description: Centralized gestures, button and shortcut management for iOS
6 layout/Library/Activator/Events/libactivator.slide-in.top-left/Info.plist
... ... @@ -0,0 +1,6 @@
  1 +{
  2 + title = "From Screen Top-Left";
  3 + group = "Slide In Gesture";
  4 + description = "Drag onto screen from top-left";
  5 + CoreFoundationVersion = (675.00);
  6 +}
6 layout/Library/Activator/Events/libactivator.slide-in.top-right/Info.plist
... ... @@ -0,0 +1,6 @@
  1 +{
  2 + title = "From Screen Top-Right";
  3 + group = "Slide In Gesture";
  4 + description = "Drag onto screen from top-right";
  5 + CoreFoundationVersion = (675.00);
  6 +}
6 layout/Library/Activator/Events/libactivator.statusbar.swipe.down/Info.plist
... ... @@ -1,5 +1,5 @@
1 1 {
2   - title = "Swipe Down";
3   - group = "Status Bar";
4   - description = "Tap and drag down from statusbar";
  2 + title = "From Screen Top";
  3 + group = "Slide In Gesture";
  4 + description = "Drag onto screen from statusbar";
5 5 }
5 libactivator.h
@@ -222,7 +222,6 @@ extern NSString * const LAEventNameSpringBoardSpread;
222 222
223 223 extern NSString * const LAEventNameStatusBarSwipeRight;
224 224 extern NSString * const LAEventNameStatusBarSwipeLeft;
225   -extern NSString * const LAEventNameStatusBarSwipeDown;
226 225 extern NSString * const LAEventNameStatusBarTapDouble;
227 226 extern NSString * const LAEventNameStatusBarTapSingle;
228 227 extern NSString * const LAEventNameStatusBarHold;
@@ -242,6 +241,10 @@ extern NSString * const LAEventNameSlideInFromBottomLeft;
242 241 extern NSString * const LAEventNameSlideInFromBottomRight;
243 242 extern NSString * const LAEventNameSlideInFromLeft;
244 243 extern NSString * const LAEventNameSlideInFromRight;
  244 +extern NSString * const LAEventNameStatusBarSwipeDown; // Now a slide gesture in iOS5.0+; extern and name kept for backwards compatibility
  245 +#define LAEventNameSlideInFromTop LAEventNameStatusBarSwipeDown
  246 +extern NSString * const LAEventNameSlideInFromTopLeft;
  247 +extern NSString * const LAEventNameSlideInFromTopRight;
245 248
246 249 extern NSString * const LAEventNameMotionShake;
247 250
4 libactivator.x
@@ -26,7 +26,6 @@ NSString * const LAEventNameSpringBoardSpread = @"libactivator.springboard.
26 26
27 27 NSString * const LAEventNameStatusBarSwipeRight = @"libactivator.statusbar.swipe.right";
28 28 NSString * const LAEventNameStatusBarSwipeLeft = @"libactivator.statusbar.swipe.left";
29   -NSString * const LAEventNameStatusBarSwipeDown = @"libactivator.statusbar.swipe.down";
30 29 NSString * const LAEventNameStatusBarTapDouble = @"libactivator.statusbar.tap.double";
31 30 NSString * const LAEventNameStatusBarTapSingle = @"libactivator.statusbar.tap.single";
32 31 NSString * const LAEventNameStatusBarHold = @"libactivator.statusbar.hold";
@@ -46,6 +45,9 @@ NSString * const LAEventNameSlideInFromBottomLeft = @"libactivator.slide-in.bot
46 45 NSString * const LAEventNameSlideInFromBottomRight = @"libactivator.slide-in.bottom-right";
47 46 NSString * const LAEventNameSlideInFromLeft = @"libactivator.slide-in.left";
48 47 NSString * const LAEventNameSlideInFromRight = @"libactivator.slide-in.right";
  48 +NSString * const LAEventNameStatusBarSwipeDown = @"libactivator.statusbar.swipe.down"; // Now a slide in gesture on iOS5.0+
  49 +NSString * const LAEventNameSlideInFromTopLeft = @"libactivator.slide-in.top-left";
  50 +NSString * const LAEventNameSlideInFromTopRight = @"libactivator.slide-in.top-right";
49 51
50 52 NSString * const LAEventNameMotionShake = @"libactivator.motion.shake";
51 53

0 comments on commit 0d0ce63

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