*/
#include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/touch-event-devel.h>
#include <dali/integration-api/events/touch-integ.h>
#include <dali/public-api/dali-core.h>
#include <stdlib.h>
END_TEST;
}
+
+int UtcDaliTouchEventSetTime(void)
+{
+ TestApplication application;
+
+ TouchEvent touchEvent = Integration::NewTouchEvent(123u, GenerateTouchPoint());
+ DALI_TEST_CHECK(touchEvent);
+
+ DALI_TEST_EQUALS(123lu, touchEvent.GetTime(), TEST_LOCATION);
+
+ DevelTouchEvent::SetTime(touchEvent, 200lu);
+ DALI_TEST_EQUALS(200lu, touchEvent.GetTime(), TEST_LOCATION);
+
+ END_TEST;
+}
--- /dev/null
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/events/touch-event-devel.h>\r
+#include <dali/internal/event/events/touch-event-impl.h>\r
+\r
+namespace Dali\r
+{\r
+namespace DevelTouchEvent\r
+{\r
+void SetTime(TouchEvent touchEvent, uint64_t time)\r
+{\r
+ GetImplementation(touchEvent).SetTime(time);\r
+}\r
+} // namespace DevelTouchEvent\r
+\r
+} // namespace Dali\r
--- /dev/null
+#ifndef DALI_TOUCH_EVENT_DEVEL_H\r
+#define DALI_TOUCH_EVENT_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/public-api/events/touch-event.h>\r
+\r
+namespace Dali\r
+{\r
+namespace DevelTouchEvent\r
+{\r
+\r
+/**\r
+ * @brief Set the time (in ms) that the touch event occurred.\r
+ *\r
+ * @param[in] touchEvent The instance of TouchEvent.\r
+ * @param[in] time The time (in ms)\r
+ */\r
+DALI_CORE_API void SetTime(TouchEvent touchEvent, uint64_t time);\r
+\r
+} // namespace DevelTouchEvent\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_TOUCH_EVENT_DEVEL_H\r
${devel_api_src_dir}/events/hit-test-algorithm.cpp
${devel_api_src_dir}/events/hover-event-devel.cpp
${devel_api_src_dir}/events/key-event-devel.cpp
+ ${devel_api_src_dir}/events/touch-event-devel.cpp
${devel_api_src_dir}/events/long-press-gesture-devel.cpp
${devel_api_src_dir}/events/long-press-gesture-detector-devel.cpp
${devel_api_src_dir}/events/pan-gesture-devel.cpp
${devel_api_src_dir}/events/hit-test-algorithm.h
${devel_api_src_dir}/events/hover-event-devel.h
${devel_api_src_dir}/events/key-event-devel.h
+ ${devel_api_src_dir}/events/touch-event-devel.h
${devel_api_src_dir}/events/long-press-gesture-devel.h
${devel_api_src_dir}/events/long-press-gesture-detector-devel.h
${devel_api_src_dir}/events/pan-gesture-devel.h
mPoints.push_back(point);
}
+void TouchEvent::SetTime(uint64_t time)
+{
+ mTime = time;
+}
+
} // namespace Internal
} // namespace Dali
mRenderTask = renderTask;
}
+ /**
+ * @brief Set the time (in ms) that the touch event occurred.
+ *
+ * @param[in] time The time (in ms)
+ */
+ void SetTime(uint64_t time);
+
private:
/**
* @brief Virtual Destructor