Add support for signed 24.8 decimal numbers

'fixed' is a signed decimal type which offers a sign bit, 23 bits of
integer precision, and 8 bits of decimal precision.  This is exposed as
an opaque struct with conversion helpers to and from double and int on
the C API side.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Input: Convert pointer co-ordinates to signed_24_8

This offers more precision when using devices like tablets, and also for
transformed surfaces.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Update TODO

Daniel did fixed point coordinates.
TODO: More updates
protocol: Add documentation for wl_output
protocol: Back out accidentally committed wl_seat changes
protocol: Specify that the fullscreen framerate parameter is also mHz
TODO: Strike the last xkbcommon issues
Optimize wl_fixed_t to/from double conversion functions
tests: add noop to fixed-benchmark

I was just curious of how much the looping takes time without
conversion, so I added this.

My results on Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz:

benchmarked noop:	1.876349827s
benchmarked magic:	2.245844470s
benchmarked div:	12.709085309s
benchmarked mul:	7.504838141s

Mul seems to take 15x the time magic does, cool!

Btw. the simple default cast of int32_t to double is slower than magic
for me, hence the use of union.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Add missing alt attributes in publican docs.

Haven't figured out how to regenerate the html, so it's not tested.
Looks like remaining html errors will be fixed in the next publican
release:  https://bugzilla.redhat.com/show_bug.cgi?id=788576
Convert wl_input_device to wl_seat (and friends)

wl_input_device has been both renamed and split.  wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.

It now only generates one event: to let clients know that it has new
capabilities.  It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
doc: Update docs to refer to wl_seat instead of wl_input_device
protocol: use transient flags for activate or not surfaces

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
shm: Add request for resizing pools
Introduce libwayland-cursor, a cursor helper library

The purpose of this library is to be the equivalent of libXcursor in
the X world. This library is compatible with X cursor themes and loads
them directly into an shm pool making it easy for the clients to get
buffer for each cursor image.

The code for handling the X cursor theme was taken from libXcursor. The
files cursor/xcursor.[ch] are a stripped down version of that library
containing only the interfaces necessary for implementing the wayland
counterpart.
server: Initialise serial number counter for wl_display

This ends up propagating through and creating a valgrind error like:

==22573== Conditional jump or move depends on uninitialised value(s)
==22573==    at 0x409E57: pointer_attach (compositor.c:1999)
==22573==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==22573==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==22573==    by 0x5674C45: wl_closure_invoke (connection.c:770)
==22573==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==22573==    by 0x56722F1: wl_event_source_fd_dispatch (event-loop.c:79)
==22573==    by 0x5672C91: wl_event_loop_dispatch (event-loop.c:410)
==22573==    by 0x56705F4: wl_display_run (wayland-server.c:1003)
==22573==    by 0x40C775: main (compositor.c:2937)
shm: Zero busy count for allocated buffers

This avoids a valgrind error like:

==31496== Conditional jump or move depends on uninitialised value(s)
==31496==    at 0x407620: weston_buffer_post_release (compositor.c:928)
==31496==    by 0x406AEB: weston_surface_attach (compositor.c:725)
==31496==    by 0x409EB8: pointer_attach (compositor.c:2009)
==31496==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496==    by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496==    by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496==    by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496==    by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496==    by 0x40C775: main (compositor.c:2937)
==31496==  Uninitialised value was created by a heap allocation
==31496==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==31496==    by 0x5670EA7: shm_pool_create_buffer (wayland-shm.c:113)
==31496==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496==    by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496==    by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496==    by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496==    by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496==    by 0x40C775: main (compositor.c:2937)
cursor: Fix unsigned/signed comparisons
fix typo