groundwork for window port interface change to add_menu
groundwork only - window port interface change This changes the last parameter for add_menu() from a boolean to an unsigned int, to allow additional itemflags in future beyond just the "preselected" that the original boolean offered. There shouldn't be any functionality changes with this groundwork-only change, and if there are it is unintentional and should be reported.
This commit is contained in:
@@ -182,7 +182,7 @@ winid window;
|
||||
}
|
||||
|
||||
void
|
||||
chainin_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected)
|
||||
chainin_add_menu(window, glyph, identifier, ch, gch, attr, str, itemflags)
|
||||
winid window; /* window to use, must be of type NHW_MENU */
|
||||
int glyph; /* glyph to display with item (unused) */
|
||||
const anything *identifier; /* what to return if selected */
|
||||
@@ -190,10 +190,11 @@ char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
int attr; /* attribute for string (like tty_putstr()) */
|
||||
const char *str; /* menu string */
|
||||
boolean preselected; /* item is marked as selected */
|
||||
unsigned int itemflags; /* flags such as item is marked as selected
|
||||
MENU_ITEMFLAGS_SELECTED */
|
||||
{
|
||||
(*cibase->nprocs->win_add_menu)(cibase->ndata, window, glyph, identifier,
|
||||
ch, gch, attr, str, preselected);
|
||||
ch, gch, attr, str, itemflags);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -224,7 +224,7 @@ winid window;
|
||||
|
||||
void
|
||||
chainout_add_menu(vp, window, glyph, identifier, ch, gch, attr, str,
|
||||
preselected)
|
||||
itemflags)
|
||||
void *vp;
|
||||
winid window; /* window to use, must be of type NHW_MENU */
|
||||
int glyph; /* glyph to display with item (unused) */
|
||||
@@ -233,12 +233,12 @@ char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
int attr; /* attribute for string (like tty_putstr()) */
|
||||
const char *str; /* menu string */
|
||||
boolean preselected; /* item is marked as selected */
|
||||
unsigned int itemflags; /* itemflags such as marked as selected */
|
||||
{
|
||||
struct chainout_data *tdp = vp;
|
||||
|
||||
(*tdp->nprocs->win_add_menu)(window, glyph, identifier, ch, gch, attr,
|
||||
str, preselected);
|
||||
str, itemflags);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -370,7 +370,7 @@ winid window;
|
||||
}
|
||||
|
||||
void
|
||||
trace_add_menu(vp, window, glyph, identifier, ch, gch, attr, str, preselected)
|
||||
trace_add_menu(vp, window, glyph, identifier, ch, gch, attr, str, itemflags)
|
||||
void *vp;
|
||||
winid window; /* window to use, must be of type NHW_MENU */
|
||||
int glyph; /* glyph to display with item (unused) */
|
||||
@@ -379,7 +379,7 @@ char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
int attr; /* attribute for string (like tty_putstr()) */
|
||||
const char *str; /* menu string */
|
||||
boolean preselected; /* item is marked as selected */
|
||||
unsigned int itemflags; /* itemflags such as marked as selected */
|
||||
{
|
||||
struct trace_data *tdp = vp;
|
||||
|
||||
@@ -400,19 +400,19 @@ boolean preselected; /* item is marked as selected */
|
||||
|
||||
if (str) {
|
||||
fprintf(wc_tracelogf,
|
||||
"%sadd_menu(%d, %d, %p, %s, %s, %d, '%s'(%d), %d)\n", INDENT,
|
||||
"%sadd_menu(%d, %d, %p, %s, %s, %d, '%s'(%d), %u)\n", INDENT,
|
||||
window, glyph, (void *) identifier, buf_ch, buf_gch, attr,
|
||||
str, (int) strlen(str), preselected);
|
||||
str, (int) strlen(str), itemflags);
|
||||
} else {
|
||||
fprintf(wc_tracelogf,
|
||||
"%sadd_menu(%d, %d, %p, %s, %s, %d, NULL, %d)\n", INDENT,
|
||||
"%sadd_menu(%d, %d, %p, %s, %s, %d, NULL, %u)\n", INDENT,
|
||||
window, glyph, (void *) identifier, buf_ch, buf_gch, attr,
|
||||
preselected);
|
||||
itemflags);
|
||||
}
|
||||
|
||||
PRE;
|
||||
(*tdp->nprocs->win_add_menu)(tdp->ndata, window, glyph, identifier, ch,
|
||||
gch, attr, str, preselected);
|
||||
gch, attr, str, itemflags);
|
||||
POST;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user