Module: Charming::Internal::Terminal::Adapter

Included in:
MemoryBackend, TTYBackend
Defined in:
lib/charming/internal/terminal/adapter.rb

Overview

Contract for terminal adapters used by Runtime and renderers. Concrete adapters provide input events, terminal dimensions, and output primitives for full or partial frame rendering.

Instance Method Summary collapse

Instance Method Details

#clearObject

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/charming/internal/terminal/adapter.rb', line 34

def clear
  raise NotImplementedError, "#{self.class} must implement #clear"
end

#enter_alt_screenObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/charming/internal/terminal/adapter.rb', line 18

def enter_alt_screen
  raise NotImplementedError, "#{self.class} must implement #enter_alt_screen"
end

#hide_cursorObject

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/charming/internal/terminal/adapter.rb', line 26

def hide_cursor
  raise NotImplementedError, "#{self.class} must implement #hide_cursor"
end

#leave_alt_screenObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/charming/internal/terminal/adapter.rb', line 22

def leave_alt_screen
  raise NotImplementedError, "#{self.class} must implement #leave_alt_screen"
end

#move_cursor(row, column) ⇒ Object

Raises:

  • (NotImplementedError)


38
39
40
# File 'lib/charming/internal/terminal/adapter.rb', line 38

def move_cursor(row, column)
  raise NotImplementedError, "#{self.class} must implement #move_cursor"
end

#read_event(timeout: nil) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/charming/internal/terminal/adapter.rb', line 10

def read_event(timeout: nil)
  raise NotImplementedError, "#{self.class} must implement #read_event"
end

#show_cursorObject

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/charming/internal/terminal/adapter.rb', line 30

def show_cursor
  raise NotImplementedError, "#{self.class} must implement #show_cursor"
end

#sizeObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/charming/internal/terminal/adapter.rb', line 14

def size
  raise NotImplementedError, "#{self.class} must implement #size"
end

#write_frame(frame) ⇒ Object

Raises:

  • (NotImplementedError)


42
43
44
# File 'lib/charming/internal/terminal/adapter.rb', line 42

def write_frame(frame)
  raise NotImplementedError, "#{self.class} must implement #write_frame"
end

#write_lines(line_changes, frame: nil) ⇒ Object

Raises:

  • (NotImplementedError)


46
47
48
# File 'lib/charming/internal/terminal/adapter.rb', line 46

def write_lines(line_changes, frame: nil)
  raise NotImplementedError, "#{self.class} must implement #write_lines"
end