| 1804 | } |
| 1805 | |
| 1806 | static void |
| 1807 | apply_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 |
no test coverage detected