MCPcopy Create free account
hub / github.com/NetHack/NetHack / apply_hilite_attributes

Function apply_hilite_attributes

win/X11/winstat.c:1806–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1804}
1805
1806static void
1807apply_hilite_attributes(struct X_status_value *sv, int attributes)
1808{
1809 boolean attr_inversion = ((HL_INVERSE & attributes)
1810 && (sv->type != SV_NAME
1811 || name_widget_has_label(sv)));
1812
1813 if (sv->inverted_hilite != attr_inversion) {
1814 sv->inverted_hilite = attr_inversion;
1815 if (!sv->set) {
1816 if (sv->type == SV_VALUE)
1817 hilight_value(sv->w);
1818 else
1819 hilight_label(sv->w);
1820 }
1821 }
1822 sv->attr = attributes;
1823 /* Could possibly add more attributes here: HL_ATTCLR_DIM,
1824 HL_ATTCLR_BLINK, HL_ATTCLR_ULINE, and HL_ATTCLR_BOLD. If so,
1825 extract the above into its own function apply_hilite_inverse()
1826 and each other attribute into its own to keep the code clean. */
1827}
1828
1829/*
1830 * Update the displayed status. The current code in botl.c updates

Callers 1

Calls 3

name_widget_has_labelFunction · 0.85
hilight_valueFunction · 0.85
hilight_labelFunction · 0.85

Tested by

no test coverage detected