* -
* */
-static int _ecore_directfb_key_symbols_count = sizeof(_ecore_directfb_key_symbols)/sizeof(Ecore_DirectFB_Key_Symbols);
static int _ecore_directfb_init_count = 0;
static int _window_event_fd = 0;
}
-/* helpers */
-/***********/
-int
-_ecore_directfb_hash_compare(void *key1, void *key2)
-{
- if(*(unsigned int*)key1 == *(unsigned int*)key2)
- return 0;
- else
- return 1;
-
-}
-
-unsigned int _ecore_directfb_hash_create(void *key)
-{
- return *(unsigned int*)key % ecore_prime_table[_ecore_directfb_key_symbols_hash->size];
-}
-
-
/* directfb window input events handler */
/****************************************/
ECORE_DIRECTFB_EVENT_WHEEL = ecore_event_type_new();;
/* create the hash table for the keynames */
- _ecore_directfb_key_symbols_hash = eina_hash_int32_new(NULL);
+ _ecore_directfb_key_symbols_hash = eina_hash_int32_new(free);
for(i=0; i<_ecore_directfb_key_symbols_count; i++)
{
struct keymap *k;
return 0;
}
ecore_main_fd_handler_del(_window_event_fd_handler_handle);
- /* free the key symbol names hash */
- for(i=0; i<_ecore_directfb_key_symbols_count; i++)
- {
- struct keymap *k;
- k = eina_hash_find(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id);
- eina_hash_del(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id);
- free(k);
- }
-
+ eina_hash_free(_ecore_directfb_key_symbols_hash);
+
if(_ecore_directfb_fullscreen_window_id)
{
DFBCHECK(_input_event->Release(_input_event));
char *string;
char *name;
unsigned int id;
-} _ecore_directfb_key_symbols[] = {
+};
+
+static const Ecore_DirectFB_Key_Symbols _ecore_directfb_key_symbols[] = {
{"\010", "BackSpace",DIKS_BACKSPACE},
{"\011", "Tab", DIKS_TAB},
{"\015", "Return", DIKS_RETURN},
/* not included the custom keys */
{"", "VoidSymbol", DIKS_NULL}
};
+static int _ecore_directfb_key_symbols_count = sizeof(_ecore_directfb_key_symbols)/sizeof(Ecore_DirectFB_Key_Symbols);