* Note that the caller is responsible for freeing the Eina_List
* when finished with it. There is no need to finish the list strings.
*
- * @return Return an EIna_List of strings;
+ * @return Return an Eina_List of strings;
* on failure it returns NULL.
* @ingroup Ecore_IMF_Context_Group
*/
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
- "ecore_imf_context_client_window_get");
- return NULL;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_client_window_get");
+ return NULL;
}
return ctx->window;
}
* also be used for purposes internal to the Input Method Context.
*
* @param ctx An #Ecore_IMF_Context.
- * @param canas The client canvas. This may be NULL to indicate
- * that the previous client canvas no longer exists.
+ * @param canvas The client canvas. This may be NULL to indicate
+ * that the previous client canvas no longer exists.
* @ingroup Ecore_IMF_Context_Group
*/
EAPI void
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
- "ecore_imf_context_client_canvas_get");
- return NULL;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_client_canvas_get");
+ return NULL;
}
return ctx->client_canvas;
}
-
/**
* Ask the Input Method Context to show itself.
*
if (ctx->klass->hide) ctx->klass->hide(ctx);
}
-/*
+/**
* Retrieve the current preedit string and cursor position
* for the Input Method Context.
*
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_show");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_show");
+ return;
}
if (ctx->klass->show) ctx->klass->show(ctx);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_hide");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_hide");
+ return;
}
-
+
if (ctx->klass->hide) ctx->klass->hide(ctx);
}
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_control_panel_show");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_control_panel_show");
+ return;
}
-
+
if (ctx->klass->control_panel_show) ctx->klass->control_panel_show(ctx);
}
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_control_panel_hide");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_control_panel_hide");
+ return;
}
-
+
if (ctx->klass->control_panel_hide) ctx->klass->control_panel_hide(ctx);
}
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_language_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_language_set");
+ return;
}
-// if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang);
+ // if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang);
}
EAPI Ecore_IMF_Input_Panel_Lang
Ecore_IMF_Input_Panel_Lang lang = ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC;
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_language_get");
- return lang;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_language_get");
+ return lang;
}
if (ctx->klass->input_panel_language_get)
- lang = ctx->klass->input_panel_language_get(ctx);
+ lang = ctx->klass->input_panel_language_get(ctx);
return lang;
}
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_ise_language");
- return -1;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_ise_language");
+ return -1;
}
if (!ise_name)
{
- printf ("input parameters error!!! \n");
- return -1;
+ printf ("input parameters error!!! \n");
+ return -1;
}
if (ctx->klass->ise_get_ise_language)
{
- return ctx->klass->ise_get_ise_language(ctx, ise_name, langlist);
+ return ctx->klass->ise_get_ise_language(ctx, ise_name, langlist);
}
else
- return -1;
+ return -1;
}
EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_keyboard_language_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_keyboard_language_set");
+ return;
}
// if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang);
}
Ecore_IMF_Keyboard_Lang lang = ECORE_IMF_KEYBOARD_LANG_NATIVE;
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_keyboard_language_get");
- return lang;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_keyboard_language_get");
+ return lang;
}
/*
if (ctx->klass->input_panel_language_get)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_isf_language");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_isf_language");
+ return;
}
if (!lang)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->ise_set_isf_language) ctx->klass->ise_set_isf_language(ctx, lang);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_imdata_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_imdata_set");
+ return;
}
if (!data || len <=0)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->input_panel_imdata_set) ctx->klass->input_panel_imdata_set(ctx, data, len);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_get_imdata");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_get_imdata");
+ return;
}
-
+
if (!data)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->input_panel_imdata_get) ctx->klass->input_panel_imdata_get(ctx, data, len);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_use_effect_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_use_effect_set");
+ return;
}
if (ctx->klass->input_panel_use_effect_set) ctx->klass->input_panel_use_effect_set(ctx, use_effect);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_use_effect_get");
- return EINA_TRUE;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_use_effect_get");
+ return EINA_TRUE;
}
return ctx->use_effect;
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_geometry_get");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_geometry_get");
+ return;
}
-
+
if (ctx->klass->input_panel_geometry_get) ctx->klass->input_panel_geometry_get(ctx, x, y, w, h);
}
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_private_key_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_private_key_set");
+ return;
}
-
+
if (label == NULL && img_path == NULL)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
Private_Key_Item *key_item;
EINA_LIST_FOREACH(ctx->private_key_list, l, key_item)
{
- if (key_item && key_item->layout_idx == layout_index && key_item->key_idx == key_index)
- {
- // if exist in the list
- exist = EINA_TRUE;
- if (label)
- {
- key_item->type = 0;
- strcpy(key_item->data, label);
- }
- else
- {
- key_item->type = 1;
- strcpy(key_item->data, img_path);
- }
- key_item->key_value = key_value;
- strcpy(key_item->key_string, key_string);
- }
+ if (key_item && key_item->layout_idx == layout_index && key_item->key_idx == key_index)
+ {
+ // if exist in the list
+ exist = EINA_TRUE;
+ if (label)
+ {
+ key_item->type = 0;
+ strcpy(key_item->data, label);
+ }
+ else
+ {
+ key_item->type = 1;
+ strcpy(key_item->data, img_path);
+ }
+ key_item->key_value = key_value;
+ strcpy(key_item->key_string, key_string);
+ }
}
if (!exist)
{
- key_item = calloc(1, sizeof(Private_Key_Item));
- if (!key_item) return;
+ key_item = calloc(1, sizeof(Private_Key_Item));
+ if (!key_item) return;
- key_item->layout_idx = layout_index;
- key_item->key_idx = key_index;;
- if (label)
- {
- key_item->type = 0;
- strcpy(key_item->data, label);
- }
- else
- {
- key_item->type = 1;
- strcpy(key_item->data, img_path);
- }
- key_item->key_value = key_value;
+ key_item->layout_idx = layout_index;
+ key_item->key_idx = key_index;;
+ if (label)
+ {
+ key_item->type = 0;
+ strcpy(key_item->data, label);
+ }
+ else
+ {
+ key_item->type = 1;
+ strcpy(key_item->data, img_path);
+ }
+ key_item->key_value = key_value;
- if (key_string)
- {
- strcpy(key_item->key_string, key_string);
- }
+ if (key_string)
+ {
+ strcpy(key_item->key_string, key_string);
+ }
- ctx->private_key_list = eina_list_append(ctx->private_key_list, key_item);
+ ctx->private_key_list = eina_list_append(ctx->private_key_list, key_item);
}
// if (ctx->klass->input_panel_private_key_set) ctx->klass->input_panel_private_key_set(ctx, layout_index, key_index, img_path, label, value);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_key_disabled_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_key_disabled_set");
+ return;
}
Disable_Key_Item *key_item;
EINA_LIST_FOREACH(ctx->disabled_key_list, l, key_item)
{
- if (key_item && key_item->layout_idx == layout_index && key_item->key_idx == key_index)
- {
- key_item->disabled = disabled;
- exist = EINA_TRUE;
- }
+ if (key_item && key_item->layout_idx == layout_index && key_item->key_idx == key_index)
+ {
+ key_item->disabled = disabled;
+ exist = EINA_TRUE;
+ }
}
if (!exist)
{
- key_item = calloc(1, sizeof(Disable_Key_Item));
- if (!key_item) return;
+ key_item = calloc(1, sizeof(Disable_Key_Item));
+ if (!key_item) return;
- key_item->layout_idx = layout_index;
- key_item->key_idx = key_index;;
- key_item->disabled = disabled;
+ key_item->layout_idx = layout_index;
+ key_item->key_idx = key_index;;
+ key_item->disabled = disabled;
- ctx->disabled_key_list = eina_list_append(ctx->disabled_key_list, key_item);
+ ctx->disabled_key_list = eina_list_append(ctx->disabled_key_list, key_item);
}
// if (ctx->klass->input_panel_key_disabled_set) ctx->klass->input_panel_key_disabled_set(ctx, layout_index, key_index, disabled);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_layout_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_layout_set");
+ return;
}
if (ctx->klass->input_panel_layout_set) ctx->klass->input_panel_layout_set(ctx, layout);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_layout_get");
- return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_layout_get");
+ return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
}
if (ctx->klass->input_panel_layout_get )
{
-// ctx->klass->input_panel_layout_get (ctx, &layout);
- return ctx->input_panel_layout;
+ // ctx->klass->input_panel_layout_get (ctx, &layout);
+ return ctx->input_panel_layout;
}
else
return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_reset");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_reset");
+ return;
}
if (ctx->klass->input_panel_reset) ctx->klass->input_panel_reset(ctx);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_orient_set");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_orient_set");
+ return;
}
if (ctx->klass->input_panel_orient_set) ctx->klass->input_panel_orient_set(ctx, orientation*90);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_orient_get");
- return ECORE_IMF_INPUT_PANEL_ORIENT_NONE;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_orient_get");
+ return ECORE_IMF_INPUT_PANEL_ORIENT_NONE;
}
return ctx->input_panel_orient;
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_active_isename");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_active_isename");
+ return;
}
if (!name)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->ise_get_active_isename) ctx->klass->ise_get_active_isename(ctx, name);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_name");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_name");
+ return;
}
if (!name)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->ise_set_active_ise_by_name) ctx->klass->ise_set_active_ise_by_name(ctx, name);
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_uuid");
- return;
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_uuid");
+ return;
}
if (!uuid)
{
- printf ("input parameters error!!! \n");
- return;
+ printf ("input parameters error!!! \n");
+ return;
}
if (ctx->klass->ise_set_active_ise_by_uuid) ctx->klass->ise_set_active_ise_by_uuid(ctx, uuid);
if (ctx->klass->ise_get_iselist)
{
- return ctx->klass->ise_get_iselist(ctx, iselist);
+ return ctx->klass->ise_get_iselist(ctx, iselist);
}
else
return -1;
return ECORE_IMF_INPUT_PANEL_STATE_INVALID;
}
- if (ctx->klass->input_panel_state_get) {
- state = ctx->klass->input_panel_state_get(ctx);
- }
+ if (ctx->klass->input_panel_state_get)
+ {
+ state = ctx->klass->input_panel_state_get(ctx);
+ }
return state;
}
if (ctx->klass->input_panel_event_callback_add)
{
- ctx->klass->input_panel_event_callback_add(ctx, type, pEventCallBackFunc, data);
+ ctx->klass->input_panel_event_callback_add(ctx, type, pEventCallBackFunc, data);
}
}
if (ctx->klass->input_panel_event_callback_del)
{
- ctx->klass->input_panel_event_callback_del(ctx, type, pEventCallBackFunc);
+ ctx->klass->input_panel_event_callback_del(ctx, type, pEventCallBackFunc);
}
}