is_key_up = EINA_TRUE;
}
-static Eina_Bool
-_feed_event(void *data)
-{
-
- evas_event_feed_mouse_wheel(evas, 1, 5, 0, &cb_data);
- evas_event_feed_axis_update(evas, 10, 0, 0, 1, &axis, &cb_data);
-
- evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
- evas_event_feed_mouse_cancel(evas, 0, &cb_data);
-
- evas_event_feed_hold(evas, 1, 0, NULL);
-
- return EINA_FALSE;
-}
-
-static Eina_Bool
-_feed_key_event(void *data)
-{
- evas_event_feed_key_down_with_keycode(evas, "f", "f", "f", "f", 0, NULL, 102);
- evas_event_feed_key_up_with_keycode(evas, "f", "f", "f", "f", 0, NULL, 102);
-
- return EINA_FALSE;
-}
-
-static Eina_Bool
-_close_loop(void *data)
-{
- ecore_main_loop_quit();
-
- return EINA_FALSE;
-}
-
-
/**
* @addtogroup evas_event_feed_mouse_key
* @{
* @step 10 Add a callback function of EVAS_CALLBACK_AXIS_UPDATE event to an rectangle object with user_data.
* @step 11 Add a callback function of EVAS_CALLBACK_MOUSE_UP event to an rectangle object with user_data.
* @step 12 Add a callback function of EVAS_CALLBACK_HOLD event to an rectangle object with user_data.
- * @step 13 Mouse in event feed.
- * @step 14 Set timer for mouse_wheel, axis_update, mouse_cancel, hold events feed.
- * @step 15 Set timer for preschedule termination of main loop.
- * @step 16 Start of main loop and wait for tested callbacks executing.
- * @step 17 Check static variables named is_mouse_wheel, is_axis_update, is_mouse_cancel, is_hold.
+ * @step 13 mouse_wheel, axis_update, mouse_cancel, hold, Mouse in events feed.
+ * @step 14 Start of main loop and wait for tested callbacks executing.
+ * @step 15 Check static variables named is_mouse_wheel, is_axis_update, is_mouse_cancel, is_hold.
* If are equals 1 that feed events is triggered. In other cases error.
- * @step 18 Free an Ecore_Evas.
+ * @step 16 Free an Ecore_Evas.
*
* @passcondition Variables named is_mouse_wheel, is_axis_update, is_mouse_cancel, is_hold
* must equals 1, and there is no segmentation fault.
evas_event_feed_mouse_in(evas, 0, NULL);
- Ecore_Timer *timer_feed = ecore_timer_add(1.0, _feed_event, NULL);
- if (!timer_feed)
- {
- ecore_evas_free(ee);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
+ evas_event_feed_mouse_wheel(evas, 1, 5, 0, &cb_data);
+ evas_event_feed_axis_update(evas, 10, 0, 0, 1, &axis, &cb_data);
- Ecore_Timer *timer_exit = ecore_timer_add(4.0, _close_loop, NULL);
- if (!timer_exit)
- {
- ecore_timer_del(timer_feed);
- ecore_evas_free(ee);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
+ evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
+ evas_event_feed_mouse_cancel(evas, 0, &cb_data);
- ecore_main_loop_begin();
+ evas_event_feed_hold(evas, 1, 0, NULL);
if (!is_mouse_wheel || !is_axis_update || !is_mouse_cancel || !is_hold)
{
* @step 14 Mouse in event feed.
* @step 15 Mouse down event feed.
* @step 16 Mouse down event feed.
- * @step 17 Set timer for preschedule termination of main loop.
* @step 17 Start of main loop and wait for tested callbacks executing.
* @step 18 Call evas_event_down_count_get function to get expected number of mouse presses.
* @step 19 Free an Ecore_Evas.
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
- Ecore_Timer *timer_exit = ecore_timer_add(4.0, _close_loop, NULL);
- if (!timer_exit)
- {
- ecore_evas_free(ee);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- ecore_main_loop_begin();
-
if (evas_event_down_count_get(evas) != count_down)
{
ecore_evas_free(ee);
* @step 9 Sets focus to the rectangle object
* @step 10 Add a callback function of EVAS_CALLBACK_KEY_DOWN event to an rectangle object with user_data.
* @step 11 Add a callback function of EVAS_CALLBACK_KEY_UP event to an rectangle object with user_data.
- * @step 12 Mouse in event feed.
- * @step 13 Set timer for key_up_with_keycode, key_down_with_keycode events feed.
- * @step 14 Set timer for preschedule termination of main loop.
- * @step 15 Start of main loop and wait for tested callbacks executing.
- * @step 16 Check static variables named is_key_up, is_key_down.
+ * @step 12 key_up_with_keycode, key_down_with_keycode, Mouse in events feed.
+ * @step 13 Start of main loop and wait for tested callbacks executing.
+ * @step 14 Check static variables named is_key_up, is_key_down.
* If are equals 1 that feed events is triggered. In other cases error.
- * @step 17 Free an Ecore_Evas.
+ * @step 15 Free an Ecore_Evas.
*
* @passcondition Variables named is_key_up, is_key_down must equals 1, and there is no segmentation fault.
* @}
evas_object_event_callback_add(background, EVAS_CALLBACK_KEY_DOWN, _key_down, &cb_data);
evas_object_event_callback_add(background, EVAS_CALLBACK_KEY_UP, _key_up, &cb_data);
- Ecore_Timer *timer_feed = ecore_timer_add(1.0, _feed_key_event, NULL);
- if (!timer_feed)
- {
- ecore_evas_free(ee);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- Ecore_Timer *timer_exit = ecore_timer_add(4.0, _close_loop, NULL);
- if (!timer_exit)
- {
- ecore_evas_free(ee);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- ecore_main_loop_begin();
+ evas_event_feed_key_down_with_keycode(evas, "f", "f", "f", "f", 0, NULL, 102);
+ evas_event_feed_key_up_with_keycode(evas, "f", "f", "f", "f", 0, NULL, 102);
if (!is_key_down || !is_key_up)
{