Changeset e1f2079 in mainline for uspace/srv/hid/rfb/main.c
- Timestamp:
- 2020-02-14T19:54:40Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b0a94854
- Parents:
- b252e87
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/rfb/main.c
rb252e87 re1f2079 27 27 */ 28 28 29 #include <ddev/info.h> 29 30 #include <ddev_srv.h> 30 31 #include <errno.h> … … 46 47 #define NAME "rfb" 47 48 49 static errno_t rfb_ddev_get_gc(void *, sysarg_t *, sysarg_t *); 50 static errno_t rfb_ddev_get_info(void *, ddev_info_t *); 51 48 52 static errno_t rfb_gc_set_color(void *, gfx_color_t *); 49 53 static errno_t rfb_gc_fill_rect(void *, gfx_rect_t *); … … 55 59 56 60 static ddev_ops_t rfb_ddev_ops = { 61 .get_gc = rfb_ddev_get_gc, 62 .get_info = rfb_ddev_get_info 57 63 }; 58 64 … … 103 109 rfb->damage_rect.width = new_rect.p1.x - new_rect.p0.x; 104 110 rfb->damage_rect.height = new_rect.p1.y - new_rect.p1.y; 111 } 112 113 static errno_t rfb_ddev_get_gc(void *arg, sysarg_t *arg2, sysarg_t *arg3) 114 { 115 *arg2 = 0; 116 *arg3 = 42; 117 return EOK; 118 } 119 120 static errno_t rfb_ddev_get_info(void *arg, ddev_info_t *info) 121 { 122 rfb_t *rfb = (rfb_t *) arg; 123 124 ddev_info_init(info); 125 126 info->rect.p0.x = 0; 127 info->rect.p0.y = 0; 128 info->rect.p1.x = rfb->width; 129 info->rect.p1.y = rfb->height; 130 131 return EOK; 105 132 } 106 133 … … 284 311 static void client_connection(ipc_call_t *icall, void *arg) 285 312 { 313 rfb_t *rfb = (rfb_t *) arg; 286 314 ddev_srv_t srv; 287 315 sysarg_t svc_id; … … 295 323 ddev_srv_initialize(&srv); 296 324 srv.ops = &rfb_ddev_ops; 297 srv.arg = arg;325 srv.arg = (void *) rfb; 298 326 299 327 /* Handle connection */ 300 328 ddev_conn(icall, &srv); 301 329 } else { 302 rc = gfx_context_new(&rfb_gc_ops, arg, &gc);330 rc = gfx_context_new(&rfb_gc_ops, (void *) rfb, &gc); 303 331 if (rc != EOK) { 304 332 async_answer_0(icall, ENOMEM);
Note:
See TracChangeset
for help on using the changeset viewer.