Show
Ignore:
Timestamp:
07/25/08 09:26:14 (6 months ago)
Author:
saurik
Message:

Fixed some of the mouse support for MobileTerminal?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/mobileterminal/port.diff

    r364 r391  
     1diff -ru mobileterminal-286/main.m mobileterminal-286+iPhone/main.m 
     2--- mobileterminal-286/main.m   2008-05-07 08:07:55.000000000 +0000 
     3+++ mobileterminal-286+iPhone/main.m    2008-07-25 09:22:12.000000000 +0000 
     4@@ -3,6 +3,8 @@ 
     5 #import "MobileTerminal.h" 
     6 #import "Settings.h" 
     7  
     8+void UIApplicationUseLegacyEvents(BOOL use); 
     9+ 
     10 int main(int argc, char **argv) 
     11 { 
     12   [[NSAutoreleasePool alloc] init]; 
     13@@ -27,5 +29,6 @@ 
     14     [[Settings sharedInstance] setArguments:args]; 
     15   } 
     16  
     17+  UIApplicationUseLegacyEvents(1); 
     18   return UIApplicationMain(argc, argv, [MobileTerminal class]); 
     19 } 
    120diff -r -u mobileterminal-286/GestureView.m mobileterminal-286+iPhone/GestureView.m 
    221--- mobileterminal-286/GestureView.m    2008-05-07 08:33:09.000000000 +0000 
    322+++ mobileterminal-286+iPhone/GestureView.m     2008-07-06 19:51:22.000000000 +0000 
    4 @@ -13,6 +13,11 @@ 
    5  #import "Tools.h" 
    6  #include <math.h> 
    7   
    8 +@protocol UITouchCompatibility 
    9 +- (CGPoint)locationInView:(UIView *)view; 
    10 +- (CGPoint)previousLocationInView:(UIView *)view; 
    11 +@end 
    12 + 
    13  @implementation GestureView 
    14   
    15  //_______________________________________________________________________________ 
    16 @@ -77,9 +82,23 @@ 
    17   
    18  //_______________________________________________________________________________ 
    19   
    20 +- (BOOL)beginTrackingWithTouch:(id)touch withEvent:(id)event { 
    21 +    return [self beginTrackingAt:[touch locationInView:self] withEvent:event]; 
    22 +} 
    23 + 
    24 +- (BOOL)continueTrackingWithTouch:(id)touch withEvent:(id)event { 
    25 +    return [self continueTrackingAt:[touch locationInView:self] previous:[touch previousLocationInView:self] withEvent:event]; 
    26 +} 
    27 + 
    28 +- (void)endTrackingWithTouch:(id)touch withEvent:(id)event { 
    29 +    return [self endTrackingAt:[touch locationInView:self] previous:[touch previousLocationInView:self] withEvent:event]; 
    30 +} 
    31 + 
    32 +//_______________________________________________________________________________ 
    33 + 
     23@@ -77,9 +82,9 @@ 
     24  
     25 //_______________________________________________________________________________ 
     26  
    3427 - (void) mouseDown:(GSEvent*)event 
    3528 {