Sei sulla pagina 1di 26

Class List

Here are the classes, structs, unions and interfaces with brief descriptions: FMCommandEvent The FoneMonkey command object used for recording and playback FoneMonkeyAPI The public API for the FoneMonkey framework UIControl(FoneMonkey) FoneMonkey UIControl event handling extensions UIEvent(Synthesize) UIEvent extensions for simulating touch events UITouch(Synthesize) UITouch extensions for synthesizing touch events FoneMonkey UIView extensions provide recording and playback of UIView(FoneMonkey) Touch and Motion events

File List
Here is a list of all files with brief descriptions: FMCommandEvent.h [code] FoneMonkeyAPI.h [code] TouchSynthesis.h [code] UIControl+FMready.h [code] UIView+FMReady.h [code]

FMCommandEvent Class Reference


The FoneMonkey command object used for recording and playback. More...
#import <FMCommandEvent.h>

List of all members.

Public Member Functions


(id) - init:className:monkeyID:args: (id) - initWithDict: (id) - execute

Static Public Member Functions


(FMCommandEven t *) + command:className:monkeyID:args: Create a new FMCommandEvent.

Properties
UIView * source The component corresponding to the supplied className and monkeyID. NSString * command NSString * className NSString * monkeyID NSString * lastResult NSArray * args NSMutableDictiona ry * dict

Detailed Description
The FoneMonkey command object used for recording and playback.

Member Function Documentation


+ (FMCommandEvent*) command: className: monkeyID: args: (NSString cmd *) (NSString nam *) e (NSString id *) (NSArray arra *) y

Create a new FMCommandEvent.


- (id) execute - (id) init: (NSString cmd *)

classNam (NSString classNa e: *) me monkeyI D: args: (NSString monkeyI *) D (NSArray args *)

- (id) initWithDict:

(NSMutableDictionar dic y *) t

Property Documentation
- (NSArray *) args [read, write, retain] - (NSString *) className [read, write,
retain]

- (NSString *) command [read, write, retain] - (NSMutableDictionary *) dict [read, write,

retain]

- (NSString *) lastResult [read, write,


retain]

- (NSString *) monkeyID [read, write,


retain]

- (UIView *) source [read,


assign]

The component corresponding to the supplied className and monkeyID.


The documentation for this class was generated from the following file:

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 */ 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00030 00031 00032 00033 00034 00035 00036 00037

/* 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/>. // // // // // // // FMCommandEvent.h FoneMonkey Created by Stuart Stern on 10/14/09. Copyright 2009 Gorilla Logic, Inc. All rights reserved.

#import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <Foundation/NSArray.h> @interface FMCommandEvent : NSObject <NSCopying> { UIView* source; NSString* command; NSString* className; NSString* monkeyID; NSArray* args; NSMutableDictionary* dict;

00038 NSString* lastResult; 00039 } 00043 + (FMCommandEvent*) command:(NSString*)cmd className:(NSString*)name monkeyID:(NSString*)id args:(NSArray*)array; 00044 - (id) init:(NSString*)cmd className:(NSString*)className monkeyID: (NSString*)monkeyID args:(NSArray*)args; 00045 - (id) initWithDict:(NSMutableDictionary*)dict; 00046 - (id) execute; 00050 @property (readonly) UIView* source; 00051 @property (nonatomic, retain) NSString* command; 00052 @property (nonatomic, retain) NSString* className; 00053 @property (nonatomic, retain) NSString* monkeyID; 00054 @property (nonatomic, retain) NSString* lastResult; 00055 @property (nonatomic, retain) NSArray* args; 00056 @property (nonatomic, retain) NSMutableDictionary* dict; 00057 @end

FoneMonkeyAPI Class Reference


The public API for the FoneMonkey framework. More...
#import <FoneMonkeyAPI.h>

List of all members.

Static Public Member Functions


(void) + record:command:args: Appends the command to the end of the currently recording script. (void) + continueRecording When handling an event, a component MUST call either record:command:args or continueRecording before returning. (NSStrin g *) + playCommands: Play the supplied array of FMCommandEvents. (NSStrin g *) + playFile: Play the commands from the named script file. (UIView *) + viewWithMonkeyID:havingClass: Find the view with the specified monkeyID and class.

Detailed Description
The public API for the FoneMonkey framework.

Member Function Documentation


+ (void) continueRecording

When handling an event, a component MUST call either record:command:args or continueRecording before returning. Neglecting to do so will permanently suspend the FoneMonkey console.
+ (NSString*) playCommands: (NSArray comman *) ds

Play the supplied array of FMCommandEvents.


Returns: nil if all comamnds run successfully and an error or failure message otherwise. + (NSString*) playFile: (NSString fil *) e

Play the commands from the named script file.


Returns: nil if all comamnds run successfully and an error or failure message otherwise. + (void) record: command: args: (UIView *) sender

(NSString comma *) nd (NSArray args *)

Appends the command to the end of the currently recording script.


Parameters: sender command the component for which this command is to be recorded the name of the command.

args + (UIView*) viewWithMonkeyID: havingClass:

an array of the command's arguments (NSString *) (NSString *) monkeyID className

Find the view with the specified monkeyID and class.


Parameters: monkeyI the id to search for D classNa the string name of the me class Returns: the view or nil if no view is found. The documentation for this class was generated from the following file:

FoneMonkeyAPI.h

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 */ 00015 00016 00017 00018 00019 00020

