Changeset 6baab83 in mainline for uspace/lib/display/src/display.c
- Timestamp:
- 2021-05-27T17:00:30Z (3 years ago)
- Children:
- b4b4dafe
- Parents:
- f2416ec3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/display.c
rf2416ec3 r6baab83 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 319 319 } 320 320 321 /** Get display window position. 322 * 323 * Get display window position on the display. 324 * 325 * @param window Window 326 * @param dpos Place to store position 327 * @return EOK on success or an error code 328 */ 329 errno_t display_window_get_pos(display_window_t *window, gfx_coord2_t *dpos) 330 { 331 async_exch_t *exch; 332 aid_t req; 333 ipc_call_t answer; 334 errno_t rc; 335 336 exch = async_exchange_begin(window->display->sess); 337 req = async_send_1(exch, DISPLAY_WINDOW_GET_POS, window->id, &answer); 338 rc = async_data_read_start(exch, dpos, sizeof (gfx_coord2_t)); 339 async_exchange_end(exch); 340 if (rc != EOK) { 341 async_forget(req); 342 return rc; 343 } 344 345 async_wait_for(req, &rc); 346 if (rc != EOK) 347 return rc; 348 349 return EOK; 350 } 351 321 352 /** Request a window resize. 322 353 *
Note:
See TracChangeset
for help on using the changeset viewer.