[AT-SPI] Add Bridge::{Enabled,Disabled}Signal()
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / accessibility-impl.h
index bce6135..34cc946 100644 (file)
@@ -47,6 +47,7 @@ class DALI_ADAPTOR_API Value;
 class DALI_ADAPTOR_API Component;
 class DALI_ADAPTOR_API Collection;
 class DALI_ADAPTOR_API Action;
+class DALI_ADAPTOR_API Application;
 
 /**
  * @brief Base class for different accessibility bridges.
@@ -72,6 +73,8 @@ struct DALI_ADAPTOR_API Bridge
 
   /**
    * @brief Gets bus name which bridge is initialized on.
+   *
+   * @return The bus name
    */
   virtual const std::string& GetBusName() const = 0;
 
@@ -143,14 +146,14 @@ struct DALI_ADAPTOR_API Bridge
   virtual Accessible* FindByPath(const std::string& path) const = 0;
 
   /**
-   * @brief Shows application on accessibility bus.
+   * @brief Notifies accessibility dbus that window has just been shown.
    */
-  virtual void ApplicationShown() = 0;
+  virtual void WindowShown() = 0;
 
   /**
-   * @brief Hides application on accessibility bus.
+   * @brief Notifies accessibility dbus that window has just been hidden.
    */
-  virtual void ApplicationHidden() = 0;
+  virtual void WindowHidden() = 0;
 
   /**
    * @brief Initializes accessibility bus.
@@ -171,7 +174,7 @@ struct DALI_ADAPTOR_API Bridge
     {
       return ForceUpResult::ALREADY_UP;
     }
-    mData = std::make_shared<Data>();
+    mData          = std::make_shared<Data>();
     mData->mBridge = this;
     return ForceUpResult::JUST_STARTED;
   }
@@ -223,7 +226,7 @@ struct DALI_ADAPTOR_API Bridge
    * @param[in] obj Accessible object
    * @param[in] type Direction type when an Accessible object moves out of screen
    **/
-  virtual void EmitMovedOutOfScreen(Accessible* obj, MovedOutOfScreenType type) = 0;
+  virtual void EmitMovedOutOfScreen(Accessible* obj, ScreenRelativeMoveType type) = 0;
 
   /**
    * @brief Emits state-changed event on at-spi bus.
@@ -361,6 +364,16 @@ struct DALI_ADAPTOR_API Bridge
    */
   static void EnableAutoInit();
 
+  static Signal<void()>& EnabledSignal()
+  {
+    return mEnabledSignal;
+  }
+
+  static Signal<void()>& DisabledSignal()
+  {
+    return mDisabledSignal;
+  }
+
 protected:
   struct Data
   {
@@ -379,7 +392,10 @@ protected:
     ENABLED
   };
 
-  inline static AutoInitState autoInitState = AutoInitState::ENABLED;
+  inline static AutoInitState mAutoInitState = AutoInitState::ENABLED;
+
+  inline static Signal<void()> mEnabledSignal;
+  inline static Signal<void()> mDisabledSignal;
 
   /**
    * @brief Registers accessible object to be known in bridge object.
@@ -546,7 +562,7 @@ public:
    *
    * @param[in] type moved out of screen type
    */
-  void EmitMovedOutOfScreen(MovedOutOfScreenType type);
+  void EmitMovedOutOfScreen(ScreenRelativeMoveType type);
 
   /**
    * @brief Emits "highlighted" event.
@@ -873,6 +889,31 @@ public:
 };
 
 /**
+ * @brief An interface identifying the root object
+ * associated with a running application.
+ *
+ * @note Provides global properties describing
+ * application's runtime environment.
+ */
+class Application : public virtual Accessible
+{
+public:
+  /**
+   * @brief Gets name of graphic user interface framework used by an application.
+   *
+   * @return String with name
+   */
+  virtual std::string GetToolkitName() = 0;
+
+  /**
+   * @brief Gets version of graphic user interface framework used by an application.
+   *
+   * @return String with version
+   */
+  virtual std::string GetVersion() = 0;
+};
+
+/**
  * @brief Interface enabling advanced quering of accessibility objects.
  *
  * @note since all mathods can be implemented inside bridge,
@@ -976,7 +1017,7 @@ public:
   virtual Accessible* GetAccessibleAtPoint(Point point, CoordinateType type);
 
   /**
-   * @brief Checks if current object contains given point.
+   * @brief Checks if the current object contains the given point inside.
    *
    * @param[in] point The two-dimensional point
    * @param[in] type The enumeration with type of coordinate system
@@ -986,7 +1027,7 @@ public:
    * @remarks This method is `Contains` in DBus method.
    * @see Dali::Accessibility::Point
    */
-  virtual bool IsAccessibleContainedAtPoint(Point point, CoordinateType type);
+  virtual bool IsAccessibleContainingPoint(Point point, CoordinateType type);
 };
 
 /**