/* 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/>. // // // // // // FoneMonkeyAPI.h FoneMonkey Created by Stuart Stern on 2/6/10. Copyright (c) 2010 Gorilla Logic, Inc. All rights reserved.

00021 // 00022 00023 00031 #import "TouchSynthesis.h" 00032 #import "FMCommandEvent.h" 00033 #import "UIView+FMReady.h" 00034 #import "UIControl+FMready.h" 00035 00038 @interface FoneMonkeyAPI : NSObject 00044 + (void) record:(UIView*)sender command:(NSString*)command args: (NSArray*)args; 00045 00049 + (void) continueRecording; 00050 00055 + (NSString*) playCommands:(NSArray*)commands; 00056 00061 + (NSString*) playFile:(NSString*)file; 00062 00069 + (UIView*) viewWithMonkeyID:(NSString*)monkeyID havingClass: (NSString*)className; 00070 00071 @end

UIControl(FoneMonkey) Class Reference


FoneMonkey UIControl event handling extensions. More...
#import <UIControl+FMready.h>

List of all members.

Public Member Functions


(UIControlEve nts) - monkeyEventsToHandle The events to be recorded for this UIControl class. (void) handleMonkeyEventFromSender:forEve nt: Prepare a UIControlEvent event for recording. (void) - subscribeToMonkeyEvents Register for events to be recorded.

Detailed Description
FoneMonkey UIControl event handling extensions. Override to modify UIControl recording of UIControlEvents.

Member Function Documentation


- (void) (id) handleMonkeyEventFromSender: forEvent: send er

(UIEvent even *) t

Prepare a UIControlEvent event for recording.


- (UIControlEvents) monkeyEventsToHandle

The events to be recorded for this UIControl class. Defaults to none.


- (void) subscribeToMonkeyEvents

Register for events to be recorded.


The documentation for this class was generated from the following file:

UIControl+FMready.h

00001 /* This file is part of FoneMonkey. 00002 00003 FoneMonkey is free software: you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation, either version 3 of the License, or 00006 (at your option) any later version. 00007 00008 FoneMonkey is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with FoneMonkey. If not, see <http://www.gnu.org/licenses/>. */ 00015 // 00016 // UIControl+FoneMonkey.h

00017 // FoneMonkey 00018 // 00019 // Created by Stuart Stern on 10/13/09. 00020 // Copyright 2009 Gorilla Logic, Inc. All rights reserved. 00021 // 00022 00023 #import <Foundation/Foundation.h> 00024 #import <UIKit/UIControl.h> 00025 00029 @interface UIControl (FoneMonkey) 00030 00034 - (UIControlEvents)monkeyEventsToHandle; 00035 00039 - (void) handleMonkeyEventFromSender:(id)sender forEvent: (UIEvent*)event; 00040 00044 - (void) subscribeToMonkeyEvents; 00045 00046 @end

UIEvent(Synthesize) Class Reference


UIEvent extensions for simulating touch events. More...
#import <TouchSynthesis.h>

List of all members.

Public Member Functions


(id) - initWithTouch:

Static Public Member Functions


(void ) + performTouchLeftInView: (void ) + performTouchRightInView:

(void ) + performTouchInView: (void ) + performTouchInView:at: (void+ ) performTouchInView:at:withC ount: (void+ ) performTouchInView:at:forPha se: (void+ ) performTouchDownInView:at: (void ) + performTouchUpInView:at: (void+ ) performMoveInView:from:to:

