interface groundwork for core-side color decisions

(user-side decisions really, but as it stands right now
user-side decisions/options are made and processed by the core)

add a parameter to add_menu so color can be passed
This commit is contained in:
nhmall
2022-06-25 13:21:51 -04:00
parent b60dae1706
commit 2770223d10
44 changed files with 437 additions and 306 deletions

View File

@@ -24,7 +24,7 @@ void chainin_putmixed(winid, int, const char *);
void chainin_display_file(const char *, boolean);
void chainin_start_menu(winid, unsigned long);
void chainin_add_menu(winid, const glyph_info *, const ANY_P *,
char, char, int,
char, char, int, int,
const char *, unsigned int);
void chainin_end_menu(winid, const char *);
int chainin_select_menu(winid, int, MENU_ITEM_P **);
@@ -263,12 +263,13 @@ chainin_add_menu(
char ch, /* keyboard accelerator (0 = pick our own) */
char gch, /* group accelerator (0 = no group) */
int attr, /* attribute for string (like tty_putstr()) */
int clr, /* attribute for string (like tty_putstr()) */
const char *str, /* menu string */
unsigned int itemflags) /* flags such as item is marked as selected
MENU_ITEMFLAGS_SELECTED */
{
(*cibase->nprocs->win_add_menu)(cibase->ndata, window, glyphinfo,
identifier, ch, gch, attr, str, itemflags);
identifier, ch, gch, attr, clr, str, itemflags);
}
void

View File

@@ -24,7 +24,7 @@ void chainout_putmixed(void *,winid, int, const char *);
void chainout_display_file(void *,const char *, boolean);
void chainout_start_menu(void *,winid, unsigned long);
void chainout_add_menu(void *,winid, const glyph_info *, const ANY_P *,
char, char, int,
char, char, int, int,
const char *, unsigned int);
void chainout_end_menu(void *,winid, const char *);
int chainout_select_menu(void *,winid, int, MENU_ITEM_P **);
@@ -300,13 +300,14 @@ chainout_add_menu(
char ch, /* keyboard accelerator (0 = pick our own) */
char gch, /* group accelerator (0 = no group) */
int attr, /* attribute for string (like tty_putstr()) */
int clr, /* clr for string */
const char *str, /* menu string */
unsigned int itemflags) /* itemflags such as marked as selected */
{
struct chainout_data *tdp = vp;
(*tdp->nprocs->win_add_menu)(window, glyphinfo, identifier, ch, gch,
attr, str, itemflags);
attr, clr, str, itemflags);
}
void

View File

@@ -50,7 +50,7 @@ void trace_putmixed(void *,winid, int, const char *);
void trace_display_file(void *,const char *, boolean);
void trace_start_menu(void *,winid, unsigned long);
void trace_add_menu(void *,winid, const glyph_info *, const ANY_P *,
char, char, int,
char, char, int, int,
const char *, unsigned int);
void trace_end_menu(void *,winid, const char *);
int trace_select_menu(void *,winid, int, MENU_ITEM_P **);
@@ -446,6 +446,7 @@ trace_add_menu(
char ch, /* keyboard accelerator (0 = pick our own) */
char gch, /* group accelerator (0 = no group) */
int attr, /* attribute for string (like tty_putstr()) */
int clr, /* color for string */
const char *str, /* menu string */
unsigned int itemflags) /* itemflags such as marked as selected */
{
@@ -480,7 +481,7 @@ trace_add_menu(
PRE;
(*tdp->nprocs->win_add_menu)(tdp->ndata, window, glyphinfo,
identifier,ch, gch, attr, str, itemflags);
identifier,ch, gch, attr, clr, str, itemflags);
POST;
}