Ignore:
Timestamp:
2011-06-13T22:05:30Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef15fbb
Parents:
a07a454
Message:

Make key lock/modifier state as well as layout state per-device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/include/layout.h

    ra07a454 r2f7a564  
    4141#include <io/console.h>
    4242
    43 typedef struct {
    44         void (*reset)(void);
    45         wchar_t (*parse_ev)(kbd_event_t *);
    46 } layout_op_t;
     43/** Layout instance state */
     44typedef struct layout {
     45        /** Ops structure */
     46        struct layout_ops *ops;
    4747
    48 extern layout_op_t us_qwerty_op;
    49 extern layout_op_t us_dvorak_op;
    50 extern layout_op_t cz_op;
     48        /* Layout-private data */
     49        void *layout_priv;
     50} layout_t;
     51
     52/** Layout ops */
     53typedef struct layout_ops {
     54        int (*create)(layout_t *);
     55        void (*destroy)(layout_t *);
     56        wchar_t (*parse_ev)(layout_t *, kbd_event_t *);
     57} layout_ops_t;
     58
     59extern layout_ops_t us_qwerty_ops;
     60extern layout_ops_t us_dvorak_ops;
     61extern layout_ops_t cz_ops;
     62
     63extern layout_t *layout_create(layout_ops_t *);
     64extern void layout_destroy(layout_t *);
     65extern wchar_t layout_parse_ev(layout_t *, kbd_event_t *);
    5166
    5267#endif
Note: See TracChangeset for help on using the changeset viewer.