From: Bowon Ryu Date: Mon, 21 Feb 2022 08:36:57 +0000 (+0000) Subject: Merge "fix issue when strikethrough used without ending tag" into devel/master X-Git-Tag: dali_2.1.11~12 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=7562b511d06c8a8157883e35308aaa65e4e10810;hp=e939bee76410eca241bda2ed4a732e0a13be00af Merge "fix issue when strikethrough used without ending tag" into devel/master --- diff --git a/automated-tests/execute.sh b/automated-tests/execute.sh index adee84b..35b4939 100755 --- a/automated-tests/execute.sh +++ b/automated-tests/execute.sh @@ -1,6 +1,6 @@ #!/bin/bash -TEMP=`getopt -o dhsSmfq --long debug,help,failnorerun,quiet,serial,tct,modules -n 'execute.sh' -- "$@"` +TEMP=`getopt -o dhsSmfqp: --long debug,help,failnorerun,quiet,serial,tct,modules,prefix: -n 'execute.sh' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -13,6 +13,7 @@ function usage echo -e " execute.sh\t\tExecute test cases from all modules in parallel" echo -e " execute.sh -f \tExecute test cases from all modules in parallel without rerunning failed test cases" echo -e " execute.sh -d \tDebug testcase" + echo -e " execute.sh -p \tExecute all testcases named with " echo -e " execute.sh [module]\tExecute test cases from the given module in parallel" echo -e " execute.sh -s [module]\t\tExecute test cases in serial using Testkit-Lite" echo -e " execute.sh -S [module]\t\tExecute test cases in serial" @@ -27,6 +28,7 @@ opt_modules=0 opt_debug=0 opt_noFailedRerun=""; opt_quiet=""; +opt_match=""; while true ; do case "$1" in -h|--help) usage ;; @@ -35,6 +37,7 @@ while true ; do -f|--nofailedrerun) opt_noFailedRerun="-f" ; shift ;; -S|--serial) opt_serial="-s" ; shift ;; -q|--quiet) opt_quiet="-q" ; shift ;; + -p|--prefix) opt_match="-m $2" ; shift 2;; -m|--modules) opt_modules=1 ; shift ;; --) shift; break;; *) echo "Internal error $1!" ; exit 1 ;; @@ -147,7 +150,7 @@ else echo -e "$ASCII_BOLD" echo -e "Executing $mod$ASCII_RESET" output_start $mod - dbus-launch build/src/$mod/tct-$mod-core $opt_serial $opt_noFailedRerun $opt_quiet + dbus-launch build/src/$mod/tct-$mod-core $opt_serial $opt_noFailedRerun $opt_quiet $opt_match output_end $mod done summary_end @@ -159,7 +162,7 @@ else module=$1 shift; output_start ${module} - dbus-launch build/src/$module/tct-$module-core $opt_serial $opt_noFailedRerun $opt_quiet $* + dbus-launch build/src/$module/tct-$module-core $opt_serial $opt_noFailedRerun $opt_quiet $opt_match $* output_end ${module} summary_end diff --git a/automated-tests/scripts/output_summary.pl b/automated-tests/scripts/output_summary.pl index dec392d..69e4fce 100755 --- a/automated-tests/scripts/output_summary.pl +++ b/automated-tests/scripts/output_summary.pl @@ -71,7 +71,7 @@ foreach $module (keys(%modules)) my $numFailures = $modules{$module}->{"fail"}; $totalFailures += $numFailures; print( "$ASCII_BOLD$module results:$ASCII_RESET\n" ); - printf("Number of test passes: %s%4d (%5.2f%%)%s\n", $ASCII_BOLD, $numPasses, 100.0 * $numPasses / ($numPasses+$numFailures), $ASCII_RESET); + printf("Number of test passes: %s%4d (%5.2f%%)%s\n", $ASCII_BOLD, $numPasses, $numPasses>0?100.0 * $numPasses / ($numPasses+$numFailures):0, $ASCII_RESET); printf("%sNumber of test failures:%s %s%4d%s\n\n", $result_colour, $ASCII_RESET, $ASCII_BOLD, $numFailures, $ASCII_RESET); } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp index 587d4a5..86874fd 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -229,9 +229,9 @@ void OutputStatistics(const char* processName, int32_t numPasses, int32_t numFai basename(processName), numPasses + numFailures, numPasses, - (float)numPasses * 100.0f / (numPasses + numFailures), + numPasses > 0 ? (float)numPasses * 100.0f / (numPasses + numFailures) : 0.0f, numFailures, - (float)numFailures * 100.0f / (numPasses + numFailures)); + numPasses > 0 ? (float)numFailures * 100.0f / (numPasses + numFailures) : 0.0f); fclose(fp); } } @@ -362,7 +362,7 @@ int32_t RunTestCaseInChildProcess(TestCase& testCase, bool redirect) return testResult; } -int32_t RunAll(const char* processName, ::testcase tc_array[], bool quiet) +int32_t RunAll(const char* processName, ::testcase tc_array[], std::string match, bool quiet) { int32_t numFailures = 0; int32_t numPasses = 0; @@ -381,23 +381,35 @@ int32_t RunAll(const char* processName, ::testcase tc_array[], bool quiet) std::string startTime(buffer); TestCase testCase(i, &tc_array[i]); - testCase.result = RunTestCaseInChildProcess(testCase, quiet); - - tt = system_clock::to_time_t(system_clock::now()); - strftime(buffer, BUFSIZE, "%c", localtime(&tt)); - std::string endTime(buffer); - - if(testCase.result == 0) + bool run = true; + if(!match.empty()) { - numPasses++; - } - else - { - numFailures++; + if(match.compare(0, match.size(), testCase.name, match.size())) + { + run = false; + } } - if(!quiet) + + if(run) { - OutputTestResult(ofs, processName, moduleName, testCase, startTime, endTime); + testCase.result = RunTestCaseInChildProcess(testCase, quiet); + + tt = system_clock::to_time_t(system_clock::now()); + strftime(buffer, BUFSIZE, "%c", localtime(&tt)); + std::string endTime(buffer); + + if(testCase.result == 0) + { + numPasses++; + } + else + { + numFailures++; + } + if(!quiet) + { + OutputTestResult(ofs, processName, moduleName, testCase, startTime, endTime); + } } } ofs.close(); @@ -408,7 +420,7 @@ int32_t RunAll(const char* processName, ::testcase tc_array[], bool quiet) } // Constantly runs up to MAX_NUM_CHILDREN processes -int32_t RunAllInParallel(const char* processName, ::testcase tc_array[], bool reRunFailed, bool quiet) +int32_t RunAllInParallel(const char* processName, ::testcase tc_array[], std::string match, bool reRunFailed, bool quiet) { int32_t numFailures = 0; int32_t numPasses = 0; @@ -427,34 +439,54 @@ int32_t RunAllInParallel(const char* processName, ::testcase tc_array[], bool re // Create more children (up to the max number or til the end of the array) while(numRunningChildren < MAX_NUM_CHILDREN && tc_array[nextTestCase].name) { - int32_t pid = fork(); - if(pid == 0) // Child process + bool run = true; + if(!match.empty()) { - TestCase testCase(nextTestCase, &tc_array[nextTestCase]); - int status = RunTestCaseRedirectOutput(testCase, quiet); - exit(status); + if(match.compare(0, match.size(), tc_array[nextTestCase].name, match.size())) + { + run = false; + } } - else if(pid == -1) + if(run) { - perror("fork"); - exit(EXIT_STATUS_FORK_FAILED); + int32_t pid = fork(); + if(pid == 0) // Child process + { + TestCase testCase(nextTestCase, &tc_array[nextTestCase]); + int status = RunTestCaseRedirectOutput(testCase, quiet); + exit(status); + } + else if(pid == -1) + { + perror("fork"); + exit(EXIT_STATUS_FORK_FAILED); + } + else // Parent process + { + TestCase tc(nextTestCase, tc_array[nextTestCase].name); + tc.startTime = steady_clock::now(); + tc.startSystemTime = system_clock::now(); + tc.childPid = pid; + + children[pid] = tc; + nextTestCase++; + numRunningChildren++; + } } - else // Parent process + else { - TestCase tc(nextTestCase, tc_array[nextTestCase].name); - tc.startTime = steady_clock::now(); - tc.startSystemTime = system_clock::now(); - tc.childPid = pid; - - children[pid] = tc; nextTestCase++; - numRunningChildren++; } } - // Check to see if any children have finished yet int32_t status = 0; - int32_t childPid = waitpid(-1, &status, WNOHANG); + int32_t childPid = 0; + if(numRunningChildren > 0) // Only wait if there are running children. + { + // Check to see if any children have finished yet + childPid = waitpid(-1, &status, WNOHANG); + } + if(childPid == 0) { // No children have finished. @@ -581,10 +613,11 @@ void Usage(const char* program) int RunTests(int argc, char* const argv[], ::testcase tc_array[]) { int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT; - const char* optString = "sfq"; + const char* optString = "sfqm:"; bool optRerunFailed(true); bool optRunSerially(false); bool optQuiet(false); + std::string optMatch; int nextOpt = 0; do @@ -601,6 +634,9 @@ int RunTests(int argc, char* const argv[], ::testcase tc_array[]) case 'q': optQuiet = true; break; + case 'm': + optMatch = optarg; + break; case '?': TestHarness::Usage(argv[0]); exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT); @@ -612,11 +648,11 @@ int RunTests(int argc, char* const argv[], ::testcase tc_array[]) { if(optRunSerially) { - result = TestHarness::RunAll(argv[0], tc_array, optQuiet); + result = TestHarness::RunAll(argv[0], tc_array, optMatch, optQuiet); } else { - result = TestHarness::RunAllInParallel(argv[0], tc_array, optRerunFailed, optQuiet); + result = TestHarness::RunAllInParallel(argv[0], tc_array, optMatch, optRerunFailed, optQuiet); } } else diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder-impl.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder-impl.h index fb67a4b..8075dbe 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder-impl.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder-impl.h @@ -119,6 +119,8 @@ public: Dali::Integration::SceneHolder::WheelEventSignalType& WheelEventSignal(); + Dali::Integration::SceneHolder::WheelEventGeneratedSignalType& WheelEventGeneratedSignal(); + Integration::Scene GetScene(); Dali::RenderSurfaceInterface& GetRenderSurface(); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp index e18809a..8bcb3c0 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp @@ -115,6 +115,11 @@ Dali::Integration::SceneHolder::WheelEventSignalType& SceneHolder::WheelEventSig return mScene.WheelEventSignal(); } +Dali::Integration::SceneHolder::WheelEventGeneratedSignalType& SceneHolder::WheelEventGeneratedSignal() +{ + return mScene.WheelEventGeneratedSignal(); +} + Integration::Scene SceneHolder::GetScene() { return mScene; @@ -235,6 +240,11 @@ SceneHolder::WheelEventSignalType& SceneHolder::WheelEventSignal() return GetImplementation( *this ).WheelEventSignal(); } +SceneHolder::WheelEventGeneratedSignalType& SceneHolder::WheelEventGeneratedSignal() +{ + return GetImplementation( *this ).WheelEventGeneratedSignal(); +} + } // Integration } // Dali diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp index b291020..ab2548a 100755 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp @@ -654,17 +654,17 @@ public: return true; } - bool AddResponseBody(const std::string& body, uint32_t length) override + bool AddResponseBody(const int8_t* body, uint32_t length) override { return true; } - bool AddResponse(const std::string& headers, const std::string& body, uint32_t length) override + bool AddResponse(const std::string& headers, const int8_t* body, uint32_t length) override { return true; } - bool WriteResponseChunk(const std::string& chunk, uint32_t length) override + bool WriteResponseChunk(const int8_t* chunk, uint32_t length) override { return true; } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp index b8cc1bc..9fc2763 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp @@ -272,6 +272,11 @@ WheelEventSignalType& WheelEventSignal( Window window ) return GetImplementation( window ).WheelEventSignal(); } +WheelEventGeneratedSignalType& WheelEventGeneratedSignal( Window window ) +{ + return GetImplementation( window ).WheelEventGeneratedSignal(); +} + VisibilityChangedSignalType& VisibilityChangedSignal( Window window ) { return GetImplementation( window ).mVisibilityChangedSignal; diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h index d102f6a..0d4e219 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h @@ -95,6 +95,7 @@ namespace DevelWindow typedef Signal< void () > EventProcessingFinishedSignalType; typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType; typedef Signal< void (const WheelEvent&) > WheelEventSignalType; +typedef Signal< bool (const WheelEvent&) > WheelEventGeneratedSignalType; typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType; Dali::Window Get( Actor actor ); @@ -107,6 +108,7 @@ void AddFramePresentedCallback( Window window, std::unique_ptr< CallbackBase > c EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ); KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window ); WheelEventSignalType& WheelEventSignal( Window window ); +WheelEventGeneratedSignalType& WheelEventGeneratedSignal( Dali::Window window ); VisibilityChangedSignalType& VisibilityChangedSignal( Window window ); } diff --git a/automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp b/automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp index 6d0e8af..4780331 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -247,6 +248,34 @@ public: bool mIsCalled; }; +class WheelEventCallback : public Dali::ConnectionTracker +{ +public: + /** + * Constructor + * @param[in] returnValue Set return value of WheelEvent callback. + * */ + WheelEventCallback( bool consumed ) + : mConsumed( consumed ), + mIsCalled( false ) + { + } + + bool Callback( Actor actor, const WheelEvent& wheelEvent ) + { + mIsCalled = true; + return mConsumed; + } + + void Callback( const WheelEvent& wheelEvent ) + { + mIsCalled = true; + } + + bool mConsumed; + bool mIsCalled; +}; + // Used to connect to signals via the ConnectSignal Handle method struct CallbackFunctor { @@ -2036,4 +2065,46 @@ int UtcDaliKeyboardFocusManagerWithKeyboardFocusableChildren(void) DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second); END_TEST; +} + +int UtcDaliKeyboardFocusManagerCheckWheelEvent(void) +{ + ToolkitTestApplication application; + + tet_infoline( "UtcDaliKeyboardFocusManagerCheckWheelEvent" ); + Dali::Integration::Scene scene = application.GetScene(); + + KeyboardFocusManager manager = KeyboardFocusManager::Get(); + DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() ); + + // Create the first actor and add it to the stage + Actor parent = Actor::New(); + parent.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true); + + Actor child = Actor::New(); + child.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true); + + parent.Add(child); + scene.Add(parent); + + WheelEventCallback childCallback( false ); + child.WheelEventSignal().Connect( &childCallback, &WheelEventCallback::Callback ); + + WheelEventCallback parentCallback( true ); + parent.WheelEventSignal().Connect( &parentCallback, &WheelEventCallback::Callback ); + + WheelEventCallback sceneCallback( false ); + scene.WheelEventSignal().Connect( &sceneCallback, &WheelEventCallback::Callback ); + + manager.SetCurrentFocusActor( child ); + + // Emit custom wheel event is comming to KeyboardFocusManager + Integration::WheelEvent event(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0u, Vector2(0.0f, 0.0f), 1, 1000u); + application.ProcessEvent(event); + + DALI_TEST_CHECK( childCallback.mIsCalled ); + DALI_TEST_CHECK( parentCallback.mIsCalled ); + DALI_TEST_CHECK( !sceneCallback.mIsCalled ); + + END_TEST; } \ No newline at end of file diff --git a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp index 6da9ee0..f08d0e8 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp @@ -1689,9 +1689,9 @@ int UtcDaliWebContextHttpRequestInterceptor(void) Dali::Property::Map testHeaders; testHeaders.Insert("key2", "value2"); DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseHeaders(testHeaders)); - DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseBody("test", 4)); - DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponse("key:value", "test", 4)); - DALI_TEST_CHECK(gRequestInterceptorInstance->WriteResponseChunk("test", 4)); + DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseBody((const int8_t*)"test", 4)); + DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponse("key:value", (const int8_t*)"test", 4)); + DALI_TEST_CHECK(gRequestInterceptorInstance->WriteResponseChunk((const int8_t*)"test", 4)); std::string testUrl("http://test.html"); DALI_TEST_EQUALS(gRequestInterceptorInstance->GetUrl(), testUrl, TEST_LOCATION); std::string testMethod("GET"); diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index b8b8a6d..4afb39a 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -145,6 +145,7 @@ void KeyboardFocusManager::OnAdaptorInit() { (*iter).KeyEventSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnKeyEvent); (*iter).TouchedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnTouch); + (*iter).WheelEventGeneratedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnWheelEvent); Dali::Window window = DevelWindow::DownCast(*iter); if(window) { @@ -161,6 +162,7 @@ void KeyboardFocusManager::OnSceneHolderCreated(Dali::Integration::SceneHolder& { sceneHolder.KeyEventSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnKeyEvent); sceneHolder.TouchedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnTouch); + sceneHolder.WheelEventGeneratedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnWheelEvent); Dali::Window window = DevelWindow::DownCast(sceneHolder); if(window) { @@ -901,12 +903,8 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) // "Shift-Tab" key changes it in the backward direction. if(!DoMoveFocusToNextFocusGroup(!event.IsShiftModifier())) { - // If the focus group is not changed, Move the focus towards right, "Shift-Tap" key moves the focus towards left. - if(!MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::LEFT : Toolkit::Control::KeyboardFocus::RIGHT)) - { - // If the focus is not moved, Move the focus towards down, "Shift-Tap" key moves the focus towards up. - MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::UP : Toolkit::Control::KeyboardFocus::DOWN); - } + // If the focus group is not changed, Move the focus towards forward, "Shift-Tap" key moves the focus towards backward. + MoveFocus(event.IsShiftModifier() ? Toolkit::Control::KeyboardFocus::BACKWARD : Toolkit::Control::KeyboardFocus::FORWARD); } } @@ -1012,6 +1010,49 @@ void KeyboardFocusManager::OnTouch(const TouchEvent& touch) } } +bool KeyboardFocusManager::OnWheelEvent(const WheelEvent& event) +{ + bool consumed = false; + Actor actor = GetCurrentFocusActor(); + if(actor) + { + // Notify the actor about the wheel event + consumed = EmitWheelSignals(actor, event); + } + return consumed; +} + +bool KeyboardFocusManager::EmitWheelSignals(Actor actor, const WheelEvent& event) +{ + bool consumed = false; + + if(actor) + { + Dali::Actor oldParent(actor.GetParent()); + + // Only do the conversion and emit the signal if the actor's wheel signal has connections. + if(!actor.WheelEventSignal().Empty()) + { + // Emit the signal to the parent + consumed = actor.WheelEventSignal().Emit(actor, event); + } + // if actor doesn't consume WheelEvent, give WheelEvent to its parent. + if(!consumed) + { + // The actor may have been removed/reparented during the signal callbacks. + Dali::Actor parent = actor.GetParent(); + + if(parent && + (parent == oldParent)) + { + consumed = EmitWheelSignals(parent, event); + } + } + } + + return consumed; +} + void KeyboardFocusManager::OnWindowFocusChanged(Window window, bool focusIn) { if(focusIn && mCurrentFocusedWindow.GetHandle() != window.GetRootLayer()) diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h index 8212a79..783e3f5 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h @@ -292,6 +292,12 @@ private: void OnTouch(const TouchEvent& touch); /** + * Callback for the wheel event when the custom wheel event occurs. + * @param[in] wheel The WheelEvent information + */ + bool OnWheelEvent(const WheelEvent& wheel); + + /** * Called when the window focus is changed. * @param[in] window The window whose focus is changed * @param[in] focusIn Whether the focus is in/out @@ -303,6 +309,14 @@ private: */ Actor GetFocusActorFromCurrentWindow(); + /** + * Recursively deliver events to the control and its parents, until the event is consumed or the stage is reached. + * @param[in] actor The actor got WheelEvent. + * @param[in] event The WheelEvent. + * @return True if WheelEvent is consumed. + */ + bool EmitWheelSignals(Actor actor, const WheelEvent& event); + private: // Undefined KeyboardFocusManager(const KeyboardFocusManager&); diff --git a/dali-toolkit/public-api/controls/control.h b/dali-toolkit/public-api/controls/control.h index cbcb6ff..7ac183e 100644 --- a/dali-toolkit/public-api/controls/control.h +++ b/dali-toolkit/public-api/controls/control.h @@ -147,12 +147,14 @@ public: */ enum Direction { - LEFT, ///< Move keyboard focus towards the left direction @SINCE_1_0.0 - RIGHT, ///< Move keyboard focus towards the right direction @SINCE_1_0.0 - UP, ///< Move keyboard focus towards the up direction @SINCE_1_0.0 - DOWN, ///< Move keyboard focus towards the down direction @SINCE_1_0.0 - PAGE_UP, ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14 - PAGE_DOWN ///< Move keyboard focus towards the next page direction @SINCE_1_2.14 + LEFT, ///< Move keyboard focus towards the left direction @SINCE_1_0.0 + RIGHT, ///< Move keyboard focus towards the right direction @SINCE_1_0.0 + UP, ///< Move keyboard focus towards the up direction @SINCE_1_0.0 + DOWN, ///< Move keyboard focus towards the down direction @SINCE_1_0.0 + PAGE_UP, ///< Move keyboard focus towards the previous page direction @SINCE_1_2.14 + PAGE_DOWN, ///< Move keyboard focus towards the next page direction @SINCE_1_2.14 + FORWARD, ///< Move keyboard focus towards the forward direction @SINCE_2_1.10 + BACKWARD, ///< Move keyboard focus towards the backward direction @SINCE_2_1.10 }; }; diff --git a/dali-toolkit/public-api/dali-toolkit-version.cpp b/dali-toolkit/public-api/dali-toolkit-version.cpp index d0bb660..6a5256d 100644 --- a/dali-toolkit/public-api/dali-toolkit-version.cpp +++ b/dali-toolkit/public-api/dali-toolkit-version.cpp @@ -29,7 +29,7 @@ namespace Toolkit { const unsigned int TOOLKIT_MAJOR_VERSION = 2; const unsigned int TOOLKIT_MINOR_VERSION = 1; -const unsigned int TOOLKIT_MICRO_VERSION = 8; +const unsigned int TOOLKIT_MICRO_VERSION = 10; const char* const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index 408fb14..6360436 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -1,6 +1,6 @@ Name: dali2-toolkit Summary: Dali 3D engine Toolkit -Version: 2.1.8 +Version: 2.1.10 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT