Class: Caca::Event::Mouse

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

Direct Known Subclasses

Motion, Press, Release

Defined Under Namespace

Classes: Motion, Press, Release

Constant Summary collapse

TYPE =
INT2FIX(CACA_EVENT_MOUSE_PRESS|
CACA_EVENT_MOUSE_RELEASE|
CACA_EVENT_MOUSE_MOTION)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Caca::Event

#quit?, to_i, |

Constructor Details

#initialize(x, y, button) ⇒ Mouse

Returns a new instance of Mouse.



27
28
29
# File 'lib/caca.rb', line 27

def initialize(x, y, button)
    @x, @y, @button = x, y, button
end

Instance Attribute Details

#buttonObject (readonly)

Returns the value of attribute button.



26
27
28
# File 'lib/caca.rb', line 26

def button
  @button
end

#xObject (readonly)

Returns the value of attribute x.



26
27
28
# File 'lib/caca.rb', line 26

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



26
27
28
# File 'lib/caca.rb', line 26

def y
  @y
end