Reduce keyboard events to one single type

Provide one top-level event for keyboard events: libinput_event_keyboard. The
event type specifies which subtype the event is anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reduce pointer events to one single type

The event type itself says enough about the actual event type, we don't need
to have separate structs for every type.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reduce touch events to a single event type

No real effect since we're hiding the actual touch events through the touch
type.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
zalloc all events to make sure we have defined defaults

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Add documentation for the various events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Provide accessors to retrieve the right event type

Slightly enhances the type-safety. A caller may now do something along the
lines of

	struct libinput_event_pointer *ptrev;
	ptrev = libinput_event_get_pointer_event(event);

	if (!ptrev)
	   oops, that wasn't a pointer event

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Promote touch frames to top-level events

These events are not a state of a single touchpoints but rather a notification
that all touchpoints finished processing. As such, they should have their own
type.

And make sure we actually send them when needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Drop event classes

There are now only two event classes and only two users of the event class.
It's easier to use the event type directly to see which event has references
and which one doesn't.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
path: get ID_SEAT and WL_SEAT from udev for the device node

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
evdev: don't ignore scroll events with a value greater than 1/-1

Higher values than 1 or -1 are legitimate on some devices, though not all mice
send wheel events other than 1/-1.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: Add a common helper function to drain all current events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: Add a basic mouse test device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add a wacom touch devices (absolute touchscreen)

This means we do have to provide the get_current_screen_dimensions() call in
litest now, just hardcode it to 1024x768.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add basic pointer motion and button test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add a simple touch test

Currently testing for touch frame events only

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
evdev: Make error handling more consistent

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Simplify device reference counting of events

This also makes DEVICE_ADDED/REMOVED events own a reference, which is
necessary to not have libinput_event_get_device() potentially returning
an invalid pointer.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Remove redundant device pointer from device notify event

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
evdev: Make evdev manage its seat reference

Before the seat reference would be decreased when a device was removed.
This could cause libinput_device_get_seat() to potentially return an
invalid pointer when a device was removed, its seat unreferenced and
destryoed.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>