X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Ffocus-manager%2Fkeyboard-focus-manager-devel.h;h=98faca9a140bd858991f164f8e4819cd0412050a;hb=784f6b2b1f66c24b1b7d920aef5b5bbff7878a99;hp=4aa1887f99f48af456d25bc60ca38ec11830a804;hpb=9eecb41468197eb2fc03e55c151011ea387e1bed;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h b/dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h index 4aa1887..98faca9 100644 --- a/dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h +++ b/dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_KEYBOARD_FOCUS_MANAGER_DEVEL_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -26,10 +26,8 @@ namespace Dali { - namespace Toolkit { - namespace DevelKeyboardFocusManager { /** @@ -45,11 +43,10 @@ namespace DevelKeyboardFocusManager class CustomAlgorithmInterface { public: - /** * @brief Virtual destructor. */ - virtual ~CustomAlgorithmInterface() {}; + virtual ~CustomAlgorithmInterface(){}; /** * @brief Called by the KeyboardFocusManager to get the next focusable actor. @@ -57,9 +54,11 @@ public: * @param[in] current The current focused actor * @param[in] proposed The proposed focused actor * @param[in] direction The direction of focus movement + * @param[in] deviceName The name of the device where the key event occurred. * @return A handle to the next focusable actor */ - virtual Actor GetNextFocusableActor(Actor current, Actor proposed, Control::KeyboardFocus::Direction direction) = 0; + virtual Actor GetNextFocusableActor(Actor current, Actor proposed, Control::KeyboardFocus::Direction direction, const std::string& deviceName = "") = 0; + }; /** @@ -71,6 +70,67 @@ public: */ DALI_TOOLKIT_API void SetCustomAlgorithm(KeyboardFocusManager keyboardFocusManager, CustomAlgorithmInterface& interface); +/** + * @brief Decide using focus indicator or not + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @param[in] enable Whether using focus indicator or not + */ +DALI_TOOLKIT_API void EnableFocusIndicator(KeyboardFocusManager keyboardFocusManager, bool enable); + +/** + * @brief Check focus indicator is enabled or not + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @return True when focus indicator is enabled + */ +DALI_TOOLKIT_API bool IsFocusIndicatorEnabled(KeyboardFocusManager keyboardFocusManager); + +/** + * @brief Decide using default focus algorithm or not + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @param[in] enable Whether using default focus algorithm or not + */ +DALI_TOOLKIT_API void EnableDefaultAlgorithm(KeyboardFocusManager keyboardFocusManager, bool enable); + +/** + * @brief Check default focus algorithm is enabled or not + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @return True when default focus algorithm is enabled + */ +DALI_TOOLKIT_API bool IsDefaultAlgorithmEnabled(KeyboardFocusManager keyboardFocusManager); + +/** + * @brief Moves the focus to the next focusable actor in the focus + * chain in the given direction (according to the focus traversal + * order). + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @param direction The direction of focus movement + * @param deviceName The device name + * @return true if the movement was successful + * @pre The KeyboardFocusManager has been initialized. + */ +DALI_TOOLKIT_API bool MoveFocus(KeyboardFocusManager keyboardFocusManager, Control::KeyboardFocus::Direction direction, const std::string& deviceName); + +/** + * @brief Sets the root actor to start moving focus when DefaultAlgorithm is enabled. + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + * @param[in] actor The root actor + */ +DALI_TOOLKIT_API void SetFocusFinderRootActor(KeyboardFocusManager keyboardFocusManager, Actor actor); + +/** + * @brief Resets the root actor that starts moving focus when DefaultAlgorithm is enabled. + * When reset, the window becomes root. + * + * @param[in] keyboardFocusManager The instance of KeyboardFocusManager + */ +DALI_TOOLKIT_API void ResetFocusFinderRootActor(KeyboardFocusManager keyboardFocusManager); + } // namespace DevelKeyboardFocusManager } // namespace Toolkit