Detailed Description
UIEvent extensions for simulating touch events.

Member Function Documentation


- (id) initWithTouch: + (void) performMoveInView: from: to: (UITouch *) touc h vie w fro m

(UIView *) (CGPoint)

(CGPoint) to

+ (void) performTouchDownInView: at:

(UIView *) (CGPoint)

vie w poi

nt

+ (void) performTouchInView: + (void) performTouchInView: at:

(UIView view *) (UIView *) view

(CGPoint) point

+ (void) performTouchInView: at: forPhase:

(UIView *) (CGPoint)

view poin t

(UITouchPha phas se) e

+ (void) performTouchInView: at: withCount:

(UIView *) (CGPoint)

view point

(NSInteger) count

+ (void) performTouchLeftInView: + (void) performTouchRightInView: + (void) performTouchUpInView: at:

(UIView vie *) w (UIView *) (UIView view *) (CGPoint point ) vie w

The documentation for this class was generated from the following file:

TouchSynthesis.h
00001 /* This file is part of FoneMonkey. 00002 00003 FoneMonkey is free software: you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation, either version 3 of the License, or 00006 (at your option) any later version. 00007 00008 FoneMonkey is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with FoneMonkey. If not, see <http://www.gnu.org/licenses/>. */ 00015 // 00016 // TouchSynthesis.h 00017 // SelfTesting 00018 // 00019 // Created by Matt Gallagher on 23/11/08. 00020 // Copyright 2008 Matt Gallagher. All rights reserved. 00021 // 00022 // Permission is given to use this source code file, free of charge, in any 00023 // project, commercial or otherwise, entirely at your risk, with the condition 00024 // that any redistribution (in part or whole) of source code must retain 00025 // this copyright and permission notice. Attribution in compiled projects is 00026 // appreciated but not required. 00027 // 00028 // Modified extensively for FoneMonkey by Stu Stern, Gorilla Logic, November, 2009 00029 // 00030 00031 00032 #import <UIKit/UIKit.h> 00033 00034 // 00035 // UITouch (Synthesize) 00039 @interface UITouch (Synthesize) 00040 00041 - (id)initInView:(UIView *)view; 00042 - (void)setPhase:(UITouchPhase)phase;

00043 - (void)setLocationInWindow:(CGPoint)location; 00044 00045 00046 @end 00047 00048 00052 @interface UIEvent (Synthesize) 00053 00054 - (id)initWithTouch:(UITouch *)touch; 00055 + (void)performTouchLeftInView:(UIView*)view; 00056 + (void)performTouchRightInView:(UIView*)view; 00057 + (void)performTouchInView:(UIView*)view; 00058 + (void)performTouchInView:(UIView*)view at:(CGPoint)point; 00059 + (void)performTouchInView:(UIView*)view at:(CGPoint)point withCount:(NSInteger)count; 00060 + (void)performTouchInView:(UIView*)view at:(CGPoint)point forPhase:(UITouchPhase)phase; 00061 + (void)performTouchDownInView:(UIView*)view at:(CGPoint)point; 00062 + (void)performTouchUpInView:(UIView*)view at:(CGPoint)point; 00063 + (void)performMoveInView:(UIView *)view from:(CGPoint)from to: (CGPoint)to; 00064 @end

UITouch(Synthesize) Class Reference


UITouch extensions for synthesizing touch events. More...
#import <TouchSynthesis.h>

List of all members.

Public Member Functions


(id) - initInView: (void) - setPhase: (void) setLocationInWindow:

Detailed Description
UITouch extensions for synthesizing touch events.

Member Function Documentation


- (id) initInView: (UIView view *) (CGPoin locati t) on

- (void) setLocationInWindow: - (void) setPhase:

(UITouchPha phas se) e

The documentation for this class was generated from the following file:

TouchSynthesis.h
00001 /* This file is part of FoneMonkey. 00002 00003 FoneMonkey is free software: you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation, either version 3 of the License, or 00006 (at your option) any later version. 00007 00008 FoneMonkey is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with FoneMonkey. If not, see <http://www.gnu.org/licenses/>. */ 00015 // 00016 // TouchSynthesis.h 00017 // SelfTesting 00018 // 00019 // Created by Matt Gallagher on 23/11/08. 00020 // Copyright 2008 Matt Gallagher. All rights reserved. 00021 // 00022 // Permission is given to use this source code file, free of charge, in any

