Changeset b7fd2a0 in mainline for uspace/srv/hid/compositor/compositor.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/compositor/compositor.c
r36f0738 rb7fd2a0 151 151 static bool active = false; 152 152 153 static int comp_active(input_t *);154 static int comp_deactive(input_t *);155 static int comp_key_press(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t);156 static int comp_mouse_move(input_t *, int, int);157 static int comp_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned);158 static int comp_mouse_button(input_t *, int, int);153 static errno_t comp_active(input_t *); 154 static errno_t comp_deactive(input_t *); 155 static errno_t comp_key_press(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t); 156 static errno_t comp_mouse_move(input_t *, int, int); 157 static errno_t comp_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned); 158 static errno_t comp_mouse_button(input_t *, int, int); 159 159 160 160 static input_ev_ops_t input_ev_ops = { … … 602 602 } 603 603 604 int rc = async_data_read_finalize(callid, event, len);604 errno_t rc = async_data_read_finalize(callid, event, len); 605 605 if (rc != EOK) { 606 606 async_answer_0(iid, ENOMEM); … … 706 706 707 707 void *new_cell_storage; 708 int rc = async_share_out_finalize(callid, &new_cell_storage);708 errno_t rc = async_share_out_finalize(callid, &new_cell_storage); 709 709 if ((rc != EOK) || (new_cell_storage == AS_MAP_FAILED)) { 710 710 async_answer_0(iid, ENOMEM); … … 1049 1049 /* Retrieve the mode that shall be set. */ 1050 1050 vslmode_t new_mode; 1051 int rc = visualizer_get_mode(vp->sess, &new_mode, mode_idx);1051 errno_t rc = visualizer_get_mode(vp->sess, &new_mode, mode_idx); 1052 1052 if (rc != EOK) { 1053 1053 fibril_mutex_unlock(&viewport_list_mtx); … … 1177 1177 static async_sess_t *vsl_connect(service_id_t sid, const char *svc) 1178 1178 { 1179 int rc;1179 errno_t rc; 1180 1180 async_sess_t *sess; 1181 1181 … … 1206 1206 static viewport_t *viewport_create(service_id_t sid) 1207 1207 { 1208 int rc;1208 errno_t rc; 1209 1209 char *vsl_name = NULL; 1210 1210 viewport_t *vp = NULL; … … 1477 1477 #endif 1478 1478 1479 static int comp_abs_move(input_t *input, unsigned x , unsigned y,1479 static errno_t comp_abs_move(input_t *input, unsigned x , unsigned y, 1480 1480 unsigned max_x, unsigned max_y) 1481 1481 { … … 1512 1512 } 1513 1513 1514 static int comp_mouse_move(input_t *input, int dx, int dy)1514 static errno_t comp_mouse_move(input_t *input, int dx, int dy) 1515 1515 { 1516 1516 pointer_t *pointer = input_pointer(input); … … 1624 1624 } 1625 1625 1626 static int comp_mouse_button(input_t *input, int bnum, int bpress)1626 static errno_t comp_mouse_button(input_t *input, int bnum, int bpress) 1627 1627 { 1628 1628 pointer_t *pointer = input_pointer(input); … … 1809 1809 } 1810 1810 1811 static int comp_active(input_t *input)1811 static errno_t comp_active(input_t *input) 1812 1812 { 1813 1813 active = true; … … 1817 1817 } 1818 1818 1819 static int comp_deactive(input_t *input)1819 static errno_t comp_deactive(input_t *input) 1820 1820 { 1821 1821 active = false; … … 1823 1823 } 1824 1824 1825 static int comp_key_press(input_t *input, kbd_event_type_t type, keycode_t key,1825 static errno_t comp_key_press(input_t *input, kbd_event_type_t type, keycode_t key, 1826 1826 keymod_t mods, wchar_t c) 1827 1827 { … … 2143 2143 } 2144 2144 2145 static int input_connect(const char *svc)2145 static errno_t input_connect(const char *svc) 2146 2146 { 2147 2147 async_sess_t *sess; 2148 2148 service_id_t dsid; 2149 2149 2150 int rc = loc_service_get_id(svc, &dsid, 0);2150 errno_t rc = loc_service_get_id(svc, &dsid, 0); 2151 2151 if (rc != EOK) { 2152 2152 printf("%s: Input service %s not found\n", NAME, svc); … … 2199 2199 /* Create viewports and connect them to visualizers. */ 2200 2200 category_id_t cat_id; 2201 int rc = loc_category_get_id("visualizer", &cat_id, IPC_FLAG_BLOCKING);2201 errno_t rc = loc_category_get_id("visualizer", &cat_id, IPC_FLAG_BLOCKING); 2202 2202 if (rc != EOK) 2203 2203 goto ret; … … 2240 2240 } 2241 2241 2242 static int compositor_srv_init(char *input_svc, char *name)2242 static errno_t compositor_srv_init(char *input_svc, char *name) 2243 2243 { 2244 2244 /* Coordinates of the central pixel. */ … … 2251 2251 async_set_fallback_port_handler(client_connection, NULL); 2252 2252 2253 int rc = loc_server_register(NAME);2253 errno_t rc = loc_server_register(NAME); 2254 2254 if (rc != EOK) { 2255 2255 printf("%s: Unable to register server (%s)\n", NAME, str_error(rc)); … … 2313 2313 printf("%s: HelenOS Compositor server\n", NAME); 2314 2314 2315 int rc = compositor_srv_init(argv[1], argv[2]);2315 errno_t rc = compositor_srv_init(argv[1], argv[2]); 2316 2316 if (rc != EOK) 2317 2317 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.