Changeset 593e023 in mainline for uspace/lib/c
- Timestamp:
- 2014-08-12T17:14:32Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c3bdc92
- Parents:
- ce3efa0
- Location:
- uspace/lib/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/input.c
rce3efa0 r593e023 80 80 } 81 81 82 int input_ yield(input_t *input)82 int input_activate(input_t *input) 83 83 { 84 84 async_exch_t *exch = async_exchange_begin(input->sess); 85 int rc = async_req_0_0(exch, INPUT_ YIELD);85 int rc = async_req_0_0(exch, INPUT_ACTIVATE); 86 86 async_exchange_end(exch); 87 87 … … 89 89 } 90 90 91 int input_reclaim(input_t *input) 92 { 93 async_exch_t *exch = async_exchange_begin(input->sess); 94 95 int rc = async_req_0_0(exch, INPUT_RECLAIM); 96 async_exchange_end(exch); 97 98 return rc; 91 static void input_ev_active(input_t *input, ipc_callid_t callid, 92 ipc_call_t *call) 93 { 94 int rc = input->ev_ops->active(input); 95 async_answer_0(callid, rc); 96 } 97 98 static void input_ev_deactive(input_t *input, ipc_callid_t callid, 99 ipc_call_t *call) 100 { 101 int rc = input->ev_ops->deactive(input); 102 async_answer_0(callid, rc); 99 103 } 100 104 … … 177 181 178 182 switch (IPC_GET_IMETHOD(call)) { 183 case INPUT_EVENT_ACTIVE: 184 input_ev_active(input, callid, &call); 185 break; 186 case INPUT_EVENT_DEACTIVE: 187 input_ev_deactive(input, callid, &call); 188 break; 179 189 case INPUT_EVENT_KEY: 180 190 input_ev_key(input, callid, &call); -
uspace/lib/c/include/io/input.h
rce3efa0 r593e023 49 49 50 50 typedef struct input_ev_ops { 51 int (*active)(input_t *); 52 int (*deactive)(input_t *); 51 53 int (*key)(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t); 52 54 int (*move)(input_t *, int, int); … … 57 59 extern int input_open(async_sess_t *, input_ev_ops_t *, void *, input_t **); 58 60 extern void input_close(input_t *); 59 extern int input_yield(input_t *); 60 extern int input_reclaim(input_t *); 61 extern int input_activate(input_t *); 61 62 62 63 #endif -
uspace/lib/c/include/ipc/input.h
rce3efa0 r593e023 39 39 40 40 typedef enum { 41 INPUT_YIELD = IPC_FIRST_USER_METHOD, 42 INPUT_RECLAIM 41 INPUT_ACTIVATE = IPC_FIRST_USER_METHOD 43 42 } input_request_t; 44 43 45 44 typedef enum { 46 INPUT_EVENT_KEY = IPC_FIRST_USER_METHOD, 45 INPUT_EVENT_ACTIVE = IPC_FIRST_USER_METHOD, 46 INPUT_EVENT_DEACTIVE, 47 INPUT_EVENT_KEY, 47 48 INPUT_EVENT_MOVE, 48 49 INPUT_EVENT_ABS_MOVE,
Note:
See TracChangeset
for help on using the changeset viewer.