00023 // project, commercial or otherwise, entirely at your risk, with the condition 00024 // that any redistribution (in part or whole) of source code must retain 00025 // this copyright and permission notice. Attribution in compiled projects is 00026 // appreciated but not required. 00027 // 00028 // Modified extensively for FoneMonkey by Stu Stern, Gorilla Logic, November, 2009 00029 // 00030 00031 00032 #import <UIKit/UIKit.h> 00033 00034 // 00035 // UITouch (Synthesize) 00039 @interface UITouch (Synthesize) 00040 00041 - (id)initInView:(UIView *)view; 00042 - (void)setPhase:(UITouchPhase)phase; 00043 - (void)setLocationInWindow:(CGPoint)location; 00044 00045 00046 @end 00047 00048 00052 @interface UIEvent (Synthesize) 00053 00054 - (id)initWithTouch:(UITouch *)touch; 00055 + (void)performTouchLeftInView:(UIView*)view; 00056 + (void)performTouchRightInView:(UIView*)view; 00057 + (void)performTouchInView:(UIView*)view; 00058 + (void)performTouchInView:(UIView*)view at:(CGPoint)point; 00059 + (void)performTouchInView:(UIView*)view at:(CGPoint)point withCount:(NSInteger)count; 00060 + (void)performTouchInView:(UIView*)view at:(CGPoint)point forPhase:(UITouchPhase)phase; 00061 + (void)performTouchDownInView:(UIView*)view at:(CGPoint)point; 00062 + (void)performTouchUpInView:(UIView*)view at:(CGPoint)point; 00063 + (void)performMoveInView:(UIView *)view from:(CGPoint)from to: (CGPoint)to; 00064 @end

UIView(FoneMonkey) Class Reference


FoneMonkey UIView extensions provide recording and playback of Touch and Motion events. More...
#import <UIView+FMReady.h>

List of all members.

Public Member Functions


(void) - playbackMonkeyEvent: Interpret the command and generate the necessary UI events for the component. (NSString *) - monkeyID A string value uniquely identifying this instance of the component class. (BOOL) - shouldRecordMonkeyTouch: Returns YES if the supplied touch should be recorded. (void) - handleMonkeyTouchEvent:withEvent: Evaluates touch events and records corresponding command. (void) - handleMonkeyMotionEvent: Evaluates motion (shake) event and records corresponding command. (BOOL) - isFMEnabled Returns NO if recording should be disabled for the component. (BOOL) - swapsWith: Returns YES if this component might have been substituted for one with the supplied class name. (void) - fmAssureAutomationInit Called to give an component's automation extension an opportunity to init

itself.

Static Public Member Functions


(NSString *) + uiAutomationCommand: Return the corresponding UIAutomation command executable by Instruments. (NSString *) + objcCommandEvent: Return the corresponding CommandEvent source executable in ObjC.

Detailed Description
FoneMonkey UIView extensions provide recording and playback of Touch and Motion events. UIView subclasses can override one or more of these methods to cusotmize recording and playback logic for a class.

Member Function Documentation


- (void) fmAssureAutomationInit

Called to give an component's automation extension an opportunity to init itself. May (will) be called multiple (countless) times.
- (void) handleMonkeyMotionEvent: (UIEvent eve *) nt

Evaluates motion (shake) event and records corresponding command.


- (void) handleMonkeyTouchEvent: withEvent: (NSSet *) touch es

(UIEvent event *)

Evaluates touch events and records corresponding command.


- (BOOL) isFMEnabled

Returns NO if recording should be disabled for the component. By default, returns YES for UIView subclasses, but NO for UIView class instances (since these are component containers).
- (NSString*) monkeyID

A string value uniquely identifying this instance of the component class.


+ (NSString*) objcCommandEvent: (FMCommandEven comma t *) nd

Return the corresponding CommandEvent source executable in ObjC.


- (void) playbackMonkeyEvent: (FMCommandEven eve t *) nt

Interpret the command and generate the necessary UI events for the component.
- (BOOL) shouldRecordMonkeyTouch: (UITouch touc *) h

Returns YES if the supplied touch should be recorded. By default, returns YES if touch.phase == UITouchPhaseEnded and NO otherwise. Override this method to filter which touch events should be recorded for a class.
- (BOOL) swapsWith: (NSString classNa *) me

