use evas's new extended info

SVN revision: 12458
This commit is contained in:
Carsten Haitzler 2004-12-14 03:22:21 +00:00
parent 6a0b8df837
commit 8c4ba30fc4
3 changed files with 31 additions and 21 deletions

View File

@ -45,13 +45,13 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y)
(fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
}
if (ee->rotation == 0)
evas_event_feed_mouse_move(ee->evas, x, y);
evas_event_feed_mouse_move(ee->evas, x, y, NULL);
else if (ee->rotation == 90)
evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x);
evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x, NULL);
else if (ee->rotation == 180)
evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1);
evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1, NULL);
else if (ee->rotation == 270)
evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1);
evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, NULL);
}
static Ecore_Evas *
@ -107,7 +107,7 @@ _ecore_evas_event_key_down(void *data, int type, void *event)
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
evas_event_feed_key_down(ee->evas, e->keyname);
evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
return 0; /* dont pass it on */
}
@ -120,7 +120,7 @@ _ecore_evas_event_key_up(void *data, int type, void *event)
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
evas_event_feed_key_up(ee->evas, e->keyname);
evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
return 0; /* dont pass it on */
}
@ -129,12 +129,15 @@ _ecore_evas_event_mouse_button_down(void *data, int type, void *event)
{
Ecore_Evas *ee;
Ecore_Fb_Event_Mouse_Button_Down *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_down(ee->evas, e->button);
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_down(ee->evas, e->button, flags, NULL);
return 0; /* dont pass it on */
}
@ -148,7 +151,7 @@ _ecore_evas_event_mouse_button_up(void *data, int type, void *event)
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_up(ee->evas, e->button);
evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, NULL);
return 0; /* dont pass it on */
}
@ -514,7 +517,7 @@ ecore_evas_fb_new(char *disp_name, int rotation, int w, int h)
evas_key_lock_add(ee->evas, "Num_Lock");
evas_key_lock_add(ee->evas, "Scroll_Lock");
evas_event_feed_mouse_in(ee->evas);
evas_event_feed_mouse_in(ee->evas, NULL);
ecore_evases = _ecore_list_prepend(ecore_evases, ee);
return ee;

View File

@ -42,13 +42,13 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y)
ee->w - x - 1 - ee->prop.cursor.hot.y);
}
if (ee->rotation == 0)
evas_event_feed_mouse_move(ee->evas, x, y);
evas_event_feed_mouse_move(ee->evas, x, y, NULL);
else if (ee->rotation == 90)
evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x);
evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x, NULL);
else if (ee->rotation == 180)
evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1);
evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1, NULL);
else if (ee->rotation == 270)
evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1);
evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, NULL);
}
static Ecore_Evas *
@ -120,7 +120,7 @@ _ecore_evas_event_key_down(void *data, int type, void *event)
ee = _ecore_evas_x_match(e->win);
if (!ee) return 1; /* pass on event */
_ecore_evas_modifier_locks_update(ee, e->modifiers);
evas_event_feed_key_down(ee->evas, e->keyname);
evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
return 0; /* dont pass it on */
}
@ -134,7 +134,7 @@ _ecore_evas_event_key_up(void *data, int type, void *event)
ee = _ecore_evas_x_match(e->win);
if (!ee) return 1; /* pass on event */
_ecore_evas_modifier_locks_update(ee, e->modifiers);
evas_event_feed_key_up(ee->evas, e->keyname);
evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
return 0; /* dont pass it on */
}
@ -143,13 +143,16 @@ _ecore_evas_event_mouse_button_down(void *data, int type, void *event)
{
Ecore_Evas *ee;
Ecore_X_Event_Mouse_Button_Down *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e = event;
ee = _ecore_evas_x_match(e->win);
if (!ee) return 1; /* pass on event */
_ecore_evas_modifier_locks_update(ee, e->modifiers);
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_down(ee->evas, e->button);
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_down(ee->evas, e->button, flags, NULL);
return 0; /* dont pass it on */
}
@ -164,7 +167,7 @@ _ecore_evas_event_mouse_button_up(void *data, int type, void *event)
if (!ee) return 1; /* pass on event */
_ecore_evas_modifier_locks_update(ee, e->modifiers);
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_up(ee->evas, e->button);
evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, NULL);
return 0; /* dont pass it on */
}
@ -182,7 +185,7 @@ _ecore_evas_event_mouse_wheel(void *data, int type, void *event)
_ecore_evas_modifier_locks_update(ee, e->modifiers);
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z);
evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z, NULL);
return 0; /* don't pass it on */
}
@ -214,7 +217,7 @@ _ecore_evas_event_mouse_in(void *data, int type, void *event)
/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */
if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
_ecore_evas_modifier_locks_update(ee, e->modifiers);
evas_event_feed_mouse_in(ee->evas);
evas_event_feed_mouse_in(ee->evas, NULL);
_ecore_evas_mouse_move_process(ee, e->x, e->y);
return 0; /* dont pass it on */
}
@ -232,7 +235,7 @@ _ecore_evas_event_mouse_out(void *data, int type, void *event)
/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */
_ecore_evas_modifier_locks_update(ee, e->modifiers);
_ecore_evas_mouse_move_process(ee, e->x, e->y);
evas_event_feed_mouse_out(ee->evas);
evas_event_feed_mouse_out(ee->evas, NULL);
if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
return 0; /* dont pass it on */

View File

@ -47,12 +47,16 @@ typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**<
struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
{
char *keyname; /**< The name of the key that was prerssed */
char *keyname; /**< The name of the key that was pressed */
char *keysymbol; /**< The logical symbol of the key that was pressed */
char *key_compose; /**< The UTF-8 string conversion if any */
};
struct _Ecore_Fb_Event_Key_Up /** FB 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 *key_compose; /**< The UTF-8 string conversion if any */
};
struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */