Last change
on this file since 3995 was
2822,
checked in by Sam Hocevar, 12 years ago
|
Continuing the libcucul-libcaca merge.
|
File size:
911 bytes
|
Line | |
---|
1 | require 'caca.so' |
---|
2 | |
---|
3 | module Caca |
---|
4 | class Display |
---|
5 | attr_reader :canvas |
---|
6 | end |
---|
7 | class Event |
---|
8 | def Event.to_i |
---|
9 | const_get("TYPE") |
---|
10 | end |
---|
11 | def Event.|(i) |
---|
12 | i = i.to_i |
---|
13 | const_get("TYPE")|i |
---|
14 | end |
---|
15 | def quit? |
---|
16 | false |
---|
17 | end |
---|
18 | class Key |
---|
19 | attr_reader :ch, :utf32, :utf8 |
---|
20 | def initialize(ch, utf32, utf8) |
---|
21 | @ch, @utf32, @utf8 = ch, utf32, utf8 |
---|
22 | end |
---|
23 | end |
---|
24 | class Mouse |
---|
25 | attr_reader :x, :y, :button |
---|
26 | def initialize(x, y, button) |
---|
27 | @x, @y, @button = x, y, button |
---|
28 | end |
---|
29 | end |
---|
30 | class Resize |
---|
31 | attr_reader :w, :h |
---|
32 | def initialize(w, h) |
---|
33 | @w, @h = w, h |
---|
34 | end |
---|
35 | end |
---|
36 | class Quit |
---|
37 | def quit? |
---|
38 | true |
---|
39 | end |
---|
40 | end |
---|
41 | end |
---|
42 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.