Changeset 1ebcb791 in mainline for uspace/lib/ui/src/ui.c
- Timestamp:
- 2021-09-01T19:44:37Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f7c12b3
- Parents:
- 45004f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/ui.c
r45004f3 r1ebcb791 39 39 #include <errno.h> 40 40 #include <fibril.h> 41 #include <gfx/color.h> 42 #include <gfx/render.h> 41 43 #include <io/console.h> 42 44 #include <stdbool.h> … … 109 111 ui_winsys_t ws; 110 112 const char *osvc; 113 sysarg_t cols; 114 sysarg_t rows; 111 115 ui_t *ui; 112 116 … … 128 132 return EIO; 129 133 134 rc = console_get_size(console, &cols, &rows); 135 if (rc != EOK) { 136 console_done(console); 137 return rc; 138 } 139 130 140 console_cursor_visibility(console, false); 131 141 … … 145 155 146 156 ui->cgc = cgc; 157 ui->rect.p0.x = 0; 158 ui->rect.p0.y = 0; 159 ui->rect.p1.x = cols; 160 ui->rect.p1.y = rows; 161 162 (void) ui_paint(ui); 147 163 } else { 148 164 return EINVAL; … … 284 300 { 285 301 errno_t rc; 302 gfx_context_t *gc; 286 303 ui_window_t *awnd; 304 gfx_color_t *color = NULL; 305 306 gc = console_gc_get_ctx(ui->cgc); 307 308 rc = gfx_color_new_ega(0x11, &color); 309 if (rc != EOK) 310 return rc; 311 312 rc = gfx_set_color(gc, color); 313 if (rc != EOK) { 314 gfx_color_delete(color); 315 return rc; 316 } 317 318 rc = gfx_fill_rect(gc, &ui->rect); 319 if (rc != EOK) { 320 gfx_color_delete(color); 321 return rc; 322 } 323 324 gfx_color_delete(color); 287 325 288 326 /* XXX Should repaint all windows */
Note:
See TracChangeset
for help on using the changeset viewer.