[PATCH 1/5] text: add pre-edit styling support to protocol

Pekka Vuorela pvuorela at iki.fi
Tue Dec 4 12:51:12 PST 2012


On 30.11.2012 18:01, Jan Arne Petersen wrote:
> From: Jan Arne Petersen <jpetersen at openismus.com>
>
> 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.
[...]
> diff --git a/protocol/text.xml b/protocol/text.xml
> index 4701f7d..5efeec8 100644
> --- a/protocol/text.xml
> +++ b/protocol/text.xml
> @@ -73,7 +73,7 @@
>           be reseted, for example after the text was changed outside of the
>           normal input method flow.
>         </description>
> -     </request>
> +    </request>
>       <request name="set_micro_focus">
>         <arg name="x" type="int"/>
>         <arg name="y" type="int"/>
> @@ -101,7 +101,7 @@
>           to the start of the composing text.
>         </description>
>         <arg name="text" type="string"/>
> -      <arg name="index" type="uint"/>
> +      <arg name="commit" type="string"/>

I suppose this is the in-case-of-forced-commit? Not self-evident.

>       </event>
>       <event name="delete_surrounding_text">
>         <description summary="delete surrounding text">
> @@ -112,7 +112,27 @@
>         <arg name="index" type="int"/>
>         <arg name="length" type="uint"/>
>       </event>
> -    <event name="preedit_styling"/>
> +    <enum name="preedit_style">
> +      <entry name="default" value="1"/>
> +      <entry name="active" value="2"/>
> +      <entry name="inactive" value="3"/>
> +      <entry name="highlight" value="4"/>
> +      <entry name="underline" value="5"/>
> +      <entry name="selection" value="6"/>
> +      <entry name="incorrect" value="7"/>
> +    </enum>
> +    <event name="preedit_styling">
> +      <arg name="index" type="uint"/>
> +      <arg name="length" type="uint"/>
> +      <arg name="style" type="uint"/>
> +    </event>
> +    <event name="preedit_cursor">
> +      <description summary="pre-edit cursor">
> +        Sets the cursor position inside the composing text (as byte index)
> +        relative to the start of the composing text.
> +      </description>
> +      <arg name="index" type="int"/>
> +    </event>
>       <event name="modifiers_map">
>         <description summary="modifiers map">
>           Transfer an array of 0-terminated modifiers names. The position in
>

Still planning to do such two-phase preedit setting that was discussed 
earlier? I.e. some "done"-like event when all the styling info is send, 
now that it's separate from the actual text.




More information about the wayland-devel mailing list