Make screen reader buildable 48/44548/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 23 Jul 2015 06:52:27 +0000 (15:52 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 23 Jul 2015 06:56:20 +0000 (15:56 +0900)
- 3.0 does not use tizen_profile_name
- 3.0 does not use X11
- 3.0 does not export keynode_t member
- 3.0 does not have to smack labeling

Change-Id: I1391f683b1d9ecc93febd007b93357c8c58bca4c

12 files changed:
CMakeLists.txt
include/etest.h
include/screen_reader_gestures.h
org.tizen.screen-reader.manifest
packaging/org.tizen.screen-reader.spec
src/main.c
src/navigator.c
src/screen_reader.c
src/screen_reader_gestures.c
src/screen_reader_system.c
src/screen_reader_tts.c
src/screen_reader_vconf.c

index 13155e7..c026ff7 100644 (file)
@@ -18,7 +18,6 @@ pkg_check_modules(pkgs REQUIRED
        ecore
        atspi-2
        gobject-2.0
-       ecore-x
        dlog
        vconf
        tts
index 69b14fc..25f259c 100644 (file)
@@ -2,7 +2,6 @@
 #define __ETEST_H__
 
 #include <Elementary.h>
-#include <Ecore_X.h>
 #include <Elementary.h>
 #include <Evas.h>
 
@@ -11,4 +10,4 @@ struct appdata
    Evas_Object *win;
 };
 
-#endif
\ No newline at end of file
+#endif
index 12c4445..bb1bc74 100644 (file)
@@ -2,7 +2,6 @@
 #define SCREEN_READER_GESTURES_H_
 
 #include <Ecore.h>
-#include <Ecore_X.h>
 
 /**
  * @brief Accessibility gestures
@@ -71,8 +70,6 @@ Eina_Bool screen_reader_gestures_init(void);
  */
 void screen_reader_gestures_shutdown(void);
 
-Eina_Bool screen_reader_gesture_x_grab_touch_devices(Ecore_X_Window win);
-
 typedef void (*GestureCB)(void *data, Gesture_Info *info);
 
 /**
index 1a87651..9c82c66 100644 (file)
@@ -1,46 +1,5 @@
 <manifest>
- <define>
-    <domain name="screen-reader" />
-    <permit>
-       <smack permit="dbus" type="rwx" />
-       <smack permit="atspi" type="rwx" />
-       <smack permit="e17" type="rwx" />
-       <smack permit="tts-server" type="rwx" />
-       <smack permit="deviced" type="rwx" />
-       <smack permit="sensord" type="rwx" />
-       <smack permit="media-server" type="rwx" />
-    </permit>
-    <request>
-       <smack request="sdbd" type="rwx" />
-       <smack request="atspi" type="rwx" />
-       <smack request="dbus" type="rwx" />
-       <smack request="xorg" type="rwx" />
-       <smack request="pulseaudio" type="rwxat" />
-       <smack request="pkgmgr::db" type="rwx" />
-       <smack request="device::app_logging" type="rwx" />
-       <smack request="isf" type="rwx" />
-       <smack request="system::homedir" type="rwx" />
-       <smack request="system::tmpdir" type="rwx" />
-       <smack request="sys-assert::core" type="rwxat" />
-       <smack request="device::sys_logging" type="rwx" />
-       <smack request="svi-data" type="rwx" />
-       <smack request="e17" type="rwx" />
-       <smack request="tts-server" type="rwx" />
-       <smack request="sound_server" type="rwx" />
-       <smack request="deviced" type="rwx" />
-       <smack request="sensord" type="rwx" />
-       <smack request="media-server" type="rwx" />
-       <smack request="notification::db" type="rw" />
-       <smack request="data-provider-master::notification" type="rw" />
-       <smack request="data-provider-master::notification.client" type="rw" />
-       <smack request="tizen::vconf::public::r" type="rwx" />
-       <smack request="tizen::vconf::public::r::platform::rw" type="rwx" />
-       <smack request="tizen::vconf::setting::admin" type="rwx" />
-       <smack request="tizen::vconf::display" type="rwx" />
-    </request>
- </define>
-
-<request>
-<domain name="screen-reader"/>
-</request>
+   <request>
+      <domain name="_"/>
+   </request>
 </manifest>
index 251d721..6520a14 100644 (file)
@@ -14,7 +14,6 @@ BuildRequires:  at-spi2-core-devel
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(ecore)
-BuildRequires:  pkgconfig(ecore-x)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(eldbus)
 BuildRequires:  pkgconfig(elementary)
index d8ee5cd..3163258 100644 (file)
@@ -174,11 +174,6 @@ static int app_create(void *data)
    logger_init();
    screen_reader_create_service(data);
 
-#ifndef SCREEN_READER_TV
-   screen_reader_gestures_init();
-   navigator_init();
-#endif
-
    return 0;
 }
 
@@ -186,11 +181,6 @@ static int app_terminate(void *data)
 {
    screen_reader_terminate_service(data);
 
-#ifndef SCREEN_READER_TV
-   navigator_shutdown();
-   screen_reader_gestures_shutdown();
-#endif
-
    eldbus_shutdown();
    logger_shutdown();
    return 0;
index 0d2b30d..15ac24a 100644 (file)
@@ -1,4 +1,3 @@
-#include <Ecore_X.h>
 #include <Ecore.h>
 #include <math.h>
 #include <atspi/atspi.h>
@@ -189,7 +188,7 @@ display_info_about_object(AtspiAccessible *obj)
    DEBUG("ROLE:%s", role)
    DEBUG("DESCRIPTION:%s", description);
    DEBUG("CHILDS:%d", atspi_accessible_get_child_count(obj, NULL));
-   DEBUG("HIGHLIGHT_INDEX:%d", atspi_component_get_highlight_index(comp, NULL));
+   //DEBUG("HIGHLIGHT_INDEX:%d", atspi_component_get_highlight_index(comp, NULL));
    DEBUG("INDEX IN PARENT:%d", atspi_accessible_get_index_in_parent(obj, NULL));
    if (value)
       {
@@ -496,7 +495,7 @@ _current_highlight_object_set(AtspiAccessible *obj)
          current_obj = NULL;
          if (current_comp)
             {
-               atspi_component_clear_highlight(current_comp, &err);
+               //atspi_component_clear_highlight(current_comp, &err);
                g_object_ref(current_comp);
                current_comp = NULL;
             }
@@ -524,9 +523,9 @@ _current_highlight_object_set(AtspiAccessible *obj)
             }
          if (current_comp)
             {
-               atspi_component_clear_highlight(current_comp, &err);
+               //atspi_component_clear_highlight(current_comp, &err);
             }
-         atspi_component_grab_highlight(comp, &err);
+         //atspi_component_grab_highlight(comp, &err);
          current_comp = comp;
          GERROR_CHECK(err)
 
@@ -1092,26 +1091,7 @@ static void _activate_widget(void)
 static void _quickpanel_change_state(gboolean quickpanel_switch)
 {
    DEBUG("START");
-   Ecore_X_Window xwin = 0;
-
-   ERROR(quickpanel_switch ? "QUICKPANEL STATE ON" : "QUICKPANEL STATE OFF");
-
-   Ecore_X_Illume_Quickpanel_State state;
-
-
-
-   ecore_x_window_prop_xid_get(ecore_x_window_root_first_get(),
-                               ECORE_X_ATOM_NET_ACTIVE_WINDOW,
-                               ECORE_X_ATOM_WINDOW,
-                               &xwin, 1);
-
-   state = quickpanel_switch ? ECORE_X_ILLUME_QUICKPANEL_STATE_ON : ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
-
-   ecore_x_e_illume_quickpanel_state_set(xwin, state);
-
-   ecore_x_e_illume_quickpanel_state_send(ecore_x_e_illume_zone_get(xwin), state);
-
-   ecore_main_loop_iterate();
+   //TODO: add wayland lines
 }
 
 /**
@@ -1903,7 +1883,7 @@ void navigator_shutdown(void)
          AtspiComponent *comp = atspi_accessible_get_component_iface(current_obj);
          if (comp)
             {
-               atspi_component_clear_highlight(comp, &err);
+               //atspi_component_clear_highlight(comp, &err);
                GERROR_CHECK(err);
             }
       }
index 9a7784e..d3aea92 100644 (file)
@@ -15,11 +15,7 @@ Service_Data service_data =
 {
    //Set by vconf
    .run_service = 1,
-#ifdef SCREEN_READER_TV
    .tracking_signal_name = FOCUS_CHANGED_SIG,
-#else
-   .tracking_signal_name = HIGHLIGHT_CHANGED_SIG,
-#endif
 
    //Set by tts
    .tts = NULL,
@@ -42,10 +38,7 @@ int screen_reader_create_service(void *data)
 
    vconf_init(service_data);
    tts_init(service_data);
-
-#ifdef SCREEN_READER_TV
    spi_init(service_data);
-#endif
 
    /* XML TEST */
 #ifdef RUN_IPC_TEST_SUIT
index 2b3f062..4e3fa49 100644 (file)
 
 #include <Ecore.h>
 #include <Ecore_Input.h>
-#include <Ecore_X.h>
 
-static GestureCB _global_cb;
-static void *_global_data;
-
-struct _Gestures_Config
-{
-   // minimal required length of flick gesture (in pixels)
-   int one_finger_flick_min_length;
-   // maximal time of gesture
-   int one_finger_flick_max_time;
-   // timeout period to activate hover gesture (first longpress timeout)
-   double one_finger_hover_longpress_timeout;
-   // tap timeout - maximal ammount of time allowed between seqiential taps
-   double two_fingers_hover_longpress_timeout;
-   // tap timeout - maximal ammount of time allowed between seqiential taps
-   double one_finger_tap_timeout;
-   // tap radius(in pixels)
-   int one_finger_tap_radius;
-};
-typedef struct _Gestures_Config Gestures_Config;
-
-typedef enum
-{
-   FLICK_DIRECTION_UNDEFINED,
-   FLICK_DIRECTION_DOWN,
-   FLICK_DIRECTION_UP,
-   FLICK_DIRECTION_LEFT,
-   FLICK_DIRECTION_RIGHT,
-   FLICK_DIRECTION_DOWN_RETURN,
-   FLICK_DIRECTION_UP_RETURN,
-   FLICK_DIRECTION_LEFT_RETURN,
-   FLICK_DIRECTION_RIGHT_RETURN,
-} flick_direction_e;
-
-typedef enum
-{
-   GESTURE_NOT_STARTED = 0, // Gesture is ready to start
-   GESTURE_ONGOING,         // Gesture in progress.
-   GESTURE_FINISHED,        // Gesture finished - should be emited
-   GESTURE_ABORTED          // Gesture aborted
-} gesture_state_e;
-
-typedef enum
-{
-   ONE_FINGER_GESTURE = 1,
-   TWO_FINGERS_GESTURE,
-   THREE_FINGERS_GESTURE
-} gesture_type_e;
-
-struct _Cover
-{
-   Ecore_X_Window  win;  /**< Input window covering given zone */
-   unsigned int    n_taps; /**< Number of fingers touching screen */
-   unsigned int    event_time;
-
-   struct
-   {
-      gesture_state_e state;     // current state of gesture
-      unsigned int timestamp[3]; // time of gesture;
-      int finger[3];             // finger number which initiates gesture
-      int x_org[3], y_org[3];    // coorinates of finger down event
-      int x_end[3], y_end[3];    // coorinates of finger up event
-      flick_direction_e dir;     // direction of flick
-      int n_fingers;             // number of fingers in gesture
-      int n_fingers_left;        // number of fingers in gesture
-      //         still touching screen
-      Eina_Bool finger_out[3];   // finger is out of the finger boundary
-      Eina_Bool return_flick[3];
-   } flick_gesture;
-
-   struct
-   {
-      gesture_state_e state;   // currest gesture state
-      int x[2], y[2];
-      int n_fingers;
-      int finger[2];
-      unsigned int timestamp; // time of gesture;
-      unsigned int last_emission_time; // last time of gesture emission
-      Ecore_Timer *timer;
-      Eina_Bool longpressed;
-   } hover_gesture;
-
-   struct
-   {
-      Eina_Bool started; // indicates if taps recognition process has started
-      Eina_Bool pressed; // indicates if finger is down
-      int n_taps;        // number of taps captures in sequence
-      int finger[3];        // device id of finget
-      Ecore_Timer *timer;  // sequence expiration timer
-      int x_org[3], y_org[3];    // coordinates of first tap
-      gesture_type_e tap_type;
-   } tap_gesture_data;
-};
-typedef struct _Cover Cover;
-
-Gestures_Config *_e_mod_config;
-static Ecore_X_Window scrolled_win;
-static int rx, ry;
-static Eina_List *handlers;
-static Cover *cov;
-static int win_angle;
-
-static void _hover_event_emit(Cover *cov, int state);
-
-static void _event_emit(Gesture g, int x, int y, int x_e, int y_e, int state, int event_time)
-{
-   Gesture_Info *info = calloc(sizeof(Gesture_Info), 1);
-   EINA_SAFETY_ON_NULL_RETURN(info);
-
-   info->type = g;
-   info->x_beg = x;
-   info->x_end = x_e;
-   info->y_beg = y;
-   info->y_end = y_e;
-   info->state = state;
-   info->event_time = event_time;
-
-   if (_global_cb)
-      _global_cb(_global_data, info);
-   free(info);
-}
-
-static void
-_flick_gesture_mouse_down(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   if (cov->flick_gesture.state == GESTURE_NOT_STARTED)
-      {
-         cov->flick_gesture.state = GESTURE_ONGOING;
-         cov->flick_gesture.finger[0] = ev->multi.device;
-         cov->flick_gesture.x_org[0] = ev->root.x;
-         cov->flick_gesture.y_org[0] = ev->root.y;
-         cov->flick_gesture.timestamp[0] = ev->timestamp;
-         cov->flick_gesture.n_fingers = 1;
-         cov->flick_gesture.n_fingers_left = 1;
-         cov->flick_gesture.dir = FLICK_DIRECTION_UNDEFINED;
-         cov->flick_gesture.finger_out[0] = EINA_FALSE;
-         cov->flick_gesture.return_flick[0] = EINA_FALSE;
-      }
-   else if (cov->flick_gesture.state == GESTURE_ONGOING)
-      {
-         // abort gesture if too many fingers touched screen
-         if ((cov->n_taps > 3) || (cov->flick_gesture.n_fingers > 2))
-            {
-               cov->flick_gesture.state = GESTURE_ABORTED;
-               return;
-            }
-
-         cov->flick_gesture.x_org[cov->flick_gesture.n_fingers] = ev->root.x;
-         cov->flick_gesture.y_org[cov->flick_gesture.n_fingers] = ev->root.y;
-         cov->flick_gesture.timestamp[cov->flick_gesture.n_fingers] = ev->timestamp;
-         cov->flick_gesture.finger[cov->flick_gesture.n_fingers] = ev->multi.device;
-         cov->flick_gesture.n_fingers++;
-         cov->flick_gesture.n_fingers_left++;
-         if (cov->flick_gesture.n_fingers < 3) /* n_fingers == 3 makes out of bounds write */
-           {
-              cov->flick_gesture.finger_out[cov->flick_gesture.n_fingers] = EINA_FALSE;
-              cov->flick_gesture.return_flick[cov->flick_gesture.n_fingers] = EINA_FALSE;
-           }
-      }
-}
-
-static Eina_Bool
-_flick_gesture_time_check(unsigned int event_time, unsigned int gesture_time)
-{
-   DEBUG("Flick time: %d", event_time - gesture_time);
-   if ((event_time - gesture_time) < _e_mod_config->one_finger_flick_max_time * 2) //Double time because of the possible of return flick
-      return EINA_TRUE;
-   else
-      return EINA_FALSE;
-}
-
-static Eina_Bool
-_flick_gesture_length_check(int x, int y, int x_org, int y_org)
-{
-   int dx = x - x_org;
-   int dy = y - y_org;
-
-   if ((dx * dx + dy * dy) > (_e_mod_config->one_finger_flick_min_length *
-                              _e_mod_config->one_finger_flick_min_length))
-      return EINA_TRUE;
-   else
-      return EINA_FALSE;
-}
-
-static flick_direction_e
-_flick_gesture_direction_get(int x, int y, int x_org, int y_org)
-{
-   int dx = x - x_org;
-   int dy = y - y_org;
-   int tmp;
-
-   switch(win_angle)
-      {
-      case 90:
-         tmp = dx;
-         dx = -dy;
-         dy = tmp;
-         break;
-      case 270:
-         tmp = dx;
-         dx = dy;
-         dy = -tmp;
-         break;
-      }
-
-   if ((dy < 0) && (abs(dx) < -dy))
-      return FLICK_DIRECTION_UP;
-   if ((dy > 0) && (abs(dx) < dy))
-      return FLICK_DIRECTION_DOWN;
-   if ((dx > 0) && (dx > abs(dy)))
-      return FLICK_DIRECTION_RIGHT;
-   if ((dx < 0) && (-dx > abs(dy)))
-      return FLICK_DIRECTION_LEFT;
-
-   return FLICK_DIRECTION_UNDEFINED;
-}
-
-static void
-_flick_event_emit(Cover *cov)
-{
-   int ax, ay, axe, aye, i, type = -1;
-   ax = ay = axe = aye = 0;
-
-   for (i = 0; i < cov->flick_gesture.n_fingers; i++)
-      {
-         ax += cov->flick_gesture.x_org[i];
-         ay += cov->flick_gesture.y_org[i];
-         axe += cov->flick_gesture.x_end[i];
-         aye += cov->flick_gesture.y_end[i];
-      }
-
-   ax /= cov->flick_gesture.n_fingers;
-   ay /= cov->flick_gesture.n_fingers;
-   axe /= cov->flick_gesture.n_fingers;
-   aye /= cov->flick_gesture.n_fingers;
-
-   if (cov->flick_gesture.dir == FLICK_DIRECTION_LEFT)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_LEFT;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_LEFT;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_LEFT;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_RIGHT)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_RIGHT;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_RIGHT;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_RIGHT;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_UP)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_UP;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_UP;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_UP;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_DOWN)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_DOWN;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_DOWN;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_DOWN;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_DOWN_RETURN)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_DOWN_RETURN;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_DOWN_RETURN;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_DOWN_RETURN;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_UP_RETURN)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_UP_RETURN;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_UP_RETURN;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_UP_RETURN;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_LEFT_RETURN)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_LEFT_RETURN;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_LEFT_RETURN;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_LEFT_RETURN;
-      }
-   else if (cov->flick_gesture.dir == FLICK_DIRECTION_RIGHT_RETURN)
-      {
-         if (cov->flick_gesture.n_fingers == 1)
-            type = ONE_FINGER_FLICK_RIGHT_RETURN;
-         if (cov->flick_gesture.n_fingers == 2)
-            type = TWO_FINGERS_FLICK_RIGHT_RETURN;
-         if (cov->flick_gesture.n_fingers == 3)
-            type = THREE_FINGERS_FLICK_RIGHT_RETURN;
-      }
-   DEBUG("FLICK GESTURE: N: %d F: %d", cov->flick_gesture.n_fingers, cov->flick_gesture.dir);
-   _event_emit(type, ax, ay, axe, aye, 2, cov->event_time);
-}
-
-static void
-_flick_gesture_mouse_up(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   if (cov->flick_gesture.state == GESTURE_ONGOING)
-      {
-         int i;
-         // check if fingers match
-         for (i = 0; i < cov->flick_gesture.n_fingers; i++)
-            {
-               if (cov->flick_gesture.finger[i] == ev->multi.device)
-                  break;
-            }
-         if (i == cov->flick_gesture.n_fingers)
-            {
-               DEBUG("Finger id not recognized. Gesture aborted.");
-               cov->flick_gesture.state = GESTURE_ABORTED;
-               goto end;
-            }
-
-         // check if flick for given finger is valid
-         if (!_flick_gesture_time_check(ev->timestamp,
-                                        cov->flick_gesture.timestamp[i]))
-            {
-               DEBUG("finger flick gesture timeout expired. Gesture aborted.");
-               cov->flick_gesture.state = GESTURE_ABORTED;
-               goto end;
-            }
-
-         // check minimal flick length
-         if (!_flick_gesture_length_check(ev->root.x, ev->root.y,
-                                          cov->flick_gesture.x_org[i],
-                                          cov->flick_gesture.y_org[i]))
-            {
-               if (!cov->flick_gesture.finger_out[i])
-                  {
-                     DEBUG("Minimal gesture length not reached and no return flick. Gesture aborted.");
-                     cov->flick_gesture.state = GESTURE_ABORTED;
-                     goto end;
-                  }
-               cov->flick_gesture.return_flick[i] = EINA_TRUE;
-            }
-
-         flick_direction_e s = cov->flick_gesture.return_flick[i] ?
-                               cov->flick_gesture.dir :
-                               _flick_gesture_direction_get(ev->root.x, ev->root.y,
-                                     cov->flick_gesture.x_org[i],
-                                     cov->flick_gesture.y_org[i]);
-
-         cov->flick_gesture.n_fingers_left--;
-
-         if ((cov->flick_gesture.dir == FLICK_DIRECTION_UNDEFINED ||
-               cov->flick_gesture.dir > FLICK_DIRECTION_RIGHT)
-               && cov->flick_gesture.return_flick[i] == EINA_FALSE)
-            {
-               DEBUG("Flick gesture");
-               cov->flick_gesture.dir = s;
-            }
-
-         // gesture is valid only if all flicks are in same direction
-         if (cov->flick_gesture.dir != s)
-            {
-               DEBUG("Flick in different direction. Gesture aborted.");
-               cov->flick_gesture.state = GESTURE_ABORTED;
-               goto end;
-            }
-
-         cov->flick_gesture.x_end[i] = ev->root.x;
-         cov->flick_gesture.y_end[i] = ev->root.y;
-
-         if (!cov->flick_gesture.n_fingers_left)
-            {
-               _flick_event_emit(cov);
-               cov->flick_gesture.state = GESTURE_NOT_STARTED;
-            }
-      }
-
-end:
-   // if no finger is touching a screen, gesture will be reseted.
-   if ((cov->flick_gesture.state == GESTURE_ABORTED) && (cov->n_taps == 0))
-      {
-         DEBUG("Restet flick gesture");
-         cov->flick_gesture.state = GESTURE_NOT_STARTED;
-      }
-}
-
-static void
-_flick_gesture_mouse_move(Ecore_Event_Mouse_Move *ev, Cover *cov)
-{
-   if (cov->flick_gesture.state == GESTURE_ONGOING)
-      {
-         int i;
-         for(i = 0; i < cov->flick_gesture.n_fingers; ++i)
-            {
-               if (cov->flick_gesture.finger[i] == ev->multi.device)
-                  break;
-            }
-         if (i == cov->flick_gesture.n_fingers)
-            {
-               if (cov->flick_gesture.n_fingers >= 3)   //that is because of the EFL bug. Mouse move event before mouse down(!)
-                  {
-                     ERROR("Finger id not recognized. Gesture aborted.");
-                     cov->flick_gesture.state = GESTURE_ABORTED;
-                     return;
-                  }
-            }
-         if(!cov->flick_gesture.finger_out[i])
-            {
-               int dx = ev->root.x - cov->flick_gesture.x_org[i];
-               int dy = ev->root.y - cov->flick_gesture.y_org[i];
-               int tmp;
-
-               switch(win_angle)
-                  {
-                  case 90:
-                     tmp = dx;
-                     dx = -dy;
-                     dy = tmp;
-                     break;
-                  case 270:
-                     tmp = dx;
-                     dx = dy;
-                     dy = -tmp;
-                     break;
-                  }
-
-               if (abs(dx) > _e_mod_config->one_finger_flick_min_length)
-                  {
-                     cov->flick_gesture.finger_out[i] = EINA_TRUE;
-                     if (dx > 0)
-                        {
-                           if (cov->flick_gesture.dir == FLICK_DIRECTION_UNDEFINED ||
-                                 cov->flick_gesture.dir == FLICK_DIRECTION_RIGHT_RETURN)
-                              {
-                                 cov->flick_gesture.dir = FLICK_DIRECTION_RIGHT_RETURN;
-                              }
-                           else
-                              {
-                                 ERROR("Invalid direction, abort");
-                                 cov->flick_gesture.state = GESTURE_ABORTED;
-                              }
-                        }
-                     else
-                        {
-                           if (cov->flick_gesture.dir == FLICK_DIRECTION_UNDEFINED ||
-                                 cov->flick_gesture.dir == FLICK_DIRECTION_LEFT_RETURN)
-                              {
-                                 cov->flick_gesture.dir = FLICK_DIRECTION_LEFT_RETURN;
-                              }
-                           else
-                              {
-                                 ERROR("Invalid direction, abort");
-                                 cov->flick_gesture.state = GESTURE_ABORTED;
-                              }
-                        }
-                     return;
-                  }
-
-               else if (abs(dy) > _e_mod_config->one_finger_flick_min_length)
-                  {
-                     cov->flick_gesture.finger_out[i] = EINA_TRUE;
-                     if (dy > 0)
-                        {
-                           if (cov->flick_gesture.dir == FLICK_DIRECTION_UNDEFINED ||
-                                 cov->flick_gesture.dir == FLICK_DIRECTION_DOWN_RETURN)
-                              {
-                                 cov->flick_gesture.dir = FLICK_DIRECTION_DOWN_RETURN;
-                              }
-                           else
-                              {
-                                 ERROR("Invalid direction, abort");
-                                 cov->flick_gesture.state = GESTURE_ABORTED;
-                              }
-                        }
-                     else
-                        {
-                           if (cov->flick_gesture.dir == FLICK_DIRECTION_UNDEFINED ||
-                                 cov->flick_gesture.dir == FLICK_DIRECTION_UP_RETURN)
-                              {
-                                 cov->flick_gesture.dir = FLICK_DIRECTION_UP_RETURN;
-                              }
-                           else
-                              {
-                                 ERROR("Invalid direction, abort");
-                                 cov->flick_gesture.state = GESTURE_ABORTED;
-                              }
-                        }
-                     return;
-                  }
-            }
-      }
-   return;
-}
-
-static Eina_Bool
-_on_hover_timeout(void *data)
-{
-   Cover *cov = data;
-   DEBUG("Hover timer expierd");
-
-   cov->hover_gesture.longpressed = EINA_TRUE;
-   cov->hover_gesture.timer = NULL;
-
-   if (cov->hover_gesture.last_emission_time == -1)
-      {
-         _hover_event_emit(cov, 0);
-         cov->hover_gesture.last_emission_time = cov->event_time;
-      }
-   return EINA_FALSE;
-}
-
-static void
-_hover_gesture_timer_reset(Cover *cov, double time)
-{
-   DEBUG("Hover timer reset");
-   cov->hover_gesture.longpressed = EINA_FALSE;
-   if (cov->hover_gesture.timer)
-      {
-         ecore_timer_reset(cov->hover_gesture.timer);
-         return;
-      }
-   cov->hover_gesture.timer = ecore_timer_add(time, _on_hover_timeout, cov);
-}
-
-static void
-_hover_gesture_mouse_down(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   if (cov->hover_gesture.state == GESTURE_NOT_STARTED &&
-         cov->n_taps == 1)
-      {
-         cov->hover_gesture.state = GESTURE_ONGOING;
-         cov->hover_gesture.timestamp = ev->timestamp;
-         cov->hover_gesture.last_emission_time = -1;
-         cov->hover_gesture.x[0] = ev->root.x;
-         cov->hover_gesture.y[0] = ev->root.y;
-         cov->hover_gesture.finger[0] = ev->multi.device;
-         cov->hover_gesture.n_fingers = 1;
-         _hover_gesture_timer_reset(cov, _e_mod_config->one_finger_hover_longpress_timeout);
-      }
-   if (cov->hover_gesture.state == GESTURE_ONGOING &&
-         cov->n_taps == 2)
-      {
-         if (cov->hover_gesture.longpressed)
-            {
-               _hover_event_emit(cov, 2);
-               goto abort;
-            }
-         cov->hover_gesture.timestamp = -1;
-         cov->hover_gesture.last_emission_time = -1;
-         cov->hover_gesture.x[1] = ev->root.x;
-         cov->hover_gesture.y[1] = ev->root.y;
-         cov->hover_gesture.finger[1] = ev->multi.device;
-         cov->hover_gesture.n_fingers = 2;
-         _hover_gesture_timer_reset(cov, _e_mod_config->one_finger_hover_longpress_timeout);
-      }
-   // abort gesture if more then 2 fingers touched screen
-   if ((cov->hover_gesture.state == GESTURE_ONGOING) &&
-         cov->n_taps > 2)
-      {
-         DEBUG("More then 2 finged. Abort hover gesture");
-         _hover_event_emit(cov, 2);
-         goto abort;
-      }
-   return;
-
-abort:
-   cov->hover_gesture.state = GESTURE_ABORTED;
-   if (cov->hover_gesture.timer)
-      ecore_timer_del(cov->hover_gesture.timer);
-   cov->hover_gesture.timer = NULL;
-}
-
-static void
-_hover_gesture_mouse_up(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   int i;
-   if (cov->hover_gesture.state == GESTURE_ONGOING)
-      {
-
-         for (i = 0; i < cov->hover_gesture.n_fingers; i++)
-            {
-               if (cov->hover_gesture.finger[i] == ev->multi.device)
-                  break;
-            }
-         if (i == cov->hover_gesture.n_fingers)
-            {
-               DEBUG("Invalid finger id: %d", ev->multi.device);
-               return;
-            }
-         else
-            {
-               cov->hover_gesture.state = GESTURE_ABORTED;
-               if (cov->hover_gesture.timer)
-                  ecore_timer_del(cov->hover_gesture.timer);
-               cov->hover_gesture.timer = NULL;
-               // aditionally emit event to complete sequence
-               if (cov->hover_gesture.longpressed)
-                  _hover_event_emit(cov, 2);
-            }
-      }
-   // reset gesture only if user released all his fingers
-   if (cov->n_taps == 0)
-      cov->hover_gesture.state = GESTURE_NOT_STARTED;
-}
-
-static void _get_root_coords(Ecore_X_Window win, int *x, int *y)
-{
-   Ecore_X_Window root = ecore_x_window_root_first_get();
-   Ecore_X_Window parent = ecore_x_window_parent_get(win);
-   int wx, wy;
-
-   if (x) *x = 0;
-   if (y) *y = 0;
-
-   while (parent && (root != parent))
-      {
-         ecore_x_window_geometry_get(parent, &wx, &wy, NULL, NULL);
-         if (x) *x += wx;
-         if (y) *y += wy;
-         parent = ecore_x_window_parent_get(parent);
-      }
-}
 
 void
 start_scroll(int x, int y)
 {
-   Ecore_X_Window under = ecore_x_window_at_xy_get(x, y);
-   _get_root_coords(under, &rx, &ry);
-   DEBUG("Send down: %d %d", x - rx, y - ry);
-   ecore_x_mouse_in_send(under, x - rx, y - ry);
-   ecore_x_window_focus(under);
-   ecore_x_mouse_down_send(under, x - rx, y - ry, 1);
-   scrolled_win = under;
 }
 
 void
 continue_scroll(int x, int y)
 {
-   DEBUG("Send move: %d %d", x - rx, y - ry);
-   ecore_x_mouse_move_send(scrolled_win, x - rx, y - ry);
 }
 
 void
 end_scroll(int x, int y)
 {
-   DEBUG("Send up: %d %d", x - rx, y - ry);
-   ecore_x_mouse_up_send(scrolled_win, x - rx, y - ry, 1);
-   ecore_x_mouse_out_send(scrolled_win, x - rx, y - ry);
-}
-
-static void
-_hover_event_emit(Cover *cov, int state)
-{
-   int ax = 0, ay = 0, j;
-   for (j = 0; j < cov->hover_gesture.n_fingers; j++)
-      {
-         ax += cov->hover_gesture.x[j];
-         ay += cov->hover_gesture.y[j];
-      }
-
-   ax /= cov->hover_gesture.n_fingers;
-   ay /= cov->hover_gesture.n_fingers;
-
-   switch (cov->hover_gesture.n_fingers)
-      {
-      case 1:
-         INFO("ON FINGER HOVER");
-         _event_emit(ONE_FINGER_HOVER, ax, ay, ax, ay, state, cov->event_time);
-         break;
-      case 2:
-         INFO("TWO FINGERS HOVER");
-         _event_emit(TWO_FINGERS_HOVER, ax, ay, ax, ay, state, cov->event_time);
-         if (state == 0)
-            start_scroll(ax, ay);
-         else if (state == 1)
-            continue_scroll(ax, ay);
-         else if (state == 2)
-            end_scroll(ax, ay);
-         break;
-      default:
-         break;
-      }
-}
-
-static void
-_hover_gesture_mouse_move(Ecore_Event_Mouse_Move *ev, Cover *cov)
-{
-   if (cov->hover_gesture.state == GESTURE_ONGOING)
-      {
-         // check fingers
-         int i;
-         if (!cov->hover_gesture.longpressed)
-            return;
-
-         for (i = 0; i < cov->hover_gesture.n_fingers; i++)
-            {
-               if (cov->hover_gesture.finger[i] == ev->multi.device)
-                  break;
-            }
-         if (i == cov->hover_gesture.n_fingers)
-            {
-               DEBUG("Invalid finger id: %d", ev->multi.device);
-               return;
-            }
-         cov->hover_gesture.x[i] = ev->root.x;
-         cov->hover_gesture.y[i] = ev->root.y;
-         _hover_event_emit(cov, 1);
-      }
-}
-
-static void
-_tap_event_emit(Cover *cov, int state)
-{
-   switch (cov->tap_gesture_data.n_taps)
-      {
-      case 1:
-         if(cov->tap_gesture_data.tap_type == ONE_FINGER_GESTURE)
-            {
-               DEBUG("ONE_FINGER_SINGLE_TAP");
-               _event_emit(ONE_FINGER_SINGLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == TWO_FINGERS_GESTURE)
-            {
-               DEBUG("TWO_FINGERS_SINGLE_TAP");
-               _event_emit(TWO_FINGERS_SINGLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[1], cov->tap_gesture_data.y_org[1],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == THREE_FINGERS_GESTURE)
-            {
-               DEBUG("THREE_FINGERS_SINGLE_TAP");
-               _event_emit(THREE_FINGERS_SINGLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[2], cov->tap_gesture_data.y_org[2],
-                           state, cov->event_time);
-            }
-         else
-            {
-               ERROR("Unknown tap");
-            }
-         break;
-      case 2:
-         if(cov->tap_gesture_data.tap_type == ONE_FINGER_GESTURE)
-            {
-               DEBUG("ONE_FINGER_DOUBLE_TAP");
-               _event_emit(ONE_FINGER_DOUBLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == TWO_FINGERS_GESTURE)
-            {
-               DEBUG("TWO_FINGERS_DOUBLE_TAP");
-               _event_emit(TWO_FINGERS_DOUBLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[1], cov->tap_gesture_data.y_org[1],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == THREE_FINGERS_GESTURE)
-            {
-               DEBUG("THREE_FINGERS_DOUBLE_TAP");
-               _event_emit(THREE_FINGERS_DOUBLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[2], cov->tap_gesture_data.y_org[2],
-                           state, cov->event_time);
-            }
-         else
-            {
-               ERROR("Unknown tap");
-            }
-         break;
-      case 3:
-         if(cov->tap_gesture_data.tap_type == ONE_FINGER_GESTURE)
-            {
-               DEBUG("ONE_FINGER_TRIPLE_TAP");
-               _event_emit(ONE_FINGER_TRIPLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == TWO_FINGERS_GESTURE)
-            {
-               DEBUG("TWO_FINGERS_TRIPLE_TAP");
-               _event_emit(TWO_FINGERS_TRIPLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[1], cov->tap_gesture_data.y_org[1],
-                           state, cov->event_time);
-            }
-         else if(cov->tap_gesture_data.tap_type == THREE_FINGERS_GESTURE)
-            {
-               DEBUG("THREE_FINGERS_TRIPLE_TAP");
-               _event_emit(THREE_FINGERS_TRIPLE_TAP,
-                           cov->tap_gesture_data.x_org[0], cov->tap_gesture_data.y_org[0],
-                           cov->tap_gesture_data.x_org[2], cov->tap_gesture_data.y_org[2],
-                           state, cov->event_time);
-            }
-         else
-            {
-               ERROR("Unknown tap");
-            }
-         break;
-      default:
-         ERROR("Unknown tap");
-         break;
-      }
-}
-
-static Eina_Bool
-_on_tap_timer_expire(void *data)
-{
-   Cover *cov = data;
-   DEBUG("Timer expired");
-
-   if (cov->tap_gesture_data.started && !cov->tap_gesture_data.pressed)
-      _tap_event_emit(cov,2);
-   else
-      _tap_event_emit(cov,3);
-
-   // finish gesture
-   cov->tap_gesture_data.started = EINA_FALSE;
-   cov->tap_gesture_data.timer = NULL;
-   cov->tap_gesture_data.tap_type = ONE_FINGER_GESTURE;
-   cov->tap_gesture_data.finger[0] = -1;
-   cov->tap_gesture_data.finger[1] = -1;
-   cov->tap_gesture_data.finger[2] = -1;
-
-   return EINA_FALSE;
-}
-
-static int _tap_gesture_finger_check(Cover *cov, int x, int y)
-{
-   int dx = x - cov->tap_gesture_data.x_org[0];
-   int dy = y - cov->tap_gesture_data.y_org[0];
-
-   if (cov->tap_gesture_data.finger[0] != -1 &&
-         (dx * dx + dy * dy < _e_mod_config->one_finger_tap_radius *
-          _e_mod_config->one_finger_tap_radius))
-      {
-         return 0;
-      }
-
-   dx = x - cov->tap_gesture_data.x_org[1];
-   dy = y - cov->tap_gesture_data.y_org[1];
-   if (cov->tap_gesture_data.finger[1] != -1 &&
-         (dx * dx + dy * dy < _e_mod_config->one_finger_tap_radius *
-          _e_mod_config->one_finger_tap_radius))
-      {
-         return 1;
-      }
-
-   dx = x - cov->tap_gesture_data.x_org[2];
-   dy = y - cov->tap_gesture_data.y_org[2];
-   if (cov->tap_gesture_data.finger[2] != -1 &&
-         (dx * dx + dy * dy < _e_mod_config->one_finger_tap_radius *
-          _e_mod_config->one_finger_tap_radius))
-      {
-         return 2;
-      }
-
-   return -1;
-}
-
-static void
-_tap_gestures_mouse_down(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   if (cov->n_taps > 4)
-      {
-         ERROR("Too many fingers");
-         return;
-      }
-
-   cov->tap_gesture_data.pressed = EINA_TRUE;
-
-   if (cov->tap_gesture_data.started == EINA_FALSE)
-      {
-         DEBUG("First finger down");
-         cov->tap_gesture_data.started = EINA_TRUE;
-         cov->tap_gesture_data.finger[0] = ev->multi.device;
-         cov->tap_gesture_data.x_org[0] = ev->root.x;
-         cov->tap_gesture_data.y_org[0] = ev->root.y;
-         cov->tap_gesture_data.finger[1] = -1;
-         cov->tap_gesture_data.finger[2] = -1;
-         cov->tap_gesture_data.n_taps = 0;
-         cov->tap_gesture_data.timer = ecore_timer_add(
-                                          _e_mod_config->one_finger_tap_timeout,
-                                          _on_tap_timer_expire, cov);
-         cov->tap_gesture_data.tap_type = ONE_FINGER_GESTURE;
-      }
-
-   else
-      {
-         if (ev->multi.device == cov->tap_gesture_data.finger[0])
-            {
-               DEBUG("First finger down");
-
-               if (_tap_gesture_finger_check(cov, ev->root.x, ev->root.y) == -1)
-                  {
-                     ERROR("Abort gesture");
-                     cov->tap_gesture_data.started = EINA_FALSE;
-                     ecore_timer_del(cov->tap_gesture_data.timer);
-                     cov->tap_gesture_data.timer = NULL;
-                     cov->tap_gesture_data.tap_type = ONE_FINGER_GESTURE;
-                     cov->tap_gesture_data.finger[0] = -1;
-                     cov->tap_gesture_data.finger[1] = -1;
-                     cov->tap_gesture_data.finger[2] = -1;
-                     _tap_gestures_mouse_down(ev, cov);
-                     return;
-                  }
-
-               cov->tap_gesture_data.x_org[0] = ev->root.x;
-               cov->tap_gesture_data.y_org[0] = ev->root.y;
-            }
-         else if (cov->tap_gesture_data.finger[1] == -1 ||
-                  cov->tap_gesture_data.finger[1] == ev->multi.device)
-            {
-               DEBUG("Second finger down");
-               cov->tap_gesture_data.finger[1] = ev->multi.device;
-
-               cov->tap_gesture_data.x_org[1] = ev->root.x;
-               cov->tap_gesture_data.y_org[1] = ev->root.y;
-               if (cov->tap_gesture_data.tap_type < TWO_FINGERS_GESTURE)
-                  cov->tap_gesture_data.tap_type = TWO_FINGERS_GESTURE;
-            }
-         else if (cov->tap_gesture_data.finger[2] == -1 ||
-                  cov->tap_gesture_data.finger[2] == ev->multi.device)
-            {
-               DEBUG("Third finger down");
-               cov->tap_gesture_data.finger[2] = ev->multi.device;
-
-               cov->tap_gesture_data.x_org[2] = ev->root.x;
-               cov->tap_gesture_data.y_org[2] = ev->root.y;
-               if (cov->tap_gesture_data.tap_type < THREE_FINGERS_GESTURE)
-                  cov->tap_gesture_data.tap_type = THREE_FINGERS_GESTURE;
-            }
-         else
-            {
-               ERROR("Unknown finger down");
-            }
-         ecore_timer_reset(cov->tap_gesture_data.timer);
-      }
-}
-
-static void
-_tap_gestures_mouse_up(Ecore_Event_Mouse_Button *ev, Cover *cov)
-{
-   if (cov->tap_gesture_data.timer)
-      {
-         cov->tap_gesture_data.pressed = EINA_FALSE;
-
-         if (ev->multi.device == cov->tap_gesture_data.finger[0])
-            {
-               DEBUG("First finger up");
-
-               int dx = ev->root.x - cov->tap_gesture_data.x_org[0];
-               int dy = ev->root.y - cov->tap_gesture_data.y_org[0];
-
-               if((dx * dx + dy * dy) < _e_mod_config->one_finger_tap_radius *
-                     _e_mod_config->one_finger_tap_radius)
-                  {
-                     if (cov->n_taps == 0)
-                        {
-                           cov->tap_gesture_data.n_taps++;
-                        }
-                  }
-               else
-                  {
-                     ERROR("Abort gesture");
-                     cov->tap_gesture_data.started = EINA_FALSE;
-                  }
-            }
-         else if (ev->multi.device == cov->tap_gesture_data.finger[1])
-            {
-               DEBUG("Second finger up");
-
-               int dx = ev->root.x - cov->tap_gesture_data.x_org[1];
-               int dy = ev->root.y - cov->tap_gesture_data.y_org[1];
-
-               if((dx * dx + dy * dy) < _e_mod_config->one_finger_tap_radius *
-                     _e_mod_config->one_finger_tap_radius)
-                  {
-                     if (cov->n_taps == 0)
-                        {
-                           cov->tap_gesture_data.n_taps++;
-                        }
-                  }
-               else
-                  {
-                     ERROR("Abort gesture");
-                     cov->tap_gesture_data.started = EINA_FALSE;
-                  }
-            }
-         else if (ev->multi.device == cov->tap_gesture_data.finger[2])
-            {
-               DEBUG("Third finger up");
-
-               int dx = ev->root.x - cov->tap_gesture_data.x_org[2];
-               int dy = ev->root.y - cov->tap_gesture_data.y_org[2];
-
-               if((dx * dx + dy * dy) < _e_mod_config->one_finger_tap_radius *
-                     _e_mod_config->one_finger_tap_radius)
-                  {
-                     if (cov->n_taps == 0)
-                        {
-                           cov->tap_gesture_data.n_taps++;
-                        }
-                  }
-               else
-                  {
-                     ERROR("Abort gesture");
-                     cov->tap_gesture_data.started = EINA_FALSE;
-                  }
-            }
-         else
-            {
-               ERROR("Unknown finger up, abort gesture");
-               cov->tap_gesture_data.started = EINA_FALSE;
-            }
-      }
-}
-
-static void
-_tap_gestures_move(Ecore_Event_Mouse_Move *ev, Cover *cov)
-{
-   int i;
-   for (i = 0; i < sizeof(cov->tap_gesture_data.finger)/sizeof(cov->tap_gesture_data.finger[0]); i++)
-      {
-         if (ev->multi.device == cov->tap_gesture_data.finger[i])
-            {
-               int dx = ev->root.x - cov->tap_gesture_data.x_org[i];
-               int dy = ev->root.y - cov->tap_gesture_data.y_org[i];
-
-               if((dx * dx + dy * dy) > _e_mod_config->one_finger_tap_radius *
-                     _e_mod_config->one_finger_tap_radius)
-                  {
-                     DEBUG("abort tap gesutre");
-                     cov->tap_gesture_data.started = EINA_FALSE;
-                     ecore_timer_del(cov->tap_gesture_data.timer);
-                     cov->tap_gesture_data.timer = NULL;
-                     cov->tap_gesture_data.tap_type = ONE_FINGER_GESTURE;
-                     cov->tap_gesture_data.finger[0] = -1;
-                     cov->tap_gesture_data.finger[1] = -1;
-                     cov->tap_gesture_data.finger[2] = -1;
-                  }
-               break;
-            }
-      }
-}
-
-static unsigned int
-_win_angle_get(void)
-{
-   Ecore_X_Window root, first_root;
-   int ret;
-   int count;
-   int angle = 0;
-   unsigned char *prop_data = NULL;
-
-   first_root = ecore_x_window_root_first_get();
-   root = ecore_x_window_root_get(first_root);
-   ret = ecore_x_window_prop_property_get(root, ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE,
-                   ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count);
-
-   if (ret && prop_data)
-      memcpy (&angle, prop_data, sizeof (int));
-
-   if (prop_data)
-      free (prop_data);
-
-   return angle;
-}
-
-static Eina_Bool
-_cb_mouse_down(void    *data EINA_UNUSED,
-               int      type EINA_UNUSED,
-               void    *event)
-{
-   Ecore_Event_Mouse_Button *ev = event;
-
-   cov->n_taps++;
-   cov->event_time = ev->timestamp;
-
-   DEBUG("mouse down: multi.device: %d, taps: %d", ev->multi.device, cov->n_taps);
-
-   win_angle = _win_angle_get();
-
-   _flick_gesture_mouse_down(ev, cov);
-   _hover_gesture_mouse_down(ev, cov);
-   _tap_gestures_mouse_down(ev, cov);
-
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_cb_mouse_up(void    *data EINA_UNUSED,
-             int      type EINA_UNUSED,
-             void    *event)
-{
-   Ecore_Event_Mouse_Button *ev = event;
-
-   cov->n_taps--;
-   cov->event_time = ev->timestamp;
-
-   DEBUG("mouse up, multi.device: %d, taps: %d", ev->multi.device, cov->n_taps);
-
-   _flick_gesture_mouse_up(ev, cov);
-   _hover_gesture_mouse_up(ev, cov);
-   _tap_gestures_mouse_up(ev, cov);
-
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_cb_mouse_move(void    *data EINA_UNUSED,
-               int      type EINA_UNUSED,
-               void    *event)
-{
-   Ecore_Event_Mouse_Move *ev = event;
-
-   cov->event_time = ev->timestamp;
-
-   _flick_gesture_mouse_move(ev, cov);
-   _hover_gesture_mouse_move(ev, cov);
-   _tap_gestures_move(ev, cov);
-
-   return ECORE_CALLBACK_PASS_ON;
 }
 
 Eina_Bool screen_reader_gestures_init(void)
 {
-   ecore_init();
-   ecore_x_init(NULL);
-
-   if (!ecore_x_pointer_grab(ecore_x_window_root_first_get()))
-      {
-         ERROR("Failed to grab pointer on: %x", ecore_x_window_root_first_get());
-         return EINA_FALSE;
-      }
-   if (!ecore_x_input_touch_devices_grab(ecore_x_window_root_first_get()))
-      {
-         ERROR("Failed to grab devices on: %x", ecore_x_window_root_first_get());
-         ecore_x_pointer_ungrab();
-         return EINA_FALSE;
-      }
-
-   ecore_x_input_multi_select(ecore_x_window_root_first_get());
-   _e_mod_config = calloc(sizeof(Gestures_Config), 1);
-   cov = calloc(sizeof(Cover), 1);
-
-   _e_mod_config->one_finger_flick_min_length = 100;
-   _e_mod_config->one_finger_flick_max_time = 400;
-   _e_mod_config->one_finger_hover_longpress_timeout = 0.81;
-   _e_mod_config->two_fingers_hover_longpress_timeout = 0.1;
-   _e_mod_config->one_finger_tap_timeout = 0.4;
-   _e_mod_config->one_finger_tap_radius = 100;
-
-   handlers = eina_list_append(NULL, ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _cb_mouse_move, NULL));
-   handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _cb_mouse_up, NULL));
-   handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _cb_mouse_down, NULL));
-
    return EINA_TRUE;
 }
 
 void screen_reader_gestures_shutdown(void)
 {
-   Ecore_Event_Handler *hdlr;
-   EINA_LIST_FREE(handlers, hdlr)
-   {
-      ecore_event_handler_del(hdlr);
-   }
-
-   ecore_x_pointer_ungrab();
-   ecore_x_input_touch_devices_ungrab();
-   ecore_x_shutdown();
-   ecore_shutdown();
-   free(_e_mod_config);
-   free(cov);
 }
 
 void screen_reader_gestures_tracker_register(GestureCB cb, void *data)
 {
-   _global_cb = cb;
-   _global_data = data;
 }
index 78060bd..20eafda 100644 (file)
@@ -19,6 +19,8 @@
 #define MAX_SIM_COUNT 2
 #define DATE_TIME_BUFFER_SIZE 26
 
+#define _HAVE_VCONF_KEY 0
+
 TapiHandle *tapi_handle[MAX_SIM_COUNT + 1] = {0, };
 
 static void device_system_cb(device_callback_e type, void *value, void *user_data);
@@ -202,10 +204,16 @@ void device_time_get(void)
    time_t rawtime = 0;
    struct tm *timeinfo = NULL;
 
+//TODO keep this before the VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_TIME is available
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_TIME))
       {
          return;
       }
