forked from enlightenment/efl
ecore_imf: Add Ecore_IMF function to set or get the input panel-specific data
SVN revision: 67711
This commit is contained in:
parent
1d92d7dbe6
commit
20646f9fa1
|
@ -472,3 +472,4 @@
|
||||||
2012-02-06 Jihoon Kim (jihoon)
|
2012-02-06 Jihoon Kim (jihoon)
|
||||||
|
|
||||||
* Set ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL as default layout in ecore_imf_context_add.
|
* Set ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL as default layout in ecore_imf_context_add.
|
||||||
|
* Add Ecore_IMF function to set or get the input panel-specific data.
|
||||||
|
|
|
@ -345,6 +345,8 @@ struct _Ecore_IMF_Context_Class
|
||||||
void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
|
void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
|
||||||
Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
|
Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
|
||||||
void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
|
void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
|
||||||
|
void (*input_panel_imdata_set)(Ecore_IMF_Context *ctx, const void* data, int len);
|
||||||
|
void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Ecore_IMF_Context_Info
|
struct _Ecore_IMF_Context_Info
|
||||||
|
@ -418,6 +420,8 @@ EAPI void ecore_imf_context_input_panel_language_set(Ec
|
||||||
EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
|
EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
|
||||||
EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
|
EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
|
||||||
EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
|
EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
|
||||||
|
EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len);
|
||||||
|
EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len);
|
||||||
|
|
||||||
/* The following entry points must be exported by each input method module
|
/* The following entry points must be exported by each input method module
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1378,3 +1378,55 @@ ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx)
|
||||||
return ctx->input_panel_enabled;
|
return ctx->input_panel_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the input panel-specific data to deliver to the input panel.
|
||||||
|
* this API is used by applications to deliver specific data to the input panel.
|
||||||
|
* the data format MUST be negotiated by both application and the input panel.
|
||||||
|
* The size and format of data are defined by the input panel.
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @param data The specific data to be set to the input panel.
|
||||||
|
* @param len the length of data, in bytes, to send to the input panel
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_imdata_set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
if (ctx->klass->input_panel_imdata_set)
|
||||||
|
ctx->klass->input_panel_imdata_set(ctx, data, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the specific data of the current active input panel.
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @param data The specific data to be got from the input panel
|
||||||
|
* @param len The length of data
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_imdata_get");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
if (ctx->klass->input_panel_imdata_get)
|
||||||
|
ctx->klass->input_panel_imdata_get(ctx, data, len);
|
||||||
|
}
|
||||||
|
|
|
@ -38,7 +38,9 @@ extern "C"
|
||||||
NULL, /* isf_imf_context_input_panel_layout_get, */
|
NULL, /* isf_imf_context_input_panel_layout_get, */
|
||||||
NULL, /* isf_imf_context_input_panel_language_set, */
|
NULL, /* isf_imf_context_input_panel_language_set, */
|
||||||
NULL, /* isf_imf_context_input_panel_language_get, */
|
NULL, /* isf_imf_context_input_panel_language_get, */
|
||||||
isf_imf_context_cursor_location_set /* cursor_location_set */
|
isf_imf_context_cursor_location_set, /* cursor_location_set */
|
||||||
|
NULL, /* input_panel_imdata_set */
|
||||||
|
NULL, /* input_panel_imdata_get */
|
||||||
};
|
};
|
||||||
|
|
||||||
static Ecore_IMF_Context *imf_module_create (void);
|
static Ecore_IMF_Context *imf_module_create (void);
|
||||||
|
|
|
@ -759,6 +759,8 @@ static Ecore_IMF_Context_Class xim_class = {
|
||||||
.input_panel_language_set = NULL,
|
.input_panel_language_set = NULL,
|
||||||
.input_panel_language_get = NULL,
|
.input_panel_language_get = NULL,
|
||||||
.cursor_location_set = _ecore_imf_context_xim_cursor_location_set,
|
.cursor_location_set = _ecore_imf_context_xim_cursor_location_set,
|
||||||
|
.input_panel_imdata_set = NULL,
|
||||||
|
.input_panel_imdata_get = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Ecore_IMF_Context *
|
static Ecore_IMF_Context *
|
||||||
|
|
Loading…
Reference in New Issue