<event name="preferred_language">
<arg name="language" type="string"/>
</event>
+ <event name="return_key_type">
+ <arg name="return_key_type" type="uint"/>
+ </event>
</interface>
<interface name="wl_input_method" version="1">
<arg name="button" type="uint"/>
<arg name="index" type="uint"/>
</request>
+ <enum name="return_key_type">
+ <description summary="return key type">
+ The return key type allows to specify the return key on the input panel.
+ </description>
+ <entry name="default" value="0" summary="default"/>
+ <entry name="done" value="1" summary="done"/>
+ <entry name="go" value="2" summary="go"/>
+ <entry name="join" value="3" summary="join"/>
+ <entry name="login" value="4" summary="login"/>
+ <entry name="next" value="5" summary="next"/>
+ <entry name="search" value="6" summary="search"/>
+ <entry name="send" value="7" summary="send"/>
+ </enum>
+ <request name="set_return_key_type">
+ <description summary="set return key type">
+ Sets the return key type.
+ </description>
+ <arg name="return_key_type" type="uint"/>
+ </request>
<event name="enter">
<description summary="enter event">
Notify the text-input object when it received focus. Typically in
}
}
+static void
+_e_text_input_cb_return_key_type_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t return_key_type)
+{
+ E_Text_Input *text_input = wl_resource_get_user_data(resource);
+ E_Input_Method *input_method = NULL;
+ Eina_List *l = NULL;
+
+ if (!text_input)
+ {
+ wl_resource_post_error(resource,
+ WL_DISPLAY_ERROR_INVALID_OBJECT,
+ "No Text Input For Resource");
+ return;
+ }
+
+ EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
+ {
+ if (!input_method || !input_method->context) continue;
+
+ if (input_method->context->resource)
+ wl_input_method_context_send_return_key_type(input_method->context->resource,
+ return_key_type);
+ }
+}
+
static const struct wl_text_input_interface _e_text_input_implementation = {
_e_text_input_cb_activate,
_e_text_input_cb_deactivate,
_e_text_input_cb_cursor_rectangle_set,
_e_text_input_cb_preferred_language_set,
_e_text_input_cb_state_commit,
- _e_text_input_cb_action_invoke
+ _e_text_input_cb_action_invoke,
+ _e_text_input_cb_return_key_type_set
};
static void