ecore_imf: deprecate ambigous or unused APIs

ecore_imf_context_show
ecore_imf_context_hide
ecore_imf_context_control_panel_show
ecore_imf_context_control_panel_hide
ecore_imf_context_preedit_start_event_add
ecore_imf_context_preedit_end_event_add
ecore_imf_context_preedit_changed_event_add
ecore_imf_context_commit_event_add
ecore_imf_context_delete_surrounding_event_add

Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
This commit is contained in:
Jihoon Kim 2019-07-10 20:01:47 +09:00
parent 4fe9edaa26
commit daa35a1893
4 changed files with 26 additions and 56 deletions

View File

@ -1035,16 +1035,20 @@ EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF
* @brief Asks the Input Method Context to show itself.
*
* @param ctx An #Ecore_IMF_Context.
*
* @deprecated use ecore_imf_context_input_panel_show() instead.
*/
EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Group
* @brief Asks the Input Method Context to hide itself.
*
* @param ctx An #Ecore_IMF_Context.
*
* @deprecated use ecore_imf_context_input_panel_hide() instead.
*/
EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Group
@ -1426,8 +1430,10 @@ EAPI Eina_Bool ecore_imf_context_selection_get(Ecore_IMF_Con
* ecore_imf_context_event_callback_call() can be used as synchronous method.
*
* @param ctx An #Ecore_IMF_Context.
*
* @deprecated use ecore_imf_context_event_callback_call() instead.
*/
EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Module_Group
@ -1438,8 +1444,10 @@ EAPI void ecore_imf_context_preedit_start_event_add(Eco
* ecore_imf_context_event_callback_call() can be used as synchronous method.
*
* @param ctx An #Ecore_IMF_Context.
*
* @deprecated use ecore_imf_context_event_callback_call() instead.
*/
EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Module_Group
@ -1449,8 +1457,10 @@ EAPI void ecore_imf_context_preedit_end_event_add(Ecore
* ecore_imf_context_event_callback_call() can be used as synchronous method.
*
* @param ctx An #Ecore_IMF_Context.
*
* @deprecated use ecore_imf_context_event_callback_call() instead.
*/
EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Module_Group
@ -1461,8 +1471,10 @@ EAPI void ecore_imf_context_preedit_changed_event_add(E
*
* @param ctx An #Ecore_IMF_Context.
* @param str The committed string.
*
* @deprecated use ecore_imf_context_event_callback_call() instead.
*/
EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
EINA_DEPRECATED EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
/**
* @ingroup Ecore_IMF_Context_Module_Group
@ -1478,8 +1490,10 @@ EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_
* @param ctx An #Ecore_IMF_Context.
* @param offset The start offset of surrounding to be deleted.
* @param n_chars The number of characters to be deleted.
*
* @deprecated use ecore_imf_context_event_callback_call() instead.
*/
EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
EINA_DEPRECATED EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
/**
* @ingroup Ecore_IMF_Context_Group
@ -1653,7 +1667,7 @@ EAPI Ecore_IMF_Input_Hints ecore_imf_context_input_hint_get(Ecore_IMF_Co
* @param ctx An #Ecore_IMF_Context.
* @since 1.1.0
*/
EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Group
@ -1662,7 +1676,7 @@ EAPI void ecore_imf_context_control_panel_show(Ecore_IM
* @param ctx An #Ecore_IMF_Context.
* @since 1.1.0
*/
EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
EINA_DEPRECATED EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
/**
* @ingroup Ecore_IMF_Context_Group

View File

@ -729,7 +729,6 @@ _ecore_imf_context_ibus_commit_text_cb(IBusInputContext *ibuscontext EINA_UNUSED
if (ibusimcontext->ctx)
{
ecore_imf_context_commit_event_add(ibusimcontext->ctx, text->text);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_COMMIT,
(void *)commit_str);
@ -803,7 +802,6 @@ _ecore_imf_context_ibus_delete_surrounding_text_cb(IBusInputContext *ibuscontext
ev.ctx = _focus_im_context;
ev.n_chars = nchars;
ev.offset = offset_from_cursor;
ecore_imf_context_delete_surrounding_event_add(_focus_im_context, offset_from_cursor, nchars);
ecore_imf_context_event_callback_call(_focus_im_context,
ECORE_IMF_CALLBACK_DELETE_SURROUNDING,
&ev);
@ -928,13 +926,11 @@ _ecore_imf_context_ibus_update_preedit_text_cb(IBusInputContext *ibuscontext EI
{
if (flag)
{
ecore_imf_context_preedit_start_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_START,
NULL);
}
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
@ -943,13 +939,11 @@ _ecore_imf_context_ibus_update_preedit_text_cb(IBusInputContext *ibuscontext EI
{
if (flag)
{
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
}
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END,
NULL);
@ -969,13 +963,11 @@ _ecore_imf_context_ibus_show_preedit_text_cb(IBusInputContext *ibuscontext EINA_
ibusimcontext->preedit_visible = EINA_TRUE;
// call preedit start
ecore_imf_context_preedit_start_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_START,
NULL);
// call preedit changed
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
@ -996,13 +988,11 @@ _ecore_imf_context_ibus_hide_preedit_text_cb(IBusInputContext *ibuscontext EINA_
ibusimcontext->preedit_visible = EINA_FALSE;
// call preedit changed
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
// call preedit end
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END,
NULL);
@ -1025,13 +1015,11 @@ _ecore_imf_context_ibus_destroy_cb(IBusInputContext *ibuscontext EINA_UNUSED,
ibusimcontext->preedit_string = NULL;
// call preedit changed
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
// call preedit end
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END,
NULL);

View File

@ -1491,7 +1491,6 @@ panel_slot_commit_string(int context, const WideString &wstr)
if (_focused_ic != ic)
return;
ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(wstr).c_str());
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
}
@ -1796,9 +1795,7 @@ turn_on_ic(EcoreIMFContextISF *ic)
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
{
ecore_imf_context_preedit_start_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ic->impl->preedit_started = true;
}
@ -1831,9 +1828,7 @@ turn_off_ic(EcoreIMFContextISF *ic)
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
{
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ecore_imf_context_preedit_end_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
@ -2166,9 +2161,7 @@ open_specific_factory(EcoreIMFContextISF *ic,
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
{
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ecore_imf_context_preedit_end_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
@ -2430,7 +2423,6 @@ slot_show_preedit_string(IMEngineInstanceBase *si)
{
if (!ic->impl->preedit_started)
{
ecore_imf_context_preedit_start_event_add(_focused_ic->ctx);
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
@ -2487,12 +2479,10 @@ slot_hide_preedit_string(IMEngineInstanceBase *si)
{
if (emit)
{
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
if (ic->impl->preedit_started)
{
ecore_imf_context_preedit_end_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
@ -2541,11 +2531,9 @@ slot_update_preedit_caret(IMEngineInstanceBase *si, int caret)
{
if (!ic->impl->preedit_started)
{
ecore_imf_context_preedit_start_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
else
@ -2572,13 +2560,11 @@ slot_update_preedit_string(IMEngineInstanceBase *si,
{
if (!ic->impl->preedit_started)
{
ecore_imf_context_preedit_start_event_add(_focused_ic->ctx);
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
ic->impl->preedit_caret = str.length();
ic->impl->preedit_updating = true;
ecore_imf_context_preedit_changed_event_add(ic->ctx);
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ic->impl->preedit_updating = false;
}
@ -2613,7 +2599,6 @@ slot_commit_string(IMEngineInstanceBase *si,
EINA_SAFETY_ON_NULL_RETURN(ic);
EINA_SAFETY_ON_NULL_RETURN(ic->ctx);
ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(str).c_str());
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
}
@ -2797,7 +2782,6 @@ slot_delete_surrounding_text(IMEngineInstanceBase *si,
ev.ctx = _focused_ic->ctx;
ev.n_chars = len;
ev.offset = offset;
ecore_imf_context_delete_surrounding_event_add(_focused_ic->ctx, offset, len);
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &ev);
return true;
@ -2840,7 +2824,6 @@ fallback_commit_string_cb(IMEngineInstanceBase *si EINA_UNUSED,
if (_focused_ic)
{
ecore_imf_context_commit_event_add(_focused_ic->ctx, utf8_wcstombs(str).c_str());
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
}
}

View File

@ -383,7 +383,6 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx)
free(imf_context_data->preedit_chars);
imf_context_data->preedit_chars = NULL;
ecore_imf_context_preedit_changed_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
@ -392,7 +391,6 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx)
char *result_utf8 = strdup(result);
if (result_utf8)
{
ecore_imf_context_commit_event_add(ctx, result_utf8);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, result_utf8);
free(result_utf8);
}
@ -695,7 +693,6 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx,
if (!unicode) abort();
if (unicode[0] >= 0x20 && unicode[0] != 0x7f)
{
ecore_imf_context_commit_event_add(ctx, compose);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, compose);
result = EINA_TRUE;
}
@ -882,10 +879,7 @@ _ecore_imf_xim_preedit_start_call(XIC xic EINA_UNUSED,
EINA_SAFETY_ON_NULL_RETURN(imf_context_data);
if (imf_context_data->finalizing == EINA_FALSE)
{
ecore_imf_context_preedit_start_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
}
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
}
static void
@ -904,15 +898,11 @@ _ecore_imf_xim_preedit_done_call(XIC xic EINA_UNUSED,
imf_context_data->preedit_length = 0;
free(imf_context_data->preedit_chars);
imf_context_data->preedit_chars = NULL;
ecore_imf_context_preedit_changed_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
if (imf_context_data->finalizing == EINA_FALSE)
{
ecore_imf_context_preedit_end_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
}
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
}
/* FIXME */
@ -1049,7 +1039,6 @@ done:
}
}
ecore_imf_context_preedit_changed_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
@ -1072,10 +1061,7 @@ _ecore_imf_xim_preedit_caret_call(XIC xic EINA_UNUSED,
{
imf_context_data->preedit_cursor = call_data->position;
if (imf_context_data->finalizing == EINA_FALSE)
{
ecore_imf_context_preedit_changed_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
}
@ -1257,7 +1243,6 @@ _ecore_imf_xim_ic_reinitialize(Ecore_IMF_Context *ctx)
imf_context_data->preedit_length = 0;
free(imf_context_data->preedit_chars);
imf_context_data->preedit_chars = NULL;
ecore_imf_context_preedit_changed_event_add(ctx);
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
}
}