and break api in ecore_input_evas - not used anyway except within
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 8 Dec 2010 03:25:23 +0000 (03:25 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 8 Dec 2010 03:25:23 +0000 (03:25 +0000)
ecore. the api didn't allow for rotation of multitouch input. need to
fix. done.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@55367 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_cocoa.c
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_sdl.c
src/lib/ecore_evas/ecore_evas_win32.c
src/lib/ecore_evas/ecore_evas_wince.c
src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_input_evas/Ecore_Input_Evas.h
src/lib/ecore_input_evas/ecore_input_evas.c

index 1507425..56e165e 100644 (file)
@@ -2881,6 +2881,152 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timest
      evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, timestamp, NULL);
 }
 
+void
+_ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
+                                     int x, int y, 
+                                     double radius,
+                                     double radius_x, double radius_y,
+                                     double pressure,
+                                     double angle,
+                                     double mx, double my,
+                                     unsigned int timestamp)
+{
+   if (ee->rotation == 0)
+      evas_event_feed_multi_move(ee->evas, device,
+                                 x, y, 
+                                 radius,
+                                 radius_x, radius_y,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 mx, my,
+                                 timestamp, NULL);
+   else if (ee->rotation == 90)
+      evas_event_feed_multi_move(ee->evas, device,
+                                 ee->h - y - 1, x, 
+                                 radius,
+                                 radius_y, radius_x,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 ee->h - my - 1, mx,
+                                 timestamp, NULL);
+   else if (ee->rotation == 180)
+      evas_event_feed_multi_move(ee->evas, device,
+                                 ee->w - x - 1, ee->h - y - 1, 
+                                 radius,
+                                 radius_x, radius_y,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 ee->w - mx - 1, ee->h - my - 1,
+                                 timestamp, NULL);
+   else if (ee->rotation == 270)
+      evas_event_feed_multi_move(ee->evas, device,
+                                 y, ee->w - x - 1,
+                                 radius,
+                                 radius_y, radius_x,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 my, ee->w - mx - 1,
+                                 timestamp, NULL);
+}
+
+void
+_ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
+                                     int x, int y, 
+                                     double radius,
+                                     double radius_x, double radius_y,
+                                     double pressure,
+                                     double angle,
+                                     double mx, double my,
+                                     Evas_Button_Flags flags,
+                                     unsigned int timestamp)
+{
+   if (ee->rotation == 0)
+      evas_event_feed_multi_down(ee->evas, device,
+                                 x, y, 
+                                 radius,
+                                 radius_x, radius_y,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 mx, my,
+                                 flags, timestamp, NULL);
+   else if (ee->rotation == 90)
+      evas_event_feed_multi_down(ee->evas, device,
+                                 ee->h - y - 1, x, 
+                                 radius,
+                                 radius_y, radius_x,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 ee->h - my - 1, mx,
+                                 flags, timestamp, NULL);
+   else if (ee->rotation == 180)
+      evas_event_feed_multi_down(ee->evas, device,
+                                 ee->w - x - 1, ee->h - y - 1, 
+                                 radius,
+                                 radius_x, radius_y,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 ee->w - mx - 1, ee->h - my - 1,
+                                 flags, timestamp, NULL);
+   else if (ee->rotation == 270)
+      evas_event_feed_multi_down(ee->evas, device,
+                                 y, ee->w - x - 1,
+                                 radius,
+                                 radius_y, radius_x,
+                                 pressure, 
+                                 angle - ee->rotation,
+                                 my, ee->w - mx - 1,
+                                 flags, timestamp, NULL);
+}
+
+void
+_ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
+                                   int x, int y, 
+                                   double radius,
+                                   double radius_x, double radius_y,
+                                   double pressure,
+                                   double angle,
+                                   double mx, double my,
+                                   Evas_Button_Flags flags,
+                                   unsigned int timestamp)
+{
+   if (ee->rotation == 0)
+      evas_event_feed_multi_up(ee->evas, device,
+                               x, y, 
+                               radius,
+                               radius_x, radius_y,
+                               pressure, 
+                               angle - ee->rotation,
+                               mx, my,
+                               flags, timestamp, NULL);
+   else if (ee->rotation == 90)
+      evas_event_feed_multi_up(ee->evas, device,
+                               ee->h - y - 1, x, 
+                               radius,
+                               radius_y, radius_x,
+                               pressure, 
+                               angle - ee->rotation,
+                               ee->h - my - 1, mx,
+                               flags, timestamp, NULL);
+   else if (ee->rotation == 180)
+      evas_event_feed_multi_up(ee->evas, device,
+                               ee->w - x - 1, ee->h - y - 1, 
+                               radius,
+                               radius_x, radius_y,
+                               pressure, 
+                               angle - ee->rotation,
+                               ee->w - mx - 1, ee->h - my - 1,
+                               flags, timestamp, NULL);
+   else if (ee->rotation == 270)
+      evas_event_feed_multi_up(ee->evas, device,
+                               y, ee->w - x - 1,
+                               radius,
+                               radius_y, radius_x,
+                               pressure, 
+                               angle - ee->rotation,
+                               my, ee->w - mx - 1,
+                               flags, timestamp, NULL);
+}
+
 /**
  * Get a list of all the ecore_evases.
  * 
index 21fdd0b..e6fb541 100644 (file)
@@ -366,7 +366,11 @@ ecore_evas_cocoa_new(const char* name, int w, int h)
 
    _ecore_evas_cocoa_init(w, h);
 
-   ecore_event_window_register(0, ee, ee->evas, _ecore_evas_mouse_move_process);
+   ecore_event_window_register(0, ee, ee->evas, 
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
 
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_cocoa_engine_func;
 
index a02557b..6344be5 100644 (file)
@@ -380,6 +380,32 @@ void _ecore_evas_register(Ecore_Evas *ee);
 void _ecore_evas_free(Ecore_Evas *ee);
 void _ecore_evas_idle_timeout_update(Ecore_Evas *ee);
 void _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timestamp);
+void _ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
+                                          int x, int y,
+                                          double radius,
+                                          double radius_x, double radius_y,
+                                          double pressure,
+                                          double angle,
+                                          double mx, double my,
+                                          unsigned int timestamp);
+void _ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
+                                          int x, int y,
+                                          double radius,
+                                          double radius_x, double radius_y,
+                                          double pressure,
+                                          double angle,
+                                          double mx, double my,
+                                          Evas_Button_Flags flags,
+                                          unsigned int timestamp);
+void _ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
+                                        int x, int y,
+                                        double radius,
+                                        double radius_x, double radius_y,
+                                        double pressure,
+                                        double angle,
+                                        double mx, double my,
+                                        Evas_Button_Flags flags,
+                                        unsigned int timestamp);
 
 extern Eina_Bool _ecore_evas_app_comp_sync;
 
index 6c19af3..1d08322 100644 (file)
@@ -427,7 +427,11 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
 
    _ecore_evas_sdl_init(w, h);
 
-   ecore_event_window_register(0, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(0, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
 
    SDL_ShowCursor(SDL_DISABLE);
 
index 852c922..6728784 100644 (file)
@@ -1170,7 +1170,11 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_init)(Ecore_Evas *ee),
 
    ee->engine.func->fn_render = _ecore_evas_win32_render;
    _ecore_evas_register(ee);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
    
    return ee;
 }
index c1de52c..3a2e444 100644 (file)
@@ -820,7 +820,11 @@ ecore_evas_software_wince_new_internal(int                 backend,
 
    ee->engine.func->fn_render = _ecore_evas_wince_render;
    _ecore_evas_register(ee);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
    evas_focus_in(ee->evas);
 
    return ee;
index 1cb168c..136ae07 100644 (file)
@@ -1887,7 +1887,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
         ecore_x_window_shape_mask_set(ee->prop.window, 0);
         ecore_x_input_multi_select(ee->prop.window);
-        ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
         if (ee->prop.borderless)
           ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
         if (ee->visible) ecore_x_window_show(ee->prop.window);
@@ -2001,7 +2005,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
 //        ecore_x_window_shape_mask_set(ee->prop.window, 0);
         ecore_x_input_multi_select(ee->prop.window);
-        ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
         if (ee->prop.borderless)
           ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
         if (ee->visible) ecore_x_window_show(ee->prop.window);
@@ -2091,7 +2099,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
         ecore_x_window_shape_mask_set(ee->prop.window, 0);
         ecore_x_input_multi_select(ee->prop.window);
-        ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
         if (ee->prop.borderless)
           ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
         if (ee->visible) ecore_x_window_show(ee->prop.window);
@@ -2174,7 +2186,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
         ecore_x_window_shape_mask_set(ee->prop.window, 0);
         ecore_x_input_multi_select(ee->prop.window);
-        ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
         if (ee->prop.borderless)
           ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
         if (ee->visible) ecore_x_window_show(ee->prop.window);
@@ -2263,7 +2279,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
         ecore_x_window_shape_mask_set(ee->prop.window, 0);
         ecore_x_input_multi_select(ee->prop.window);
-        ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
         if (ee->prop.borderless)
           ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
         if (ee->visible) ecore_x_window_show(ee->prop.window);
@@ -3255,7 +3275,11 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func->fn_render = _ecore_evas_x_render;
    _ecore_evas_register(ee);
    ecore_x_input_multi_select(ee->prop.window);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
    return ee;
 }
 #else
@@ -3358,7 +3382,11 @@ ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window wi
         *winp = win;
         ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
         ecore_x_input_multi_select(win);
-        ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(win, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
      }
 }
 #else
@@ -3482,7 +3510,11 @@ ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func->fn_render = _ecore_evas_x_render;
    _ecore_evas_register(ee);
    ecore_x_input_multi_select(ee->prop.window);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
 # endif /* HAVE_ECORE_X_XCB */
 
    return ee;
