forked from enlightenment/efl
ecore_imf: Add ecore_imf APIs to set return key type, disable return key.
SVN revision: 67946
This commit is contained in:
parent
13ae7e3ea4
commit
567b6ac0e8
|
@ -489,3 +489,8 @@
|
||||||
2012-02-10 Christopher Michael (devilhorns)
|
2012-02-10 Christopher Michael (devilhorns)
|
||||||
|
|
||||||
* Add Ecore_Evas function to allow setting a mouse pointer from efl/elm wayland clients.
|
* Add Ecore_Evas function to allow setting a mouse pointer from efl/elm wayland clients.
|
||||||
|
|
||||||
|
2012-02-15 Jihoon Kim (jihoon)
|
||||||
|
|
||||||
|
* Add ecore_imf APIs to set return key type, disable return key.
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,18 @@ typedef enum
|
||||||
ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
|
ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
|
||||||
} Ecore_IMF_Input_Panel_Lang;
|
} Ecore_IMF_Input_Panel_Lang;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,
|
||||||
|
ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND
|
||||||
|
} Ecore_IMF_Input_Panel_Return_Key_Type;
|
||||||
|
|
||||||
struct _Ecore_IMF_Event_Preedit_Start
|
struct _Ecore_IMF_Event_Preedit_Start
|
||||||
{
|
{
|
||||||
Ecore_IMF_Context *ctx;
|
Ecore_IMF_Context *ctx;
|
||||||
|
@ -347,6 +359,8 @@ struct _Ecore_IMF_Context_Class
|
||||||
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_set)(Ecore_IMF_Context *ctx, const void* data, int len);
|
||||||
void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
|
void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
|
||||||
|
void (*input_panel_return_key_type_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
|
||||||
|
void (*input_panel_return_key_disabled_set) (Ecore_IMF_Context *ctx, Eina_Bool disabled);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Ecore_IMF_Context_Info
|
struct _Ecore_IMF_Context_Info
|
||||||
|
@ -422,6 +436,10 @@ EAPI void ecore_imf_context_input_panel_enabled_set(Eco
|
||||||
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_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);
|
EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len);
|
||||||
|
EAPI void ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type actiontype);
|
||||||
|
EAPI Ecore_IMF_Input_Panel_Return_Key_Type ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx);
|
||||||
|
EAPI void ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled);
|
||||||
|
EAPI Eina_Bool ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx);
|
||||||
|
|
||||||
/* The following entry points must be exported by each input method module
|
/* The following entry points must be exported by each input method module
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1428,3 +1428,93 @@ ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int
|
||||||
if (ctx->klass->input_panel_imdata_get)
|
if (ctx->klass->input_panel_imdata_get)
|
||||||
ctx->klass->input_panel_imdata_get(ctx, data, len);
|
ctx->klass->input_panel_imdata_get(ctx, data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
|
||||||
|
*
|
||||||
|
* An input panel displays the string or icon associated with this type
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @param return_key_type The type of "return" key on the input panel
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_return_key_type_set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx->input_panel_return_key_type = return_key_type;
|
||||||
|
if (ctx->klass->input_panel_return_key_type_set) ctx->klass->input_panel_return_key_type_set(ctx, return_key_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the "return" key type.
|
||||||
|
*
|
||||||
|
* @see ecore_imf_context_input_panel_return_key_type_set() for more details
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @return The type of "return" key on the input panel
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI Ecore_IMF_Input_Panel_Return_Key_Type
|
||||||
|
ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_return_key_type_get");
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ctx->input_panel_return_key_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the return key on the input panel to be disabled.
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @param disabled The state
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI void
|
||||||
|
ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_return_key_disabled_set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx->input_panel_return_key_disabled = disabled;
|
||||||
|
if (ctx->klass->input_panel_return_key_disabled_set) ctx->klass->input_panel_return_key_disabled_set(ctx, disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether the return key on the input panel should be disabled or not.
|
||||||
|
*
|
||||||
|
* @param ctx An #Ecore_IMF_Context.
|
||||||
|
* @return EINA_TRUE if it should be disabled
|
||||||
|
* @ingroup Ecore_IMF_Context_Group
|
||||||
|
* @since 1.2.0
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx)
|
||||||
|
{
|
||||||
|
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
|
||||||
|
{
|
||||||
|
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
|
||||||
|
"ecore_imf_context_input_panel_return_key_disabled_get");
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ctx->input_panel_return_key_disabled;
|
||||||
|
}
|
||||||
|
|
|
@ -52,8 +52,10 @@ struct _Ecore_IMF_Context
|
||||||
Ecore_IMF_Autocapital_Type autocapital_type;
|
Ecore_IMF_Autocapital_Type autocapital_type;
|
||||||
Ecore_IMF_Input_Panel_Layout input_panel_layout;
|
Ecore_IMF_Input_Panel_Layout input_panel_layout;
|
||||||
Ecore_IMF_Input_Panel_Lang input_panel_lang;
|
Ecore_IMF_Input_Panel_Lang input_panel_lang;
|
||||||
|
Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type;
|
||||||
Eina_Bool allow_prediction : 1;
|
Eina_Bool allow_prediction : 1;
|
||||||
Eina_Bool input_panel_enabled : 1;
|
Eina_Bool input_panel_enabled : 1;
|
||||||
|
Eina_Bool input_panel_return_key_disabled : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Ecore_IMF_Module
|
struct _Ecore_IMF_Module
|
||||||
|
|
|
@ -41,6 +41,8 @@ extern "C"
|
||||||
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_set */
|
||||||
NULL, /* input_panel_imdata_get */
|
NULL, /* input_panel_imdata_get */
|
||||||
|
NULL, /* input_panel_return_key_type_set */
|
||||||
|
NULL /* input_panel_return_key_disabled_set */
|
||||||
};
|
};
|
||||||
|
|
||||||
static Ecore_IMF_Context *imf_module_create (void);
|
static Ecore_IMF_Context *imf_module_create (void);
|
||||||
|
|
|
@ -800,6 +800,8 @@ static Ecore_IMF_Context_Class xim_class = {
|
||||||
.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_set = NULL,
|
||||||
.input_panel_imdata_get = NULL,
|
.input_panel_imdata_get = NULL,
|
||||||
|
.input_panel_return_key_type_set = NULL,
|
||||||
|
.input_panel_return_key_disabled_set = NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static Ecore_IMF_Context *
|
static Ecore_IMF_Context *
|
||||||
|
|
Loading…
Reference in New Issue