Changeset 2012fe0 in mainline for uspace/srv/hid/display/display.c
- Timestamp:
- 2020-01-21T15:04:53Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 28db46b
- Parents:
- c79545e
- git-author:
- Jiri Svoboda <jiri@…> (2020-01-20 19:04:50)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-01-21 15:04:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
rc79545e r2012fe0 236 236 } 237 237 238 /** Get last window in display. 239 * 240 * @param display Display 241 * @return Last window or @c NULL if there is none 242 */ 243 ds_window_t *ds_display_last_window(ds_display_t *display) 244 { 245 link_t *link = list_last(&display->windows); 246 247 if (link == NULL) 248 return NULL; 249 250 return list_get_instance(link, ds_window_t, ldwindows); 251 } 252 238 253 /** Get next window in client. 239 254 * … … 244 259 { 245 260 link_t *link = list_next(&wnd->ldwindows, &wnd->display->windows); 261 262 if (link == NULL) 263 return NULL; 264 265 return list_get_instance(link, ds_window_t, ldwindows); 266 } 267 268 /** Get previous window in client. 269 * 270 * @param wnd Current window 271 * @return Previous window or @c NULL if there is none 272 */ 273 ds_window_t *ds_display_prev_window(ds_window_t *wnd) 274 { 275 link_t *link = list_prev(&wnd->ldwindows, &wnd->display->windows); 246 276 247 277 if (link == NULL) … … 441 471 } 442 472 473 /** Paint display. 474 * 475 * @param display Display 476 * @param rect Bounding rectangle or @c NULL to repaint entire display 477 */ 478 errno_t ds_display_paint(ds_display_t *disp, gfx_rect_t *rect) 479 { 480 errno_t rc; 481 ds_window_t *wnd; 482 483 /* Paint background */ 484 rc = ds_display_paint_bg(disp, rect); 485 if (rc != EOK) 486 return rc; 487 488 /* Paint windows bottom to top */ 489 wnd = ds_display_last_window(disp); 490 while (wnd != NULL) { 491 rc = ds_window_paint(wnd, rect); 492 if (rc != EOK) 493 return rc; 494 495 wnd = ds_display_prev_window(wnd); 496 } 497 498 return EOK; 499 } 500 443 501 /** @} 444 502 */
Note:
See TracChangeset
for help on using the changeset viewer.