Re: [dev] TermKit

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Fri, 20 May 2011 16:35:35 +0100

2011/5/20 Hadrian Węgrzynowski <hadrian_AT_hawski.com>:
> Sometimes I would like to display some graphics inside terminal window.
> We could draw directly in terminal's window or place graphics inline
> with text. I would prefer second method.

I think the way I described it in my first email was a little
confusing. As I clarified to Dieter, what I meant was that the program
would request a space in which to draw, and the term would place this
drawing space in-line (i.e., as graphics within text), so that it
scrolls with the output, and so on.

> One of the key features of text terminals is monospaced font - that
> makes everything easier to align and easier to code. As I said I would
> like to display some graphics, but I don't want to give up on grid
> aligned display. I would prefer to display graphics within text.

> But for this to make sense program in many cases needs to know width
> and height of image in terminal characters.

I don't think so. If the term is handling the placement of images, it
can maintain the monospaced columns without the drawing process having
to know anything about character size. Instead, the image is drawn,
and the term simply continues drawing characters in the next column,
so everything still lines up fine.

We also don't have to reinvent the wheel with escape codes, since we
can just use Xembed. Upon receiving an Xembed request the term would
just stick that window in-line, with the appropriate size and
everything, and that's dandy.

(I checked, btw, and it seems you can XCopyArea from child windows,
which is necessary for this approach.)

cls
Received on Fri May 20 2011 - 17:35:35 CEST

This archive was generated by hypermail 2.2.0 : Fri May 20 2011 - 17:48:01 CEST