summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2004-12-14 03:22:21 +0000
committerCarsten Haitzler <raster@rasterman.com>2004-12-14 03:22:21 +0000
commit8c4ba30fc418c8a618de6bb7d39203cd5c8f376c (patch)
treed577a35130d0cbebd8efbc036c095adf08411171 /legacy/ecore
parent6a0b8df83713efd774b608720ffbebee5212fa07 (diff)
use evas's new extended info
SVN revision: 12458
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c21
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c25
-rw-r--r--legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h6
3 files changed, 31 insertions, 21 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
index 04a531a452..d641441380 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
@@ -45,13 +45,13 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y)
45 (fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y); 45 (fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
46 } 46 }
47 if (ee->rotation == 0) 47 if (ee->rotation == 0)
48 evas_event_feed_mouse_move(ee->evas, x, y); 48 evas_event_feed_mouse_move(ee->evas, x, y, NULL);
49 else if (ee->rotation == 90) 49 else if (ee->rotation == 90)
50 evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x); 50 evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x, NULL);
51 else if (ee->rotation == 180) 51 else if (ee->rotation == 180)
52 evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1); 52 evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1, NULL);
53 else if (ee->rotation == 270) 53 else if (ee->rotation == 270)
54 evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1); 54 evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, NULL);
55} 55}
56 56
57static Ecore_Evas * 57static Ecore_Evas *
@@ -107,7 +107,7 @@ _ecore_evas_event_key_down(void *data, int type, void *event)
107 e = event; 107 e = event;
108 ee = _ecore_evas_fb_match(); 108 ee = _ecore_evas_fb_match();
109 if (!ee) return 1; /* pass on event */ 109 if (!ee) return 1; /* pass on event */
110 evas_event_feed_key_down(ee->evas, e->keyname); 110 evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
111 return 0; /* dont pass it on */ 111 return 0; /* dont pass it on */
112} 112}
113 113
@@ -120,7 +120,7 @@ _ecore_evas_event_key_up(void *data, int type, void *event)
120 e = event; 120 e = event;
121 ee = _ecore_evas_fb_match(); 121 ee = _ecore_evas_fb_match();
122 if (!ee) return 1; /* pass on event */ 122 if (!ee) return 1; /* pass on event */
123 evas_event_feed_key_up(ee->evas, e->keyname); 123 evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
124 return 0; /* dont pass it on */ 124 return 0; /* dont pass it on */
125} 125}
126 126
@@ -129,12 +129,15 @@ _ecore_evas_event_mouse_button_down(void *data, int type, void *event)
129{ 129{
130 Ecore_Evas *ee; 130 Ecore_Evas *ee;
131 Ecore_Fb_Event_Mouse_Button_Down *e; 131 Ecore_Fb_Event_Mouse_Button_Down *e;
132 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
132 133
133 e = event; 134 e = event;
134 ee = _ecore_evas_fb_match(); 135 ee = _ecore_evas_fb_match();
135 if (!ee) return 1; /* pass on event */ 136 if (!ee) return 1; /* pass on event */
136 _ecore_evas_mouse_move_process(ee, e->x, e->y); 137 _ecore_evas_mouse_move_process(ee, e->x, e->y);
137 evas_event_feed_mouse_down(ee->evas, e->button); 138 if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
139 if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
140 evas_event_feed_mouse_down(ee->evas, e->button, flags, NULL);
138 return 0; /* dont pass it on */ 141 return 0; /* dont pass it on */
139} 142}
140 143
@@ -148,7 +151,7 @@ _ecore_evas_event_mouse_button_up(void *data, int type, void *event)
148 ee = _ecore_evas_fb_match(); 151 ee = _ecore_evas_fb_match();
149 if (!ee) return 1; /* pass on event */ 152 if (!ee) return 1; /* pass on event */
150 _ecore_evas_mouse_move_process(ee, e->x, e->y); 153 _ecore_evas_mouse_move_process(ee, e->x, e->y);
151 evas_event_feed_mouse_up(ee->evas, e->button); 154 evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, NULL);
152 return 0; /* dont pass it on */ 155 return 0; /* dont pass it on */
153} 156}
154 157
@@ -514,7 +517,7 @@ ecore_evas_fb_new(char *disp_name, int rotation, int w, int h)
514 evas_key_lock_add(ee->evas, "Num_Lock"); 517 evas_key_lock_add(ee->evas, "Num_Lock");
515 evas_key_lock_add(ee->evas, "Scroll_Lock"); 518 evas_key_lock_add(ee->evas, "Scroll_Lock");
516 519
517 evas_event_feed_mouse_in(ee->evas); 520 evas_event_feed_mouse_in(ee->evas, NULL);
518 521
519 ecore_evases = _ecore_list_prepend(ecore_evases, ee); 522 ecore_evases = _ecore_list_prepend(ecore_evases, ee);
520 return ee; 523 return ee;
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
index 4616cca58c..173a30fa7c 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
@@ -42,13 +42,13 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y)
42 ee->w - x - 1 - ee->prop.cursor.hot.y); 42 ee->w - x - 1 - ee->prop.cursor.hot.y);
43 } 43 }
44 if (ee->rotation == 0) 44 if (ee->rotation == 0)
45 evas_event_feed_mouse_move(ee->evas, x, y); 45 evas_event_feed_mouse_move(ee->evas, x, y, NULL);
46 else if (ee->rotation == 90) 46 else if (ee->rotation == 90)
47 evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x); 47 evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x, NULL);
48 else if (ee->rotation == 180) 48 else if (ee->rotation == 180)
49 evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1); 49 evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1, NULL);
50 else if (ee->rotation == 270) 50 else if (ee->rotation == 270)
51 evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1); 51 evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, NULL);
52} 52}
53 53
54static Ecore_Evas * 54static Ecore_Evas *
@@ -120,7 +120,7 @@ _ecore_evas_event_key_down(void *data, int type, void *event)
120 ee = _ecore_evas_x_match(e->win); 120 ee = _ecore_evas_x_match(e->win);
121 if (!ee) return 1; /* pass on event */ 121 if (!ee) return 1; /* pass on event */
122 _ecore_evas_modifier_locks_update(ee, e->modifiers); 122 _ecore_evas_modifier_locks_update(ee, e->modifiers);
123 evas_event_feed_key_down(ee->evas, e->keyname); 123 evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
124 return 0; /* dont pass it on */ 124 return 0; /* dont pass it on */
125} 125}
126 126
@@ -134,7 +134,7 @@ _ecore_evas_event_key_up(void *data, int type, void *event)
134 ee = _ecore_evas_x_match(e->win); 134 ee = _ecore_evas_x_match(e->win);
135 if (!ee) return 1; /* pass on event */ 135 if (!ee) return 1; /* pass on event */
136 _ecore_evas_modifier_locks_update(ee, e->modifiers); 136 _ecore_evas_modifier_locks_update(ee, e->modifiers);
137 evas_event_feed_key_up(ee->evas, e->keyname); 137 evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, NULL);
138 return 0; /* dont pass it on */ 138 return 0; /* dont pass it on */
139} 139}
140 140
@@ -143,13 +143,16 @@ _ecore_evas_event_mouse_button_down(void *data, int type, void *event)
143{ 143{
144 Ecore_Evas *ee; 144 Ecore_Evas *ee;
145 Ecore_X_Event_Mouse_Button_Down *e; 145 Ecore_X_Event_Mouse_Button_Down *e;
146 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
146 147
147 e = event; 148 e = event;
148 ee = _ecore_evas_x_match(e->win); 149 ee = _ecore_evas_x_match(e->win);
149 if (!ee) return 1; /* pass on event */ 150 if (!ee) return 1; /* pass on event */
150 _ecore_evas_modifier_locks_update(ee, e->modifiers); 151 _ecore_evas_modifier_locks_update(ee, e->modifiers);
151 _ecore_evas_mouse_move_process(ee, e->x, e->y); 152 _ecore_evas_mouse_move_process(ee, e->x, e->y);
152 evas_event_feed_mouse_down(ee->evas, e->button); 153 if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
154 if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
155 evas_event_feed_mouse_down(ee->evas, e->button, flags, NULL);
153 return 0; /* dont pass it on */ 156 return 0; /* dont pass it on */
154} 157}
155 158
@@ -164,7 +167,7 @@ _ecore_evas_event_mouse_button_up(void *data, int type, void *event)
164 if (!ee) return 1; /* pass on event */ 167 if (!ee) return 1; /* pass on event */
165 _ecore_evas_modifier_locks_update(ee, e->modifiers); 168 _ecore_evas_modifier_locks_update(ee, e->modifiers);
166 _ecore_evas_mouse_move_process(ee, e->x, e->y); 169 _ecore_evas_mouse_move_process(ee, e->x, e->y);
167 evas_event_feed_mouse_up(ee->evas, e->button); 170 evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, NULL);
168 return 0; /* dont pass it on */ 171 return 0; /* dont pass it on */
169} 172}
170 173
@@ -182,7 +185,7 @@ _ecore_evas_event_mouse_wheel(void *data, int type, void *event)
182 185
183 _ecore_evas_modifier_locks_update(ee, e->modifiers); 186 _ecore_evas_modifier_locks_update(ee, e->modifiers);
184 _ecore_evas_mouse_move_process(ee, e->x, e->y); 187 _ecore_evas_mouse_move_process(ee, e->x, e->y);
185 evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z); 188 evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z, NULL);
186 189
187 return 0; /* don't pass it on */ 190 return 0; /* don't pass it on */
188} 191}
@@ -214,7 +217,7 @@ _ecore_evas_event_mouse_in(void *data, int type, void *event)
214/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ 217/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */
215 if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); 218 if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
216 _ecore_evas_modifier_locks_update(ee, e->modifiers); 219 _ecore_evas_modifier_locks_update(ee, e->modifiers);
217 evas_event_feed_mouse_in(ee->evas); 220 evas_event_feed_mouse_in(ee->evas, NULL);
218 _ecore_evas_mouse_move_process(ee, e->x, e->y); 221 _ecore_evas_mouse_move_process(ee, e->x, e->y);
219 return 0; /* dont pass it on */ 222 return 0; /* dont pass it on */
220} 223}
@@ -232,7 +235,7 @@ _ecore_evas_event_mouse_out(void *data, int type, void *event)
232/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ 235/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */
233 _ecore_evas_modifier_locks_update(ee, e->modifiers); 236 _ecore_evas_modifier_locks_update(ee, e->modifiers);
234 _ecore_evas_mouse_move_process(ee, e->x, e->y); 237 _ecore_evas_mouse_move_process(ee, e->x, e->y);
235 evas_event_feed_mouse_out(ee->evas); 238 evas_event_feed_mouse_out(ee->evas, NULL);
236 if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); 239 if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
237 if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); 240 if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
238 return 0; /* dont pass it on */ 241 return 0; /* dont pass it on */
diff --git a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
index 9f2b907d2c..9ec1596bca 100644
--- a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
+++ b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
@@ -47,12 +47,16 @@ typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**<
47 47
48struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */ 48struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
49{ 49{
50 char *keyname; /**< The name of the key that was prerssed */ 50 char *keyname; /**< The name of the key that was pressed */
51 char *keysymbol; /**< The logical symbol of the key that was pressed */
52 char *key_compose; /**< The UTF-8 string conversion if any */
51}; 53};
52 54
53struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */ 55struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */
54{ 56{
55 char *keyname; /**< The name of the key that was released */ 57 char *keyname; /**< The name of the key that was released */
58 char *keysymbol; /**< The logical symbol of the key that was pressed */
59 char *key_compose; /**< The UTF-8 string conversion if any */
56}; 60};
57 61
58struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */ 62struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */