summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/canvas/evas_events.c
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-10-18 12:13:04 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-10-18 12:13:04 +0000
commit95376064270fd3c314b790f7a5b63850b4f54d8f (patch)
treeade1a9ea03d5c57385bc0972a6df3471e98bfc56 /legacy/evas/src/lib/canvas/evas_events.c
parentbea89dd14f9053c30a220a30445529a1e9b76abd (diff)
evas/event - remove duplication
SVN revision: 78185
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c57
1 files changed, 21 insertions, 36 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index ac71a8cfd0..6f749cb82f 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -2036,6 +2036,24 @@ evas_object_freeze_events_set(Evas_Object *eo_obj, Eina_Bool freeze)
2036 eo_do(eo_obj, evas_obj_freeze_events_set(freeze)); 2036 eo_do(eo_obj, evas_obj_freeze_events_set(freeze));
2037} 2037}
2038 2038
2039static void
2040_feed_mouse_move_eval_internal(Eo *eo_obj, Evas_Object_Protected_Data *obj)
2041{
2042 Evas_Public_Data *evas = obj->layer->evas;
2043 Eina_Bool in_output_rect;
2044 in_output_rect = evas_object_is_in_output_rect(eo_obj, obj, evas->pointer.x,
2045 evas->pointer.y, 1, 1);
2046 if ((in_output_rect) &&
2047 ((!obj->precise_is_inside) || (evas_object_is_inside(eo_obj, obj,
2048 evas->pointer.x,
2049 evas->pointer.y))))
2050 evas_event_feed_mouse_move(evas->evas,
2051 evas->pointer.x,
2052 evas->pointer.y,
2053 evas->last_timestamp,
2054 NULL);
2055}
2056
2039void 2057void
2040_freeze_events_set(Eo *eo_obj, void *_pd, va_list *list) 2058_freeze_events_set(Eo *eo_obj, void *_pd, va_list *list)
2041{ 2059{
@@ -2047,18 +2065,7 @@ _freeze_events_set(Eo *eo_obj, void *_pd, va_list *list)
2047 evas_object_smart_member_cache_invalidate(eo_obj, EINA_FALSE, EINA_TRUE, 2065 evas_object_smart_member_cache_invalidate(eo_obj, EINA_FALSE, EINA_TRUE,
2048 EINA_FALSE); 2066 EINA_FALSE);
2049 if (obj->freeze_events) return; 2067 if (obj->freeze_events) return;
2050 if (evas_object_is_in_output_rect(eo_obj, obj, 2068 _feed_mouse_move_eval_internal(eo_obj, obj);
2051 obj->layer->evas->pointer.x,
2052 obj->layer->evas->pointer.y, 1, 1) &&
2053 ((!obj->precise_is_inside) ||
2054 (evas_object_is_inside(eo_obj, obj,
2055 obj->layer->evas->pointer.x,
2056 obj->layer->evas->pointer.y))))
2057 evas_event_feed_mouse_move(obj->layer->evas->evas,
2058 obj->layer->evas->pointer.x,
2059 obj->layer->evas->pointer.y,
2060 obj->layer->evas->last_timestamp,
2061 NULL);
2062} 2069}
2063 2070
2064EAPI Eina_Bool 2071EAPI Eina_Bool
@@ -2098,18 +2105,7 @@ _pass_events_set(Eo *eo_obj, void *_pd, va_list *list)
2098 if (obj->pass_events == pass) return; 2105 if (obj->pass_events == pass) return;
2099 obj->pass_events = pass; 2106 obj->pass_events = pass;
2100 evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_FALSE, EINA_FALSE); 2107 evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_FALSE, EINA_FALSE);
2101 if (evas_object_is_in_output_rect(eo_obj, obj, 2108 _feed_mouse_move_eval_internal(eo_obj, obj);
2102 obj->layer->evas->pointer.x,
2103 obj->layer->evas->pointer.y, 1, 1) &&
2104 ((!obj->precise_is_inside) ||
2105 (evas_object_is_inside(eo_obj, obj,
2106 obj->layer->evas->pointer.x,
2107 obj->layer->evas->pointer.y))))
2108 evas_event_feed_mouse_move(obj->layer->evas->evas,
2109 obj->layer->evas->pointer.x,
2110 obj->layer->evas->pointer.y,
2111 obj->layer->evas->last_timestamp,
2112 NULL);
2113} 2109}
2114 2110
2115EAPI Eina_Bool 2111EAPI Eina_Bool
@@ -2148,18 +2144,7 @@ _repeat_events_set(Eo *eo_obj, void *_pd, va_list *list)
2148 repeat = !!repeat; 2144 repeat = !!repeat;
2149 if (obj->repeat_events == repeat) return; 2145 if (obj->repeat_events == repeat) return;
2150 obj->repeat_events = repeat; 2146 obj->repeat_events = repeat;
2151 if (evas_object_is_in_output_rect(eo_obj, obj, 2147 _feed_mouse_move_eval_internal(eo_obj, obj);
2152 obj->layer->evas->pointer.x,
2153 obj->layer->evas->pointer.y, 1, 1) &&
2154 ((!obj->precise_is_inside) ||
2155 (evas_object_is_inside(eo_obj, obj,
2156 obj->layer->evas->pointer.x,
2157 obj->layer->evas->pointer.y))))
2158 evas_event_feed_mouse_move(obj->layer->evas->evas,
2159 obj->layer->evas->pointer.x,
2160 obj->layer->evas->pointer.y,
2161 obj->layer->evas->last_timestamp,
2162 NULL);
2163} 2148}
2164 2149
2165EAPI Eina_Bool 2150EAPI Eina_Bool