forked from enlightenment/efl
ecore_imf/wayland: support input hint in wayland text input
@feature
This commit is contained in:
parent
29cf9abfc6
commit
7240a71d33
|
@ -890,6 +890,23 @@ wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
|
||||||
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
|
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
|
||||||
|
Ecore_IMF_Input_Hints input_hints)
|
||||||
|
{
|
||||||
|
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||||
|
|
||||||
|
if (input_hints & ECORE_IMF_INPUT_HINT_AUTO_COMPLETE)
|
||||||
|
imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
|
||||||
|
else
|
||||||
|
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
|
||||||
|
|
||||||
|
if (input_hints & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
|
||||||
|
imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
|
||||||
|
else
|
||||||
|
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager)
|
WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager)
|
||||||
{
|
{
|
||||||
WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext));
|
WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext));
|
||||||
|
|
|
@ -69,6 +69,9 @@ EAPI void wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx,
|
||||||
EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
|
EAPI void wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
|
||||||
Ecore_IMF_Input_Mode input_mode);
|
Ecore_IMF_Input_Mode input_mode);
|
||||||
|
|
||||||
|
EAPI void wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
|
||||||
|
Ecore_IMF_Input_Hints input_hints);
|
||||||
|
|
||||||
WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager);
|
WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager);
|
||||||
|
|
||||||
extern int _ecore_imf_wayland_log_dom;
|
extern int _ecore_imf_wayland_log_dom;
|
||||||
|
|
|
@ -80,7 +80,7 @@ static Ecore_IMF_Context_Class wayland_imf_class =
|
||||||
NULL, /* input_panel_event_callback_del */
|
NULL, /* input_panel_event_callback_del */
|
||||||
NULL, /* input_panel_language_locale_get */
|
NULL, /* input_panel_language_locale_get */
|
||||||
NULL, /* candidate_window_geometry_get */
|
NULL, /* candidate_window_geometry_get */
|
||||||
NULL, /* input_hint_set */
|
wayland_im_context_input_hint_set, /* input_hint_set */
|
||||||
NULL /* bidi_direction_set */
|
NULL /* bidi_direction_set */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue