You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 rivejä
927 B

  1. require 'cucul'
  2. require 'caca.so'
  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