Changeset 8edec53 in mainline for uspace/lib/c


Ignore:
Timestamp:
2021-10-25T17:51:10Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91ece11b
Parents:
805a149
Message:

Support double-click

Needed to open Navigator entries using the mouse.

Location:
uspace/lib/c
Files:
4 edited

Legend:

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

    r805a149 r8edec53  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    164164}
    165165
     166static void input_ev_dclick(input_t *input, ipc_call_t *call)
     167{
     168        int bnum;
     169        errno_t rc;
     170
     171        bnum = ipc_get_arg1(call);
     172
     173        rc = input->ev_ops->dclick(input, bnum);
     174        async_answer_0(call, rc);
     175}
     176
    166177static void input_cb_conn(ipc_call_t *icall, void *arg)
    167178{
     
    196207                        input_ev_button(input, &call);
    197208                        break;
     209                case INPUT_EVENT_DCLICK:
     210                        input_ev_dclick(input, &call);
     211                        break;
    198212                default:
    199213                        async_answer_0(&call, ENOTSUP);
  • uspace/lib/c/include/io/input.h

    r805a149 r8edec53  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    5454        errno_t (*abs_move)(input_t *, unsigned, unsigned, unsigned, unsigned);
    5555        errno_t (*button)(input_t *, int, int);
     56        errno_t (*dclick)(input_t *, int);
    5657} input_ev_ops_t;
    5758
  • uspace/lib/c/include/io/pos_event.h

    r805a149 r8edec53  
    11/*
     2 * Copyright (c) 2021 Jiri Svoboda
    23 * Copyright (c) 2012 Petr Koupy
    3  * Copyright (c) 2013 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    4040
    4141typedef enum {
     42        /** Position update */
    4243        POS_UPDATE,
     44        /** Button press */
    4345        POS_PRESS,
    44         POS_RELEASE
     46        /** Button release */
     47        POS_RELEASE,
     48        /** Double click */
     49        POS_DCLICK
    4550} pos_event_type_t;
    4651
  • uspace/lib/c/include/ipc/input.h

    r805a149 r8edec53  
    11/*
    2  * Copyright (c) 2011 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4848        INPUT_EVENT_MOVE,
    4949        INPUT_EVENT_ABS_MOVE,
    50         INPUT_EVENT_BUTTON
     50        INPUT_EVENT_BUTTON,
     51        INPUT_EVENT_DCLICK
    5152} input_notif_t;
    5253
Note: See TracChangeset for help on using the changeset viewer.