Escape-Characters

哪些終端或終端仿真器支持硬體視窗?

  • September 6, 2021

terminfo(5) 手冊頁描述了一組功能wnum(可定義視窗的最大數量)、cwin(定義一個視窗)、wingo(轉到視窗)、wind(調整目前視窗大小),但在 terminfo 主文件中只有一個終端定義使用它們中的任何一個(tvi9065;它設置 wnum=0)。

是否存在任何支持這些功能的硬體終端或終端仿真器?

簡短:很少有終端提供這些功能。祝你好運找到一個。

Long:確定終端是否支持視窗功能具有誤導性,因為 terminfo 中最常用的功能是 curses 中使用的功能。但這是一個(弱)線索。

ncurses 和 AT&T SVr4 終端描述都包括一些。

只需考慮terminfo(5)中列出的這些功能:

     maximum_windows             wnum      MW     maximum number of
                                                  definable windows
     create_window               cwin      CW     define a window #1
                                                  from #2,#3 to #4,#5
     goto_window                 wingo     WG     go to window #1
     set_window                  wind      wi     current window is
                                                  lines #1-#2 cols
                                                  #3-#4

ncurses 只列出了一些使用wind(沒有使用其他的,因為聲明視窗是多餘的):

這些特定條目是不久前添加的(最近沒有):

# 10.1.14 (Sat Nov 22 19:59:03 EST 1997)
#       * add vt220-js, pilot, rbcomm, datapoint entries from esr's 27-jun-97
#         version.
#       * add hds200 description (Walter Skorski)
#       * add EMX 0.9b descriptions
#       * correct rmso/smso capabilities in wy30-mc and wy50-mc (Daniel Weaver)
#       * rename xhpterm back to hpterm.

# 1998/9/26
#       * format most %'char' sequences to %{number}
#       * adapt IBM AIX 3.2.5 terminfo - T.Dickey
#       * merge Data General terminfo from Hasufin <hasufin@vidnet.net> - TD

# 2002-05-25
#       * add kf13-kf48 strings to cons25w -TD
#       * add pcvt25-color entry -TD
#       * changed a few /usr/lib/tabset -> /usr/share/tabset.
#       * improve some features of scoansi entry based on SCO's version -TD
#       * add scoansi-new entry corresponding to OpenServer 5.0.6

hds200上也有一條評論表明這wind是可能的,但與其他用途相衝突。

AT&T 終端描述同樣很少使用視窗。SCO terminfo 是 1995-1996 年大部分 ncurses 的來源,在Concept AVTwind的描述中已被註釋掉:

# Info:                                                                         
#       Concept AVT with status line. We get the status line using the          
#       "Background status line" feature of the terminal. We swipe the          
#       first line of memory in window 2 for the status line, keeping           
#       191 lines of memory and 24 screen lines for regular use.                
#       The first line is used instead of the last so that this works           
#       on both 4 and 8 page AVT's. (Note the lm#191 or 192 - this              
#       assumes an 8 page AVT but lm isn't currently used anywhere.)            
#                                                                               
avt+s|concept avt status line changes,                                          
       is3=\E[2w\E[2!w\E[1;1;1;80w\E[H\E[2*w\E[1!w\E2\r\n,                     
       tsl=\E[2;1!w\E[;%p1%dH\E[2K, fsl=\E[1;1!w, eslok, hs,                   
       dsl=\E[0*w, lm#191, smcup=\E[2;25w\E2\r, rmcup=\E[2w\E2\r\n,            
       .wind=\E[%i%p1%{1}%+%d;%p2%d;%p3%{01}%+%d;%p4%{01}%+%dw

對我從 OSF/1 機器獲得的評論說:

# EXECUTION ENVIRONMENT:                                                        
#                                                                               
#       This entry does not use any of the fancy windowing stuff of the         
#       2626.  Indeed, terminfo does not yet handle such stuff.  Since          
#       changing any window clears memory, it is probably not possible to       
#       use this for screen opt.  ed is incredibly slow most of the time.       
#       It may due to the exact padding.                                        
#                                                                               
#       Since the terminal uses xoff/xon this is intended only for cost         
#       computation, so that the terminal will prefer el or even dl1 which      
#       is probably faster!  \ED\EJ\EC is also being used -                     
#       apparently ed is only extra slow on the last line of the window.        
#       The padding probably should be changed.                                 
                                                                               
hp2626|hp2626a|hp2626p|2626|2626a|2626p|2626A|2626P|hp 2626,

但是(請參閱手冊)仔細檢查後,您可能會注意到這些終端中的每一個都有不同的功能,但並不能完全解決(它的可能性範圍太廣,提供類似視窗的wind功能的終端太少,無法證明它們在螢幕優化)。

引用自:https://unix.stackexchange.com/questions/391850