keyboard: Add support for pre-edit styling

Adds a button to the keyboard to support different styles of pre-edit
styling.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
editor: add support for pre-edit styling

Add pango dependency to the example and use pango for text handling.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Add content type support to text protocol

Support content types in text protocol. Content is defined by a hint
bitmask and a purpose field.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
keyboard: Add support for a numeric layout

Add support for a numeric key layout, which is used for some numeric
content purpose types.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
editor: Add content type example

Set the content type purpose to numeric of the second entry.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: add support for invoke_action request

Add a request to be called by the client when the word currently being
composed is tapped by the user. Input methods often use this information
to offer more word suggestions to the user.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
editor: add support for invoke_action

Call invoke_action request when a currently composed word is clicked.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
keyboard: add support for invoke_action

Set the pre-edit cursor on the clicked index on invoke_action.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
simple-im: fix for protocol changes

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: fix weston key bindings with input methods

Add a struct weston_keyboard, to handle the input method grab.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
doc: add some more text protocol documentation

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
editor: Add support for backspace keysym events

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
shell: Do not crash when hiding input_panel

Allow an input panel to attach a NULL-buffer for hiding.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
shell: Do not hang after setting input_panel twice

Ignore multiple calls with the same surface in input_panel_set_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Move input_panel interface to input-method

Move the input_panel interface from desktop-shell to input-method (since
it is not really tied to desktop-shell).

Add an input_panel_surface interface like wl_shell_surface to make it
easier to extend it. Also add a parameter to the set_toplevel request to
be able to specify where to show an input panel surface on the screen.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Remove unused requests/events

Put them back in, when we know what arguments they will have.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Add commit request

Allows for atomic state changes. Updated surrounding text, content type
and micro focus is taken into account all at once at commit.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Add show/hide_input_panel requests

Allows to show/hide the input panel (virtual keyboard) more independent
of focus (some applications might to require additionaly click on a
focused entry to show the input panel).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Rename set_micro_focus request

Rename set_micro_focus to set_cursor_rectangle to make more clear, what
it refers to.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
text: Split out cursor_position

Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.

The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>