curs_sp_funcs(3x)
curs_sp_funcs - curses screen-pointer extension
SYNOPSIS
Section titled “SYNOPSIS”#include <curses.h>
#include <form.h>
#include <menu.h>
#include <panel.h>
#include <term.h>
/* tparm_sp may use 9 long parameters rather than being variadic */
#include <unctrl.h>
DESCRIPTION
Section titled “DESCRIPTION”This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of the configurations supported by ncurses; it adds new symbols without changing the meaning of any of the existing ones.
Improved Functions
Section titled “Improved Functions”Most of the functions are new versions of existing functions. A parameter is added at the front of the parameter list. It is a SCREEN pointer.
The existing functions all use the current screen, which is a static variable. The extended functions use the specified screen, thereby reducing the number of variables which must be modified to update multiple screens.
New Functions
Section titled “New Functions”Here are the new functions:
ceiling_panel
this returns a pointer to the topmost panel in the given screen.
ground_panel
this returns a pointer to the lowest panel in the given screen.
new_prescr
when creating a new screen, the library uses static variables which have been preset, e.g., by use_env(3X), filter(3X), etc. With the screen-pointer extension, there are situations where it must create a current screen before the unextended library does. The new_prescr function is used internally to handle these cases. It is also provided to allow applications to customize library initialization.
This extension introduces some new names:
NCURSES_SP_FUNCS
This is set to the library patch-level number. In the unextended library, this is zero (0), to make it useful for checking if the extension is provided.
NCURSES_SP_NAME
The new functions are named using the macro NCURSES_SP_NAME, which hides the actual implementation. Currently this adds a “_sp” suffix to the name of the unextended function. This manual page indexes the extensions showing the full name. However the proper usage of these functions uses the macro, to provide for the possibility of changing the naming convention for specific library configurations.
NCURSES_SP_OUTC
This is a new function-pointer type to use in the screen-pointer functions where an NCURSES_OUTC is used in the unextended library.
NCURSES_OUTC
This is a function-pointer type used for the cases where a function passes characters to the output stream, e.g., vidputs(3X).
PORTABILITY
Section titled “PORTABILITY”Applications employing these ncurses extensions should condition their use on the visibility of the NCURSES_SP_FUNCS preprocessor macro.
SEE ALSO
Section titled “SEE ALSO”curses(3X), curs_opaque(3X), curs_threads(3X)