Add a generic libinput_event_get_device() function

After dropping seat evens, all events are now are associated with a device, so
provide a generic accessor function and drop the custom ones.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Drop libinput_event_get_target()

Replaced by specific accessor functions for context, seat and device. This
obsoletes the internal target as well, we just direcly ref the element we need
to instead of temporarily storing it in the target.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Merge the device added/removed events into a single device notify event

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Improve namespacing of event types

Now that the target of an event isn't exposed to the caller anymore, the
namespacing can be associated with a more intuitive one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>