ffi-ncurses 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +22 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +13 -0
- data/History.txt +32 -3
- data/README.rdoc +118 -58
- data/Rakefile +30 -0
- data/examples/acs_chars.rb +53 -0
- data/examples/acs_chars.rbc +1502 -0
- data/examples/{example-attributes.rb → attributes.rb} +0 -0
- data/examples/color.rb +63 -0
- data/examples/cursor.rb +27 -0
- data/examples/example.rb +17 -17
- data/examples/getkey.rb +212 -0
- data/examples/{example-getsetsyx.rb → getsetsyx.rb} +2 -2
- data/examples/globals.rb +38 -0
- data/examples/hello.rb +34 -0
- data/examples/hello.rbc +638 -0
- data/examples/hellowide.rb +59 -0
- data/examples/keys.rb +27 -0
- data/examples/{example-mouse.rb → mouse.rb} +2 -2
- data/examples/multiterm.rb +120 -0
- data/examples/ncurses/LICENSES_for_examples +26 -0
- data/examples/{ncurses-example.rb → ncurses/example.rb} +13 -80
- data/examples/ncurses/hello_ncurses.rb +57 -0
- data/examples/ncurses/rain.rb +220 -0
- data/examples/ncurses/read_line.rb +67 -0
- data/examples/ncurses/subwin.rb +71 -0
- data/examples/ncurses/tclock.rb +227 -0
- data/examples/newterm.rb +65 -0
- data/examples/panel_simple.rb +82 -0
- data/examples/{example-printw-variadic.rb → printw-variadic.rb} +1 -1
- data/examples/ripoffline.rb +86 -0
- data/examples/run-all.sh +14 -0
- data/examples/{example-softkeys.rb → softkeys.rb} +0 -0
- data/examples/{example-stdscr.rb → stdscr.rb} +2 -1
- data/examples/temp_leave.rb +99 -0
- data/examples/viewer.rb +350 -0
- data/examples/wacs_chars.rb +64 -0
- data/examples/windows.rb +73 -0
- data/ffi-ncurses.gemspec +39 -52
- data/lib/ffi-ncurses.rb +214 -474
- data/lib/ffi-ncurses/acs.rb +150 -0
- data/lib/ffi-ncurses/bool_wrappers.rb +66 -0
- data/lib/ffi-ncurses/functions.rb +450 -0
- data/lib/ffi-ncurses/keydefs.rb +136 -99
- data/lib/ffi-ncurses/mouse.rb +106 -106
- data/lib/ffi-ncurses/ncurses.rb +176 -0
- data/lib/ffi-ncurses/{ord-shim.rb → ord_shim.rb} +0 -0
- data/lib/ffi-ncurses/panel.rb +21 -0
- data/lib/ffi-ncurses/typedefs.rb +35 -0
- data/lib/ffi-ncurses/version.rb +7 -0
- data/lib/ffi-ncurses/widechars.rb +137 -0
- data/lib/ffi-ncurses/winstruct.rb +55 -33
- data/spec/attached_functions_spec.rb +42 -0
- metadata +95 -85
- data/examples/example-colour.rb +0 -63
- data/examples/example-cursor.rb +0 -22
- data/examples/example-hello.rb +0 -24
- data/examples/example-jruby.rb +0 -14
- data/examples/example-keys.rb +0 -25
- data/examples/example-windows.rb +0 -24
data/examples/hello.rbc
ADDED
@@ -0,0 +1,638 @@
|
|
1
|
+
!RBIX
|
2
|
+
9338562450968150714
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
243
|
13
|
+
5
|
14
|
+
7
|
15
|
+
0
|
16
|
+
64
|
17
|
+
47
|
18
|
+
49
|
19
|
+
1
|
20
|
+
1
|
21
|
+
15
|
22
|
+
5
|
23
|
+
7
|
24
|
+
2
|
25
|
+
64
|
26
|
+
47
|
27
|
+
49
|
28
|
+
1
|
29
|
+
1
|
30
|
+
15
|
31
|
+
99
|
32
|
+
7
|
33
|
+
3
|
34
|
+
7
|
35
|
+
4
|
36
|
+
65
|
37
|
+
67
|
38
|
+
49
|
39
|
+
5
|
40
|
+
0
|
41
|
+
49
|
42
|
+
6
|
43
|
+
4
|
44
|
+
15
|
45
|
+
5
|
46
|
+
45
|
47
|
+
7
|
48
|
+
8
|
49
|
+
43
|
50
|
+
9
|
51
|
+
47
|
52
|
+
49
|
53
|
+
10
|
54
|
+
1
|
55
|
+
15
|
56
|
+
29
|
57
|
+
229
|
58
|
+
1
|
59
|
+
26
|
60
|
+
93
|
61
|
+
0
|
62
|
+
15
|
63
|
+
45
|
64
|
+
11
|
65
|
+
12
|
66
|
+
49
|
67
|
+
13
|
68
|
+
0
|
69
|
+
13
|
70
|
+
10
|
71
|
+
63
|
72
|
+
15
|
73
|
+
7
|
74
|
+
14
|
75
|
+
64
|
76
|
+
19
|
77
|
+
0
|
78
|
+
15
|
79
|
+
5
|
80
|
+
48
|
81
|
+
15
|
82
|
+
19
|
83
|
+
1
|
84
|
+
15
|
85
|
+
5
|
86
|
+
48
|
87
|
+
16
|
88
|
+
15
|
89
|
+
5
|
90
|
+
20
|
91
|
+
1
|
92
|
+
2
|
93
|
+
47
|
94
|
+
49
|
95
|
+
17
|
96
|
+
2
|
97
|
+
15
|
98
|
+
5
|
99
|
+
48
|
100
|
+
18
|
101
|
+
15
|
102
|
+
5
|
103
|
+
78
|
104
|
+
47
|
105
|
+
49
|
106
|
+
19
|
107
|
+
1
|
108
|
+
15
|
109
|
+
5
|
110
|
+
5
|
111
|
+
47
|
112
|
+
49
|
113
|
+
20
|
114
|
+
0
|
115
|
+
4
|
116
|
+
3
|
117
|
+
82
|
118
|
+
21
|
119
|
+
4
|
120
|
+
3
|
121
|
+
49
|
122
|
+
22
|
123
|
+
1
|
124
|
+
78
|
125
|
+
47
|
126
|
+
49
|
127
|
+
23
|
128
|
+
2
|
129
|
+
15
|
130
|
+
5
|
131
|
+
7
|
132
|
+
24
|
133
|
+
64
|
134
|
+
20
|
135
|
+
0
|
136
|
+
81
|
137
|
+
25
|
138
|
+
47
|
139
|
+
49
|
140
|
+
3
|
141
|
+
1
|
142
|
+
15
|
143
|
+
5
|
144
|
+
7
|
145
|
+
26
|
146
|
+
64
|
147
|
+
47
|
148
|
+
49
|
149
|
+
27
|
150
|
+
1
|
151
|
+
15
|
152
|
+
5
|
153
|
+
7
|
154
|
+
28
|
155
|
+
64
|
156
|
+
47
|
157
|
+
49
|
158
|
+
3
|
159
|
+
1
|
160
|
+
15
|
161
|
+
5
|
162
|
+
7
|
163
|
+
26
|
164
|
+
64
|
165
|
+
47
|
166
|
+
49
|
167
|
+
27
|
168
|
+
1
|
169
|
+
15
|
170
|
+
5
|
171
|
+
7
|
172
|
+
29
|
173
|
+
64
|
174
|
+
47
|
175
|
+
49
|
176
|
+
3
|
177
|
+
1
|
178
|
+
15
|
179
|
+
5
|
180
|
+
7
|
181
|
+
30
|
182
|
+
64
|
183
|
+
47
|
184
|
+
49
|
185
|
+
27
|
186
|
+
1
|
187
|
+
15
|
188
|
+
5
|
189
|
+
7
|
190
|
+
31
|
191
|
+
64
|
192
|
+
47
|
193
|
+
49
|
194
|
+
3
|
195
|
+
1
|
196
|
+
15
|
197
|
+
5
|
198
|
+
48
|
199
|
+
32
|
200
|
+
15
|
201
|
+
5
|
202
|
+
48
|
203
|
+
33
|
204
|
+
19
|
205
|
+
2
|
206
|
+
15
|
207
|
+
5
|
208
|
+
48
|
209
|
+
34
|
210
|
+
15
|
211
|
+
5
|
212
|
+
5
|
213
|
+
7
|
214
|
+
35
|
215
|
+
64
|
216
|
+
20
|
217
|
+
2
|
218
|
+
20
|
219
|
+
2
|
220
|
+
47
|
221
|
+
49
|
222
|
+
36
|
223
|
+
3
|
224
|
+
47
|
225
|
+
49
|
226
|
+
27
|
227
|
+
1
|
228
|
+
15
|
229
|
+
5
|
230
|
+
48
|
231
|
+
32
|
232
|
+
15
|
233
|
+
5
|
234
|
+
79
|
235
|
+
47
|
236
|
+
49
|
237
|
+
37
|
238
|
+
1
|
239
|
+
30
|
240
|
+
8
|
241
|
+
236
|
242
|
+
26
|
243
|
+
5
|
244
|
+
48
|
245
|
+
38
|
246
|
+
15
|
247
|
+
27
|
248
|
+
34
|
249
|
+
5
|
250
|
+
48
|
251
|
+
38
|
252
|
+
15
|
253
|
+
15
|
254
|
+
2
|
255
|
+
11
|
256
|
+
I
|
257
|
+
9
|
258
|
+
I
|
259
|
+
3
|
260
|
+
I
|
261
|
+
0
|
262
|
+
I
|
263
|
+
0
|
264
|
+
n
|
265
|
+
p
|
266
|
+
39
|
267
|
+
s
|
268
|
+
11
|
269
|
+
ffi-ncurses
|
270
|
+
x
|
271
|
+
7
|
272
|
+
require
|
273
|
+
s
|
274
|
+
21
|
275
|
+
ffi-ncurses/widechars
|
276
|
+
x
|
277
|
+
6
|
278
|
+
centre
|
279
|
+
M
|
280
|
+
1
|
281
|
+
n
|
282
|
+
n
|
283
|
+
x
|
284
|
+
6
|
285
|
+
centre
|
286
|
+
i
|
287
|
+
54
|
288
|
+
5
|
289
|
+
47
|
290
|
+
49
|
291
|
+
0
|
292
|
+
0
|
293
|
+
45
|
294
|
+
1
|
295
|
+
2
|
296
|
+
20
|
297
|
+
0
|
298
|
+
49
|
299
|
+
3
|
300
|
+
1
|
301
|
+
82
|
302
|
+
4
|
303
|
+
80
|
304
|
+
49
|
305
|
+
5
|
306
|
+
1
|
307
|
+
19
|
308
|
+
1
|
309
|
+
15
|
310
|
+
5
|
311
|
+
5
|
312
|
+
48
|
313
|
+
6
|
314
|
+
47
|
315
|
+
49
|
316
|
+
7
|
317
|
+
1
|
318
|
+
97
|
319
|
+
37
|
320
|
+
19
|
321
|
+
2
|
322
|
+
15
|
323
|
+
37
|
324
|
+
19
|
325
|
+
3
|
326
|
+
15
|
327
|
+
15
|
328
|
+
2
|
329
|
+
15
|
330
|
+
5
|
331
|
+
20
|
332
|
+
2
|
333
|
+
20
|
334
|
+
1
|
335
|
+
20
|
336
|
+
0
|
337
|
+
47
|
338
|
+
49
|
339
|
+
8
|
340
|
+
3
|
341
|
+
11
|
342
|
+
I
|
343
|
+
8
|
344
|
+
I
|
345
|
+
4
|
346
|
+
I
|
347
|
+
1
|
348
|
+
I
|
349
|
+
1
|
350
|
+
n
|
351
|
+
p
|
352
|
+
9
|
353
|
+
x
|
354
|
+
4
|
355
|
+
COLS
|
356
|
+
x
|
357
|
+
9
|
358
|
+
WideChars
|
359
|
+
n
|
360
|
+
x
|
361
|
+
13
|
362
|
+
display_width
|
363
|
+
x
|
364
|
+
1
|
365
|
+
-
|
366
|
+
x
|
367
|
+
1
|
368
|
+
/
|
369
|
+
x
|
370
|
+
6
|
371
|
+
stdscr
|
372
|
+
x
|
373
|
+
5
|
374
|
+
getyx
|
375
|
+
x
|
376
|
+
8
|
377
|
+
mvaddstr
|
378
|
+
p
|
379
|
+
9
|
380
|
+
I
|
381
|
+
-1
|
382
|
+
I
|
383
|
+
9
|
384
|
+
I
|
385
|
+
0
|
386
|
+
I
|
387
|
+
a
|
388
|
+
I
|
389
|
+
16
|
390
|
+
I
|
391
|
+
b
|
392
|
+
I
|
393
|
+
2a
|
394
|
+
I
|
395
|
+
c
|
396
|
+
I
|
397
|
+
36
|
398
|
+
x
|
399
|
+
54
|
400
|
+
/home/seano/Dropbox/work/ffi-ncurses/examples/hello.rb
|
401
|
+
p
|
402
|
+
4
|
403
|
+
x
|
404
|
+
4
|
405
|
+
text
|
406
|
+
x
|
407
|
+
3
|
408
|
+
col
|
409
|
+
x
|
410
|
+
1
|
411
|
+
y
|
412
|
+
x
|
413
|
+
1
|
414
|
+
x
|
415
|
+
x
|
416
|
+
17
|
417
|
+
method_visibility
|
418
|
+
x
|
419
|
+
15
|
420
|
+
add_defn_method
|
421
|
+
x
|
422
|
+
3
|
423
|
+
FFI
|
424
|
+
n
|
425
|
+
x
|
426
|
+
7
|
427
|
+
NCurses
|
428
|
+
x
|
429
|
+
7
|
430
|
+
include
|
431
|
+
x
|
432
|
+
4
|
433
|
+
ARGV
|
434
|
+
n
|
435
|
+
x
|
436
|
+
5
|
437
|
+
shift
|
438
|
+
s
|
439
|
+
5
|
440
|
+
World
|
441
|
+
x
|
442
|
+
7
|
443
|
+
initscr
|
444
|
+
x
|
445
|
+
3
|
446
|
+
raw
|
447
|
+
x
|
448
|
+
6
|
449
|
+
keypad
|
450
|
+
x
|
451
|
+
6
|
452
|
+
noecho
|
453
|
+
x
|
454
|
+
8
|
455
|
+
curs_set
|
456
|
+
x
|
457
|
+
5
|
458
|
+
LINES
|
459
|
+
x
|
460
|
+
1
|
461
|
+
-
|
462
|
+
x
|
463
|
+
1
|
464
|
+
/
|
465
|
+
x
|
466
|
+
4
|
467
|
+
move
|
468
|
+
s
|
469
|
+
6
|
470
|
+
Hello
|
471
|
+
x
|
472
|
+
1
|
473
|
+
+
|
474
|
+
s
|
475
|
+
1
|
476
|
+
|
477
|
+
|
478
|
+
x
|
479
|
+
6
|
480
|
+
addstr
|
481
|
+
s
|
482
|
+
6
|
483
|
+
你好
|
484
|
+
s
|
485
|
+
31
|
486
|
+
HELLO WORLD
|
487
|
+
s
|
488
|
+
2
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
s
|
493
|
+
25
|
494
|
+
Press any key to continue
|
495
|
+
x
|
496
|
+
7
|
497
|
+
refresh
|
498
|
+
x
|
499
|
+
5
|
500
|
+
getch
|
501
|
+
x
|
502
|
+
8
|
503
|
+
flushinp
|
504
|
+
s
|
505
|
+
20
|
506
|
+
|
507
|
+
You pressed %c (%d)
|
508
|
+
x
|
509
|
+
7
|
510
|
+
sprintf
|
511
|
+
x
|
512
|
+
5
|
513
|
+
sleep
|
514
|
+
x
|
515
|
+
6
|
516
|
+
endwin
|
517
|
+
p
|
518
|
+
53
|
519
|
+
I
|
520
|
+
0
|
521
|
+
I
|
522
|
+
6
|
523
|
+
I
|
524
|
+
9
|
525
|
+
I
|
526
|
+
7
|
527
|
+
I
|
528
|
+
12
|
529
|
+
I
|
530
|
+
9
|
531
|
+
I
|
532
|
+
20
|
533
|
+
I
|
534
|
+
f
|
535
|
+
I
|
536
|
+
2b
|
537
|
+
I
|
538
|
+
11
|
539
|
+
I
|
540
|
+
42
|
541
|
+
I
|
542
|
+
12
|
543
|
+
I
|
544
|
+
48
|
545
|
+
I
|
546
|
+
13
|
547
|
+
I
|
548
|
+
4c
|
549
|
+
I
|
550
|
+
14
|
551
|
+
I
|
552
|
+
55
|
553
|
+
I
|
554
|
+
15
|
555
|
+
I
|
556
|
+
59
|
557
|
+
I
|
558
|
+
16
|
559
|
+
I
|
560
|
+
60
|
561
|
+
I
|
562
|
+
1d
|
563
|
+
I
|
564
|
+
75
|
565
|
+
I
|
566
|
+
1e
|
567
|
+
I
|
568
|
+
82
|
569
|
+
I
|
570
|
+
1f
|
571
|
+
I
|
572
|
+
8b
|
573
|
+
I
|
574
|
+
20
|
575
|
+
I
|
576
|
+
94
|
577
|
+
I
|
578
|
+
21
|
579
|
+
I
|
580
|
+
9d
|
581
|
+
I
|
582
|
+
22
|
583
|
+
I
|
584
|
+
a6
|
585
|
+
I
|
586
|
+
23
|
587
|
+
I
|
588
|
+
af
|
589
|
+
I
|
590
|
+
24
|
591
|
+
I
|
592
|
+
b8
|
593
|
+
I
|
594
|
+
25
|
595
|
+
I
|
596
|
+
bc
|
597
|
+
I
|
598
|
+
26
|
599
|
+
I
|
600
|
+
c2
|
601
|
+
I
|
602
|
+
27
|
603
|
+
I
|
604
|
+
c6
|
605
|
+
I
|
606
|
+
29
|
607
|
+
I
|
608
|
+
d8
|
609
|
+
I
|
610
|
+
2a
|
611
|
+
I
|
612
|
+
dc
|
613
|
+
I
|
614
|
+
2b
|
615
|
+
I
|
616
|
+
e6
|
617
|
+
I
|
618
|
+
2d
|
619
|
+
I
|
620
|
+
ec
|
621
|
+
I
|
622
|
+
2d
|
623
|
+
I
|
624
|
+
f3
|
625
|
+
x
|
626
|
+
54
|
627
|
+
/home/seano/Dropbox/work/ffi-ncurses/examples/hello.rb
|
628
|
+
p
|
629
|
+
3
|
630
|
+
x
|
631
|
+
8
|
632
|
+
greeting
|
633
|
+
x
|
634
|
+
6
|
635
|
+
stdscr
|
636
|
+
x
|
637
|
+
2
|
638
|
+
ch
|