Unref seats and devices in libinput_destroy()

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Move zalloc() up to libinput-util.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doc: group li_fixed_t into the fixed point functions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
util: add ARRAY_FOR_EACH helper

Requires c99, but that's the future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
udev: print errno if we can't open a device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Add -lm to library

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Add libudev and -lm to Requires.private

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Document the open/close_restricted interface

Specifically, document that it needs to return a negative errno on failure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix typo in comment

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Documentation typo fix
doc: extract static members as well

We only run doxygen over the public headers, so if we have a static function
in those make sure they show up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
evdev: Combine evdev_handle_device() and evdev_configure_device()

We split the device probing and idenfication somewhat arbitrarily between
these two functions.  This commit combines them into one.  Return of -1
indicates error, 0 success, but succesful probing can return a device
with device->caps == 0, which means we don't handle the device.
evdev: Drop EVDEV_MOTION_REL flag

This is only used inside evdev_configure_device() and we now use a local
has_rel flag instead.
evdev: Use has_abs only for ABS_X and ABS_Y, introduce has_mt for MT events

We split up has_abs into plain ABS_X/Y and MT events, but this shouldn't
introduce any logic changes.
evdev: Replace EVDEV_MOTION_ABS with local has_abs flag
evdev: Replace EVDEV_BUTTON with local has_button flag
evdev: Use a has_keyboard flag instead of EVDEV_KEYBOARD bit
evdev: Remove EVDEV_TOUCH and with it evdev_device->caps

We now keep all the configuration intermediate results inside
evdev_configure_device() and the result is device->seat_caps.
evdev: Drop obsolete accelerometer reject rule

This rule triggers for devices with an ABS_X/Y evaluators and no
keyboard or multitouch events.  There is no way we would ever add such
a device as a pointer, keyboard or touch device anyway.  A pointer
device requires has_button (in which case the !has_key condtion would
fail); a keyboard device would also mean !has_key is false and a touch
screen device implies that !device->is_mt is false.
evdev: Reject absolute motion if we're not a pointer or a touch device

Some joysticks have certain buttons that acts keyboard keys.  As such,
we'll reconize them as keyboards but not pointers.  In that case, don't
send pointer motion events when we get absolute joystick events.