forked from gambit/gambit
/
ViewController.h
114 lines (100 loc) · 3.89 KB
/
ViewController.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//
// ViewController.h
//
// Created by Marc Feeley on 11-03-06.
// Copyright 2011 Université de Montréal. All rights reserved.
//
#import <UIKit/UIKit.h>
// ViewController methods callable from Scheme.
void set_navigation(int n);
void show_cancelButton();
void hide_cancelButton();
void show_webView(int view);
void show_textView(int view);
void show_imageView(int view);
void set_textView_font(int view, NSString *name, int size);
void set_textView_content(int view, NSString *str);
NSString *get_textView_content(int view);
void add_output_to_textView(int view, NSString *str);
void add_input_to_textView(int view, NSString *str);
void set_webView_content(int view, NSString *str, BOOL enable_scaling, NSString *mime_type);
void set_webView_content_from_file(int view, NSString *path, BOOL enable_scaling, NSString *mime_type);
NSString *eval_js_in_webView(int view, NSString *script);
void open_URL(NSString *url);
void segm_ctrl_set_title(int segment, NSString *title);
void segm_ctrl_insert(int segment, NSString *title);
void set_pref(NSString *key, NSString *value);
NSString *get_pref(NSString *key);
void set_pasteboard(NSString *value);
NSString *get_pasteboard();
NSString *get_documents_dir();
void popup_alert(NSString *title, NSString *msg, NSString *cancel_button, NSString *accept_button);
#define NB_WEBVIEWS 4
#define NB_TEXTVIEWS 2
#define NB_IMAGEVIEWS 2
@interface ViewController : UIViewController <UITextViewDelegate,UIWebViewDelegate,UIAlertViewDelegate> {
UISegmentedControl *segmCtrl;
UIWebView *webViews[NB_WEBVIEWS];
UIWebView *webView0;
UIWebView *webView1;
UIWebView *webView2;
UIWebView *webView3;
UITextView *textViews[NB_TEXTVIEWS];
UITextView *textView0;
UITextView *textView1;
UIImageView *imageViews[NB_IMAGEVIEWS];
UIImageView *imageView0;
UIImageView *imageView1;
UIButton *cancelButton;
UIView *accessoryView;
int keyboardSounds;
NSTimer *timer;
NSMutableArray *queuedActions;
}
@property (nonatomic, assign) IBOutlet UISegmentedControl *segmCtrl;
@property (nonatomic, assign) IBOutlet UIWebView *webView0;
@property (nonatomic, assign) IBOutlet UIWebView *webView1;
@property (nonatomic, assign) IBOutlet UIWebView *webView2;
@property (nonatomic, assign) IBOutlet UIWebView *webView3;
@property (nonatomic, retain) IBOutlet UITextView *textView0;
@property (nonatomic, retain) IBOutlet UITextView *textView1;
@property (nonatomic, retain) IBOutlet UIImageView *imageView0;
@property (nonatomic, retain) IBOutlet UIImageView *imageView1;
@property (nonatomic, assign) IBOutlet UIButton *cancelButton;
@property (nonatomic, assign) IBOutlet UIView *accessoryView;
@property (assign) int keyboardSounds;
@property (assign) NSTimer *timer;
@property (assign) NSMutableArray *queuedActions;
- (void)queue_action:(void(^)())action;
- (void)send_event:(NSString*)name;
- (void)send_key:(NSString*)name;
- (void)heartbeat_tick;
- (void)schedule_next_heartbeat_tick:(double)interval;
- (void)app_become_active;
- (IBAction)navigation_changed:(id)sender;
- (IBAction)touch_up_cancel:(id)sender;
- (IBAction)touch_down:(id)sender;
- (IBAction)touch_up_F1:(id)sender;
- (IBAction)touch_up_F2:(id)sender;
- (IBAction)touch_up_F3:(id)sender;
- (IBAction)touch_up_F4:(id)sender;
- (IBAction)touch_up_F5:(id)sender;
- (IBAction)touch_up_F6:(id)sender;
- (IBAction)touch_up_F7:(id)sender;
- (IBAction)touch_up_F8:(id)sender;
- (IBAction)touch_up_F9:(id)sender;
- (IBAction)touch_up_F10:(id)sender;
- (IBAction)touch_up_F11:(id)sender;
- (IBAction)touch_up_F12:(id)sender;
- (IBAction)touch_up_F13:(id)sender;
- (IBAction)touch_up_SHARP:(id)sender;
- (IBAction)touch_up_DQUOTE:(id)sender;
- (IBAction)touch_up_QUOTE:(id)sender;
- (IBAction)touch_up_COMMA:(id)sender;
- (IBAction)touch_up_PLUS:(id)sender;
- (IBAction)touch_up_MINUS:(id)sender;
- (IBAction)touch_up_STAR:(id)sender;
- (IBAction)touch_up_SLASH:(id)sender;
- (IBAction)touch_up_LPAREN:(id)sender;
- (IBAction)touch_up_RPAREN:(id)sender;
@end