clients: add window_get_decoration_size

In tests we need to know about the decoration size. Moreover
it's a small clean-up.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
tests-helper: distil the functionality from handlers

Split out the real code from event handlers (like pointer_handle_motion,
etc.) and put it into standalone function. We'll use it in follow-up
patch where we will register handlers for toytoolkit clients and we'll
use the new functions so that the code won't be duplicated.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
add toytoolkit_client_create
tests: do attach only with normal surfaces

When we call move_client on toytoolkit client when intializing, then the
wl_buffer is NULL and we don't want that. Actually, toytoolkit clients
don't need attaching and commiting the surface at all, because it has
been already done.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
window: add display_dispatch

Split display_run into two functions - display_run and display_dispatch.
display_dispatch is the part that actually does something and
display_run just calls it in a loop. Now we can dispatch toytoolkit
events in tests (display_run is blocking, so we couldn't use that)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
add get_geometry & geometry request/event
tests: make client_roundtrip universal

Make client_roundtrip a function instead of macro and
make it work with both - normal clients and toytoolkit clients.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
weston-test: use real time instead of magic number

Pass time from weston_compositor_get_time() into notify_{motion, button}
etc. Until now the time was hardcoded to 100 and with toytoolkit clients
it causes problems, because toytoolkit checks the time.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
tests: add test-suite tests

Tests for test-suite itself

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
tests: add interactive tests

These tests are using pointer and keyboard simulated events
to interact with client.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>