[AT-SPI] Change the type of Control::Impl::mAccessibilityRelations
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / control / control-data-impl.h
index e278390..5b2cee5 100644 (file)
@@ -393,16 +393,32 @@ public:
   Dali::Property GetVisualProperty(Dali::Property::Index index, Dali::Property::Key visualPropertyKey);
 
   /**
-   * @brief Make visual transition from source control to this control about specific Property::Index
-   * If both of source and this control have Property::Index property, than create animation between them.
+   * @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[in] animation Return animation from source to this control.
-   * @param[in] source Source control to be used property animation.
-   * @param[in] visualIndex Property::Index to make animation.
-   * @param[in] alphaFunction alpha function of the animation.
-   * @param[in] timePeriod time period of the animation.
+   * @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.
+   *
+   * This method triggers Control::OnCreateTransition().
    */
-  void MakeVisualTransition(Dali::Animation& animation, Dali::Toolkit::Control source, Dali::Property::Index visualIndex, AlphaFunction alphaFunction, TimePeriod timePeriod);
+  void CreateTransitions(std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& sourceProperties,
+                         std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& 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.
+   *
+   * @note This method triggers Control::OnUpdateVisualProperties().
+   */
+  void UpdateVisualProperties(const std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& properties);
 
   /**
    * @brief Gets the current control's accessible object.
@@ -468,6 +484,21 @@ private:
    */
   void OnIdleCallback();
 
+  /**
+   * @brief Checks highlighted object geometry if it is showing or not
+   */
+  void CheckHighlightedObjectGeometry();
+
+  /**
+   * @brief Register property notification to check highlighted object position
+   */
+  void RegisterAccessibilityPositionPropertyNotification();
+
+  /**
+   * @brief Remove property notification added by RegisterPropertyNotification
+   */
+  void UnregisterAccessibilityPositionPropertyNotification();
+
 public:
   Control&            mControlImpl;
   DevelControl::State mState;
@@ -479,17 +510,17 @@ public:
   int mUpFocusableActorId;    ///< Actor ID of Up focusable control.
   int mDownFocusableActorId;  ///< Actor ID of Down focusable control.
 
-  RegisteredVisualContainer                                      mVisuals; ///< Stores visuals needed by the control, non trivial type so std::vector used.
-  std::string                                                    mStyleName;
-  Vector4                                                        mBackgroundColor;    ///< The color of the background visual
-  Vector3*                                                       mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
-  Extents                                                        mMargin;             ///< The margin values
-  Extents                                                        mPadding;            ///< The padding values
-  Toolkit::Control::KeyEventSignalType                           mKeyEventSignal;
-  Toolkit::Control::KeyInputFocusSignalType                      mKeyInputFocusGainedSignal;
-  Toolkit::Control::KeyInputFocusSignalType                      mKeyInputFocusLostSignal;
-  Toolkit::Control::ResourceReadySignalType                      mResourceReadySignal;
-  DevelControl::VisualEventSignalType                            mVisualEventSignal;
+  RegisteredVisualContainer                 mVisuals; ///< Stores visuals needed by the control, non trivial type so std::vector used.
+  std::string                               mStyleName;
+  Vector4                                   mBackgroundColor;    ///< The color of the background visual
+  Vector3*                                  mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
+  Extents                                   mMargin;             ///< The margin values
+  Extents                                   mPadding;            ///< The padding values
+  Toolkit::Control::KeyEventSignalType      mKeyEventSignal;
+  Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusGainedSignal;
+  Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusLostSignal;
+  Toolkit::Control::ResourceReadySignalType mResourceReadySignal;
+  DevelControl::VisualEventSignalType       mVisualEventSignal;
 
   // Accessibility
   Toolkit::DevelControl::AccessibilityActivateSignalType         mAccessibilityActivateSignal;
@@ -499,15 +530,15 @@ public:
   Toolkit::DevelControl::AccessibilityReadingCancelledSignalType mAccessibilityReadingCancelledSignal;
   Toolkit::DevelControl::AccessibilityReadingStoppedSignalType   mAccessibilityReadingStoppedSignal;
 
-  Toolkit::DevelControl::AccessibilityGetNameSignalType          mAccessibilityGetNameSignal;
-  Toolkit::DevelControl::AccessibilityGetDescriptionSignalType   mAccessibilityGetDescriptionSignal;
-  Toolkit::DevelControl::AccessibilityDoGestureSignalType        mAccessibilityDoGestureSignal;
+  Toolkit::DevelControl::AccessibilityGetNameSignalType        mAccessibilityGetNameSignal;
+  Toolkit::DevelControl::AccessibilityGetDescriptionSignalType mAccessibilityGetDescriptionSignal;
+  Toolkit::DevelControl::AccessibilityDoGestureSignalType      mAccessibilityDoGestureSignal;
 
   std::string mAccessibilityName;
   std::string mAccessibilityDescription;
   std::string mAccessibilityTranslationDomain;
-  bool        mAccessibilityNameSet = false;
-  bool        mAccessibilityDescriptionSet = false;
+  bool        mAccessibilityNameSet              = false;
+  bool        mAccessibilityDescriptionSet       = false;
   bool        mAccessibilityTranslationDomainSet = false;
 
   bool mAccessibilityHighlightable    = false;
@@ -515,7 +546,7 @@ public:
 
   Dali::Accessibility::Role mAccessibilityRole = Dali::Accessibility::Role::UNKNOWN;
 
-  std::vector<std::vector<Accessibility::Address>>                       mAccessibilityRelations;
+  std::vector<std::vector<Accessibility::Accessible*>>                   mAccessibilityRelations;
   std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Actor)> mAccessibilityConstructor;
   std::unique_ptr<Dali::Accessibility::Accessible>                       mAccessibilityObject;
 
@@ -536,6 +567,7 @@ public:
   bool             mIsKeyboardFocusGroup : 1;             ///< Stores whether the control is a focus group.
   bool             mIsEmittingResourceReadySignal : 1;    ///< True during ResourceReady().
   bool             mNeedToEmitResourceReady : 1;          ///< True if need to emit the resource ready signal again.
+  bool             mDispatchKeyEvents : 1;                ///< Whether the actor emits key event signals
 
   RegisteredVisualContainer mRemoveVisuals; ///< List of visuals that are being replaced by another visual once ready
 
@@ -562,6 +594,12 @@ public:
   static const PropertyRegistration PROPERTY_20;
   static const PropertyRegistration PROPERTY_21;
   static const PropertyRegistration PROPERTY_22;
+
+private:
+  // Accessibility - notification for highlighted object to check if it is showing.
+  bool                                        mIsAccessibilityPositionPropertyNotificationSet{false};
+  Dali::PropertyNotification                  mAccessibilityPositionNotification;
+  Dali::Accessibility::ScreenRelativeMoveType mAccessibilityLastScreenRelativeMoveType{Accessibility::ScreenRelativeMoveType::OUTSIDE};
 };
 
 } // namespace Internal