-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadMe.h
More file actions
51 lines (41 loc) · 1.19 KB
/
ReadMe.h
File metadata and controls
51 lines (41 loc) · 1.19 KB
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
//
// ReadMe.h
// ReadMe
//
// Created by Benoît Layer on 08/03/2014.
// Copyright (c) 2014 Benoît Layer. All rights reserved.
//
#import <Foundation/Foundation.h>
@class ReadMe;
@protocol ReadMeDelegate <NSObject>
/**
Called on the delegate when a new word should be diplayed. This method is called on the main thread.
@param readMe The readme object.
@param newWord The word to be diplayed.
@param orp Optimal recognition point. The place where the eyes should focus. Usually resulting in a colored letter. Index starting to 0 for first letter
*/
- (void)readMe:(ReadMe *)readMe didReadWord:(NSString *)newWord withORP:(int)orp;
/**
Called when ReadMe has finished parsing a text.
@param readMe The readme object.
*/
- (void)readMeDidFinishReading:(ReadMe *)readMe;
@end
@interface ReadMe : NSObject
@property (nonatomic, weak) id<ReadMeDelegate> delegate;
@property (nonatomic) int wordsPerMinute;
/**
Returns the ReadMe singleton.
@return The readme singleton.
*/
+ (instancetype)sharedInstance;
/**
Stops the readme process.
*/
- (void)stopReading;
/**
Starts the readme process.
@param text The whole text to read.
*/
- (void)readText:(NSString *)text;
@end