slk_color(), after slk_attrset(). Not tested.

This commit is contained in:
William McBrine
2005-12-12 04:09:49 +00:00
parent 361618047b
commit f44348aced
2 changed files with 29 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
***************************************************************************
*/
/*
$Id: curses.h,v 1.48 2005/12/12 00:26:57 wmcbrine Exp $
$Id: curses.h,v 1.49 2005/12/12 04:09:49 wmcbrine Exp $
*/
/*
*----------------------------------------------------------------------
@@ -1760,6 +1760,7 @@ int PDC_CDECL slk_touch Args((void));
int PDC_CDECL slk_attron Args((attr_t));
int PDC_CDECL slk_attrset Args((attr_t));
int PDC_CDECL slk_attroff Args((attr_t));
int PDC_CDECL slk_color Args((short));
WINDOW* PDC_CDECL subpad Args(( WINDOW*, int, int, int, int ));
WINDOW* PDC_CDECL subwin Args(( WINDOW*, int, int, int, int ));
int PDC_CDECL syncok Args((WINDOW*, bool));

View File

@@ -36,13 +36,14 @@
#undef slk_attron
#undef slk_attrset
#undef slk_attroff
#undef slk_color
/* undefine any macros for functions called by this module if in debug mode */
#ifdef PDCDEBUG
#endif
#ifdef PDCDEBUG
char *rcsid_slk = "$Id: slk.c,v 1.3 2005/11/19 19:07:21 wmcbrine Exp $";
char *rcsid_slk = "$Id: slk.c,v 1.4 2005/12/12 04:09:49 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -62,6 +63,7 @@ char *rcsid_slk = "$Id: slk.c,v 1.3 2005/11/19 19:07:21 wmcbrine Exp $";
int slk_attron(attr_t attrs);
int slk_attrset(attr_t attrs);
int slk_attroff(attr_t attrs);
int slk_color(short color_pair);
X/Open Description:
These functions manipulate a window that contain Soft Label Keys (SLK).
@@ -555,6 +557,30 @@ attr_t attrs;
}
/***********************************************************************/
#ifdef HAVE_PROTO
int PDC_CDECL slk_color(short color_pair)
#else
int PDC_CDECL slk_color(color_pair)
short color_pair;
#endif
/***********************************************************************/
{
int i,rc;
#ifdef PDCDEBUG
if (trace_on) PDC_debug("slk_color() - called\n");
#endif
rc = wcolor_set(SP->slk_winptr, color_pair, NULL);
for (i = 0; i < labels; ++i)
{
PDC_slk_set(i + 1, slk_save[i].label, slk_save[i].format, 0);
}
return rc;
}
/***********************************************************************/
#ifdef HAVE_PROTO
static void PDC_slk_init(void)