Update kernel driver

Copy most recent linux-3.3 driver source to ./driver/ directory.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Remove xwiimote_kernel links

We have no experimental features. Development takes place upstream so add link
to linux-input mailing list.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Clarify xorg config comments

The xorg config file is provided to ignore direct raw wiimote input. It works
perfectly well with out tools.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Add autotools support

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Update documentation to refer to autotools

Update REAMDE to include hints about the autotools and also rework the
documentation. Also remove the old Makefiles.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Add xwiikeymap dummy

They xwiikeymap will become the most basic emulator which simply remaps the Wii
Remote keys to other keys.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Add dummy compatibility library

Since adopting a new API is always hard we now try to emulate the two
most commonly used Wii Remote APIs under linux. This is cwiid and
wiiuse. The current implementation is just a dummy but this will
eventually become a full ABI compatible implementation of both libraries
based on libxwiimote.so.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Add configure to autogen.sh

Add default configure-line to autogen.sh.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: implement main loop

Add basic main-loop interface and open a new uinput-device so we can
start mapping incoming Wii Remote keys.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
lib: add time info to events

Copy the current time from the kernel input sync-event into our own
event structure.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
compat: remove compatibility interfaces

Cwiid and wiiuse have a horrible API design. It would take months to get the
compatibility library right and then we would end up with support for two more
APIs which no-one want to use. Instead, we should help porting old applications
to the new interface and everyone will be happy.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Improve documentation

Add several missing sections about the kernel interface and clarify extension
hotplug.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: add xwii monitor

Create xwii monitor and wait for incoming connections. We will then create a
mapper for each connected Wii Remote.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
lib: fix monitor udev device filter

The xwii_monitor recently discovered devices by the "event" files. However, we
have multiple event files per HID device so we now directly discover only the
HID device. This prevents the monitor from returning a device multiple times.

As a side effect, the device might not be fully set up when the parent HID
device is broadcasted by udev. However, that's up to the user to handle as we
only notify him of new devices, not of the current state of the remote device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: poll for devices before starting

The xwii-monitor provides already connected devices before starting to poll for
new devices so we need to retrieve them before starting the main-loop.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
lib: provide epoll wrapper

To allow the application to have only one FD for polling we provide an epoll fd
to the application that it can use like any other FD in it's own event-loop. We
hide all the event-descriptors a single wiimote has behind the epoll-fd.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: add new devices into main-loop

If we find a new device we now put it into the main-loop and react on events of
the device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: implement keymaps

Add basic mapping from wiimote-keys so we have a working mapper for now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: add argument parser

The keymap and some basic parameters can now be changed on the command line with
arguments to xwiikeymap.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xwiikeymap: allow daemon mode

If -d is given on the command-line we fork into background to run as a daemon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>