@@ -3786,7 +3818,11 @@ ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func->fn_render = _ecore_evas_x_render;
    _ecore_evas_register(ee);
    ecore_x_input_multi_select(ee->prop.window);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
    return ee;
 }
 #else
@@ -4013,7 +4049,11 @@ ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func->fn_render = _ecore_evas_x_render;
    _ecore_evas_register(ee);
    ecore_x_input_multi_select(ee->prop.window);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
    return ee;
 }
 #else
@@ -4116,7 +4156,11 @@ ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window
         *winp = win;
         ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
         ecore_x_input_multi_select(win);
-        ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(win, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
      }
 }
 #else
@@ -4323,7 +4367,11 @@ ecore_evas_software_x11_8_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func->fn_render = _ecore_evas_x_render;
    _ecore_evas_register(ee);
    ecore_x_input_multi_select(ee->prop.window);
-   ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+   ecore_event_window_register(ee->prop.window, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
 
    return ee;
 #else
@@ -4437,7 +4485,11 @@ ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window
         *winp = win;
         ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
         ecore_x_input_multi_select(win);
-        ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+        ecore_event_window_register(win, ee, ee->evas,
+                                    (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                                    (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                                    (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                                    (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
      }
 #else
    return;
index 836d3e0..c97274e 100644 (file)
@@ -34,7 +34,10 @@ extern "C" {
 #endif
 
 typedef void (*Ecore_Event_Mouse_Move_Cb)(void *window, int x, int y, unsigned int timestamp);
-
+typedef void (*Ecore_Event_Multi_Move_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, unsigned int timestamp);
+typedef void (*Ecore_Event_Multi_Down_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp);
+typedef void (*Ecore_Event_Multi_Up_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp);
+      
 EAPI int       ecore_event_evas_init(void);
 EAPI int       ecore_event_evas_shutdown(void);
 
@@ -47,7 +50,7 @@ EAPI Eina_Bool ecore_event_evas_mouse_move(void *data, int type, void *event);
 EAPI Eina_Bool ecore_event_evas_mouse_in(void *data, int type, void *event);
 EAPI Eina_Bool ecore_event_evas_mouse_out(void *data, int type, void *event);
 
-EAPI void      ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse);
+EAPI void      ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse, Ecore_Event_Multi_Move_Cb move_multi, Ecore_Event_Multi_Down_Cb down_multi, Ecore_Event_Multi_Up_Cb up_multi);
 EAPI void      ecore_event_window_unregister(Ecore_Window id);
 EAPI void     *ecore_event_window_match(Ecore_Window id);
 EAPI void      ecore_event_window_ignore_events(Ecore_Window id, int ignore_event);
index 4de8b1d..0f445a0 100644 (file)
@@ -18,6 +18,9 @@ struct _Ecore_Input_Window
    Evas *evas;
    void *window;
    Ecore_Event_Mouse_Move_Cb move_mouse;
+   Ecore_Event_Multi_Move_Cb move_multi;
+   Ecore_Event_Multi_Down_Cb down_multi;
+   Ecore_Event_Multi_Up_Cb up_multi;
    int ignore_event;
 };
 
@@ -65,7 +68,11 @@ ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers)
 }
 
 EAPI void
-ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse)
+ecore_event_window_register(Ecore_Window id, void *window, Evas *evas,
+                            Ecore_Event_Mouse_Move_Cb move_mouse,
+                            Ecore_Event_Multi_Move_Cb move_multi,
+                            Ecore_Event_Multi_Down_Cb down_multi,
+                            Ecore_Event_Multi_Up_Cb up_multi)
 {
    Ecore_Input_Window *w;
 
@@ -75,6 +82,9 @@ ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Eve
    w->evas = evas;
    w->window = window;
    w->move_mouse = move_mouse;
+   w->move_multi = move_multi;
+   w->down_multi = down_multi;
+   w->up_multi = up_multi;
    w->ignore_event = 0;
 
    eina_hash_add(_window_hash, &id, w);
@@ -156,16 +166,48 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr
      {
         ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
         if (press == ECORE_DOWN)
-          evas_event_feed_mouse_down(lookup->evas, e->buttons, flags, e->timestamp, NULL);
+          evas_event_feed_mouse_down(lookup->evas, e->buttons, flags, 
+                                     e->timestamp, NULL);
         else
-          evas_event_feed_mouse_up(lookup->evas, e->buttons, flags, e->timestamp, NULL);
+          evas_event_feed_mouse_up(lookup->evas, e->buttons, flags, 
+                                   e->timestamp, NULL);
      }
    else
      {
         if (press == ECORE_DOWN)
-          evas_event_feed_multi_down(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, flags, e->timestamp, NULL);
+          {
+             if (lookup->down_multi)
+                lookup->down_multi(lookup->window, e->multi.device, 
+                                   e->x, e->y, e->multi.radius, 
+                                   e->multi.radius_x, e->multi.radius_y, 
+                                   e->multi.pressure, e->multi.angle, 
+                                   e->multi.x, e->multi.y, flags, 
+                                   e->timestamp);
+             else
+                evas_event_feed_multi_down(lookup->evas, e->multi.device, 
+                                           e->x, e->y, e->multi.radius, 
+                                           e->multi.radius_x, e->multi.radius_y, 
+                                           e->multi.pressure, e->multi.angle, 
+                                           e->multi.x, e->multi.y, flags, 
+                                           e->timestamp, NULL);
+          }
         else
-          evas_event_feed_multi_up(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, flags, e->timestamp, NULL);
+          {
+             if (lookup->up_multi)
+                lookup->up_multi(lookup->window, e->multi.device, 
+                                 e->x, e->y, e->multi.radius, 
+                                 e->multi.radius_x, e->multi.radius_y, 
+                                 e->multi.pressure, e->multi.angle, 
+                                 e->multi.x, e->multi.y, flags, 
+                                 e->timestamp);
+             else
+                evas_event_feed_multi_up(lookup->evas, e->multi.device, 
+                                         e->x, e->y, e->multi.radius, 
+                                         e->multi.radius_x, e->multi.radius_y, 
+                                         e->multi.pressure, e->multi.angle, 
+                                         e->multi.x, e->multi.y, flags, 
+                                         e->timestamp, NULL);
+          }
      }
    return ECORE_CALLBACK_RENEW;
 }
@@ -182,11 +224,27 @@ ecore_event_evas_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *ev
    if (e->multi.device == 0)
      {
         ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
-        lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
+        if (lookup->move_mouse)
+           lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
+        else
+           evas_event_feed_mouse_move(lookup->evas, e->x, e->y, e->timestamp, 
+                                      NULL);
      }
    else
      {
-        evas_event_feed_multi_move(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, e->timestamp, NULL);
+        if (lookup->move_multi)
+           lookup->move_multi(lookup->window, e->multi.device, 
+                              e->x, e->y, e->multi.radius, 
+                              e->multi.radius_x, e->multi.radius_y, 
+                              e->multi.pressure, e->multi.angle, 
+                              e->multi.x, e->multi.y, e->timestamp);
+        else
+           evas_event_feed_multi_move(lookup->evas, e->multi.device, 
+                                      e->x, e->y, e->multi.radius, 
+                                      e->multi.radius_x, e->multi.radius_y, 
+                                      e->multi.pressure, e->multi.angle, 
+                                      e->multi.x, e->multi.y, e->timestamp, 
+                                      NULL);
      }
    return ECORE_CALLBACK_RENEW;
 }