Returns YES if this component might have been substituted for one with the supplied class name. The only known example of component swapping is UIToolbarTextButton which swaps with UINavigationButton on an iPad multiview controller.

+ (NSString*) uiAutomationCommand:

(FMCommandEven comma t *) nd

Return the corresponding UIAutomation command executable by Instruments.


The documentation for this class was generated from the following file:

UIView+FMReady.h
00001 /* This file is part of FoneMonkey. 00002 00003 FoneMonkey is free software: you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation, either version 3 of the License, or 00006 (at your option) any later version. 00007 00008 FoneMonkey is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with FoneMonkey. If not, see <http://www.gnu.org/licenses/>. */ 00015 // 00016 // UIResponder+FMReady.h 00017 // FoneMonkey 00018 // 00019 // Created by Stuart Stern on 10/19/09. 00020 // Copyright 2009 Gorilla Logic, Inc.. All rights reserved. 00021 // 00022 00023 #import <Foundation/Foundation.h> 00024 #import <UIKit/UIKit.h> 00025 @class FMCommandEvent; 00026 00030 @interface UIView (FoneMonkey) 00033 - (void) playbackMonkeyEvent:(FMCommandEvent*)event; 00037 - (NSString*) monkeyID; 00038 00042 - (BOOL) shouldRecordMonkeyTouch:(UITouch*)touch; 00043 00047 - (void) handleMonkeyTouchEvent:(NSSet*)touches withEvent: (UIEvent*)event;

00051 00052 00056 00057 00062 00063 00067 00068 00072 00073 00078 00079 00080

- (void) handleMonkeyMotionEvent:(UIEvent*)event; - (BOOL) isFMEnabled; - (BOOL) swapsWith:(NSString*)className; + (NSString*) uiAutomationCommand:(FMCommandEvent*)command; + (NSString*) objcCommandEvent:(FMCommandEvent*)command; - (void) fmAssureAutomationInit; @end

Here is a list of all class members with links to the classes they belong to:

-a

args : FMCommandEvent

-c

className : FMCommandEvent command : FMCommandEvent command:className:monkeyID:args: : FMCommandEvent continueRecording : FoneMonkeyAPI

-d

dict : FMCommandEvent

-e

execute : FMCommandEvent

-f

fmAssureAutomationInit : UIView(FoneMonkey)

-h

handleMonkeyEventFromSender:forEvent: : UIControl(FoneMonkey) handleMonkeyMotionEvent: : UIView(FoneMonkey) handleMonkeyTouchEvent:withEvent: : UIView(FoneMonkey)

-i

init:className:monkeyID:args: : FMCommandEvent initInView: : UITouch(Synthesize) initWithDict: : FMCommandEvent initWithTouch: : UIEvent(Synthesize) isFMEnabled : UIView(FoneMonkey)

-l

lastResult : FMCommandEvent

-m

monkeyEventsToHandle : UIControl(FoneMonkey) monkeyID : UIView(FoneMonkey) , FMCommandEvent

-o

objcCommandEvent: : UIView(FoneMonkey)

-p

performMoveInView:from:to: : UIEvent(Synthesize) performTouchDownInView:at: : UIEvent(Synthesize) performTouchInView: : UIEvent(Synthesize) performTouchInView:at: : UIEvent(Synthesize) performTouchInView:at:forPhase: : UIEvent(Synthesize) performTouchInView:at:withCount: : UIEvent(Synthesize) performTouchLeftInView: : UIEvent(Synthesize) performTouchRightInView: : UIEvent(Synthesize) performTouchUpInView:at: : UIEvent(Synthesize) playbackMonkeyEvent: : UIView(FoneMonkey) playCommands: : FoneMonkeyAPI playFile: : FoneMonkeyAPI

-r

record:command:args: : FoneMonkeyAPI

-s

setLocationInWindow: : UITouch(Synthesize) setPhase: : UITouch(Synthesize) shouldRecordMonkeyTouch: : UIView(FoneMonkey) source : FMCommandEvent subscribeToMonkeyEvents : UIControl(FoneMonkey) swapsWith: : UIView(FoneMonkey)

-u

uiAutomationCommand: : UIView(FoneMonkey)

-v

viewWithMonkeyID:havingClass: : FoneMonkeyAPI

Potrebbero piacerti anche