Ecore ecore_imf: Fixed formatting and removed trailing whitespaces.

Patch by Jihoon Kim <jihoon48.kim@samsung.com>


SVN revision: 58545
This commit is contained in:
Daniel Juyung Seo 2011-04-11 11:31:55 +00:00
parent a8890cff0d
commit 0f42616889
3 changed files with 26 additions and 26 deletions

View File

@ -34,10 +34,10 @@ EAPI int
ecore_imf_init(void)
{
if (++_ecore_imf_init_count != 1) return _ecore_imf_init_count;
if (!ecore_init()) return --_ecore_imf_init_count;
_ecore_imf_log_dom = eina_log_domain_register
("ecore_imf", ECORE_IMF_DEFAULT_LOG_COLOR);
("ecore_imf", ECORE_IMF_DEFAULT_LOG_COLOR);
if (_ecore_imf_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module.");
@ -45,7 +45,7 @@ ecore_imf_init(void)
return --_ecore_imf_init_count;
}
ecore_imf_module_init();
ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new();
ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new();
ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new();

View File

@ -51,16 +51,16 @@ ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type)
static int
_ecore_imf_context_match_locale(const char *locale, const char *against, int against_len)
{
if (strcmp(against, "*") == 0)
return 1;
if (strcmp(against, "*") == 0)
return 1;
if (strcasecmp(locale, against) == 0)
return 4;
if (strcasecmp(locale, against) == 0)
return 4;
if (strncasecmp(locale, against, 2) == 0)
return (against_len == 2) ? 3 : 2;
if (strncasecmp(locale, against, 2) == 0)
return (against_len == 2) ? 3 : 2;
return 0;
return 0;
}
/**
@ -122,13 +122,13 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
const char *q = strchr(p, ':');
int goodness = _ecore_imf_context_match_locale(locale, p, q ? (size_t)(q - p) : strlen (p));
if (goodness > best_goodness)
{
id = module->info->id;
best_goodness = goodness;
}
if (goodness > best_goodness)
{
id = module->info->id;
best_goodness = goodness;
}
p = q ? q + 1 : NULL;
p = q ? q + 1 : NULL;
}
}
@ -859,7 +859,7 @@ _ecore_imf_event_free_delete_surrounding(void *data __UNUSED__, void *event)
/**
* Adds ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
*
* Asks the widget that the input context is attached to to delete characters around the cursor position
* Asks the widget that the input context is attached to to delete characters around the cursor position
* by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
* Note that offset and n_chars are in characters not in bytes.
*

View File

@ -18,8 +18,8 @@ static int _ecore_imf_modules_exists(const char *ctx_id);
typedef struct _Ecore_IMF_Selector
{
const char *toselect;
void *selected;
const char *toselect;
void *selected;
} Ecore_IMF_Selector;
static Eina_Hash *modules = NULL;
@ -58,8 +58,8 @@ ecore_imf_module_shutdown(void)
static Eina_Bool
_hash_module_available_get(const Eina_Hash *hash __UNUSED__, int *data, void *list)
{
*(Eina_List**)list = eina_list_append(*(Eina_List**)list, data);
return EINA_TRUE;
*(Eina_List**)list = eina_list_append(*(Eina_List**)list, data);
return EINA_TRUE;
}
Eina_List *
@ -72,7 +72,7 @@ ecore_imf_module_available_get(void)
it = eina_hash_iterator_data_new(modules);
if (!it)
return NULL;
return NULL;
eina_iterator_foreach(it, EINA_EACH_CB(_hash_module_available_get), &values);
eina_iterator_free(it);
@ -112,8 +112,8 @@ ecore_imf_module_context_create(const char *ctx_id)
static Eina_Bool
_hash_ids_get(const Eina_Hash *hash __UNUSED__, const char *key, void *list)
{
*(Eina_List**)list = eina_list_append(*(Eina_List**)list, key);
return EINA_TRUE;
*(Eina_List**)list = eina_list_append(*(Eina_List**)list, key);
return EINA_TRUE;
}
Eina_List *
@ -126,7 +126,7 @@ ecore_imf_module_context_ids_get(void)
it = eina_hash_iterator_key_new(modules);
if (!it)
return NULL;
return NULL;
eina_iterator_foreach(it, EINA_EACH_CB(_hash_ids_get), &l);
eina_iterator_free(it);
@ -160,7 +160,7 @@ ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type)
it = eina_hash_iterator_data_new(modules);
if (!it)
return NULL;
return NULL;
selector.toselect = canvas_type;
selector.selected = values;