Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/input.c

    r6af521c rf9b2cb4c  
    5858        async_exch_t *exch = async_exchange_begin(sess);
    5959
    60         int rc = async_connect_to_me(exch, 0, 0, 0, input_cb_conn, input);
     60        port_id_t port;
     61        int rc = async_create_callback_port(exch, INTERFACE_INPUT_CB, 0, 0,
     62            input_cb_conn, input, &port);
     63       
    6164        async_exchange_end(exch);
    6265
     
    8083}
    8184
    82 int input_yield(input_t *input)
     85int input_activate(input_t *input)
    8386{
    8487        async_exch_t *exch = async_exchange_begin(input->sess);
    85 
    86         int rc = async_req_0_0(exch, INPUT_YIELD);
     88        int rc = async_req_0_0(exch, INPUT_ACTIVATE);
    8789        async_exchange_end(exch);
    88 
     90       
    8991        return rc;
    9092}
    9193
    92 int input_reclaim(input_t *input)
    93 {
    94         async_exch_t *exch = async_exchange_begin(input->sess);
    95 
    96         int rc = async_req_0_0(exch, INPUT_RECLAIM);
    97         async_exchange_end(exch);
    98 
    99         return rc;
     94static void input_ev_active(input_t *input, ipc_callid_t callid,
     95    ipc_call_t *call)
     96{
     97        int rc = input->ev_ops->active(input);
     98        async_answer_0(callid, rc);
     99}
     100
     101static void input_ev_deactive(input_t *input, ipc_callid_t callid,
     102    ipc_call_t *call)
     103{
     104        int rc = input->ev_ops->deactive(input);
     105        async_answer_0(callid, rc);
    100106}
    101107
     
    178184
    179185                switch (IPC_GET_IMETHOD(call)) {
     186                case INPUT_EVENT_ACTIVE:
     187                        input_ev_active(input, callid, &call);
     188                        break;
     189                case INPUT_EVENT_DEACTIVE:
     190                        input_ev_deactive(input, callid, &call);
     191                        break;
    180192                case INPUT_EVENT_KEY:
    181193                        input_ev_key(input, callid, &call);
Note: See TracChangeset for help on using the changeset viewer.