Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8f16ede6 in mainline for uspace/srv/hid/input/layout/cz.c


Ignore:
Timestamp:
2019-05-14T18:24:48Z (19 months ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
e89dc0b
Parents:
3e1bc35
Message:

Turning old layouts into dynamic libraries

Adds new makefiles which creates dynamic
libraries for every layout. Extends existing
makefile for exposing those layout in the
distributed image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/layout/cz.c

    r3e1bc35 r8f16ede6  
    3535 */
    3636
     37#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_cz))
     38#error Invalid configuration of CONFIG_KB_LAYOUT
     39#else
     40
    3741#include <errno.h>
    3842#include <io/console.h>
     
    4751static wchar_t cz_parse_ev(layout_t *, kbd_event_t *ev);
    4852
     53static const layout_ops_t layout_intern = {
     54        .create = cz_create,
     55        .destroy = cz_destroy,
     56        .parse_ev = cz_parse_ev
     57};
     58
     59#ifdef CONFIG_KB_LAYOUT_EXTERNAL
     60layout_ops_t get_layout(void);
     61layout_ops_t get_layout(void)
     62{
     63        return layout_intern;
     64}
     65#else
     66layout_ops_t layout_default = layout_intern;
     67layout_ops_t layout_active = layout_intern;
     68#endif
     69
    4970enum m_state {
    5071        ms_start,
     
    5677        enum m_state mstate;
    5778} layout_cz_t;
    58 
    59 #ifdef CONFIG_KB_LAYOUT_cz
    60 
    61 layout_ops_t layout_default = {
    62         .create = cz_create,
    63         .destroy = cz_destroy,
    64         .parse_ev = cz_parse_ev
    65 };
    66 
    67 #else
    68 
    69 layout_ops_t get_layout(void);
    70 layout_ops_t get_layout(void) {
    71         layout_ops_t layout_default = {
    72                 .create = cz_create,
    73                 .destroy = cz_destroy,
    74                 .parse_ev = cz_parse_ev
    75         };
    76         return layout_default;
    77 }
    78 
    79 #endif
    8079
    8180static wchar_t map_lcase[] = {
     
    447446}
    448447
     448#endif
     449
    449450/**
    450451 * @}
Note: See TracChangeset for help on using the changeset viewer.