bug-ncurses
[Top][All Lists]
Advanced

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

Re: Recommended way to distinguish between pads and windows?


From: Thomas Dickey
Subject: Re: Recommended way to distinguish between pads and windows?
Date: Sun, 6 Sep 2009 10:25:33 -0400 (EDT)

On Sun, 6 Sep 2009, Mark Dickinson wrote:


Thomas Dickey-2 wrote:
On Sun, 6 Sep 2009, Mark Dickinson wrote:
but with ncurses 5.7, the internals of WINDOW are hidden, so the

hmm - that's actually a configure option (not "always" hidden, but can
be made so).  Which package/distribution is turning this on?

Aha.  I forgot to include system information:  apologies.  This is
the 'official' Snow Leopard version of ncurses, from a clean install of
OS X 10.6 on a MacBook Pro.  The /usr/include/ncurses.h
file includes the lines:

#ifndef NCURSES_OPAQUE
#define NCURSES_OPAQUE 1
#endif

and now that you mention it, I see that the macports version of
ncurses has a '#define NCURSES_OPAQUE 0' here instead.  I wonder
why Apple decided to do this.

I don't know - I get occasional feedback from people who are maintaining
ports, but don't recall that any of those are Apple developers.

I didn't think of adding an is_pad(), but for other features, see
the ncurses "opaque" manpage, e.g.,

        bool is_cleared(const WINDOW *win);
...
        WINDOW * wgetparent(const WINDOW *win);

Not exactly what you want, but a pad wouldn't have a parent window.
(subwin's and derwin's would have one, but not plain newwin's).

Thank you.  That's very helpful.

no problem.  I'll add an is_pad() and is_subwin() for later use.
(the other flags really seem too low-level to be visible)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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