From afffbd8bf5c5ae851b63a5d3700e79804bfb56fd Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 29 Jul 2019 11:35:23 +0000 Subject: [PATCH 1/9] text-input: Add on_screen_input_provided hint The new hint is meant to indicate that the text input already provides an on-screen means to enter data, and that using the system provided input method may not be needed. It should be used when the client presents the user with a custom on-screen input method, like an on-screen keyboard, or perhaps a dropdown list. The new hint is meant to address the issue when the system input method is an on-screen keyboard. Without the hint, the input method would not know that it's not needed, unless the client refrained from using the input method protocol at all. With the hint, the input method can still be enabled, while not displaying a second on-screen keyboard. This allows for the system input method to still provide accessibility services, as well as text completion or prediction. Based on discussion in https://gitlab.gnome.org/GNOME/gtk/merge_requests/978 Signed-off-by: Dorota Czaplejewicz --- unstable/text-input/text-input-unstable-v3.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index c1c1b22..122002d 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -47,7 +47,7 @@ interface version number is reset. - + The zwp_text_input_v3 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the @@ -210,6 +210,9 @@ + @@ -434,7 +437,7 @@ - + A factory for text-input objects. This object is a global singleton. From 67be8069dc15c68f6f45dba29e59c7dd4ee88380 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Thu, 3 Feb 2022 12:37:14 +0900 Subject: [PATCH 2/9] text-input: Add no Emoji input Allow hinting input methods about if Emoji support is not useful for special applications likes IDE, which manage or debug other applications. Fixes: #79 Signed-off-by: fujiwarat --- unstable/text-input/text-input-unstable-v3.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index 122002d..22e833f 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -213,6 +213,9 @@ + From 163b0404610bfdc6f80e44e291fc799673a64fc4 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Mon, 25 Jan 2021 18:36:38 -0700 Subject: [PATCH 3/9] text-input: Add preedit_shown flag Some clients don't show preedit text inline, so the compositor may want to display the preedit text in a popup window instead. Signed-off-by: Tadeo Kondrak --- unstable/text-input/text-input-unstable-v3.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index 22e833f..cfc46a3 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -216,6 +216,9 @@ + From ba4ea256d1106ad5dfc59d0db5dd7b706010e6c4 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Fri, 19 Mar 2021 14:14:37 -0600 Subject: [PATCH 4/9] text-input: Synchronize set_cursor_rectangle with the wl_surface Signed-off-by: Tadeo Kondrak --- unstable/text-input/text-input-unstable-v3.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index cfc46a3..3b8ed38 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -282,6 +282,16 @@ the text input does not support describing the cursor area. If the empty values get applied, subsequent attempts to change them may have no effect. + + As of version 2, the values sent with this request are not used + immediately after they are applied to the text-input state. + + After the pending state is applied with the zwp_text_input_v3.commit + request, the following wl_surface.commit request on the surface with + text-input focus will cause the values to become active. + + If the surface with text-input focus changes before a wl_surface.commit + request is sent, the values are discarded. From 0dd05d436f89c421adcd0481c69ad7d63a40236f Mon Sep 17 00:00:00 2001 From: dcz Date: Fri, 20 Jun 2025 11:34:28 +0000 Subject: [PATCH 5/9] text-input: Reword and clarify cursor syncing This change makes it clear that there's an extra buffer for the value. This explains the purpose of the complicated design. Signed-off-by: Dorota Czaplejewicz --- unstable/text-input/text-input-unstable-v3.xml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index 3b8ed38..2803661 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -283,15 +283,18 @@ empty values get applied, subsequent attempts to change them may have no effect. - As of version 2, the values sent with this request are not used - immediately after they are applied to the text-input state. + As of version 2, the zwp_text_input_v3.commit request does not apply + values sent with this request. Instead, it stores them in a separate + "committed" area. The committed values, if still valid, get applied on + the next wl_surface.commit request on the surface with text-input focus. + Both committed and applied values get invalidated on: - After the pending state is applied with the zwp_text_input_v3.commit - request, the following wl_surface.commit request on the surface with - text-input focus will cause the values to become active. + - the next committed enable or disable request, or + - a change of the focused surface of the text-input (leave or enter events). - If the surface with text-input focus changes before a wl_surface.commit - request is sent, the values are discarded. + This double stage application allows the compositor to position + the input method popup in the same frame as the contents + of the text on the surface are updated. From 6562cf724a7248e8ff1e71da6ef078d896e88b51 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Thu, 25 Mar 2021 23:07:40 -0600 Subject: [PATCH 6/9] text-input: Add actions Signed-off-by: Tadeo Kondrak --- .../text-input/text-input-unstable-v3.xml | 52 ++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index 2803661..f3cb5f3 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -425,8 +425,10 @@ Instruct the application to apply changes to state requested by the - preedit_string, commit_string and delete_surrounding_text events. The - state relating to these events is double-buffered, and each one + preedit_string, commit_string delete_surrounding_text, and action + events. + + The state relating to these events is double-buffered, and each one modifies the pending state. This event replaces the current state with the pending state. @@ -439,6 +441,7 @@ 4. Calculate surrounding text to send. 5. Insert new preedit text in cursor position. 6. Place cursor inside preedit text. + 7. Perform the requested action. The serial number reflects the last state of the zwp_text_input_v3 object known to the compositor. The value of the serial argument must @@ -454,6 +457,51 @@ + + + + + + + + + A possible action to perform on a text input. + + The submit action is intended for input entries that expect some sort of + activation after user interaction, e.g. the URL entry in a browser. + + + + + + + + An action was performed on this text input. + + Values set with this event are double-buffered. They must be applied + and reset to initial on the next zwp_text_input_v3.done event. + + The initial value of action is none. + + + + + + + + Set the actions available for this text input. + + Values set with this request are double-buffered. They will get applied + on the next zwp_text_input_v3.commit request. + + If the available_actions array contains the none action, or contains the + same action multiple times, the compositor must raise the invalid_action + protocol error. + + Initially, no actions are available. + + + From f83f492569926c07277b253047ca623348f78bcb Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 1 Aug 2023 10:52:42 +0100 Subject: [PATCH 7/9] unstable/text-input: Add language hint from IME to clients Some input methods such as a virtual keyboard allow a user to switch between different languages. This is important to clients as some languages should be rendered as RTL or change font rendering. Signed-off-by: David Edmundson --- unstable/text-input/text-input-unstable-v3.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index f3cb5f3..dc0d233 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -487,6 +487,18 @@ + + + Notify the application of language used by the input method. + + This event will be sent on creation if known and for all subsequent changes. + + The language should be specified as an IETF BCP 47 tag. + Setting an empty string will reset any known language back to the default unknown state. + + + + Set the actions available for this text input. From 1cbb0d25df76343e52e3c74d3d0d167404cb4681 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 18 Jul 2024 13:39:59 +0200 Subject: [PATCH 8/9] text-input: Add show/hide_input_panel requests These requests allow clients to explicitly declare the desired interaction pattern with input panels (e.g. the system OSK). This allows clients to decide a fine grained pattern to show/hide these panels that is decouple of enable/disable requests. This may help them enhance the experience with e.g. selecting text, or navigating around large bodies of text without an intrusive OSK, or implementing other UI patterns like a "show OSK" button. Signed-off-by: Carlos Garnacho --- .../text-input/text-input-unstable-v3.xml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index dc0d233..c671793 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -514,6 +514,26 @@ + + + + Requests an input panel to be shown (e.g. a on-screen keyboard). + + This request only hints the desired interaction pattern from the + client side, and its effect may be ignored by compositors given + other environmental factors. Repeated calls will be ignored. + + + + + + Requests an input panel to be hidden. + + This request only hints the desired interaction pattern from the + client side, and its effect may be ignored by compositors given + other environmental factors. Repeated calls will be ignored. + + From 1b7eb33769bf30610ac095175dbcb1051b3d9d53 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 7 Jul 2023 16:30:39 +0200 Subject: [PATCH 9/9] text-input: Add preedit text hints There seems to be some demand from input methods to be able to style different parts of the preedit string differently. Since the reasons to do that are many, and vary between IMs and languages. But even though some IMs would much want to be able to specify colors, they lack the context to know what choice of colors provides enough contrast and legibility embedded on foreign UIs (e.g. accounting things like themes, accessibility, ...). There is a proposal for a semantic closed list of pre-edit styling options at https://github.com/ibus/ibus/wiki/Wayland-Colors, which this commit follows, so clients and UIs have more freedom in displaying a suitable style to pre-edit strings. Signed-off-by: Carlos Garnacho --- .../text-input/text-input-unstable-v3.xml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index c671793..01c1e21 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -534,6 +534,52 @@ other environmental factors. Repeated calls will be ignored. + + + + Style hints for the preedit string. + + + + + + + + + + + + + Notify of contextual hints for the pre-edit string. This + event is always sent together with a zwp_text_input_v3.preedit_string + event. + + The parameters start and end are counted in bytes relative to the + beginning of the text buffer submitted through + zwp_text_input_v3.preedit_string, and represent the substring in the + pre-edit text affected by the hint. + + Multiple events may be submitted if the preedit string has different + sections. The extent of hints may overlap. The parts of the preedit + string that are not covered by any zwp_text_input_v3.preedit_hint event, + the text will be considered unhinted. This is also the case if no + preedit_hint event is sent. + + Clients should provide recognizable visuals to these hints. if they are + unable to comply with this requisition, it may be preferable for them + keep the preedit_shown content hint disabled. + + Values set with this event are double-buffered. They must be applied + and reset on the next zwp_text_input_v3.done event. + + + + +