python: prefix event map names with underscores

Closest thing that python has to "private". These are generated and we reserve
the right to modify the generation in the future, so make sure they're private
by default.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: rename _map to _type_map for better clarity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: be forgiving about invalid event types/codes in the public API

Return None if not found instead of throwing a KeyError which reveals too much
of the internal implementation anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: update the __all__ listing for the evemu module

Export the new class and the two public conversion functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: drop an erroneous quote + parenthesis

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: put a warning comment for private API into the generated file

Inserting a tab in front of the top comment to have textwrap.dedent() work
correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: add wrappers to get input prop names/values

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: hardcode the encoding in the two places we need it

Prep work for being able to deprecate evemu.const.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
python: move the library name to the class that loads it

With the goal of deprecating the evemu.const file.

This is the only class that cares about the name of the lib, so define it
here. Something fancier involving Makefiles and generation from base.py.in is
possible, but probably more trouble than it's worth.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>