Sha256: a7d66d5ba26ef89712b1d51251fd73b63e0e8c598ccf1168f073d92da70ab8c0

Contents?: true

Size: 1.72 KB

Versions: 17

Compression:

Stored size: 1.72 KB

Contents

#import <Foundation/Foundation.h>
#include "common/app_build_capabilities.h"

#import <UIKit/UIKit.h>

#import "Rhodes.h"

extern void Bundle_update_on_triple_tap();
extern void Bundle_update_on_quadro_tap();


@interface RhoSpecialGesturesReceiver : NSObject {
}

- (void)handleTripleTap:(UITapGestureRecognizer *)sender;
- (void)handleQuadroTap:(UITapGestureRecognizer *)sender;

@end

@implementation RhoSpecialGesturesReceiver
- (void)handleTripleTap:(UITapGestureRecognizer *)sender
{
    if (sender.state == UIGestureRecognizerStateEnded)
    {
        // handling code
        AudioServicesPlaySystemSound(1003);
        Bundle_update_on_triple_tap();
    }
}

- (void)handleQuadroTap:(UITapGestureRecognizer *)sender
{
    if (sender.state == UIGestureRecognizerStateEnded)
    {
        // handling code
        Bundle_update_on_quadro_tap();
    }
}

@end

static RhoSpecialGesturesReceiver* ourRhoSpecialGesturesReceiver = nil;

extern void Development_Init();

void Init_Development_extension()
{
    ourRhoSpecialGesturesReceiver = [[RhoSpecialGesturesReceiver alloc] init];
    
    UITapGestureRecognizer* triple = [[UITapGestureRecognizer alloc] initWithTarget:ourRhoSpecialGesturesReceiver action:@selector(handleTripleTap:)];
    triple.numberOfTapsRequired = 1;
    triple.numberOfTouchesRequired = 3;
    UITapGestureRecognizer* quadro = [[UITapGestureRecognizer alloc] initWithTarget:ourRhoSpecialGesturesReceiver action:@selector(handleQuadroTap:)];
    quadro.numberOfTapsRequired = 1;
    quadro.numberOfTouchesRequired = 4;
    
    //[UIApplication sharedApplication]
    [[Rhodes sharedInstance].window addGestureRecognizer:triple];
    [[Rhodes sharedInstance].window addGestureRecognizer:quadro];
    
    
    Development_Init();
}

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rhodes-7.6.0 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-7.5.1 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-7.4.1 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-7.1.17 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-6.2.0 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-6.0.11 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.18 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.17 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.15 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.0.22 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.2 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.0.7 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.0.3 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
rhodes-5.5.0 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
tauplatform-1.0.3 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
tauplatform-1.0.2 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m
tauplatform-1.0.1 lib/extensions/Development/ext/platform/iphone/impl/DevelopmentSetup.m