Split the mods, layout, leds parts of xkb_state_components

Note first:
This commits breaks the ABI somewhat. If an application is run against
this commit without recompiling against the updated header, these break:
    - xkb_state_layout_*_is_active always retuns false.
    - xkb_state_serialize_mods always returns 0.
So it might break layout switching in some applications. However,
xkbcommon-compat.h provides the necessary fixes, so recompiling should
work (though updating the application is even better).

Split the enum to its individual components, which enables us to refer
to them individually. We will use that later for reporting which
components of the state have changed after update.

Signed-off-by: Ran Benita <ran234@gmail.com>
state: add struct state_components

This holds all of the state component fields in the state in one struct.
We will later want to keep the previous state components after updates,
so this will allow us to do it without duplicating the fields.

Signed-off-by: Ran Benita <ran234@gmail.com>
Report which components of the state have changed

We add a return value to the xkb_state_update_key and
xkb_state_update_mask, which reports to the caller which of the state
components have changed as a result.

This restores the XKB functionality of the XkbStateNotify and
XkbIndicatorsStateNotify events. See:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Events
It is quite useful in some situations. For example, it allows an
application to avoid doing some work if nothing of relevance in the
state has changed. Say, a keyboard layout applet. Also useful for
debugging.

The deltas themselves are not provided, because I can't see a use case.
If needed, it should be possible to add some API for that.

In xkbcommon, keymaps are immutable, so all of the other *Notify events
from XKB are irrelevant.

Signed-off-by: Ran Benita <ran234@gmail.com>
test/interactive: add option to show state changes

Pass -c to see.

Signed-off-by: Ran Benita <ran234@gmail.com>
Change update_mask arguments to read 'depressed' instead of 'base'

Just to be consistent, as we use 'depressed' everywhere else in the API.

Signed-off-by: Ran Benita <ran234@gmail.com>
autogen: use --force instead of --symlink

--force copies and installs all the autotools support files, rather than
making symlinks, which can sometimes break things when upgrading your
system autotools.  This is what xserver does.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
state: fix typo in state component copying

Gladly no-one should have been fast enough to hit this.

Signed-off-by: Ran Benita <ran234@gmail.com>
keymap: use plain array for keymap->group_names

Again it is not resized.

Signed-off-by: Ran Benita <ran234@gmail.com>
test/interactive: use num_layouts_for_key()

This is the more appropriate for a specific key (also considering the
num_layouts() is a bit of a made-up value).

Signed-off-by: Ran Benita <ran234@gmail.com>
doc: move include_path functions to a separate group

These are 'special intrest' function, like the logging functions, so
it's nice to have them in their own logical group.

Signed-off-by: Ran Benita <ran234@gmail.com>
doc: various fixes

Just moving around / fixing syntax / grammar.

Signed-off-by: Ran Benita <ran234@gmail.com>