Class: Reline::GeneralIO

Inherits:
Object
  • Object
show all
Defined in:
lib/reline/general_io.rb

Constant Summary collapse

RAW_KEYSTROKE_CONFIG =
{}
@@buf =
[]

Class Method Summary collapse

Class Method Details

.clear_screenObject



53
54
# File 'lib/reline/general_io.rb', line 53

def self.clear_screen
end

.cursor_posObject



34
35
36
# File 'lib/reline/general_io.rb', line 34

def self.cursor_pos
  Reline::CursorPos.new(1, 1)
end

.deprep(otio) ⇒ Object



65
66
# File 'lib/reline/general_io.rb', line 65

def self.deprep(otio)
end

.erase_after_cursorObject



47
48
# File 'lib/reline/general_io.rb', line 47

def self.erase_after_cursor
end

.get_screen_sizeObject



30
31
32
# File 'lib/reline/general_io.rb', line 30

def self.get_screen_size
  [1, 1]
end

.getcObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/reline/general_io.rb', line 12

def self.getc
  unless @@buf.empty?
    return @@buf.shift
  end
  c = nil
  loop do
    result = select([@@input], [], [], 0.1)
    next if result.nil?
    c = @@input.read(1)
    break
  end
  c&.ord
end

.input=(val) ⇒ Object



8
9
10
# File 'lib/reline/general_io.rb', line 8

def self.input=(val)
  @@input = val
end

.move_cursor_column(val) ⇒ Object



38
39
# File 'lib/reline/general_io.rb', line 38

def self.move_cursor_column(val)
end

.move_cursor_down(val) ⇒ Object



44
45
# File 'lib/reline/general_io.rb', line 44

def self.move_cursor_down(val)
end

.move_cursor_up(val) ⇒ Object



41
42
# File 'lib/reline/general_io.rb', line 41

def self.move_cursor_up(val)
end

.prepObject



62
63
# File 'lib/reline/general_io.rb', line 62

def self.prep
end

.scroll_down(val) ⇒ Object



50
51
# File 'lib/reline/general_io.rb', line 50

def self.scroll_down(val)
end

.set_screen_size(rows, columns) ⇒ Object



56
57
# File 'lib/reline/general_io.rb', line 56

def self.set_screen_size(rows, columns)
end

.set_winch_handler(&handler) ⇒ Object



59
60
# File 'lib/reline/general_io.rb', line 59

def self.set_winch_handler(&handler)
end

.ungetc(c) ⇒ Object



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

def self.ungetc(c)
  @@buf.unshift(c)
end