X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol-impl.h;h=9ccb533ead533b8d0168752e794c6e385723fc77;hb=cef6d2324d9ecca71abf3c9e63db8e371a636b8a;hp=9a68ca19ea2fc0f17ec5e9e9c55737d0432caeee;hpb=7e83d1dc2a864653968ad8a6e68c3afdf9f9918d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index 9a68ca1..9ccb533 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_CONTROL_IMPL_H /* - * 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. @@ -43,8 +43,15 @@ namespace Toolkit class StyleManager; +namespace DevelControl +{ +class ControlAccessible; + +} // namespace DevelControl + namespace Internal { + /** * @brief This is the internal base class for all controls. * @@ -59,7 +66,6 @@ public: class Extension; ///< Forward declare future extension interface // Creation & Destruction - /** * @brief Creates a new ControlImpl instance that does not require touch by default. * @@ -109,6 +115,19 @@ public: */ void ClearBackground(); + // Accessibility + + /** + * @brief Gets the Accessible object that represents this control. + * + * This method calls CreateAccessibleObject() if necessary, so a non-null return is expected. + * + * @return The Accessible object + * + * @see CreateAccessibleObject() + */ + Toolkit::DevelControl::ControlAccessible* GetAccessibleObject(); + // Gesture Detection /** @@ -381,8 +400,7 @@ protected: // From CustomActorImpl */ void OnLayoutNegotiated(float size, Dimension::Type dimension) override; -protected: // Helpers for deriving classes - // Construction +public: // Helpers for deriving classes /** * @brief Flags for the constructor. @@ -401,6 +419,19 @@ protected: // Helpers for deriving classes static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log::value + 1; ///< Total count of flags /** + * @brief Creates a new ControlImpl instance that does not require touch by default. + * + * If touch is required, then the user can connect to this class' touch signal. + * @SINCE_2_1.8 + * @param[in] additionalBehaviour Additional control behaviour. + * @return A handle to the ControlImpl instance + */ + static Toolkit::Control New(ControlBehaviour additionalBehaviour); + +protected: + // Construction + + /** * @brief Control constructor. * * @SINCE_1_0.0 @@ -476,6 +507,24 @@ public: // API for derived classes to override */ virtual bool OnAccessibilityZoom(); + /** + * @brief This method should be overriden by deriving classes when they wish to be + * represented by a custom Accessible object implementation. + * + * The AT-SPI infrastructure is responsible for destroying the returned object. + * + * Currently, this method is called at most once in a given Control's lifetime, when + * GetAccessibleObject() is called for the first time. A future version of the + * AT-SPI infrastructure, however, may delete the Accessible object and request a new + * one to be created (by calling this method) multiple times, for example during + * scene connection and disconnection. + * + * @return The newly created Accessible object + * + * @see GetAccessibleObject() + */ + virtual DevelControl::ControlAccessible* CreateAccessibleObject(); + // Keyboard focus /** @@ -617,18 +666,47 @@ public: // API for derived classes to override return NULL; } - // Transition + // Transition APIs /** - * @brief Retrieve visual property animations. - * This Control is a destination. + * @brief Make visual transition from source control to destination control about specific Visual. + * If both of source and destination control have same visual index, than generates information for the transition of this Control. * - * @param[in] animation generated animation - * @param[in] source source control of the animation. - * @param[in] alphaFunction AlphaFunction of the animation - * @param[in] timePeriod TimePeriod of the animation + * @param[out] sourcePropertyMap Source property map to be applied on this Control. + * @param[out] destinationPropertyMap Destination property map to be applied on this Control. + * @param[in] source Source control of the animation. + * @param[in] destination Destination control of the animation. + * @param[in] visualIndex Property::Index to make animation. + */ + void MakeVisualTransition(Dali::Property::Map& sourcePropertyMap, Dali::Property::Map& destinationPropertyMap, + Dali::Toolkit::Control source, Dali::Toolkit::Control destination, Dali::Property::Index visualIndex); + + /** + * @brief Retrieves source and destination visual properties for the Transition of this Control. + * The properties of this Control will be transitioned from the propeties of source Control to that of destination control. + * If a property value is different between source and destination Control, + * the property information of each Control will be included in sourceProperties and destinationProperties. + * + * @param[out] sourceProperties Source property list to be applied on this Control. + * @param[out] destinationProperties Destination property list to be applied on this Control. + * @param[in] source Source control of the animation. + * @param[in] destination Destination control of the animation. + * + * @note This method do not handle Actor properties. + * And the size and order of the sourceProperties and destinationProperties must be synchronized. + */ + virtual void OnCreateTransitions(std::vector>& sourceProperties, + std::vector>& destinationProperties, + Dali::Toolkit::Control source, + Dali::Toolkit::Control destination) + { + } + + /** + * @brief Update visual properties. + * @param[in] properties Property list to be used to update visual properties of this Control. */ - virtual void OnCreateTransitions(Dali::Animation& animation, Dali::Toolkit::Control source, AlphaFunction alphaFunction, TimePeriod timePeriod) + virtual void OnUpdateVisualProperties(const std::vector>& properties) { }