25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
735 B

  1. require 'cucul'
  2. require 'caca.so'
  3. module Caca
  4. class Event
  5. def Event.to_i
  6. const_get("TYPE")
  7. end
  8. def Event.|(i)
  9. i = i.to_i
  10. const_get("TYPE")|i
  11. end
  12. class Key
  13. attr_reader :ch, :utf32, :utf8
  14. def initialize(ch, utf32, utf8)
  15. @ch, @utf32, @utf8 = ch, utf32, utf8
  16. end
  17. end
  18. class Mouse
  19. attr_reader :x, :y, :button
  20. def initialize(x, y, button)
  21. @x, @y, @button = x, y, button
  22. end
  23. end
  24. class Resize
  25. attr_reader :w, :h
  26. def initialize(w, h)
  27. @w, @h = w, h
  28. end
  29. end
  30. end
  31. end