Changeset d8503fd in mainline for uspace/srv/hid/display/display.c
- Timestamp:
- 2023-01-09T21:14:04Z (16 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46b02cb
- Parents:
- e04b72d6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 98 98 list_initialize(&disp->clients); 99 99 list_initialize(&disp->wmclients); 100 list_initialize(&disp->cfgclients); 100 101 disp->next_wnd_id = 1; 101 102 list_initialize(&disp->ddevs); … … 120 121 assert(list_empty(&disp->clients)); 121 122 assert(list_empty(&disp->wmclients)); 123 assert(list_empty(&disp->cfgclients)); 122 124 assert(list_empty(&disp->seats)); 123 125 assert(list_empty(&disp->ddevs)); … … 241 243 list_remove(&wmclient->lwmclients); 242 244 wmclient->display = NULL; 245 } 246 247 /** Add CFG client to display. 248 * 249 * @param disp Display 250 * @param cfgclient CFG client 251 */ 252 void ds_display_add_cfgclient(ds_display_t *disp, ds_cfgclient_t *cfgclient) 253 { 254 assert(cfgclient->display == NULL); 255 assert(!link_used(&cfgclient->lcfgclients)); 256 257 cfgclient->display = disp; 258 list_append(&cfgclient->lcfgclients, &disp->cfgclients); 259 } 260 261 /** Remove CFG client from display. 262 * 263 * @param cfgclient CFG client 264 */ 265 void ds_display_remove_cfgclient(ds_cfgclient_t *cfgclient) 266 { 267 list_remove(&cfgclient->lcfgclients); 268 cfgclient->display = NULL; 243 269 } 244 270 … … 525 551 526 552 seat->display = disp; 553 seat->id = disp->next_seat_id++; 527 554 list_append(&seat->lseats, &disp->seats); 528 555 } … … 566 593 567 594 return list_get_instance(link, ds_seat_t, lseats); 595 } 596 597 /** Find seat by ID. 598 * 599 * @param display Display 600 * @param id Seat ID 601 */ 602 ds_seat_t *ds_display_find_seat(ds_display_t *display, ds_seat_id_t id) 603 { 604 ds_seat_t *seat; 605 606 seat = ds_display_first_seat(display); 607 while (seat != NULL) { 608 if (seat->id == id) 609 return seat; 610 611 seat = ds_display_next_seat(seat); 612 } 613 614 return NULL; 568 615 } 569 616
Note:
See TracChangeset
for help on using the changeset viewer.