+#else
+   return;
+#endif
+
 
    time(&rawtime );
    timeinfo = localtime ( &rawtime );
@@ -287,10 +295,14 @@ void device_battery_get(void)
    bool is_charging = false;
    int ret = -1;
 
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_BATTERY))
       {
          return;
       }
+#else
+   return;
+#endif
 
    ret = device_battery_is_charging(&is_charging);
    if (ret != DEVICE_ERROR_NONE)
@@ -526,10 +538,14 @@ static void _signal_strength_wifi_get(void)
 
 void device_signal_strenght_get(void)
 {
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_SIGNAL_STRENGHT))
       {
          return;
       }
+#else
+   return;
+#endif
    _signal_strength_sim_get();
    _signal_strength_wifi_get();
 }
@@ -545,10 +561,14 @@ void device_missed_events_get(void)
    int current_noti_count = 0;
    char *buffer = NULL;
 
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_MISSED_EVENTS))
       {
          return;
       }
+#else
+   return;
+#endif
 
    ret = notification_get_list(NOTIFICATION_TYPE_NONE, -1, &list);
    if (ret != NOTIFICATION_ERROR_NONE)
@@ -623,10 +643,14 @@ void device_date_get(void)
    time_t rawtime = 0;
    struct tm *timeinfo = NULL;
 
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_DATE))
       {
          return;
       }
