From: Woochanlee Date: Fri, 24 Sep 2021 07:38:30 +0000 (+0900) Subject: libaurum: Add doc for Device classes. X-Git-Tag: submit/tizen/20210928.232914^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F264542%2F2;p=platform%2Fcore%2Fuifw%2Faurum.git libaurum: Add doc for Device classes. Change-Id: I01816661088c9afe3f0c13afb65127f720c541b8 --- diff --git a/libaurum/inc/Impl/MockDeviceImpl.h b/libaurum/inc/Impl/MockDeviceImpl.h index 342e748..b2cd9f1 100644 --- a/libaurum/inc/Impl/MockDeviceImpl.h +++ b/libaurum/inc/Impl/MockDeviceImpl.h @@ -44,7 +44,7 @@ public: * @brief TBD * @since_tizen 5.5 */ - bool click(const int x, const int y, const unsigned int intv) override; + bool click(const int x, const int y, const unsigned int durationMs) override; /** * @brief TBD @@ -142,7 +142,7 @@ protected: * @brief TBD * @since_tizen 5.5 */ - bool strokeKeyCode(std::string keycode, unsigned int intv); + bool strokeKeyCode(std::string keycode, unsigned int durationMs); /** * @brief TBD diff --git a/libaurum/inc/Impl/TizenDeviceImpl.h b/libaurum/inc/Impl/TizenDeviceImpl.h index fff19b5..79db52c 100644 --- a/libaurum/inc/Impl/TizenDeviceImpl.h +++ b/libaurum/inc/Impl/TizenDeviceImpl.h @@ -6,239 +6,162 @@ #include #include -/** - * @brief TizenDeviceImpl Class - * @since_tizen 5.5 - */ class TizenDeviceImpl : public IDevice { public: - /** - * @brief TBD - * @since_tizen 5.5 - */ TizenDeviceImpl(); - /** - * @brief TBD - * @since_tizen 5.5 - */ ~TizenDeviceImpl(); /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::click() */ bool click(const int x, const int y) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::click() */ - bool click(const int x, const int y, const unsigned int intv) override; + bool click(const int x, const int y, const unsigned int durationMs) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::drag() */ bool drag(const int sx, const int sy, const int ex, const int ey, const int steps, const int durationMs) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::touchDown() */ int touchDown(const int x, const int y) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::touchMove() */ bool touchMove(const int x, const int y, const int seq) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::touchUp() */ bool touchUp(const int x, const int y, const int seq) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::wheelUp() */ bool wheelUp(int amount, const int durationMs) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::wheelDown() */ bool wheelDown(int amount, const int durationMs) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressBack() */ bool pressBack(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressHome() */ bool pressHome(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressMenu() */ bool pressMenu(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressVolUp() */ bool pressVolUp(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressVolDown() */ bool pressVolDown(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressPower() */ bool pressPower(KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::pressKeyCode() */ bool pressKeyCode(std::string keycode, KeyRequestType type) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::takeScreenshot() */ bool takeScreenshot(std::string path, float scale, int quality) override; /** - * @brief TBD - * @since_tizen 5.5 + * @copydoc IDevice::getSystemTime() */ long long getSystemTime(TimeRequestType type) override; protected: /** - * @brief TBD + * @brief Press and release given key during duration time. + * * @since_tizen 5.5 */ - bool strokeKeyCode(std::string keycode, unsigned int intv); + bool strokeKeyCode(std::string keycode, unsigned int durationMs); /** - * @brief TBD + * @brief Press given key. + * * @since_tizen 5.5 */ bool pressKeyCode(std::string keycode); /** - * @brief TBD + * @brief Release given key. + * * @since_tizen 5.5 */ bool releaseKeyCode(std::string keycode); /** - * @brief TBD + * @brief Increase touch count and return the number to manage touch count. + * * @since_tizen 5.5 */ int grabTouchSeqNumber(); /** - * @brief TBD + * @brief Delete given touch number. + * * @since_tizen 5.5 */ bool releaseTouchSeqNumber(int seq); private: /** - * @brief TBD + * @brief Timer utility. + * * @since_tizen 5.5 */ void startTimer(void); /** - * @brief TBD + * @brief Timer utility. + * * @since_tizen 5.5 */ int stopTimer(void); private: - /** - * @brief TBD - */ efl_util_inputgen_h mFakeTouchHandle; - - /** - * @brief TBD - */ efl_util_inputgen_h mFakeKeyboardHandle; - - /** - * @brief TBD - */ efl_util_inputgen_h mFakeWheelHandle; - - /** - * @brief TBD - */ static const int INTV_CLICK = 5; - - /** - * @brief TBD - */ static const int INTV_SHORTSTROKE = 100; - - /** - * @brief TBD - */ static const int INTV_LONGSTROKE = 2000; - - /** - * @brief TBD - */ static const int INTV_MINIMUM_DRAG_MS = 25; - - /** - * @brief TBD - */ static const int INTV_MINIMUM_USLEEP = 1000; - - /** - * @brief TBD - */ static const int MINIMUM_DURATION_DRAG = 100; - - /** - * @brief TBD - */ static const unsigned int MSEC_PER_SEC = 1000; - - /** - * @brief TBD - */ static const unsigned int MAX_FINGER_NUMBER = 2; - - /** - * @brief TBD - */ struct timespec tStart; - - /** - * @brief TBD - */ bool isTimerStarted; - - /** - * @brief TBD - */ std::set mTouchSeq; }; \ No newline at end of file diff --git a/libaurum/inc/Interface/IDevice.h b/libaurum/inc/Interface/IDevice.h index 84a93cd..ab8a058 100644 --- a/libaurum/inc/Interface/IDevice.h +++ b/libaurum/inc/Interface/IDevice.h @@ -5,137 +5,245 @@ #include /** - * @brief TimeRequestType enum class + * @brief TimeRequestType enum class. + * * @since_tizen 5.5 */ enum class TimeRequestType { - WALLCLOCK, - MONOTONIC, + WALLCLOCK, //Real time of system + MONOTONIC, //monotonic time of system }; /** - * @brief KeyRequestType enum class + * @brief KeyRequestType enum class. + * * @since_tizen 5.5 */ enum class KeyRequestType { - STROKE, - LONG_STROKE, - PRESS, - RELEASE, + STROKE, //Key press(100ms) and release + LONG_STROKE, //Key long press(2000ms) and release + PRESS, //Key press + RELEASE, //Key release }; /** - * @brief IDevice interface + * @brief IDevice interface. + * It defines common device controls such as touch, key events + * * @since_tizen 5.5 */ class IDevice { public: /** - * @brief TBD virtual dtor + * @brief IDevice Destructor. + * * @since_tizen 5.5 */ virtual ~IDevice() {} /** - * @brief TBD + * @brief Performs a click at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * + * @return true if the click succeeded else false + * * @since_tizen 5.5 */ virtual bool click(const int x, const int y) = 0; /** - * @brief TBD click method + * @brief Performs a click at arbitrary coordinates specified by the user during the specified time. + * + * @param x x coordinate + * @param y y coordinate + * @param durationMs total time to maintain down action + * + * @return true if the click succeeded else false + * * @since_tizen 5.5 */ - virtual bool click(const int x, const int y, const unsigned int intv) = 0; + virtual bool click(const int x, const int y, const unsigned int durationMs) = 0; /** - * @brief TBD + * @brief Performs a drag from one coordinate to another using the number of steps + * during the specified time. + * + * @param sx start x coordinate + * @param sy start y coordinate + * @param ex end x coordinate + * @param ey end y coordinate + * @param steps the number of move steps + * @param durationMs total time to drag event + * + * @return true if the drag succeeded else false + * * @since_tizen 5.5 */ virtual bool drag(const int sx, const int sy, const int ex, const int ey, const int steps, const int durationMs) = 0; /** - * @brief TBD + * @brief Performs a touch down at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * + * @return touch event number + * * @since_tizen 5.5 */ virtual int touchDown(const int x, const int y) = 0; /** - * @brief TBD + * @brief Performs a touch move at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * @param seq touch event number + * + * @return true if the touch move succeeded else false + * * @since_tizen 5.5 */ virtual bool touchMove(const int x, const int y, const int seq) = 0; /** - * @brief TBD + * @brief Performs a touch up at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * @param seq touch event number + * + * @return true if the touch up succeeded else false + * * @since_tizen 5.5 */ virtual bool touchUp(const int x, const int y, const int seq) = 0; /** - * @brief TBD + * @brief Performs a wheel up on device with event amount and duration. + * + * @param amount the number of wheel up event sent + * @param durationMs total time to wheel up event + * + * @return true if the wheel up succeeded else false + * * @since_tizen 5.5 */ - virtual bool wheelUp(int amount, const int durationMs) = 0; /** - * @brief TBD + * @brief Performs a wheel down on device with event amount and duration. + * + * @param amount the number of wheel down event sent + * @param durationMs total time to wheel down event + * + * @return true if the wheel down succeeded else false + * * @since_tizen 5.5 */ virtual bool wheelDown(int amount, const int durationMs) = 0; /** - * @brief TBD + * @brief Simulates a press on the back key. + * + * @param type one of @KeyRequestType + * + * @return true if the press back succeeded else false + * * @since_tizen 5.5 */ virtual bool pressBack(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the home key. + * + * @param type one of @KeyRequestType + * + * @return true if the press home succeeded else false + * * @since_tizen 5.5 */ virtual bool pressHome(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the menu key. + * + * @param type one of @KeyRequestType + * + * @return true if the press menu succeeded else false + * * @since_tizen 5.5 */ virtual bool pressMenu(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the volume up key. + * + * @param type one of @KeyRequestType + * + * @return true if the press volume up succeeded else false + * * @since_tizen 5.5 */ virtual bool pressVolUp(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the volume down key. + * + * @param type one of @KeyRequestType + * + * @return true if the press volume down succeeded else false + * * @since_tizen 5.5 */ virtual bool pressVolDown(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the power key. + * + * @param type one of @KeyRequestType + * + * @return true if the press power succeeded else false + * * @since_tizen 5.5 */ virtual bool pressPower(KeyRequestType type) = 0; /** - * @brief TBD + * @brief Simulates a press on the given keycode key. + * + * @param keycode keycode + * @param type one of @KeyRequestType + * + * @return true if the press keycode succeeded else false + * * @since_tizen 5.5 */ virtual bool pressKeyCode(std::string keycode, KeyRequestType type) = 0; /** - * @brief TBD + * @brief Take a screenshot of current window and store it as image file. + * + * @param path where the image file should be written to + * @param scale scale the screenshot down if needed; 1.0f for original size + * @param quality quality of the PNG compression; range: 0-100 + * + * @return true if screen shot is created successfully, false otherwise + * * @since_tizen 5.5 */ virtual bool takeScreenshot(std::string path, float scale, int quality) = 0; /** - * @brief TBD + * @brief Gets device system time. + * + * @param type one of @TimeRequestType + * + * @return utc time stamp + * * @since_tizen 5.5 */ virtual long long getSystemTime(TimeRequestType type) = 0; diff --git a/libaurum/inc/UiDevice.h b/libaurum/inc/UiDevice.h index 03cce46..ac2e642 100644 --- a/libaurum/inc/UiDevice.h +++ b/libaurum/inc/UiDevice.h @@ -18,110 +18,218 @@ #include /** - * @brief UiDevice class - * @since_tizen 5.5 + * @class UiDevice + * + * @ingroup aurum + * + * @brief UiDevice provides access to state information about the device. + * You can also use this class to simulate user actions on the device. */ class UiDevice : public IDevice, public ISearchable { public: /** - * @brief TBD + * @brief Performs a click at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * + * @return true if the click succeeded else false + * * @since_tizen 5.5 */ bool click(const int x, const int y) override; /** - * @brief TBD + * @brief Performs a click at arbitrary coordinates specified by the user during the specified time. + * + * @param x x coordinate + * @param y y coordinate + * @param durationMs total time to maintain down action + * + * @return true if the click succeeded else false + * * @since_tizen 5.5 */ - bool click(const int x, const int y, const unsigned int intv) override; - - /** - * @brief TBD + bool click(const int x, const int y, const unsigned int durationMs) override; + + /** + * @brief Performs a drag from one coordinate to another using the number of steps + * during the specified time. + * + * @param sx start x coordinate + * @param sy start y coordinate + * @param ex end x coordinate + * @param ey end y coordinate + * @param steps the number of move steps + * @param durationMs total time to drag event + * + * @return true if the drag succeeded else false + * * @since_tizen 5.5 */ bool drag(const int sx, const int sy, const int ex, const int ey, const int steps, const int durationMs) override; /** - * @brief TBD + * @brief Performs a touch down at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * + * @return touch event number + * * @since_tizen 5.5 */ int touchDown(const int x, const int y) override; /** - * @brief TBD + * @brief Performs a touch move at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * @param seq touch event number + * + * @return true if the touch move succeeded else false + * * @since_tizen 5.5 */ bool touchMove(const int x, const int y, const int seq) override; /** - * @brief TBD + * @brief Performs a touch up at arbitrary coordinates specified by the user. + * + * @param x x coordinate + * @param y y coordinate + * @param seq touch event number + * + * @return true if the touch up succeeded else false + * * @since_tizen 5.5 */ bool touchUp(const int x, const int y, const int seq) override; /** - * @brief TBD + * @brief Performs a wheel up on device with event amount and duration. + * + * @param amount the number of wheel up event sent + * @param durationMs total time to wheel up event + * + * @return true if the wheel up succeeded else false + * * @since_tizen 5.5 */ bool wheelUp(int amount, const int durationMs) override; /** - * @brief TBD + * @brief Performs a wheel down on device with event amount and duration. + * + * @param amount the number of wheel down event sent + * @param durationMs total time to wheel down event + * + * @return true if the wheel down succeeded else false + * * @since_tizen 5.5 */ bool wheelDown(int amount, const int durationMs) override; /** - * @brief TBD + * @brief Simulates a press on the back key. + * + * @param type one of @KeyRequestType + * + * @return true if the press back succeeded else false + * * @since_tizen 5.5 */ bool pressBack(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the home key. + * + * @param type one of @KeyRequestType + * + * @return true if the press home succeeded else false + * * @since_tizen 5.5 */ bool pressHome(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the menu key. + * + * @param type one of @KeyRequestType + * + * @return true if the press menu succeeded else false + * * @since_tizen 5.5 */ bool pressMenu(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the volume up key. + * + * @param type one of @KeyRequestType + * + * @return true if the press volume up succeeded else false + * * @since_tizen 5.5 */ bool pressVolUp(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the volume down key. + * + * @param type one of @KeyRequestType + * + * @return true if the press volume down succeeded else false + * * @since_tizen 5.5 */ bool pressVolDown(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the power key. + * + * @param type one of @KeyRequestType + * + * @return true if the press power succeeded else false + * * @since_tizen 5.5 */ bool pressPower(KeyRequestType type) override; /** - * @brief TBD + * @brief Simulates a press on the given keycode key. + * + * @param keycode keycode + * @param type one of @KeyRequestType + * + * @return true if the press keycode succeeded else false + * * @since_tizen 5.5 */ bool pressKeyCode(std::string keycode, KeyRequestType type) override; /** - * @brief TBD + * @brief Take a screenshot of current window and store it as image file. + * + * @param path where the image file should be written to + * @param scale scale the screenshot down if needed; 1.0f for original size + * @param quality quality of the PNG compression; range: 0-100 + * + * @return true if screen shot is created successfully, false otherwise + * * @since_tizen 5.5 */ bool takeScreenshot(std::string path, float scale, int quality) override; /** - * @brief TBD + * @brief Gets device system time. + * + * @param type one of @TimeRequestType + * + * @return utc time stamp + * * @since_tizen 5.5 */ long long getSystemTime(TimeRequestType type) override; @@ -129,102 +237,142 @@ public: public: /** - * @brief TBD + * @brief Checks that there is object that satisfied with the selector condition in the device. + * + * @param selector @UiSelector + * + * @return object exist or not + * * @since_tizen 5.5 */ bool hasObject(const std::shared_ptr selector) const override; /** - * @brief TBD + * @brief Finds that object that satisfied with the selector condition in the device. + * + * @param selector @UiSelector + * + * @return Found UiObject ptr + * * @since_tizen 5.5 */ std::shared_ptr findObject( const std::shared_ptr selector) const override; /** - * @brief TBD + * @brief Finds that objects that satisfied with the selector condition in the device. + * + * @param selector @UiSelector + * + * @return Found UiObject ptr vector + * * @since_tizen 5.5 */ std::vector> findObjects( const std::shared_ptr selector) const override; /** - * @brief TBD - * @since_tizen 5.5 + * TODO */ bool waitFor( const std::function condition) const; /** - * @brief TBD - * @since_tizen 5.5 + * TODO */ std::shared_ptr waitFor( const std::function(const ISearchable *)> condition) const; /** - * @brief TBD + * @brief Waits for a specific A11y Event for a some time by user set. + * + * @param type one of @A11yEvent + * @param timeout time(millisecond) to wait event occur + * + * @return true if event happened in time, otherwise false + * * @since_tizen 6.5 */ bool waitForEvents( const A11yEvent type, const int timeout) const; /** - * @brief TBD + * @brief Sends key event and Wait for a specific A11y Event for a some time by user set. + * + * @param keycode keycode + * @param type one of @A11yEvent + * @param timeout time(millisecond) to wait event occur + * + * @return true if event happened in time, otherwise false + * * @since_tizen 6.5 */ bool sendKeyAndWaitForEvents( const std::string keycode, const A11yEvent type, const int timeout) const; + /** + * @brief Runs command and Wait for a specific A11y Event for a some time by user set. + * + * @param cmd @Runnable + * @param type one of @A11yEvent + * @param timeout time(millisecond) to wait event occur + * + * @return true if event happened in time, otherwise false + * + * @since_tizen 6.5 + */ bool executeAndWaitForEvents( const Runnable *cmd, const A11yEvent type, const int timeout) const; public: /** - * @brief TBD + * @brief Gets UiDevice instance. + * + * @return UiDevice ptr + * * @since_tizen 5.5 */ static std::shared_ptr getInstance(IDevice *deviceImpl = nullptr); /** - * @brief TBD + * @brief Gets currently enabled applications root window. + * + * @return AccessibleNode ptr vector * @since_tizen 5.5 */ std::vector> getWindowRoot() const; private: /** - * @brief TBD + * @brief Waits process idle. + * * @since_tizen 5.5 */ bool waitForIdle() const; private: /** - * @brief TBD + * @brief UiDevice Consturctor. + * * @since_tizen 5.5 */ UiDevice(); /** - * @brief TBD + * @brief UiDevice Consturctor with IDevice. + * * @since_tizen 5.5 */ UiDevice(IDevice *impl); public: /** - * @brief TBD + * @brief UiDevice Destructor. + * * @since_tizen 5.5 */ virtual ~UiDevice(); private: - /** - * @brief TBD - */ IDevice *mDeviceImpl; - /** - * @brief TBD - */ const Waiter *mWaiter; }; diff --git a/libaurum/inc/UiObject.h b/libaurum/inc/UiObject.h index 15a77a9..e1561d8 100644 --- a/libaurum/inc/UiObject.h +++ b/libaurum/inc/UiObject.h @@ -286,7 +286,7 @@ public: * @brief TBD * @since_tizen 5.5 */ - void longClick(const unsigned int intv = LOGNCLICK_INTERVAL) const; + void longClick(const unsigned int durationMs = LOGNCLICK_INTERVAL) const; /** * @brief TBD diff --git a/libaurum/src/Impl/MockDeviceImpl.cc b/libaurum/src/Impl/MockDeviceImpl.cc index 855ceb3..2170536 100644 --- a/libaurum/src/Impl/MockDeviceImpl.cc +++ b/libaurum/src/Impl/MockDeviceImpl.cc @@ -34,11 +34,11 @@ bool MockDeviceImpl::click(const int x, const int y) return click(x, y, INTV_CLICK); } -bool MockDeviceImpl::click(const int x, const int y, const unsigned int intv) +bool MockDeviceImpl::click(const int x, const int y, const unsigned int durationMs) { int seq = touchDown(x, y); if (seq < 0) return false; - std::this_thread::sleep_for(std::chrono::milliseconds{intv}); + std::this_thread::sleep_for(std::chrono::milliseconds{durationMs}); return touchUp(x, y, seq); } diff --git a/libaurum/src/Impl/TizenDeviceImpl.cc b/libaurum/src/Impl/TizenDeviceImpl.cc index ea0792a..101cf06 100644 --- a/libaurum/src/Impl/TizenDeviceImpl.cc +++ b/libaurum/src/Impl/TizenDeviceImpl.cc @@ -40,13 +40,13 @@ bool TizenDeviceImpl::click(const int x, const int y) return click(x, y, INTV_CLICK); } -bool TizenDeviceImpl::click(const int x, const int y, const unsigned int intv) +bool TizenDeviceImpl::click(const int x, const int y, const unsigned int durationMs) { - LOGI("click %d %d , intv:%d", x, y, intv); + LOGI("click %d %d , durationMs:%d", x, y, durationMs); int seq = touchDown(x, y); if (seq < 0) return false; - usleep(intv * MSEC_PER_SEC); + usleep(durationMs * MSEC_PER_SEC); touchUp(x, y, seq); return true; @@ -221,10 +221,10 @@ bool TizenDeviceImpl::pressKeyCode(std::string keycode, KeyRequestType type) return false; } -bool TizenDeviceImpl::strokeKeyCode(std::string keycode, unsigned int intv) +bool TizenDeviceImpl::strokeKeyCode(std::string keycode, unsigned int durationMs) { pressKeyCode(keycode); - usleep(intv * 1000); + usleep(durationMs * 1000); releaseKeyCode(keycode); return true; } diff --git a/libaurum/src/UiDevice.cc b/libaurum/src/UiDevice.cc index b53d43d..2fdeb2e 100644 --- a/libaurum/src/UiDevice.cc +++ b/libaurum/src/UiDevice.cc @@ -148,9 +148,9 @@ bool UiDevice::click(const int x, const int y) return result; } -bool UiDevice::click(const int x, const int y, const unsigned int intv) +bool UiDevice::click(const int x, const int y, const unsigned int durationMs) { - bool result = mDeviceImpl->click(x, y, intv); + bool result = mDeviceImpl->click(x, y, durationMs); waitForIdle(); return result; } diff --git a/libaurum/src/UiObject.cc b/libaurum/src/UiObject.cc index e8f7cdd..2d4bda4 100644 --- a/libaurum/src/UiObject.cc +++ b/libaurum/src/UiObject.cc @@ -308,12 +308,12 @@ void UiObject::click() const mDevice->click(midPoint.x, midPoint.y); } -void UiObject::longClick(const unsigned int intv) const +void UiObject::longClick(const unsigned int durationMs) const { mNode->updateExtents(); const Rect rect = mNode->getScreenBoundingBox(); const Point2D midPoint = rect.midPoint(); - mDevice->click(midPoint.x, midPoint.y, intv); + mDevice->click(midPoint.x, midPoint.y, durationMs); } bool UiObject::DoAtspiActivate() const