module Ncurses
Constants
- FALSE
- TRUE
Public Class Methods
initscr()
click to toggle source
if ffi-ncurses returns a pointer wrap it. or we can check for whether it responds_to? refresh and getch
# File lib/canis/core/system/ncurses.rb, line 218 def self.initscr #@stdscr = Ncurses::FFIWINDOW.new(FFI::NCurses.initscr) { } stdscr = FFI::NCurses.initscr if stdscr.is_a? FFI::Pointer @stdscr = Ncurses::FFIWINDOW.new(stdscr) { } else @stdscr = stdscr end end
stdscr()
click to toggle source
# File lib/canis/core/system/ncurses.rb, line 227 def self.stdscr @stdscr end
Public Instance Methods
const_missing(name)
click to toggle source
FFINC.constants.each { |e| Ncurses.const_set(e, FFINC.const_get(e) ) }
# File lib/canis/core/system/ncurses.rb, line 172 def const_missing name val = FFI::NCurses.const_get(name) const_set(name, val) return val end
method_missing(meth, *args)
click to toggle source
i think we can knock this off
# File lib/canis/core/system/ncurses.rb, line 166 def method_missing meth, *args if (FFI::NCurses.respond_to?(meth)) FFI::NCurses.send meth, *args end end