+#else
+   return;
+#endif
 
    time(&rawtime );
    timeinfo = localtime ( &rawtime );
@@ -693,10 +717,14 @@ void device_bluetooth_get(void)
    char *buffer = NULL;
    int device_count = 0;
 
+#if _HAVE_VCONF_KEY
    if (!_read_text_get(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS_INDICATOR_INFORMATION_BLUETOOTH))
       {
          return;
       }
+#else
+   return;
+#endif
 
    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
    int ret = bt_adapter_get_state(&adapter_state);
index 0813c05..6080f6b 100644 (file)
@@ -132,15 +132,6 @@ static void __tts_test_utt_completed_cb(tts_h tts, int utt_id, void* user_data)
             flush_flag = EINA_FALSE;
       }
 
-#ifndef SCREEN_READER_TV
-   if(last_utt_id == utt_id)
-      {
-         DEBUG("LAST UTTERANCE");
-         pause_state = EINA_FALSE;
-         on_utterance_end();
-      }
-#endif
-
    return;
 }
 
index 4e1d9c8..f682b5f 100644 (file)
@@ -21,10 +21,10 @@ keylist_t *keys = NULL;
 void app_termination_cb(keynode_t *node, void *user_data)
 {
    DEBUG("START");
-   DEBUG("Application terminate %d", !node->value.i);
+   DEBUG("Application terminate %d", !vconf_keynode_get_int(node));
 
    Service_Data *service_data = user_data;
-   service_data->run_service = node->value.i;
+   service_data->run_service = vconf_keynode_get_int(node);
 
    if(service_data->run_service == 0)
       {
@@ -37,10 +37,10 @@ void app_termination_cb(keynode_t *node, void *user_data)
 void display_language_cb(keynode_t *node, void *user_data)
 {
    DEBUG("START");
-   DEBUG("Trying to set LC_MESSAGES to: %s", node->value.s);
+   DEBUG("Trying to set LC_MESSAGES to: %s", vconf_keynode_get_str(node));
 
    Service_Data *sd = user_data;
-   snprintf(sd->display_language, LANGUAGE_NAME_SIZE, "%s", node->value.s);
+   snprintf(sd->display_language, LANGUAGE_NAME_SIZE, "%s", vconf_keynode_get_str(node));
    //to make gettext work
    setenv("LC_MESSAGES", sd->display_language, 1);