Changes in uspace/srv/hid/display/dsops.c [9e84d2c:3be5366] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/dsops.c
r9e84d2c r3be5366 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 46 46 static errno_t disp_window_create(void *, display_wnd_params_t *, sysarg_t *); 47 47 static errno_t disp_window_destroy(void *, sysarg_t); 48 static errno_t disp_window_move_req(void *, sysarg_t, gfx_coord2_t *); 48 static errno_t disp_window_move_req(void *, sysarg_t, gfx_coord2_t *, 49 sysarg_t); 49 50 static errno_t disp_window_move(void *, sysarg_t, gfx_coord2_t *); 50 51 static errno_t disp_window_get_pos(void *, sysarg_t, gfx_coord2_t *); 52 static errno_t disp_window_get_max_rect(void *, sysarg_t, gfx_rect_t *); 51 53 static errno_t disp_window_resize_req(void *, sysarg_t, 52 display_wnd_rsztype_t, gfx_coord2_t * );54 display_wnd_rsztype_t, gfx_coord2_t *, sysarg_t); 53 55 static errno_t disp_window_resize(void *, sysarg_t, gfx_coord2_t *, 54 56 gfx_rect_t *); 57 static errno_t disp_window_minimize(void *, sysarg_t); 58 static errno_t disp_window_maximize(void *, sysarg_t); 59 static errno_t disp_window_unmaximize(void *, sysarg_t); 55 60 static errno_t disp_window_set_cursor(void *, sysarg_t, display_stock_cursor_t); 61 static errno_t disp_window_set_caption(void *, sysarg_t, const char *); 56 62 static errno_t disp_get_event(void *, sysarg_t *, display_wnd_ev_t *); 57 63 static errno_t disp_get_info(void *, display_info_t *); … … 63 69 .window_move = disp_window_move, 64 70 .window_get_pos = disp_window_get_pos, 71 .window_get_max_rect = disp_window_get_max_rect, 65 72 .window_resize_req = disp_window_resize_req, 66 73 .window_resize = disp_window_resize, 74 .window_minimize = disp_window_minimize, 75 .window_maximize = disp_window_maximize, 76 .window_unmaximize = disp_window_unmaximize, 67 77 .window_set_cursor = disp_window_set_cursor, 78 .window_set_caption = disp_window_set_caption, 68 79 .get_event = disp_get_event, 69 80 .get_info = disp_get_info … … 117 128 118 129 static errno_t disp_window_move_req(void *arg, sysarg_t wnd_id, 119 gfx_coord2_t *pos )130 gfx_coord2_t *pos, sysarg_t pos_id) 120 131 { 121 132 ds_client_t *client = (ds_client_t *) arg; … … 131 142 132 143 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_move_req()"); 133 ds_window_move_req(wnd, pos );144 ds_window_move_req(wnd, pos, pos_id); 134 145 ds_display_unlock(client->display); 135 146 return EOK; … … 175 186 } 176 187 188 static errno_t disp_window_get_max_rect(void *arg, sysarg_t wnd_id, 189 gfx_rect_t *rect) 190 { 191 ds_client_t *client = (ds_client_t *) arg; 192 ds_window_t *wnd; 193 194 ds_display_lock(client->display); 195 196 wnd = ds_client_find_window(client, wnd_id); 197 if (wnd == NULL) { 198 ds_display_unlock(client->display); 199 return ENOENT; 200 } 201 202 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_get_max_rect()"); 203 ds_window_get_max_rect(wnd, rect); 204 ds_display_unlock(client->display); 205 return EOK; 206 } 207 177 208 static errno_t disp_window_resize_req(void *arg, sysarg_t wnd_id, 178 display_wnd_rsztype_t rsztype, gfx_coord2_t *pos )209 display_wnd_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id) 179 210 { 180 211 ds_client_t *client = (ds_client_t *) arg; … … 193 224 194 225 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_resize_req()"); 195 ds_window_resize_req(wnd, rsztype, pos );226 ds_window_resize_req(wnd, rsztype, pos, pos_id); 196 227 ds_display_unlock(client->display); 197 228 return EOK; … … 219 250 } 220 251 252 static errno_t disp_window_minimize(void *arg, sysarg_t wnd_id) 253 { 254 ds_client_t *client = (ds_client_t *) arg; 255 ds_window_t *wnd; 256 errno_t rc; 257 258 ds_display_lock(client->display); 259 260 wnd = ds_client_find_window(client, wnd_id); 261 if (wnd == NULL) { 262 ds_display_unlock(client->display); 263 return ENOENT; 264 } 265 266 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_maximize()"); 267 rc = ds_window_minimize(wnd); 268 ds_display_unlock(client->display); 269 return rc; 270 } 271 272 static errno_t disp_window_maximize(void *arg, sysarg_t wnd_id) 273 { 274 ds_client_t *client = (ds_client_t *) arg; 275 ds_window_t *wnd; 276 errno_t rc; 277 278 ds_display_lock(client->display); 279 280 wnd = ds_client_find_window(client, wnd_id); 281 if (wnd == NULL) { 282 ds_display_unlock(client->display); 283 return ENOENT; 284 } 285 286 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_maximize()"); 287 rc = ds_window_maximize(wnd); 288 ds_display_unlock(client->display); 289 return rc; 290 } 291 292 static errno_t disp_window_unmaximize(void *arg, sysarg_t wnd_id) 293 { 294 ds_client_t *client = (ds_client_t *) arg; 295 ds_window_t *wnd; 296 errno_t rc; 297 298 ds_display_lock(client->display); 299 300 wnd = ds_client_find_window(client, wnd_id); 301 if (wnd == NULL) { 302 ds_display_unlock(client->display); 303 return ENOENT; 304 } 305 306 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_unmaximize()"); 307 rc = ds_window_unmaximize(wnd); 308 ds_display_unlock(client->display); 309 return rc; 310 } 311 221 312 static errno_t disp_window_set_cursor(void *arg, sysarg_t wnd_id, 222 313 display_stock_cursor_t cursor) … … 240 331 } 241 332 333 static errno_t disp_window_set_caption(void *arg, sysarg_t wnd_id, 334 const char *caption) 335 { 336 ds_client_t *client = (ds_client_t *) arg; 337 ds_window_t *wnd; 338 errno_t rc; 339 340 ds_display_lock(client->display); 341 342 wnd = ds_client_find_window(client, wnd_id); 343 if (wnd == NULL) { 344 ds_display_unlock(client->display); 345 return ENOENT; 346 } 347 348 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_set_caption()"); 349 rc = ds_window_set_caption(wnd, caption); 350 ds_display_unlock(client->display); 351 return rc; 352 } 353 242 354 static errno_t disp_get_event(void *arg, sysarg_t *wnd_id, 243 355 display_wnd_ev_t *event) … … 247 359 errno_t rc; 248 360 249 log_msg(LOG_DEFAULT, LVL_DEBUG , "disp_window_get_event()");361 log_msg(LOG_DEFAULT, LVL_DEBUG2, "disp_window_get_event()"); 250 362 251 363 ds_display_lock(client->display);
Note:
See TracChangeset
for help on using the changeset viewer.