Back
Type Name Operations
ImageMagick-6 Open
X11 Open
arpa Open
asm Open
asm-generic Open
bind9 Open
bind9-export Open
bits Open
bsock Open
c++ Open
curl Open
drm Open
e2p Open
event2 Open
ext2fs Open
finclude Open
fontconfig Open
freetype2 Open
fstrm Open
gdb Open
gdbm Open
ghostscript Open
gnu Open
google Open
gssapi Open
gssrpc Open
jasper Open
json-c Open
kadm5 Open
krb5 Open
libdb Open
libexslt Open
libltdl Open
libpng16 Open
libxml2 Open
libxslt Open
linux Open
lve Open
lzma Open
misc Open
mtd Open
mysql Open
ncurses Open
ncursesw Open
net Open
netash Open
netatalk Open
netax25 Open
neteconet Open
netinet Open
netipx Open
netiucv Open
netpacket Open
netrom Open
netrose Open
nfs Open
openssl Open
pcp Open
perf Open
protobuf-c Open
protocols Open
python2.7 Open
python3.6m Open
python3.8 Open
rdma Open
rpc Open
rpcsvc Open
scsi Open
security Open
selinux Open
sepol Open
sodium Open
sound Open
sys Open
tirpc Open
uuid Open
video Open
webp Open
xcb Open
xen Open
FlexLexer.h
a.out.h
aio.h
aliases.h
alloca.h
ar.h
argp.h
argz.h
assert.h
autosprintf.h
byteswap.h
bzlib.h
com_err.h
complex.h
cpio.h
cpuidle.h
crypt.h
ctype.h
curses.h
cursesapp.h
cursesf.h
cursesm.h
cursesp.h
cursesw.h
cursslk.h
db.h
db_185.h
dbm.h
dirent.h
dlfcn.h
elf.h
endian.h
entities.h
envz.h
err.h
errno.h
error.h
eti.h
etip.h
evdns.h
event.h
evhttp.h
evrpc.h
evutil.h
execinfo.h
expat.h
expat_config.h
expat_external.h
fcntl.h
features.h
fenv.h
fmtmsg.h
fnmatch.h
form.h
fpu_control.h
fstab.h
fstrm.h
fts.h
ftw.h
gconv.h
gcrypt.h
gd.h
gd_color_map.h
gd_errors.h
gd_io.h
gdbm.h
gdcache.h
gdfontg.h
gdfontl.h
gdfontmb.h
gdfonts.h
gdfontt.h
gdfx.h
gdpp.h
getopt.h
gettext-po.h
glob.h
gnu-versions.h
gnumake.h
gpg-error.h
gpgrt.h
grp.h
gshadow.h
gssapi.h
iconv.h
idn-free.h
idn-int.h
idna.h
ieee754.h
ifaddrs.h
inttypes.h
jconfig-64.h
jconfig.h
jerror.h
jmorecfg.h
jpegint.h
jpeglib.h
kdb.h
keyutils.h
krad.h
krb5.h
langinfo.h
lastlog.h
libaio.h
libgen.h
libintl.h
limits.h
link.h
locale.h
ltdl.h
lzma.h
magic.h
malloc.h
math.h
mcheck.h
memory.h
menu.h
mntent.h
monetary.h
mqueue.h
nc_tparm.h
ncurses.h
ncurses_dll.h
ndbm.h
netdb.h
nl_types.h
nss.h
obstack.h
panel.h
paths.h
pcre.h
pcre2.h
pcre2posix.h
pcre_scanner.h
pcre_stringpiece.h
pcrecpp.h
pcrecpparg.h
pcreposix.h
png.h
pngconf.h
pnglibconf.h
poll.h
pr29.h
printf.h
proc_service.h
profile.h
pthread.h
pty.h
punycode.h
pwd.h
re_comp.h
regex.h
regexp.h
resolv.h
sched.h
search.h
semaphore.h
setjmp.h
sgtty.h
shadow.h
signal.h
sodium.h
spawn.h
stab.h
stdc-predef.h
stdint.h
stdio.h
stdio_ext.h
stdlib.h
string.h
stringprep.h
strings.h
syscall.h
sysexits.h
syslog.h
tar.h
term.h
term_entry.h
termcap.h
termio.h
termios.h
tgmath.h
thread_db.h
threads.h
tic.h
tiff.h
tiffconf-64.h
tiffconf.h
tiffio.h
tiffio.hxx
tiffvers.h
time.h
tld.h
ttyent.h
uchar.h
ucontext.h
ulimit.h
unctrl.h
unistd.h
utime.h
utmp.h
utmpx.h
values.h
verto-module.h
verto.h
wait.h
wchar.h
wctype.h
wordexp.h
zconf.h
zlib.h

File Transfer

Upload files to current directory

File Editor: cursesp.h

// * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ #ifndef NCURSES_CURSESP_H_incl #define NCURSES_CURSESP_H_incl 1 // $Id: cursesp.h,v 1.31 2014/08/09 22:06:26 Adam.Jiang Exp $ #include extern "C" { # include } class NCURSES_IMPEXP NCursesPanel : public NCursesWindow { protected: PANEL *p; static NCursesPanel *dummy; private: // This structure is used for the panel's user data field to link the // PANEL* to the C++ object and to provide extra space for a user pointer. typedef struct { void* m_user; // the pointer for the user's data const NCursesPanel* m_back; // backward pointer to C++ object const PANEL* m_owner; // the panel itself } UserHook; inline UserHook *UserPointer() { UserHook* uptr = reinterpret_cast( const_cast(::panel_userptr (p))); return uptr; } void init(); // Initialize the panel object protected: void set_user(void *user) { UserHook* uptr = UserPointer(); if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p) { uptr->m_user = user; } } // Set the user pointer of the panel. void *get_user() { UserHook* uptr = UserPointer(); void *result = 0; if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p) result = uptr->m_user; return result; } void OnError (int err) const THROW2(NCursesException const, NCursesPanelException) { if (err==ERR) THROW(new NCursesPanelException (this, err)); } // If err is equal to the curses error indicator ERR, an error handler // is called. // Get a keystroke. Default implementation calls getch() virtual int getKey(void); public: NCursesPanel(int nlines, int ncols, int begin_y = 0, int begin_x = 0) : NCursesWindow(nlines,ncols,begin_y,begin_x), p(0) { init(); } // Create a panel with this size starting at the requested position. NCursesPanel() : NCursesWindow(::stdscr), p(0) { init(); } // This constructor creates the default Panel associated with the // ::stdscr window NCursesPanel& operator=(const NCursesPanel& rhs) { if (this != &rhs) { *this = rhs; NCursesWindow::operator=(rhs); } return *this; } NCursesPanel(const NCursesPanel& rhs) : NCursesWindow(rhs), p(rhs.p) { } virtual ~NCursesPanel(); // basic manipulation inline void hide() { OnError (::hide_panel(p)); } // Hide the panel. It stays in the stack but becomes invisible. inline void show() { OnError (::show_panel(p)); } // Show the panel, i.e. make it visible. inline void top() { OnError (::top_panel(p)); } // Make this panel the top panel in the stack. inline void bottom() { OnError (::bottom_panel(p)); } // Make this panel the bottom panel in the stack. // N.B.: The panel associated with ::stdscr is always on the bottom. So // actually bottom() makes the panel the first above ::stdscr. virtual int mvwin(int y, int x) { OnError(::move_panel(p, y, x)); return OK; } inline bool hidden() const { return (::panel_hidden (p) ? TRUE : FALSE); } // Return TRUE if the panel is hidden, FALSE otherwise. /* The functions panel_above() and panel_below() are not reflected in the NCursesPanel class. The reason for this is, that we cannot assume that a panel retrieved by those operations is one wrapped by a C++ class. Although this situation might be handled, we also need a reverse mapping from PANEL to NCursesPanel which needs some redesign of the low level stuff. At the moment, we define them in the interface but they will always produce an error. */ inline NCursesPanel& above() const { OnError(ERR); return *dummy; } inline NCursesPanel& below() const { OnError(ERR); return *dummy; } // Those two are rewrites of the corresponding virtual members of // NCursesWindow virtual int refresh(); // Propagate all panel changes to the virtual screen and update the // physical screen. virtual int noutrefresh(); // Propagate all panel changes to the virtual screen. static void redraw(); // Redraw all panels. // decorations virtual void frame(const char* title=NULL, const char* btitle=NULL); // Put a frame around the panel and put the title centered in the top line // and btitle in the bottom line. virtual void boldframe(const char* title=NULL, const char* btitle=NULL); // Same as frame(), but use highlighted attributes. virtual void label(const char* topLabel, const char* bottomLabel); // Put the title centered in the top line and btitle in the bottom line. virtual void centertext(int row,const char* label); // Put the label text centered in the specified row. }; /* We use templates to provide a typesafe mechanism to associate * user data with a panel. A NCursesUserPanel is a panel * associated with some user data of type T. */ template class NCursesUserPanel : public NCursesPanel { public: NCursesUserPanel (int nlines, int ncols, int begin_y = 0, int begin_x = 0, const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel (nlines, ncols, begin_y, begin_x) { if (p) set_user (const_cast(reinterpret_cast (p_UserData))); }; // This creates an user panel of the requested size with associated // user data pointed to by p_UserData. NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel() { if (p) set_user(const_cast(reinterpret_cast(p_UserData))); }; // This creates an user panel associated with the ::stdscr and user data // pointed to by p_UserData. virtual ~NCursesUserPanel() {}; T* UserData (void) { return reinterpret_cast(get_user ()); }; // Retrieve the user data associated with the panel. virtual void setUserData (const T* p_UserData) { if (p) set_user (const_cast(reinterpret_cast(p_UserData))); } // Associate the user panel with the user data pointed to by p_UserData. }; #endif /* NCURSES_CURSESP_H_incl */