forked from enlightenment/efl
ecore_imf/wayland: support to set prediction allow mode
This commit is contained in:
parent
b1336a27c1
commit
584a5a32a2
|
@ -987,6 +987,18 @@ wayland_im_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx,
|
||||||
*locale = strdup(imcontext->language ? imcontext->language : "");
|
*locale = strdup(imcontext->language ? imcontext->language : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
|
||||||
|
Eina_Bool prediction)
|
||||||
|
{
|
||||||
|
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||||
|
|
||||||
|
if (prediction)
|
||||||
|
imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
|
||||||
|
else
|
||||||
|
imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
|
||||||
|
}
|
||||||
|
|
||||||
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));
|
||||||
|
|
|
@ -83,6 +83,10 @@ EAPI void
|
||||||
wayland_im_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx,
|
wayland_im_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx,
|
||||||
char **locale);
|
char **locale);
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
|
||||||
|
Eina_Bool prediction);
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -61,7 +61,7 @@ static Ecore_IMF_Context_Class wayland_imf_class =
|
||||||
wayland_im_context_input_mode_set, /* input_mode_set */
|
wayland_im_context_input_mode_set, /* input_mode_set */
|
||||||
wayland_im_context_filter_event, /* filter_event */
|
wayland_im_context_filter_event, /* filter_event */
|
||||||
wayland_im_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */
|
wayland_im_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */
|
||||||
NULL, /* prediction_allow_set */
|
wayland_im_context_prediction_allow_set, /* prediction_allow_set */
|
||||||
wayland_im_context_autocapital_type_set, /* autocapital_type_set */
|
wayland_im_context_autocapital_type_set, /* autocapital_type_set */
|
||||||
NULL, /* control panel show */
|
NULL, /* control panel show */
|
||||||
NULL, /* control panel hide */
|
NULL, /* control panel hide */
|
||||||
|
|
Loading…
Reference in New Issue