Class: Caca::Event::Key

Inherits:
Caca::Event show all
Defined in:
lib/caca.rb,
ext/caca/caca-event.c

Direct Known Subclasses

Press, Release

Defined Under Namespace

Classes: Press, Release

Constant Summary collapse

TYPE =
INT2FIX(CACA_EVENT_KEY_PRESS|
CACA_EVENT_KEY_RELEASE)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Caca::Event

#quit?, to_i, |

Constructor Details

#initialize(ch, utf32, utf8) ⇒ Key

Returns a new instance of Key.



21
22
23
# File 'lib/caca.rb', line 21

def initialize(ch, utf32, utf8)
    @ch, @utf32, @utf8 = ch, utf32, utf8
end

Instance Attribute Details

#chObject (readonly)

Returns the value of attribute ch.



20
21
22
# File 'lib/caca.rb', line 20

def ch
  @ch
end

#utf32Object (readonly)

Returns the value of attribute utf32.



20
21
22
# File 'lib/caca.rb', line 20

def utf32
  @utf32
end

#utf8Object (readonly)

Returns the value of attribute utf8.



20
21
22
# File 'lib/caca.rb', line 20

def utf8
  @utf8
end