* ecore: Remove symbol duplication.

SVN revision: 45083
This commit is contained in:
Cedric BAIL 2010-01-13 14:20:01 +00:00
parent 313deaed8e
commit 1208614f73
2 changed files with 3 additions and 48 deletions

View File

@ -193,6 +193,9 @@ struct _Ecore_Event_Modifiers
EAPI int ecore_event_init(void);
EAPI int ecore_event_shutdown(void);
EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
#ifdef __cplusplus
}
#endif

View File

@ -336,51 +336,3 @@ ecore_event_evas_shutdown(void)
return _ecore_event_evas_init_count;
}
typedef struct _Ecore_Event_Modifier_Match Ecore_Event_Modifier_Match;
struct _Ecore_Event_Modifier_Match
{
const char *key;
Ecore_Event_Modifier modifier;
unsigned int event_modifier;
};
static const Ecore_Event_Modifier_Match matchs[] = {
{ "Shift_L", ECORE_SHIFT, ECORE_EVENT_MODIFIER_SHIFT },
{ "Shift_R", ECORE_SHIFT, ECORE_EVENT_MODIFIER_SHIFT },
{ "Alt_L", ECORE_ALT, ECORE_EVENT_MODIFIER_ALT },
{ "Alt_R", ECORE_ALT, ECORE_EVENT_MODIFIER_ALT },
{ "Control_L", ECORE_CTRL, ECORE_EVENT_MODIFIER_CTRL },
{ "Control_R", ECORE_CTRL, ECORE_EVENT_MODIFIER_CTRL },
{ "Caps_Lock", ECORE_CAPS, ECORE_EVENT_MODIFIER_CAPS },
{ "Super_L", ECORE_WIN, ECORE_EVENT_MODIFIER_WIN },
{ "Super_R", ECORE_WIN, ECORE_EVENT_MODIFIER_WIN },
{ "Scroll_Lock", ECORE_SCROLL, ECORE_EVENT_MODIFIER_SCROLL }
};
EAPI unsigned int
ecore_event_modifier_mask(Ecore_Event_Modifier modifier)
{
int i;
for (i = 0; i < sizeof (matchs) / sizeof (Ecore_Event_Modifier_Match); i++)
if (matchs[i].modifier == modifier)
return matchs[i].event_modifier;
return 0;
}
EAPI Ecore_Event_Modifier
ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc)
{
int i;
for (i = 0; i < sizeof (matchs) / sizeof (Ecore_Event_Modifier_Match); i++)
if (strcmp(matchs[i].key, key) == 0)
{
if (modifiers && matchs[i].modifier < modifiers->size)
modifiers->array[matchs[i].modifier] += inc;
return matchs[i].modifier;
}
return ECORE_NONE;
}