Talk:Terminal control/Positional read: Difference between revisions

 
Line 57:
: I am actually not sure if any terminals have this capability. I have read about something analogous being a security with X windows. As a general rule, if you want to support this kind of thing you do it by owning the terminal and keeping complete track of everything you put there. You do need to know its size (and when it changes size) to make this work. You also need to know when something else has damaged the thing to know when you need to re-update it. (Which is basically what paint events are, in most modern gui environments.) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:51, 19 June 2017 (UTC)
:: It clearly has some security implications. Even if the console is accessible only within a given user context, it could be a problem that application A can read something that was put on the screen by application B. Speaking of "keeping track of everything you put there", I was prompted to go looking through the curses API to see whether this could be solved using curses. Curses does know everything that has been put into the screen, so it can do the optimized updates. I didn't find an API for getting characters out, though.--[[User:Kazinator|Kazinator]] ([[User talk:Kazinator|talk]]) 20:43, 19 June 2017 (UTC)
::: The right approach there, as in any context, is probably to maintain your own buffer. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 21:32, 19 June 2017 (UTC)
6,962

edits