forked from rpetrich/fonemonkey4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TouchSynthesis.h
64 lines (52 loc) · 2.19 KB
/
TouchSynthesis.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* This file is part of FoneMonkey.
FoneMonkey is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FoneMonkey is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FoneMonkey. If not, see <http://www.gnu.org/licenses/>. */
//
// TouchSynthesis.h
// SelfTesting
//
// Created by Matt Gallagher on 23/11/08.
// Copyright 2008 Matt Gallagher. All rights reserved.
//
// Permission is given to use this source code file, free of charge, in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
// Modified extensively for FoneMonkey by Stu Stern, Gorilla Logic, November, 2009
//
#import <UIKit/UIKit.h>
//
// UITouch (Synthesize)
/**
UITouch extensions for synthesizing touch events.
*/
@interface UITouch (Synthesize)
- (id)initInView:(UIView *)view;
- (void)setPhase:(UITouchPhase)phase;
- (void)setLocationInWindow:(CGPoint)location;
@end
/**
// UIEvent extensions for simulating touch events.
*/
@interface UIEvent (Synthesize)
- (id)initWithTouch:(UITouch *)touch;
+ (void)performTouchLeftInView:(UIView*)view;
+ (void)performTouchRightInView:(UIView*)view;
+ (void)performTouchInView:(UIView*)view;
+ (void)performTouchInView:(UIView*)view at:(CGPoint)point;
+ (void)performTouchInView:(UIView*)view at:(CGPoint)point withCount:(NSInteger)count;
+ (void)performTouchInView:(UIView*)view at:(CGPoint)point forPhase:(UITouchPhase)phase;
+ (void)performTouchDownInView:(UIView*)view at:(CGPoint)point;
+ (void)performTouchUpInView:(UIView*)view at:(CGPoint)point;
+ (void)performMoveInView:(UIView *)view from:(CGPoint)from to:(CGPoint)to;
@end