Jorge's dfb patches are finally in! :)
SVN revision: 18751
This commit is contained in:
parent
e475d8844f
commit
2489a46975
|
@ -45,7 +45,7 @@ extern int ECORE_DIRECTFB_EVENT_WHEEL;
|
|||
|
||||
#ifndef _ECORE_DIRECTFB_WINDOW_PREDEF
|
||||
typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
|
||||
#endif
|
||||
#endif
|
||||
typedef struct _Ecore_DirectFB_Cursor Ecore_DirectFB_Cursor;
|
||||
|
||||
typedef struct _Ecore_DirectFB_Event_Key_Down Ecore_DirectFB_Event_Key_Down;
|
||||
|
@ -83,8 +83,8 @@ struct _Ecore_DirectFB_Cursor
|
|||
|
||||
struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
|
||||
{
|
||||
char *keyname; /**< The name of the key that was released */
|
||||
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
||||
char *name; /**< The name of the key that was released */
|
||||
char *string; /**< The logical symbol of the key that was pressed */
|
||||
char *key_compose; /**< The UTF-8 string conversion if any */
|
||||
unsigned int time;
|
||||
DFBWindowID win;
|
||||
|
@ -92,8 +92,8 @@ struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
|
|||
|
||||
struct _Ecore_DirectFB_Event_Key_Up /** DirectFB Key Up event */
|
||||
{
|
||||
char *keyname; /**< The name of the key that was released */
|
||||
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
||||
char *name; /**< The name of the key that was released */
|
||||
char *string; /**< The logical symbol of the key that was pressed */
|
||||
char *key_compose; /**< The UTF-8 string conversion if any */
|
||||
unsigned int time;
|
||||
DFBWindowID win;
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
/* ecore_directfb */
|
||||
/******************/
|
||||
/* About */
|
||||
/* with this you can create windows of directfb and handle events through ecore */
|
||||
/* with this you can create windows of directfb and handle events through ecore
|
||||
* TODO:
|
||||
* - handle all event types
|
||||
* -
|
||||
* */
|
||||
|
||||
static int _ecore_directfb_key_symbols_count = sizeof(_ecore_directfb_key_symbols)/sizeof(Ecore_DirectFB_Key_Symbols);
|
||||
static int _ecore_directfb_init_count = 0;
|
||||
|
@ -62,8 +66,8 @@ _ecore_directfb_event_free_key_down(void *data __UNUSED__, void *ev)
|
|||
Ecore_DirectFB_Event_Key_Up *e;
|
||||
|
||||
e = ev;
|
||||
free(e->keyname);
|
||||
if (e->keysymbol) free(e->keysymbol);
|
||||
if(e->name) free(e->name);
|
||||
if (e->string) free(e->string);
|
||||
if (e->key_compose) free(e->key_compose);
|
||||
free(e);
|
||||
}
|
||||
|
@ -74,8 +78,8 @@ _ecore_directfb_event_free_key_up(void *data __UNUSED__, void *ev)
|
|||
Ecore_DirectFB_Event_Key_Up *e;
|
||||
|
||||
e = ev;
|
||||
free(e->keyname);
|
||||
if (e->keysymbol) free(e->keysymbol);
|
||||
if(e->name) free(e->name);
|
||||
if (e->string) free(e->string);
|
||||
if (e->key_compose) free(e->key_compose);
|
||||
free(e);
|
||||
}
|
||||
|
@ -151,7 +155,7 @@ _ecore_directfb_event_handle_key_down(DFBEvent *evt)
|
|||
|
||||
Ecore_DirectFB_Event_Key_Down *e;
|
||||
unsigned int key_symbol;
|
||||
char *key_name;
|
||||
struct keymap *k;
|
||||
|
||||
e = calloc(1, sizeof(Ecore_DirectFB_Event_Key_Down));
|
||||
|
||||
|
@ -159,31 +163,31 @@ _ecore_directfb_event_handle_key_down(DFBEvent *evt)
|
|||
{
|
||||
case DFEC_INPUT:
|
||||
key_symbol = evt->input.key_symbol;
|
||||
key_name = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
k = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
|
||||
if(!key_name)
|
||||
if(!k)
|
||||
{
|
||||
printf("error en el numero, %0X\n", evt->input.key_symbol);
|
||||
return;
|
||||
}
|
||||
e->keyname = strdup(key_name);
|
||||
e->keysymbol = strdup(key_name);
|
||||
e->name = strdup(k->name);
|
||||
e->string = strdup(k->string);
|
||||
e->key_compose = NULL;
|
||||
e->win = _ecore_directfb_fullscreen_window_id;
|
||||
e->time = 0;
|
||||
break;
|
||||
break;
|
||||
|
||||
case DFEC_WINDOW:
|
||||
key_symbol = evt->window.key_symbol;
|
||||
key_name = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
k = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
|
||||
if(!key_name)
|
||||
if(!k)
|
||||
{
|
||||
printf("error en el numero, %0X\n", evt->window.key_symbol);
|
||||
return;
|
||||
}
|
||||
e->keyname = strdup(key_name);
|
||||
e->keysymbol = strdup(key_name);
|
||||
e->name = strdup(k->name);
|
||||
e->string = strdup(k->string);
|
||||
e->key_compose = NULL;
|
||||
e->win = evt->window.window_id;
|
||||
e->time = 0;
|
||||
|
@ -199,7 +203,7 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt)
|
|||
{
|
||||
Ecore_DirectFB_Event_Key_Up *e;
|
||||
unsigned int key_symbol;
|
||||
char *key_name;
|
||||
struct keymap *k;
|
||||
|
||||
e = calloc(1, sizeof(Ecore_DirectFB_Event_Key_Up));
|
||||
|
||||
|
@ -207,15 +211,16 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt)
|
|||
{
|
||||
case DFEC_INPUT:
|
||||
key_symbol = evt->input.key_symbol;
|
||||
key_name = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
k = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
|
||||
if(!key_name)
|
||||
|
||||
if(!k)
|
||||
{
|
||||
printf("error en el numero, %0X\n", evt->input.key_symbol);
|
||||
return;
|
||||
}
|
||||
e->keyname = strdup(key_name);
|
||||
e->keysymbol = strdup(key_name);
|
||||
e->name = strdup(k->name);
|
||||
e->string = strdup(k->string);
|
||||
e->key_compose = NULL;
|
||||
e->win = _ecore_directfb_fullscreen_window_id;
|
||||
e->time = 0;
|
||||
|
@ -223,15 +228,15 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt)
|
|||
|
||||
case DFEC_WINDOW:
|
||||
key_symbol = evt->window.key_symbol;
|
||||
key_name = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
k = ecore_hash_get(_ecore_directfb_key_symbols_hash, &key_symbol);
|
||||
|
||||
if(!key_name)
|
||||
if(!k)
|
||||
{
|
||||
printf("error en el numero, %0X\n", evt->window.key_symbol);
|
||||
return;
|
||||
}
|
||||
e->keyname = strdup(key_name);
|
||||
e->keysymbol = strdup(key_name);
|
||||
e->name = strdup(k->name);
|
||||
e->string = strdup(k->string);
|
||||
e->key_compose = NULL;
|
||||
e->win = evt->window.window_id;
|
||||
e->time = 0;
|
||||
|
@ -695,7 +700,11 @@ ecore_directfb_init(const char *name)
|
|||
_ecore_directfb_key_symbols_hash = ecore_hash_new(_ecore_directfb_hash_create,_ecore_directfb_hash_compare);
|
||||
for(i=0; i<_ecore_directfb_key_symbols_count; i++)
|
||||
{
|
||||
ecore_hash_set(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].keycode, _ecore_directfb_key_symbols[i].keysymbol);
|
||||
struct keymap *k;
|
||||
k = malloc(sizeof(struct keymap));
|
||||
k->name = _ecore_directfb_key_symbols[i].name;
|
||||
k->string = _ecore_directfb_key_symbols[i].string;
|
||||
ecore_hash_set(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id, k);
|
||||
}
|
||||
/* create the hash for the windows(key = windowid, val = Ecore_DirectFB_Window struct) */
|
||||
return _ecore_directfb_init_count;
|
||||
|
@ -717,7 +726,10 @@ ecore_directfb_shutdown(void)
|
|||
/* free the key symbol names hash */
|
||||
for(i=0; i<_ecore_directfb_key_symbols_count; i++)
|
||||
{
|
||||
ecore_hash_remove(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].keycode);
|
||||
struct keymap *k;
|
||||
k = ecore_hash_get(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id);
|
||||
ecore_hash_remove(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id);
|
||||
free(k);
|
||||
}
|
||||
|
||||
if(_ecore_directfb_fullscreen_window_id)
|
||||
|
|
|
@ -1,131 +1,131 @@
|
|||
typedef struct _Ecore_DirectFB_Key_Symbols Ecore_DirectFB_Key_Symbols;
|
||||
|
||||
struct _Ecore_DirectFB_Key_Symbols
|
||||
{
|
||||
char *keysymbol;
|
||||
unsigned int keycode;
|
||||
char *string;
|
||||
char *name;
|
||||
unsigned int id;
|
||||
} _ecore_directfb_key_symbols[] = {
|
||||
{"BackSpace", DIKS_BACKSPACE},
|
||||
{"Tab", DIKS_TAB},
|
||||
{"Return", DIKS_RETURN},
|
||||
{"Cancel", DIKS_CANCEL},
|
||||
{"Escape", DIKS_ESCAPE},
|
||||
{"space", DIKS_SPACE},
|
||||
{"exclam", DIKS_EXCLAMATION_MARK},
|
||||
{"quotedbl", DIKS_QUOTATION},
|
||||
{"numbersign", DIKS_NUMBER_SIGN},
|
||||
{"dollar", DIKS_DOLLAR_SIGN},
|
||||
{"percent", DIKS_PERCENT_SIGN},
|
||||
{"ampersand", DIKS_AMPERSAND},
|
||||
{"apostrophe", DIKS_APOSTROPHE},
|
||||
{"parenleft", DIKS_PARENTHESIS_LEFT},
|
||||
{"parenright", DIKS_PARENTHESIS_RIGHT},
|
||||
{"asterisk", DIKS_ASTERISK},
|
||||
{"plus", DIKS_PLUS_SIGN},
|
||||
{"comma", DIKS_COMMA},
|
||||
{"minus", DIKS_MINUS_SIGN},
|
||||
{"period", DIKS_PERIOD},
|
||||
{"slash", DIKS_SLASH},
|
||||
{"0", DIKS_0},
|
||||
{"1", DIKS_1},
|
||||
{"2", DIKS_2},
|
||||
{"3", DIKS_3},
|
||||
{"4", DIKS_4},
|
||||
{"5", DIKS_5},
|
||||
{"6", DIKS_6},
|
||||
{"7", DIKS_7},
|
||||
{"8", DIKS_8},
|
||||
{"9", DIKS_9},
|
||||
{"colon", DIKS_COLON},
|
||||
{"semicolon", DIKS_SEMICOLON},
|
||||
{"less", DIKS_LESS_THAN_SIGN},
|
||||
{"equal", DIKS_EQUALS_SIGN},
|
||||
{"greater", DIKS_GREATER_THAN_SIGN},
|
||||
{"question", DIKS_QUESTION_MARK},
|
||||
{"at", DIKS_AT},
|
||||
{"A", DIKS_CAPITAL_A },
|
||||
{"B", DIKS_CAPITAL_B },
|
||||
{"C", DIKS_CAPITAL_C },
|
||||
{"D", DIKS_CAPITAL_D },
|
||||
{"E", DIKS_CAPITAL_E },
|
||||
{"F", DIKS_CAPITAL_F },
|
||||
{"G", DIKS_CAPITAL_G },
|
||||
{"H", DIKS_CAPITAL_H },
|
||||
{"I", DIKS_CAPITAL_I },
|
||||
{"J", DIKS_CAPITAL_J },
|
||||
{"K", DIKS_CAPITAL_K },
|
||||
{"L", DIKS_CAPITAL_L },
|
||||
{"M", DIKS_CAPITAL_M },
|
||||
{"N", DIKS_CAPITAL_N },
|
||||
{"O", DIKS_CAPITAL_O },
|
||||
{"P", DIKS_CAPITAL_P },
|
||||
{"Q", DIKS_CAPITAL_Q },
|
||||
{"R", DIKS_CAPITAL_R },
|
||||
{"S", DIKS_CAPITAL_S },
|
||||
{"T", DIKS_CAPITAL_T },
|
||||
{"U", DIKS_CAPITAL_U },
|
||||
{"V", DIKS_CAPITAL_V },
|
||||
{"W", DIKS_CAPITAL_W },
|
||||
{"X", DIKS_CAPITAL_X },
|
||||
{"Y", DIKS_CAPITAL_Y },
|
||||
{"Z", DIKS_CAPITAL_Z },
|
||||
{"bracketleft", DIKS_SQUARE_BRACKET_LEFT },
|
||||
{"backslash", DIKS_BACKSLASH },
|
||||
{"bracketright", DIKS_SQUARE_BRACKET_RIGHT },
|
||||
{"asciicircum", DIKS_CIRCUMFLEX_ACCENT },
|
||||
{"underscore", DIKS_UNDERSCORE },
|
||||
{"grave", DIKS_GRAVE_ACCENT},
|
||||
{"a", DIKS_SMALL_A },
|
||||
{"b", DIKS_SMALL_B },
|
||||
{"c", DIKS_SMALL_C },
|
||||
{"d", DIKS_SMALL_D },
|
||||
{"e", DIKS_SMALL_E },
|
||||
{"f", DIKS_SMALL_F },
|
||||
{"g", DIKS_SMALL_G },
|
||||
{"h", DIKS_SMALL_H },
|
||||
{"i", DIKS_SMALL_I },
|
||||
{"j", DIKS_SMALL_J },
|
||||
{"k", DIKS_SMALL_K },
|
||||
{"l", DIKS_SMALL_L },
|
||||
{"m", DIKS_SMALL_M },
|
||||
{"n", DIKS_SMALL_N },
|
||||
{"o", DIKS_SMALL_O },
|
||||
{"p", DIKS_SMALL_P },
|
||||
{"q", DIKS_SMALL_Q },
|
||||
{"r", DIKS_SMALL_R },
|
||||
{"s", DIKS_SMALL_S },
|
||||
{"t", DIKS_SMALL_T },
|
||||
{"u", DIKS_SMALL_U },
|
||||
{"v", DIKS_SMALL_V },
|
||||
{"w", DIKS_SMALL_W },
|
||||
{"x", DIKS_SMALL_X },
|
||||
{"y", DIKS_SMALL_Y },
|
||||
{"z", DIKS_SMALL_Z },
|
||||
{"braceleft", DIKS_CURLY_BRACKET_LEFT },
|
||||
{"bar", DIKS_VERTICAL_BAR },
|
||||
{"braceright", DIKS_CURLY_BRACKET_RIGHT },
|
||||
{"asciitilde", DIKS_TILDE },
|
||||
{"Delete", DIKS_DELETE },
|
||||
{"Left", DIKS_CURSOR_LEFT },
|
||||
{"Right", DIKS_CURSOR_RIGHT},
|
||||
{"Up", DIKS_CURSOR_UP},
|
||||
{"Down", DIKS_CURSOR_DOWN},
|
||||
{"Insert", DIKS_INSERT},
|
||||
{"Home", DIKS_HOME},
|
||||
{"End", DIKS_END},
|
||||
{"Page_Up", DIKS_PAGE_UP},
|
||||
{"Page_Down", DIKS_PAGE_DOWN},
|
||||
{"Print", DIKS_PRINT},
|
||||
{"Pause", DIKS_PAUSE},
|
||||
{"\010", "BackSpace",DIKS_BACKSPACE},
|
||||
{"\011", "Tab", DIKS_TAB},
|
||||
{"\015", "Return", DIKS_RETURN},
|
||||
{"", "Cancel", DIKS_CANCEL},
|
||||
{"", "Escape", DIKS_ESCAPE},
|
||||
{" ", "space", DIKS_SPACE},
|
||||
{"!", "exclam", DIKS_EXCLAMATION_MARK},
|
||||
{"\"", "quotedbl", DIKS_QUOTATION},
|
||||
{"#", "numbersign", DIKS_NUMBER_SIGN},
|
||||
{"$", "dollar", DIKS_DOLLAR_SIGN},
|
||||
{"%", "percent", DIKS_PERCENT_SIGN},
|
||||
{"&", "ampersand", DIKS_AMPERSAND},
|
||||
{"'", "apostrophe", DIKS_APOSTROPHE},
|
||||
{"(", "parenleft", DIKS_PARENTHESIS_LEFT},
|
||||
{")", "parenright", DIKS_PARENTHESIS_RIGHT},
|
||||
{"*", "asterisk", DIKS_ASTERISK},
|
||||
{"+", "plus", DIKS_PLUS_SIGN},
|
||||
{",", "comma", DIKS_COMMA},
|
||||
{"-", "minus", DIKS_MINUS_SIGN},
|
||||
{".", "period", DIKS_PERIOD},
|
||||
{"/", "slash", DIKS_SLASH},
|
||||
{"0", "0", DIKS_0},
|
||||
{"1", "1", DIKS_1},
|
||||
{"2", "2", DIKS_2},
|
||||
{"3", "3", DIKS_3},
|
||||
{"4", "4", DIKS_4},
|
||||
{"5", "5", DIKS_5},
|
||||
{"6", "6", DIKS_6},
|
||||
{"7", "7", DIKS_7},
|
||||
{"8", "8", DIKS_8},
|
||||
{"9", "9", DIKS_9},
|
||||
{":", "colon", DIKS_COLON},
|
||||
{";", "semicolon", DIKS_SEMICOLON},
|
||||
{"<", "less", DIKS_LESS_THAN_SIGN},
|
||||
{"=", "equal", DIKS_EQUALS_SIGN},
|
||||
{">", "greater", DIKS_GREATER_THAN_SIGN},
|
||||
{"?", "question", DIKS_QUESTION_MARK},
|
||||
{"@", "at", DIKS_AT},
|
||||
{"A", "A", DIKS_CAPITAL_A },
|
||||
{"B", "B", DIKS_CAPITAL_B },
|
||||
{"C", "C", DIKS_CAPITAL_C },
|
||||
{"D", "D", DIKS_CAPITAL_D },
|
||||
{"E", "E", DIKS_CAPITAL_E },
|
||||
{"F", "F", DIKS_CAPITAL_F },
|
||||
{"G", "G", DIKS_CAPITAL_G },
|
||||
{"H", "H", DIKS_CAPITAL_H },
|
||||
{"I", "I", DIKS_CAPITAL_I },
|
||||
{"J", "J", DIKS_CAPITAL_J },
|
||||
{"K", "K", DIKS_CAPITAL_K },
|
||||
{"L", "L", DIKS_CAPITAL_L },
|
||||
{"M", "M", DIKS_CAPITAL_M },
|
||||
{"N", "N", DIKS_CAPITAL_N },
|
||||
{"O", "O", DIKS_CAPITAL_O },
|
||||
{"P", "P", DIKS_CAPITAL_P },
|
||||
{"Q", "Q", DIKS_CAPITAL_Q },
|
||||
{"R", "R", DIKS_CAPITAL_R },
|
||||
{"S", "S", DIKS_CAPITAL_S },
|
||||
{"T", "T", DIKS_CAPITAL_T },
|
||||
{"U", "U", DIKS_CAPITAL_U },
|
||||
{"V", "V", DIKS_CAPITAL_V },
|
||||
{"W", "W", DIKS_CAPITAL_W },
|
||||
{"X", "X", DIKS_CAPITAL_X },
|
||||
{"Y", "Y", DIKS_CAPITAL_Y },
|
||||
{"Z", "Z", DIKS_CAPITAL_Z },
|
||||
{"[", "bracketleft", DIKS_SQUARE_BRACKET_LEFT },
|
||||
{"\\", "backslash", DIKS_BACKSLASH },
|
||||
{"]", "bracketright", DIKS_SQUARE_BRACKET_RIGHT },
|
||||
{"^", "asciicircum", DIKS_CIRCUMFLEX_ACCENT },
|
||||
{"_", "underscore", DIKS_UNDERSCORE },
|
||||
{"`", "grave", DIKS_GRAVE_ACCENT},
|
||||
{"a", "a", DIKS_SMALL_A },
|
||||
{"b","b", DIKS_SMALL_B },
|
||||
{"c","c", DIKS_SMALL_C },
|
||||
{"d","d", DIKS_SMALL_D },
|
||||
{"e","e", DIKS_SMALL_E },
|
||||
{"f","f", DIKS_SMALL_F },
|
||||
{"g","g", DIKS_SMALL_G },
|
||||
{"h","h", DIKS_SMALL_H },
|
||||
{"i","i", DIKS_SMALL_I },
|
||||
{"j","j", DIKS_SMALL_J },
|
||||
{"k","k", DIKS_SMALL_K },
|
||||
{"l","l", DIKS_SMALL_L },
|
||||
{"m","m", DIKS_SMALL_M },
|
||||
{"n","n", DIKS_SMALL_N },
|
||||
{"o", "o", DIKS_SMALL_O },
|
||||
{"p", "p", DIKS_SMALL_P },
|
||||
{"q", "q", DIKS_SMALL_Q },
|
||||
{"r", "r", DIKS_SMALL_R },
|
||||
{"s", "s", DIKS_SMALL_S },
|
||||
{"t", "t", DIKS_SMALL_T },
|
||||
{"u", "u", DIKS_SMALL_U },
|
||||
{"v", "v", DIKS_SMALL_V },
|
||||
{"w", "w", DIKS_SMALL_W },
|
||||
{"x", "x", DIKS_SMALL_X },
|
||||
{"y", "y", DIKS_SMALL_Y },
|
||||
{"z", "z", DIKS_SMALL_Z },
|
||||
{"{", "braceleft",DIKS_CURLY_BRACKET_LEFT },
|
||||
{"|", "bar", DIKS_VERTICAL_BAR },
|
||||
{"}", "braceright", DIKS_CURLY_BRACKET_RIGHT },
|
||||
{"~", "asciitilde", DIKS_TILDE },
|
||||
{"\177", "Delete", DIKS_DELETE },
|
||||
{"", "Left", DIKS_CURSOR_LEFT },
|
||||
{"", "Right", DIKS_CURSOR_RIGHT},
|
||||
{"", "Up", DIKS_CURSOR_UP},
|
||||
{"", "Down", DIKS_CURSOR_DOWN},
|
||||
{"", "Insert", DIKS_INSERT},
|
||||
{"", "Home", DIKS_HOME},
|
||||
{"", "End", DIKS_END},
|
||||
{"", "Page_Up", DIKS_PAGE_UP},
|
||||
{"", "Page_Down", DIKS_PAGE_DOWN},
|
||||
{"", "Print", DIKS_PRINT},
|
||||
{"", "Pause", DIKS_PAUSE},
|
||||
/* ok */
|
||||
{"Select", DIKS_SELECT},
|
||||
{"", "Select",DIKS_SELECT},
|
||||
/* goto */
|
||||
{"Clear", DIKS_CLEAR},
|
||||
{"", "Clear", DIKS_CLEAR},
|
||||
/* power */
|
||||
/* power 2 */
|
||||
/* option */
|
||||
{"Menu", DIKS_MENU},
|
||||
{"Help", DIKS_HELP},
|
||||
{"", "Menu",DIKS_MENU},
|
||||
{"", "Help",DIKS_HELP},
|
||||
/* info */
|
||||
/* time */
|
||||
/* vendor */
|
||||
|
@ -134,48 +134,48 @@ struct _Ecore_DirectFB_Key_Symbols
|
|||
/* channel */
|
||||
/* favorites */
|
||||
/* hasta next */
|
||||
{"Next", DIKS_NEXT},
|
||||
{"Begin", DIKS_BEGIN},
|
||||
{"", "Next",DIKS_NEXT},
|
||||
{"", "Begin",DIKS_BEGIN},
|
||||
/* digits */
|
||||
/* teen */
|
||||
/* twen */
|
||||
{"Break", DIKS_BREAK},
|
||||
{"", "Break", DIKS_BREAK},
|
||||
/* exit */
|
||||
/* setup */
|
||||
{"upleftcorner", DIKS_CURSOR_LEFT_UP },
|
||||
{"lowleftcorner", DIKS_CURSOR_LEFT_DOWN },
|
||||
{"uprightcorner", DIKS_CURSOR_UP_RIGHT },
|
||||
{"lowrightcorner", DIKS_CURSOR_DOWN_RIGHT },
|
||||
{"F1", DIKS_F1},
|
||||
{"F2", DIKS_F2},
|
||||
{"F3", DIKS_F3},
|
||||
{"F4", DIKS_F4},
|
||||
{"F5", DIKS_F5},
|
||||
{"F6", DIKS_F6},
|
||||
{"F7", DIKS_F7},
|
||||
{"F8", DIKS_F8},
|
||||
{"F9", DIKS_F9},
|
||||
{"F10", DIKS_F10},
|
||||
{"F11", DIKS_F11},
|
||||
{"F12", DIKS_F12},
|
||||
{"", "upleftcorner", DIKS_CURSOR_LEFT_UP },
|
||||
{"", "lowleftcorner", DIKS_CURSOR_LEFT_DOWN },
|
||||
{"", "uprightcorner", DIKS_CURSOR_UP_RIGHT },
|
||||
{"", "lowrightcorner",DIKS_CURSOR_DOWN_RIGHT },
|
||||
{"", "F1",DIKS_F1},
|
||||
{"", "F2",DIKS_F2},
|
||||
{"", "F3",DIKS_F3},
|
||||
{"", "F4",DIKS_F4},
|
||||
{"", "F5",DIKS_F5},
|
||||
{"", "F6",DIKS_F6},
|
||||
{"", "F7",DIKS_F7},
|
||||
{"", "F8",DIKS_F8},
|
||||
{"", "F9",DIKS_F9},
|
||||
{"", "F10",DIKS_F10},
|
||||
{"", "F11",DIKS_F11},
|
||||
{"", "F12",DIKS_F12},
|
||||
/* this are only mapped to one, not left right */
|
||||
{"Shift_L", DIKS_SHIFT},
|
||||
/*{"Shift_R", 0xFFE2}, */
|
||||
{"Control_L", DIKS_CONTROL},
|
||||
/*{"Control_R", 0xFFE4}, */
|
||||
{"Meta_L", DIKS_META},
|
||||
/* {"Meta_R", 0xFFE8}, */
|
||||
{"Alt_L", DIKS_ALT},
|
||||
{"Alt_R", DIKS_ALTGR},
|
||||
{"Super_L", DIKS_SUPER},
|
||||
/*{"Super_R", 0xFFEC}, */
|
||||
{"Hyper_L", DIKS_HYPER},
|
||||
/*{"Hyper_R", 0xFFEE}, */
|
||||
{"", "Shift_L", DIKS_SHIFT},
|
||||
/*{"Shift_R",0xFFE2},*/
|
||||
{"", "Control_L", DIKS_CONTROL},
|
||||
/*{"Control_R",0xFFE4},*/
|
||||
{"", "Meta_L", DIKS_META},
|
||||
/* {"Meta_R",0xFFE8},*/
|
||||
{"", "Alt_L", DIKS_ALT},
|
||||
{"", "Alt_R", DIKS_ALTGR},
|
||||
{"", "Super_L", DIKS_SUPER},
|
||||
/*{"Super_R",0xFFEC},*/
|
||||
{"", "Hyper_L", DIKS_HYPER},
|
||||
/*{"Hyper_R",0xFFEE},*/
|
||||
|
||||
{"Caps_Lock", DIKS_CAPS_LOCK},
|
||||
{"Num_Lock", DIKS_NUM_LOCK},
|
||||
{"Scroll_Lock", DIKS_SCROLL_LOCK},
|
||||
{"", "Caps_Lock", DIKS_CAPS_LOCK},
|
||||
{"", "Num_Lock", DIKS_NUM_LOCK},
|
||||
{"", "Scroll_Lock", DIKS_SCROLL_LOCK},
|
||||
/* not included the dead keys */
|
||||
/* not included the custom keys */
|
||||
{"VoidSymbol", DIKS_NULL}
|
||||
{"", "VoidSymbol", DIKS_NULL}
|
||||
};
|
||||
|
|
|
@ -8,4 +8,8 @@
|
|||
} \
|
||||
}
|
||||
|
||||
|
||||
struct keymap
|
||||
{
|
||||
char *name;
|
||||
char *string;
|
||||
};
|
||||
|
|
|
@ -21,18 +21,21 @@ static Ecore_Idle_Enterer *ecore_evas_directfb_idle_enterer = NULL;
|
|||
static void
|
||||
_ecore_evas_directfb_render(Ecore_Evas *ee)
|
||||
{
|
||||
if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
|
||||
Evas_List *updates;
|
||||
|
||||
if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
|
||||
updates = evas_render_updates(ee->evas);
|
||||
if (updates)
|
||||
{
|
||||
DFBRegion region;
|
||||
IDirectFBSurface *surface;
|
||||
Evas_List *l;
|
||||
|
||||
surface = ee->engine.directfb.window->surface;
|
||||
for (l = updates; l; l = l->next)
|
||||
{
|
||||
Evas_Rectangle *rect;
|
||||
|
||||
rect = l->data;
|
||||
region.x1 = rect->x;
|
||||
region.y1 = rect->y;
|
||||
|
@ -58,6 +61,7 @@ _ecore_evas_directfb_idle_enter(void *data __UNUSED__)
|
|||
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
|
||||
{
|
||||
Ecore_Evas *ee;
|
||||
|
||||
ee = (Ecore_Evas *)l;
|
||||
_ecore_evas_directfb_render(ee);
|
||||
}
|
||||
|
@ -132,7 +136,7 @@ _ecore_evas_directfb_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned i
|
|||
else if (ee->rotation == 270)
|
||||
evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, timestamp, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
_ecore_evas_directfb_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||
|
@ -144,9 +148,8 @@ _ecore_evas_directfb_event_key_down(void *data __UNUSED__, int type __UNUSED__,
|
|||
ee = _ecore_evas_directfb_match(e->win);
|
||||
|
||||
if (!ee) return 1; /* pass on event */
|
||||
evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, e->time, NULL);
|
||||
evas_event_feed_key_down(ee->evas, e->name, NULL, e->string, e->key_compose, e->time, NULL);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -159,9 +162,8 @@ _ecore_evas_directfb_event_key_up(void *data __UNUSED__, int type __UNUSED__, vo
|
|||
ee = _ecore_evas_directfb_match(e->win);
|
||||
|
||||
if (!ee) return 1; /* pass on event */
|
||||
evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, e->time, NULL);
|
||||
evas_event_feed_key_up(ee->evas, e->name, NULL, e->string, e->key_compose, e->time, NULL);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -176,7 +178,6 @@ _ecore_evas_directfb_event_motion(void *data __UNUSED__, int type __UNUSED__, vo
|
|||
if (!ee) return 1; /* pass on event */
|
||||
_ecore_evas_directfb_mouse_move_process(ee, e->x, e->y, e->time);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -283,7 +284,6 @@ _ecore_evas_directfb_event_lost_focus(void *data __UNUSED__, int type __UNUSED__
|
|||
ee->prop.focused = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_ecore_evas_directfb_shutdown(void)
|
||||
|
@ -478,13 +478,13 @@ _ecore_evas_directfb_fullscreen_set(Ecore_Evas *ee, int on)
|
|||
}
|
||||
}
|
||||
einfo = (Evas_Engine_Info_DirectFB *)evas_engine_info_get(ee->evas);
|
||||
if(einfo)
|
||||
if (einfo)
|
||||
{
|
||||
einfo->info.surface = ee->engine.directfb.window->surface;
|
||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||
}
|
||||
ee->prop.fullscreen = on;
|
||||
if(resized)
|
||||
if (resized)
|
||||
{
|
||||
if(ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
}
|
||||
|
@ -506,14 +506,14 @@ static const Ecore_Evas_Engine_Func _ecore_directfb_engine_func =
|
|||
NULL, /* cb mouse out */
|
||||
NULL, /* cb pre render */
|
||||
NULL, /* cb post render */
|
||||
_ecore_evas_directfb_move, /* move */
|
||||
_ecore_evas_directfb_move, /* move */
|
||||
NULL, /* managed move */
|
||||
_ecore_evas_directfb_resize, /* resize */
|
||||
NULL, /* move resize */
|
||||
NULL,//_ecore_evas_directfb_rotation_set,/* rotation */
|
||||
_ecore_evas_directfb_shaped_set,/* shaped */
|
||||
_ecore_evas_directfb_show, /* show */
|
||||
_ecore_evas_directfb_hide, /* hide */
|
||||
_ecore_evas_directfb_shaped_set, /* shaped */
|
||||
_ecore_evas_directfb_show, /* show */
|
||||
_ecore_evas_directfb_hide, /* hide */
|
||||
NULL, /* raise */
|
||||
NULL, /* lower */
|
||||
NULL, /* title set */
|
||||
|
@ -522,7 +522,7 @@ static const Ecore_Evas_Engine_Func _ecore_directfb_engine_func =
|
|||
NULL, /* size max */
|
||||
NULL, /* size base */
|
||||
NULL, /* size step */
|
||||
_ecore_evas_directfb_cursor_set,/* cursor set */
|
||||
_ecore_evas_directfb_cursor_set, /* cursor set */
|
||||
NULL, /* layer set */
|
||||
_ecore_evas_directfb_focus_set, /* focus */
|
||||
NULL, /* iconified */
|
||||
|
@ -556,10 +556,7 @@ ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w
|
|||
#ifdef BUILD_ECORE_EVAS_DIRECTFB
|
||||
Evas_Engine_Info_DirectFB *einfo;
|
||||
Ecore_Evas *ee;
|
||||
|
||||
Ecore_DirectFB_Window *window;
|
||||
|
||||
|
||||
int rmethod;
|
||||
|
||||
rmethod = evas_render_method_lookup("directfb");
|
||||
|
@ -576,7 +573,6 @@ ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w
|
|||
if (disp_name) ee->name = strdup(disp_name);
|
||||
|
||||
if (w < 1) w = 1;
|
||||
|
||||
if (h < 1) h = 1;
|
||||
|
||||
ee->rotation = 0;
|
||||
|
@ -587,16 +583,6 @@ ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w
|
|||
ee->h = h;
|
||||
ee->prop.layer = 1;
|
||||
ee->prop.fullscreen = 0;
|
||||
/*ee->prop.max.w = 0;
|
||||
ee->prop.max.h = 0;
|
||||
ee->prop.layer = 0;
|
||||
ee->prop.focused = 1;
|
||||
ee->prop.borderless = 0;
|
||||
ee->prop.override = 1;
|
||||
ee->prop.maximized = 0;
|
||||
ee->prop.withdrawn = 0;
|
||||
ee->prop.sticky = 0;*/
|
||||
//ee->prop.cursor.object = 0;
|
||||
|
||||
/* init evas here */
|
||||
ee->evas = evas_new();
|
||||
|
|
|
@ -143,10 +143,7 @@ struct _Ecore_Evas_Engine
|
|||
#endif
|
||||
#ifdef BUILD_ECORE_EVAS_DIRECTFB
|
||||
struct {
|
||||
Ecore_DirectFB_Window *window;
|
||||
/*IDirectFBWindow *window;
|
||||
DirectFBSurface *surface;
|
||||
DirectFBWindowID id;*/
|
||||
Ecore_DirectFB_Window *window;
|
||||
} directfb;
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue