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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
#include <FL/Fl_Text_Buffer.H>
#include "c_fl_text_buffer.h"
TEXTBUFFER new_fl_text_buffer(int rs, int pgs) {
Fl_Text_Buffer *tb = new Fl_Text_Buffer(rs, pgs);
return tb;
}
void free_fl_text_buffer(TEXTBUFFER tb) {
delete reinterpret_cast<Fl_Text_Buffer*>(tb);
}
void fl_text_buffer_add_modify_callback(TEXTBUFFER tb, void * cb, void * ud) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->add_modify_callback(reinterpret_cast<Fl_Text_Modify_Cb>(cb), ud);
}
void fl_text_buffer_add_predelete_callback(TEXTBUFFER tb, void * cb, void * ud) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->add_predelete_callback(reinterpret_cast<Fl_Text_Predelete_Cb>(cb), ud);
}
void fl_text_buffer_call_modify_callbacks(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->call_modify_callbacks();
}
void fl_text_buffer_call_predelete_callbacks(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->call_predelete_callbacks();
}
int fl_text_buffer_loadfile(TEXTBUFFER tb, char * n, int b) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->loadfile(n,b);
}
int fl_text_buffer_appendfile(TEXTBUFFER tb, char * n, int b) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->appendfile(n,b);
}
int fl_text_buffer_insertfile(TEXTBUFFER tb, char * n, int p, int b) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->insertfile(n,p,b);
}
int fl_text_buffer_outputfile(TEXTBUFFER tb, char * n, int f, int t, int b) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->outputfile(n,f,t,b);
}
int fl_text_buffer_savefile(TEXTBUFFER tb, char * n, int b) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->savefile(n,b);
}
void fl_text_buffer_insert(TEXTBUFFER tb, int p, const char * item) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->insert(p, item);
}
void fl_text_buffer_append(TEXTBUFFER tb, const char * item) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->append(item);
}
void fl_text_buffer_replace(TEXTBUFFER tb, int s, int f, const char * text) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->replace(s, f, text);
}
void fl_text_buffer_remove(TEXTBUFFER tb, int s, int f) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->remove(s, f);
}
char * fl_text_buffer_get_text(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->text();
}
void fl_text_buffer_set_text(TEXTBUFFER tb, char * t) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->text(t);
}
char fl_text_buffer_byte_at(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->byte_at(p);
}
unsigned int fl_text_buffer_char_at(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->char_at(p);
}
char * fl_text_buffer_text_range(TEXTBUFFER tb, int s, int f) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->text_range(s, f);
}
int fl_text_buffer_next_char(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->next_char(p);
}
int fl_text_buffer_prev_char(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->prev_char(p);
}
int fl_text_buffer_count_displayed_characters(TEXTBUFFER tb, int s, int f) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->count_displayed_characters(s,f);
}
int fl_text_buffer_count_lines(TEXTBUFFER tb, int s, int f) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->count_lines(s,f);
}
int fl_text_buffer_length(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->length();
}
int fl_text_buffer_get_tab_distance(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->tab_distance();
}
void fl_text_buffer_set_tab_distance(TEXTBUFFER tb, int t) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->tab_distance(t);
}
int fl_text_buffer_selection_position(TEXTBUFFER tb, int * s, int * e) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->selection_position(s, e);
}
int fl_text_buffer_secondary_selection_position(TEXTBUFFER tb, int * s, int * e) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->secondary_selection_position(s,e);
}
void fl_text_buffer_select(TEXTBUFFER tb, int s, int e) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->select(s, e);
}
void fl_text_buffer_secondary_select(TEXTBUFFER tb, int s, int e) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->secondary_select(s,e);
}
int fl_text_buffer_selected(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->selected();
}
int fl_text_buffer_secondary_selected(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->secondary_selected();
}
char * fl_text_buffer_selection_text(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->selection_text();
}
char * fl_text_buffer_secondary_selection_text(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->secondary_selection_text();
}
void fl_text_buffer_replace_selection(TEXTBUFFER tb, char * t) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->replace_selection(t);
}
void fl_text_buffer_replace_secondary_selection(TEXTBUFFER tb, char * t) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->replace_secondary_selection(t);
}
void fl_text_buffer_remove_selection(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->remove_selection();
}
void fl_text_buffer_remove_secondary_selection(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->remove_secondary_selection();
}
void fl_text_buffer_unselect(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->unselect();
}
void fl_text_buffer_secondary_unselect(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->secondary_unselect();
}
void fl_text_buffer_highlight(TEXTBUFFER tb, int f, int t) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->highlight(f,t);
}
char * fl_text_buffer_highlight_text(TEXTBUFFER tb) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->highlight_text();
}
void fl_text_buffer_unhighlight(TEXTBUFFER tb) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->unhighlight();
}
int fl_text_buffer_findchar_forward(TEXTBUFFER tb, int start, unsigned int item, int * found) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->findchar_forward(start, item, found);
}
int fl_text_buffer_findchar_backward(TEXTBUFFER tb, int start, unsigned int item, int * found) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->findchar_backward(start, item, found);
}
int fl_text_buffer_search_forward(TEXTBUFFER tb, int start, const char * item, int * found, int mcase) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->search_forward(start, item, found, mcase);
}
int fl_text_buffer_search_backward(TEXTBUFFER tb, int start, const char * item, int * found, int mcase) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->search_backward(start, item, found, mcase);
}
int fl_text_buffer_word_start(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->word_start(p);
}
int fl_text_buffer_word_end(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->word_end(p);
}
int fl_text_buffer_line_start(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->line_start(p);
}
int fl_text_buffer_line_end(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->line_end(p);
}
char * fl_text_buffer_line_text(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->line_text(p);
}
int fl_text_buffer_skip_lines(TEXTBUFFER tb, int s, int l) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->skip_lines(s, l);
}
int fl_text_buffer_rewind_lines(TEXTBUFFER tb, int s, int l) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->rewind_lines(s, l);
}
int fl_text_buffer_skip_displayed_characters(TEXTBUFFER tb, int s, int n) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->skip_displayed_characters(s,n);
}
void fl_text_buffer_canundo(TEXTBUFFER tb, char f) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->canUndo(f);
}
void fl_text_buffer_copy(TEXTBUFFER tb, TEXTBUFFER tb2, int s, int f, int i) {
reinterpret_cast<Fl_Text_Buffer*>(tb)->copy(reinterpret_cast<Fl_Text_Buffer*>(tb2),s,f,i);
}
int fl_text_buffer_utf8_align(TEXTBUFFER tb, int p) {
return reinterpret_cast<Fl_Text_Buffer*>(tb)->utf8_align(p);
}
|