From: mlichvar Date: Wed, 28 Feb 2007 17:35:01 +0000 (+0000) Subject: - add newtSetColor() X-Git-Tag: r0-52-6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70728aabde76e8e88714e7d0aaf75f8e3546717e;p=thirdparty%2Fnewt.git - add newtSetColor() --- diff --git a/newt.0.52.ver b/newt.0.52.ver index 3bb4d7b..fe9bdd3 100644 --- a/newt.0.52.ver +++ b/newt.0.52.ver @@ -138,5 +138,6 @@ NEWT_0.52 { NEWT_0.52.6 { global: + newtSetColor; newtPopWindowNoRefresh; } NEWT_0.52; diff --git a/newt.c b/newt.c index a74c107..544558d 100644 --- a/newt.c +++ b/newt.c @@ -398,6 +398,14 @@ void newtSetColors(struct newtColors colors) { colors.selListboxBg); } +void newtSetColor(int colorset, char *fg, char *bg) { + if (colorset < NEWT_COLORSET_ROOT || colorset > NEWT_COLORSET_SELLISTBOX || + !SLtt_Use_Ansi_Colors) + return; + + SLtt_set_color(colorset, "", fg, bg); +} + /* Keymap handling - rewritten by Henning Makholm , * November 2003. */ diff --git a/newt.h b/newt.h index da16afe..daa5513 100644 --- a/newt.h +++ b/newt.h @@ -122,6 +122,7 @@ int newtCenteredWindow(unsigned int width,unsigned int height, const char * titl void newtPopWindow(void); void newtPopWindowNoRefresh(void); void newtSetColors(struct newtColors colors); +void newtSetColor(int colorset, char *fg, char *bg); void newtRefresh(void); void newtSuspend(void); void newtSetSuspendCallback(newtSuspendCallback cb, void * data);