On this page:
display-ubuf-cells
ubuf-display-linear?
ubuf-display-only-dirty?
ubuf-display-clear-dirty?
ubuf-display-position
8.16.0.4

5 Low-Level Output🔗ℹ

Dominik Pantůček <dominik.pantucek@trustica.cz>

 (require tui/ubuf/vt-output) package: tui-ubuf

This module contains the actual implementation of universal buffer output to virtual terminal. It also contains various parameters configuring the default behaviour of such output. These parameters are reprovided by the tui/ubuf main module.

procedure

(display-ubuf-cells stride    
  cells    
  buffer    
  clip-x    
  clip-y    
  clip-w    
  clip-h    
  [port    
  linear?    
  x0    
  y0    
  only-dirty?    
  clear-dirty?    
  last-newline?])  void?
  stride : exact-positive-integer?
  cells : vector?
  buffer : bytes?
  clip-x : exact-nonnegative-integer?
  clip-y : exact-nonnegative-integer?
  clip-w : exact-nonnegative-integer?
  clip-h : exact-nonnegative-integer?
  port : output-port? = (current-output-port)
  linear? : boolean? = (ubuf-display-linear?)
  x0 : exact-nonnegative-integer?
   = (car (ubuf-display-position))
  y0 : exact-nonnegative-integer?
   = (cdr (ubuf-display-position))
  only-dirty? : boolean? = (ubuf-display-only-dirty?)
  clear-dirty? : boolean? = (ubuf-display-clear-dirty?)
  last-newline? : boolean? = #f
Prepares VT sequences and characters to be output in buffer (which must be large enough) and writes the result into given port.

The arguments which names are the same as ubuf? struct fields have the same meaning in this procedure.

If linear? is #t, no characters are skipped when creating the update and explicit position on screen is ignored. Lines are terminated by newline character(s).

Otherwise x0 and y0 are the position on the screen where to start writing the character cells contents.

If only-dirty? is #t, then a delta update is computed which assumes that the screen contents are already the same as given cells contents and only those cells marked with tfc-dirty-true must be redrawn.

If clear-dirty? is #t, then any cells marked with tcf-dirty-true have this mark removed after putting the cells contents into the output buffer.

If last-newline? is #t then in linear mode an extra newline is produced.

parameter

(ubuf-display-linear?)  boolean?

(ubuf-display-linear? linear?)  void?
  linear? : boolean?
 = #t
Whether display-ubuf-cells should display linear sequence by default.

parameter

(ubuf-display-only-dirty?)  boolean?

(ubuf-display-only-dirty? only-dirty?)  void?
  only-dirty? : boolean?
 = #f
Whether display-ubuf-cells should construct the delta update when displaying the cells.

parameter

(ubuf-display-clear-dirty?)  boolean?

(ubuf-display-clear-dirty? clear-dirty?)  void?
  clear-dirty? : boolean?
 = #f
Whether display-ubuf-cells should clear the dirty bit of cells it rendered.

parameter

(ubuf-display-position)  
(cons/c exact-nonnegative-integer?
        exact-nonnegative-integer?)
(ubuf-display-position position)  void?
  position : 
(cons/c exact-nonnegative-integer?
        exact-nonnegative-integer?)
 = '(0 . 0)
Default position for display-ubuf-cells in non-linear mode.