Change of method signature due to external API change 07/206307/3
authorLukasz Wlazly <l.wlazly@partner.samsung.com>
Thu, 16 May 2019 07:00:27 +0000 (09:00 +0200)
committerLukasz Wlazly <l.wlazly@partner.samsung.com>
Thu, 16 May 2019 07:51:32 +0000 (09:51 +0200)
This patch follows change happend in e-mod-tizen-screen-reader
regarding new functionality for DispatchDragEvent

Change-Id: I2962284448d9a68961a8bec0eaeb92dfef4e9979

src/ScanningProperties.cpp
src/utils.cpp
src/utils.hpp

index fec89f3..331f6b2 100644 (file)
@@ -222,5 +222,5 @@ void ScanningProperties::setCachedPauseOnFirstElementTime(double time)
 void ScanningProperties::setCachedColor(int value)
 {
        color = Color::fromABGR(value);
-       DEBUG("color: %#010x", color);
+       DEBUG("color: %#010x", color.toRGBAInt());
 }
\ No newline at end of file
index 278b451..e2d0613 100644 (file)
@@ -39,9 +39,9 @@ namespace utils
                return dbus.method<void(std::string, int, double)>("DispatchKeyEvent").call(keyId, static_cast<int>(multiplicity), hold_time);
        }
 
-       DBus::ValueOrError<void> generateTapGesture(int x, int y, double press_time)
+       DBus::ValueOrError<void> generateTapGesture(int x, int y, double press_time, int pointers_no)
        {
-               DEBUG("Tap with drag gesture, x: %d, y: %d, press time: %lf", x, y, press_time);
+               DEBUG("Tap with drag gesture, x: %d, y: %d, press time: %lf, pointers number: %d", x, y, press_time, pointers_no);
 
                DBus::DBusClient dbus {dbusLocators::accessibilityEMod::BUS,
                                                           dbusLocators::accessibilityEMod::OBJ_PATH,
@@ -49,18 +49,18 @@ namespace utils
                                                           DBus::ConnectionType::SYSTEM};
 
                static auto tap_steps = 1;
-               return dbus.method<void(int, int, int, int, int, double)>("DispatchDragEvent").call(x, y, x, y, tap_steps, press_time);
+               return dbus.method<void(int, int, int, int, int, double, int)>("DispatchDragEvent").call(x, y, x, y, tap_steps, press_time, pointers_no);
        }
 
-       DBus::ValueOrError<void> generateDragGesture(int from_x, int from_y, int to_x, int to_y, int steps, double hold_time)
+       DBus::ValueOrError<void> generateDragGesture(int from_x, int from_y, int to_x, int to_y, int steps, double hold_time, int pointers_no)
        {
-               DEBUG("Drag gesture, from (x, y): (%d, %d), to (x, y): (%d, %d), steps: %d, hold on first time: %lf", from_x, from_y, to_x, to_y, steps, hold_time);
+               DEBUG("Drag gesture, from (x, y): (%d, %d), to (x, y): (%d, %d), steps: %d, hold on first time: %lf, pointers number: %d", from_x, from_y, to_x, to_y, steps, hold_time, pointers_no);
 
                DBus::DBusClient dbus {dbusLocators::accessibilityEMod::BUS,
                                                           dbusLocators::accessibilityEMod::OBJ_PATH,
                                                           dbusLocators::accessibilityEMod::INTERFACE,
                                                           DBus::ConnectionType::SYSTEM};
-               return dbus.method<void(int, int, int, int, int, double)>("DispatchDragEvent").call(from_x, from_y, to_x, to_y, steps, hold_time);
+               return dbus.method<void(int, int, int, int, int, double, int)>("DispatchDragEvent").call(from_x, from_y, to_x, to_y, steps, hold_time, pointers_no);
        }
 
        DBus::ValueOrError<void> generatePinchGesture(int x, int y, int radius_change, int steps)
index ca53b6b..c80bd8c 100644 (file)
@@ -62,8 +62,8 @@ namespace utils
        }
 
        DBus::ValueOrError<void> generateKeyPress(const std::string &keyId, unsigned multiplicity = 1, double hold_time = 0.0);
-       DBus::ValueOrError<void> generateTapGesture(int x, int y, double press_time);
-       DBus::ValueOrError<void> generateDragGesture(int from_x, int from_y, int to_x, int to_y, int steps, double hold_time);
+       DBus::ValueOrError<void> generateTapGesture(int x, int y, double press_time, int pointers_no = 1);
+       DBus::ValueOrError<void> generateDragGesture(int from_x, int from_y, int to_x, int to_y, int steps, double hold_time, int pointers_no = 1);
        DBus::ValueOrError<void> generatePinchGesture(int x, int y, int radius_change, int steps);
 
        /**