Changeset 87a7cdb in mainline for uspace/srv/hid/display/display.c
- Timestamp:
- 2019-12-05T19:35:12Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 71cbe5c
- Parents:
- 973efd36
- File:
-
- 1 edited
-
uspace/srv/hid/display/display.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
r973efd36 r87a7cdb 58 58 59 59 list_initialize(&disp->clients); 60 disp->gc = gc;61 60 disp->next_wnd_id = 1; 61 list_initialize(&disp->ddevs); 62 62 list_initialize(&disp->seats); 63 63 list_initialize(&disp->windows); … … 347 347 } 348 348 349 /** Add display device to display. 350 * 351 * @param disp Display 352 * @param ddev Display device 353 */ 354 void ds_display_add_ddev(ds_display_t *disp, ds_ddev_t *ddev) 355 { 356 assert(ddev->display == NULL); 357 assert(!link_used(&ddev->lddevs)); 358 359 ddev->display = disp; 360 list_append(&ddev->lddevs, &disp->ddevs); 361 } 362 363 /** Remove display device from display. 364 * 365 * @param ddev Display device 366 */ 367 void ds_display_remove_ddev(ds_ddev_t *ddev) 368 { 369 list_remove(&ddev->lddevs); 370 ddev->display = NULL; 371 } 372 373 /** Get first display device in display. 374 * 375 * @param disp Display 376 * @return First display device or @c NULL if there is none 377 */ 378 ds_ddev_t *ds_display_first_ddev(ds_display_t *disp) 379 { 380 link_t *link = list_first(&disp->ddevs); 381 382 if (link == NULL) 383 return NULL; 384 385 return list_get_instance(link, ds_ddev_t, lddevs); 386 } 387 388 /** Get next display device in display. 389 * 390 * @param ddev Current display device 391 * @return Next display device or @c NULL if there is none 392 */ 393 ds_ddev_t *ds_display_next_ddev(ds_ddev_t *ddev) 394 { 395 link_t *link = list_next(&ddev->lddevs, &ddev->display->ddevs); 396 397 if (link == NULL) 398 return NULL; 399 400 return list_get_instance(link, ds_ddev_t, lddevs); 401 } 402 403 // XXX 404 gfx_context_t *ds_display_get_gc(ds_display_t *display) 405 { 406 ds_ddev_t *ddev; 407 408 ddev = ds_display_first_ddev(display); 409 if (ddev == NULL) 410 abort(); 411 412 return ddev->gc; 413 } 414 349 415 /** @} 350 416 */
Note:
See TracChangeset
for help on using the changeset viewer.
