[RFC] ColorD

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Oct 25 20:30:47 PDT 2012


On Fri, Oct 26, 2012 at 03:35:42AM +0200, Adam D. Ruppe wrote:
> On Thursday, 25 October 2012 at 22:27:52 UTC, Jens Mueller wrote:
> >>5. setting the contents of the title bar
> >The title bar of what?
> 
> Here's how you do it on xterm:
> 
> writefln("\033]0;%s\007", title);
> 
> On Windows it is an api function:
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms686050%28v=vs.85%29.aspx

And just to add, on Posix it's probably good to do something similar to
Windows, where exiting the program will reset the title back to what it
originally was. There's an xterm escape sequence that lets you read the
current title string from stdin, so that can be used to save the
original title.


> >>6. supporting cut/paste
> >
> >Don't know how to do this? Anybody a starting point?
> 
> I wouldn't worry about it up front, the system will give simple
> stuff for you and getting it right is a bit of a pain because you
> have to bring in other api calls (on both Windows and Linux; linux
> will need some X11 calls I believe.)
[...]

I don't think you can assume X11 calls will work. You may be running on
GNU screen, or on a remote SSH connection.

Regardless, I think on Linux this feature is not needed, since most
terminals will give the user a way to cut and paste independently of the
program running in them, so implementing this in a console library is
probably redundant.


T

-- 
A bend in the road is not the end of the road unless you fail to make the turn. -- Brian White


More information about the Digitalmars-d mailing list