Changeset 60ebe63 in mainline for uspace/lib/c/generic/io/input.c
- Timestamp:
- 2022-11-08T21:20:23Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7bcd15f
- Parents:
- 3a6d44b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/input.c
r3a6d44b7 r60ebe63 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 106 106 static void input_ev_key(input_t *input, ipc_call_t *call) 107 107 { 108 unsigned kbd_id; 108 109 kbd_event_type_t type; 109 110 keycode_t key; … … 112 113 errno_t rc; 113 114 114 type = ipc_get_arg1(call); 115 key = ipc_get_arg2(call); 116 mods = ipc_get_arg3(call); 117 c = ipc_get_arg4(call); 118 119 rc = input->ev_ops->key(input, type, key, mods, c); 115 kbd_id = ipc_get_arg1(call); 116 type = ipc_get_arg2(call); 117 key = ipc_get_arg3(call); 118 mods = ipc_get_arg4(call); 119 c = ipc_get_arg5(call); 120 121 rc = input->ev_ops->key(input, kbd_id, type, key, mods, c); 120 122 async_answer_0(call, rc); 121 123 } … … 123 125 static void input_ev_move(input_t *input, ipc_call_t *call) 124 126 { 127 unsigned pos_id; 125 128 int dx; 126 129 int dy; 127 130 errno_t rc; 128 131 129 dx = ipc_get_arg1(call); 130 dy = ipc_get_arg2(call); 131 132 rc = input->ev_ops->move(input, dx, dy); 132 pos_id = ipc_get_arg1(call); 133 dx = ipc_get_arg2(call); 134 dy = ipc_get_arg3(call); 135 136 rc = input->ev_ops->move(input, pos_id, dx, dy); 133 137 async_answer_0(call, rc); 134 138 } … … 136 140 static void input_ev_abs_move(input_t *input, ipc_call_t *call) 137 141 { 142 unsigned pos_id; 138 143 unsigned x; 139 144 unsigned y; … … 142 147 errno_t rc; 143 148 144 x = ipc_get_arg1(call); 145 y = ipc_get_arg2(call); 146 max_x = ipc_get_arg3(call); 147 max_y = ipc_get_arg4(call); 148 149 rc = input->ev_ops->abs_move(input, x, y, max_x, max_y); 149 pos_id = ipc_get_arg1(call); 150 x = ipc_get_arg2(call); 151 y = ipc_get_arg3(call); 152 max_x = ipc_get_arg4(call); 153 max_y = ipc_get_arg5(call); 154 155 rc = input->ev_ops->abs_move(input, pos_id, x, y, max_x, max_y); 150 156 async_answer_0(call, rc); 151 157 } … … 153 159 static void input_ev_button(input_t *input, ipc_call_t *call) 154 160 { 161 unsigned pos_id; 155 162 int bnum; 156 163 int press; 157 164 errno_t rc; 158 165 159 bnum = ipc_get_arg1(call); 160 press = ipc_get_arg2(call); 161 162 rc = input->ev_ops->button(input, bnum, press); 166 pos_id = ipc_get_arg1(call); 167 bnum = ipc_get_arg2(call); 168 press = ipc_get_arg3(call); 169 170 rc = input->ev_ops->button(input, pos_id, bnum, press); 163 171 async_answer_0(call, rc); 164 172 } … … 166 174 static void input_ev_dclick(input_t *input, ipc_call_t *call) 167 175 { 176 unsigned pos_id; 168 177 int bnum; 169 178 errno_t rc; 170 179 171 bnum = ipc_get_arg1(call); 172 173 rc = input->ev_ops->dclick(input, bnum); 180 pos_id = ipc_get_arg1(call); 181 bnum = ipc_get_arg2(call); 182 183 rc = input->ev_ops->dclick(input, pos_id, bnum); 174 184 async_answer_0(call, rc); 175 185 }
Note:
See TracChangeset
for help on using the changeset viewer.