forked from enlightenment/efl
From: Jihoon Kim <jihoon48.kim@samsung.com>
Subject: [E-devel] [PATCH] ecore_imf_context_canvas_get, ecore_imf_context_window_get This patch includes the code to add ecore_imf_context_canvas_get and ecore_imf_context_window_get. These APIs are coupled with the ecore_imf_context_canvas_set and ecore_imf_context_window_set. SVN revision: 57203
This commit is contained in:
parent
a3808761cc
commit
94a5e99df3
|
@ -302,7 +302,9 @@ EAPI Ecore_IMF_Context *ecore_imf_context_add(const char *id);
|
|||
EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_del(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
|
||||
EAPI void *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
|
||||
EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
|
||||
EAPI void ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
|
||||
|
|
|
@ -242,6 +242,28 @@ ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window)
|
|||
return;
|
||||
}
|
||||
if (ctx->klass->client_window_set) ctx->klass->client_window_set(ctx, window);
|
||||
ctx->window = window;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client window of the Input Method Context
|
||||
*
|
||||
* See @ref ecore_imf_context_client_window_set for more details.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @return Return the client window.
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
*/
|
||||
EAPI void *
|
||||
ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx)
|
||||
{
|
||||
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||
"ecore_imf_context_client_window_get");
|
||||
return NULL;
|
||||
}
|
||||
return ctx->window;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -267,6 +289,28 @@ ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas)
|
|||
return;
|
||||
}
|
||||
if (ctx->klass->client_canvas_set) ctx->klass->client_canvas_set(ctx, canvas);
|
||||
ctx->client_canvas = canvas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client canvas of the Input Method Context.
|
||||
*
|
||||
* See @ref ecore_imf_context_client_canvas_set for more details.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @return Return the client canvas.
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
*/
|
||||
EAPI void *
|
||||
ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx)
|
||||
{
|
||||
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||
"ecore_imf_context_client_canvas_get");
|
||||
return NULL;
|
||||
}
|
||||
return ctx->client_canvas;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,6 +43,8 @@ struct _Ecore_IMF_Context
|
|||
const Ecore_IMF_Context_Class *klass;
|
||||
void *data;
|
||||
int input_mode;
|
||||
void *window;
|
||||
void *client_canvas;
|
||||
Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
|
||||
void *retrieve_surrounding_data;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue