Commit Graph

28 Commits

Author SHA1 Message Date
Bryce Harrington 8224171c22 simple-im: Use returns from main() consistently
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
2016-10-12 14:03:01 -07:00
Bryce Harrington c6ae8126e1
clients: Use ARRAY_LENGTH macro in weston-simple-im
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-01 00:47:18 +02:00
Jussi Kukkonen 649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Bryce Harrington b4dae9beff Make config.h inclusion consistent
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-06-16 11:01:54 -07:00
Bryce Harrington cd7df632be weston-simple-im: Make capitalization consistent in error messages
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-06-16 11:01:18 -07:00
Jonas Ådahl b57f472c84 Use input method protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 13:17:59 +02:00
Bryce Harrington 1f6b0d1d2c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
Ran Benita 2e1968fa1f Replace deprecated xkbcommon symbols with current names
These symbols (xkb_map_* and others) were replaced in xkbcommon with more
consistent names. See the header xkbcommon/xkbcommon-compat.h for how
the old names map to the new.

The new names have been available since the first stable xkbcommon
release (0.2.0).

Signed-off-by: Ran Benita <ran234@gmail.com>
2014-08-20 01:05:13 -07:00
Kristian Høgsberg c7d2c4c147 Add more missing config.h #includes
Now that we use AC_SYS_LARGEFILE, we need to pull in config.h at least
whereever we use mmap().  Fixes at least the test-suite and simple-shm
on 32 bit systems.
2013-08-26 14:59:14 -07:00
Jan Arne Petersen cc75ec11ca text: Rename input_method to wl_input_method
Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:18:46 -04:00
Jan Arne Petersen 00191c7c4a text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen ece6b5af51 text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:21:18 -04:00
Jan Arne Petersen 1cc9e08d2f 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>
2013-02-15 17:08:01 -05:00
Jan Arne Petersen 0eabcaafae 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>
2013-02-15 17:07:03 -05:00
Jan Arne Petersen ab2b01429e simple-im: fix for protocol changes
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:01:20 -05:00
Jan Arne Petersen c7d2a9839b text: add serial argument to text protocol
The serial argument will allow to ignore outdated events from before a
reset request.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:37 -05:00
Jan Arne Petersen 4653531e7a text: add pre-edit styling support to protocol
Also add a separate preedit-cursor event and add a commit argument to
preedit-string to allow to support commit on reset. Fix editor and
keyboard example to adapt to the protocol changes.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:27 -05:00
Pekka Paalanen 0eab05d2a7 clients: add global_remove handler stubs
All the clients here were missing the global_remove handler. Because
window.c did not have it, weston-desktop-shell and weston-keyboard
segfaulted on compositor exit, as they received some
wl_registry.global_remove events.

Add more or less stub global_remove handlers, so that clients do not
crash on such events. Toytoolkit and all applications would need a lot
more code to properly handle the global object removal.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:42:38 -05:00
Kristian Høgsberg b88b68fa42 weston-simple-im: Add a few more compose sequences 2012-11-27 15:11:04 -05:00
Kristian Høgsberg 504e8f109a weston-simple-im: Fold struct keyboard_input into struct simple_im 2012-11-27 14:28:19 -05:00
Kristian Høgsberg aec12b806c weston-simple-im: Fold keyboard_input_handle_keymap() into event handler 2012-11-27 14:21:34 -05:00
Kristian Høgsberg 6aae61483b weston-simple-im: Fold keyboard_input_handle_key() into event handler 2012-11-27 14:20:31 -05:00
Kristian Høgsberg 3a3704db20 weston-simple-im: Fold keyboard_input_handle_modifiers into event handler 2012-11-27 14:18:54 -05:00
Kristian Høgsberg de318ab25f weston-simple-im: Stop using toytoolkit
Toytoolkit doesn't buy us anything in this case, we're not rendering or
handling regular input events.  Just talk directly to wl_display and
look up the 'input_method' global directly.
2012-11-27 14:18:54 -05:00
Kristian Høgsberg 79bfde20bd weston-simple-im: Use serial number from incoming events
The key events we pass through to the input_method_context has to have
a serial number that corresponds to the key event we got.  The struct display
serial is updated on pointer enter/leave and keyboard events, but not the
input method keyboard events.  So the display serial will never correspond
to the key event we're dealing with and we have to pass through the
serial we get from the key event.
2012-11-27 13:57:27 -05:00
Kristian Høgsberg 8c03616c39 weston-simple-im: Create our own xkb_context
There's no need to use the struct display xkb_context, we can just create
out ow.  This reverts c31288daf1.
2012-11-27 13:48:09 -05:00
Kristian Høgsberg 1199b16f02 clients: Move keyboard-utils.[ch] into weston-simple-im
This is the only user of this code, so just include it in the simple im
source.
2012-11-27 13:42:04 -05:00
Jan Arne Petersen e9fba2b737 text: Add simple compose input method
Add an input method listening to hardware keyboard input and generating
compose text.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:19:39 -05:00