Changeset 805a149 in mainline
- Timestamp:
- 2021-10-25T11:18:04Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8edec53
- Parents:
- d0fd86a
- git-author:
- Jiri Svoboda <jiri@…> (2021-10-24 22:15:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-10-25 11:18:04)
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/terminal.c
rd0fd86a r805a149 141 141 static pixel_t color_table[16] = { 142 142 [COLOR_BLACK] = PIXEL(255, 0, 0, 0), 143 [COLOR_BLUE] = PIXEL(255, 0, 0, 240),144 [COLOR_GREEN] = PIXEL(255, 0, 240, 0),145 [COLOR_CYAN] = PIXEL(255, 0, 240, 240),146 [COLOR_RED] = PIXEL(255, 240, 0, 0),147 [COLOR_MAGENTA] = PIXEL(255, 240, 0, 240),148 [COLOR_YELLOW] = PIXEL(255, 240, 240, 0),149 [COLOR_WHITE] = PIXEL(255, 240, 240, 240),150 151 [COLOR_BLACK + 8] = PIXEL(255, 0, 0, 0),152 [COLOR_BLUE + 8] = PIXEL(255, 0, 0, 255),153 [COLOR_GREEN + 8] = PIXEL(255, 0, 255, 0),154 [COLOR_CYAN + 8] = PIXEL(255, 0, 255, 255),155 [COLOR_RED + 8] = PIXEL(255, 255, 0, 0),156 [COLOR_MAGENTA + 8] = PIXEL(255, 255, 0, 255),157 [COLOR_YELLOW + 8] = PIXEL(255, 255, 255, 0),143 [COLOR_BLUE] = PIXEL(255, 0, 0, 170), 144 [COLOR_GREEN] = PIXEL(255, 0, 170, 0), 145 [COLOR_CYAN] = PIXEL(255, 0, 170, 170), 146 [COLOR_RED] = PIXEL(255, 170, 0, 0), 147 [COLOR_MAGENTA] = PIXEL(255, 170, 0, 170), 148 [COLOR_YELLOW] = PIXEL(255, 170, 85, 0), 149 [COLOR_WHITE] = PIXEL(255, 170, 170, 170), 150 151 [COLOR_BLACK + 8] = PIXEL(255, 85, 85, 85), 152 [COLOR_BLUE + 8] = PIXEL(255, 85, 85, 255), 153 [COLOR_GREEN + 8] = PIXEL(255, 85, 255, 85), 154 [COLOR_CYAN + 8] = PIXEL(255, 85, 255, 255), 155 [COLOR_RED + 8] = PIXEL(255, 255, 85, 85), 156 [COLOR_MAGENTA + 8] = PIXEL(255, 255, 85, 255), 157 [COLOR_YELLOW + 8] = PIXEL(255, 255, 255, 85), 158 158 [COLOR_WHITE + 8] = PIXEL(255, 255, 255, 255), 159 159 }; … … 165 165 switch (attrs.val.style) { 166 166 case STYLE_NORMAL: 167 *bgcolor = color_table[COLOR_WHITE ];167 *bgcolor = color_table[COLOR_WHITE + 8]; 168 168 *fgcolor = color_table[COLOR_BLACK]; 169 169 break; 170 170 case STYLE_EMPHASIS: 171 *bgcolor = color_table[COLOR_WHITE ];172 *fgcolor = color_table[COLOR_RED ];171 *bgcolor = color_table[COLOR_WHITE + 8]; 172 *fgcolor = color_table[COLOR_RED + 8]; 173 173 break; 174 174 case STYLE_INVERTED: 175 175 *bgcolor = color_table[COLOR_BLACK]; 176 *fgcolor = color_table[COLOR_WHITE ];176 *fgcolor = color_table[COLOR_WHITE + 8]; 177 177 break; 178 178 case STYLE_SELECTED: 179 *bgcolor = color_table[COLOR_RED ];180 *fgcolor = color_table[COLOR_WHITE ];179 *bgcolor = color_table[COLOR_RED + 8]; 180 *fgcolor = color_table[COLOR_WHITE + 8]; 181 181 break; 182 182 } 183 183 break; 184 184 case CHAR_ATTR_INDEX: 185 *bgcolor = color_table[(attrs.val.index.bgcolor & 7) | 186 ((attrs.val.index.attr & CATTR_BRIGHT) ? 8 : 0)]; 185 *bgcolor = color_table[(attrs.val.index.bgcolor & 7)]; 187 186 *fgcolor = color_table[(attrs.val.index.fgcolor & 7) | 188 187 ((attrs.val.index.attr & CATTR_BRIGHT) ? 8 : 0)]; -
uspace/app/tester/console/console1.c
rd0fd86a r805a149 106 106 } 107 107 console_flush(console); 108 console_set_ color(console, COLOR_WHITE, COLOR_BLACK, 0);108 console_set_style(console, STYLE_NORMAL); 109 109 putchar('\n'); 110 110 … … 115 115 } 116 116 console_flush(console); 117 console_set_ color(console, COLOR_WHITE, COLOR_BLACK, 0);117 console_set_style(console, STYLE_NORMAL); 118 118 putchar('\n'); 119 119 -
uspace/lib/congfx/src/console.c
rd0fd86a r805a149 300 300 * @param cgc Console GC 301 301 * @return EOK on success or an error code 302 */ 302 */ 303 303 errno_t console_gc_resume(console_gc_t *cgc) 304 304 {
Note:
See TracChangeset
for help on using the changeset viewer.