bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colors in a file generated with putwin(3c)


From: Thomas Dickey
Subject: Re: Colors in a file generated with putwin(3c)
Date: Tue, 3 Mar 2015 06:37:18 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Mar 03, 2015 at 04:24:50AM -0500, John S. Urban wrote:
> Thank you for your response and your consideration. 
>  The biggest question that came to my mind is that, for my current purposes,
> I want to capture the screen or pad definition exactly,
> Including any customized colors and the background color. But does that mean
> if I read the dump back in to another program
> That it will have the side-effect of changing it'sy current init_pair(3c)
> settings and/or background color mode if that is added to the dump?

no... as I recall this area (short of time):

reading the dump back into a program would not do init_pair's, but
rely upon the current settings.

>   For my purposes that is what I want; but that might
> Not be what others expect to have happen. But init_pair(3c) settings do not
> appear to be set on a per-window basis or can just
> Be thought of as applying to "stdsrc", I guess. So I understand my request
> may not be as straight-forward as it appears because it could have
> side-effects.
>   Thanks again, and thanks for the support you provide ncurses(3c);
> John S. Urban
> 
> -----Original Message-----
> From: Thomas Dickey [mailto:address@hidden 
> Sent: Monday, March 2, 2015 5:22 AM
> To: John S. Urban
> Cc: address@hidden
> Subject: Re: Colors in a file generated with putwin(3c)
> 
> On Sat, Feb 28, 2015 at 10:06:00PM -0500, John S. Urban wrote:
> > QUESTION:
> > 
> > Files generated with putwin(3c) do not appear to contain information 
> > to reproduce the color pairs that were in use when the putwin(3c) call 
> > was made. Is that correct?
> 
> That seems to be the case: as I read the code, it is writing only the text.
>  
> > BACKGROUND:
> > 
> > I made a routine to print pads or windows as pre-formatted HTML. It 
> > works quite well for my purposes when called directly from an 
> > ncurses(3c) application.  Well enough that others are interested in 
> > using it with their applications. To make a long story short (my 
> > programs are in Fortran, theirs are in C and
> > 
> > Python for starters) I thought I would make a small application that 
> > read a
> > putwin(3c) file  (thus having a way to generate screen-shots that was 
> > language-independent and already part of the ncurses(3c) library) and 
> > convert that to HTML.  It works well enough for everything but color 
> > for those currently interested in it.  Am I doing something wrong or 
> > is there no
> > 
> > 
> > Color pair information in the dump files?   If not, is that a feature or a
> > bug? 
> 
> I think it is a bug.  (I am puzzled why it was overlooked, aside from noting
> that putwin is not often used...).
> 
> On the other hand, I do not like the implementation (but have had no
> compelling reason to revise it), because it relies upon the binary layout of
> the window structs.  For instance, you could not transfer between
> normal/wide libraries.  (I'm not keen on starting a new development task at
> this moment because I was trying to wrap up things for a release, but I'll
> see what I can do).
> 
> --
> Thomas E. Dickey <address@hidden> http://invisible-island.net
> ftp://invisible-island.net
> 

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]