more window port interface adjustments
further adjustments to the window port interface to pass a pointer to a glyph_info struct which describes not just the glyph number itself, but also the ttychar, the color, the glyphflags, and the symset index. This affects two existing window port calls that get passed glyphs and does the parameter consistently for both of them using the glyph_info struct pointer: print_glyph() add_menu(). The recently added glyphmod parameter is now unnecessary and has been removed.
This commit is contained in:
@@ -183,9 +183,9 @@ unsigned long mbehavior;
|
||||
}
|
||||
|
||||
void
|
||||
chainin_add_menu(window, glyph, identifier, ch, gch, attr, str, itemflags)
|
||||
chainin_add_menu(window, glyphinfo, 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 glyph_info *glyphinfo; /* glyph and other glyph info to display with item */
|
||||
const anything *identifier; /* what to return if selected */
|
||||
char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
@@ -194,8 +194,8 @@ 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, glyph, identifier,
|
||||
ch, gch, attr, str, itemflags);
|
||||
(*cibase->nprocs->win_add_menu)(cibase->ndata, window, glyphinfo,
|
||||
identifier, ch, gch, attr, str, itemflags);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -272,13 +272,13 @@ char *posbar;
|
||||
|
||||
/* XXX can we decode the glyph in a meaningful way? */
|
||||
void
|
||||
chainin_print_glyph(window, x, y, glyph, bkglyph, glyphmod)
|
||||
chainin_print_glyph(window, x, y, glyphinfo, bkglyphinfo)
|
||||
winid window;
|
||||
xchar x, y;
|
||||
int glyph, bkglyph;
|
||||
int glyphmod[NUM_GLYPHMOD];
|
||||
const glyph_info *glyphinfo;
|
||||
const glyph_info *bkglyphinfo;
|
||||
{
|
||||
(*cibase->nprocs->win_print_glyph)(cibase->ndata, window, x, y, glyph, bkglyph, glyphmod);
|
||||
(*cibase->nprocs->win_print_glyph)(cibase->ndata, window, x, y, glyphinfo, bkglyphinfo);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -224,11 +224,11 @@ unsigned long mbehavior;
|
||||
}
|
||||
|
||||
void
|
||||
chainout_add_menu(vp, window, glyph, identifier, ch, gch, attr, str,
|
||||
chainout_add_menu(vp, window, glyphinfo, 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) */
|
||||
const glyph_info *glyphinfo /* glyph plus glyph info to display with item */
|
||||
const anything *identifier; /* what to return if selected */
|
||||
char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
@@ -238,8 +238,8 @@ 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, itemflags);
|
||||
(*tdp->nprocs->win_add_menu)(window, glyphinfo, identifier, ch, gch,
|
||||
attr, str, itemflags);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -336,16 +336,16 @@ char *posbar;
|
||||
#endif
|
||||
|
||||
void
|
||||
chainout_print_glyph(vp, window, x, y, glyph, bkglyph, glyphmod)
|
||||
chainout_print_glyph(vp, window, x, y, glyphinfo, bkglyphinfo)
|
||||
void *vp;
|
||||
winid window;
|
||||
xchar x, y;
|
||||
int glyph, bkglyph;
|
||||
int glyphmod[NUM_GLYPHMOD];
|
||||
const glyph_info *glyphinfo;
|
||||
const glyph_info *bkglyphinfo;
|
||||
{
|
||||
struct chainout_data *tdp = vp;
|
||||
|
||||
(*tdp->nprocs->win_print_glyph)(window, x, y, glyph, bkglyph, glyphmod);
|
||||
(*tdp->nprocs->win_print_glyph)(window, x, y, glyphinfo, bkglyphinfo);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -372,10 +372,10 @@ unsigned long mbehavior;
|
||||
}
|
||||
|
||||
void
|
||||
trace_add_menu(vp, window, glyph, identifier, ch, gch, attr, str, itemflags)
|
||||
trace_add_menu(vp, window, glyphinfo, 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) */
|
||||
const glyph_info *glyphinfo /* glyph plus glyph info to display with item */
|
||||
const anything *identifier; /* what to return if selected */
|
||||
char ch; /* keyboard accelerator (0 = pick our own) */
|
||||
char gch; /* group accelerator (0 = no group) */
|
||||
@@ -402,19 +402,19 @@ unsigned int itemflags; /* itemflags such as marked as selected */
|
||||
|
||||
if (str) {
|
||||
fprintf(wc_tracelogf,
|
||||
"%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), itemflags);
|
||||
"%sadd_menu(%d, %d, %u, %p, %s, %s, %d, '%s'(%d), %u)\n", INDENT,
|
||||
window, glyphinfo->glyph, glyphinfo->flags, (void *) identifier,
|
||||
buf_ch, buf_gch, attr, str, (int) strlen(str), itemflags);
|
||||
} else {
|
||||
fprintf(wc_tracelogf,
|
||||
"%sadd_menu(%d, %d, %p, %s, %s, %d, NULL, %u)\n", INDENT,
|
||||
window, glyph, (void *) identifier, buf_ch, buf_gch, attr,
|
||||
itemflags);
|
||||
"%sadd_menu(%d, %d, %u, %p, %s, %s, %d, NULL, %u)\n", INDENT,
|
||||
window, glyphinfo->glyph, glyphinfo->flags, (void *) identifier,
|
||||
buf_ch, buf_gch, attr, itemflags);
|
||||
}
|
||||
|
||||
PRE;
|
||||
(*tdp->nprocs->win_add_menu)(tdp->ndata, window, glyph, identifier, ch,
|
||||
gch, attr, str, itemflags);
|
||||
(*tdp->nprocs->win_add_menu)(tdp->ndata, window, glyphinfo,
|
||||
identifier,ch, gch, attr, str, itemflags);
|
||||
POST;
|
||||
}
|
||||
|
||||
@@ -575,23 +575,23 @@ char *posbar;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX can we decode the glyph in a meaningful way? see map_glyphmod()?
|
||||
/* XXX can we decode the glyph in a meaningful way? see map_glyphinfo()?
|
||||
genl_putmixed? */
|
||||
void
|
||||
trace_print_glyph(vp, window, x, y, glyph, bkglyph, glyphmod)
|
||||
trace_print_glyph(vp, window, x, y, glyphinfo, bkglyphinfo)
|
||||
void *vp;
|
||||
winid window;
|
||||
xchar x, y;
|
||||
int glyph, bkglyph;
|
||||
int glyphmod[NUM_GLYPHMOD];
|
||||
const glyph_info *glyphinfo;
|
||||
const glyph_info *bkglyphinfo;
|
||||
{
|
||||
struct trace_data *tdp = vp;
|
||||
|
||||
fprintf(wc_tracelogf, "%sprint_glyph(%d, %d, %d, %d, %d, %lu)\n", INDENT, window,
|
||||
x, y, glyph, bkglyph, glyphmod);
|
||||
fprintf(wc_tracelogf, "%sprint_glyph(%d, %d, %d, %d, %d)\n", INDENT, window,
|
||||
x, y, glyphinfo->glyph, bkglyphinfo->glyph);
|
||||
|
||||
PRE;
|
||||
(*tdp->nprocs->win_print_glyph)(tdp->ndata, window, x, y, glyph, bkglyph, glyphmod);
|
||||
(*tdp->nprocs->win_print_glyph)(tdp->ndata, window, x, y, glyphinfo, bkglyphinfo);
|
||||
POST;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user