Changeset 5480d5e in mainline for uspace/lib/display/src
- Timestamp:
- 2020-05-19T21:51:11Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9242ad9
- Parents:
- 4c4d6142
- Location:
- uspace/lib/display/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
r4c4d6142 r5480d5e 266 266 } 267 267 268 static void display_window_set_cursor_srv(display_srv_t *srv, ipc_call_t *icall) 269 { 270 sysarg_t wnd_id; 271 display_stock_cursor_t cursor; 272 errno_t rc; 273 274 wnd_id = ipc_get_arg1(icall); 275 cursor = ipc_get_arg2(icall); 276 277 if (srv->ops->window_set_cursor == NULL) { 278 async_answer_0(icall, ENOTSUP); 279 return; 280 } 281 282 rc = srv->ops->window_set_cursor(srv->arg, wnd_id, cursor); 283 async_answer_0(icall, rc); 284 } 285 268 286 static void display_get_event_srv(display_srv_t *srv, ipc_call_t *icall) 269 287 { … … 386 404 case DISPLAY_WINDOW_RESIZE: 387 405 display_window_resize_srv(srv, &call); 406 break; 407 case DISPLAY_WINDOW_SET_CURSOR: 408 display_window_set_cursor_srv(srv, &call); 388 409 break; 389 410 case DISPLAY_GET_EVENT: -
uspace/lib/display/src/display.c
r4c4d6142 r5480d5e 416 416 } 417 417 418 /** Set window cursor. 419 * 420 * Set cursor that is displayed when pointer is over the window. The default 421 * is the arrow pointer. 422 * 423 * @param window Window 424 * @param cursor Cursor to display 425 * @return EOK on success or an error code 426 */ 427 errno_t display_window_set_cursor(display_window_t *window, 428 display_stock_cursor_t cursor) 429 { 430 async_exch_t *exch; 431 errno_t rc; 432 433 exch = async_exchange_begin(window->display->sess); 434 rc = async_req_2_0(exch, DISPLAY_WINDOW_SET_CURSOR, window->id, 435 cursor); 436 async_exchange_end(exch); 437 return rc; 438 } 439 418 440 /** Get display event. 419 441 *
Note:
See TracChangeset
for help on using the changeset viewer.