Merge branch 'devel/master' into devel/graphics 94/258794/2
authorDavid Steele <david.steele@samsung.com>
Tue, 25 May 2021 23:27:07 +0000 (00:27 +0100)
committerDavid Steele <david.steele@samsung.com>
Wed, 26 May 2021 10:34:43 +0000 (11:34 +0100)
Change-Id: I074c2bb0fbb1d6775cfbadcf4f1271e177bc12c2

1  2 
dali/devel-api/adaptor-framework/accessibility-impl.cpp
dali/internal/accessibility/bridge/bridge-base.h
dali/internal/accessibility/bridge/bridge-impl.cpp
dali/internal/accessibility/bridge/dummy-atspi.cpp
dali/internal/imaging/common/image-loader.cpp
dali/internal/window-system/common/window-render-surface.cpp

@@@ -596,7 -596,7 +596,7 @@@ class NonControlAccessible : public vir
  {
  protected:
    Dali::WeakHandle<Dali::Actor> self;
--  bool        root = false;
++  bool                          root = false;
  
    Dali::Actor Self()
    {
@@@ -618,12 -618,12 +618,12 @@@ public
  
    Dali::Rect<> GetExtents(Dali::Accessibility::CoordType ctype) override
    {
--    Dali::Actor actor = Self();
--    Vector2 screenPosition          = actor.GetProperty(Actor::Property::SCREEN_POSITION).Get<Vector2>();
--    Vector3 size                    = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
--    bool    positionUsesAnchorPoint = actor.GetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT).Get<bool>();
--    Vector3 anchorPointOffSet       = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
--    Vector2 position                = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y);
++    Dali::Actor actor                   = Self();
++    Vector2     screenPosition          = actor.GetProperty(Actor::Property::SCREEN_POSITION).Get<Vector2>();
++    Vector3     size                    = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
++    bool        positionUsesAnchorPoint = actor.GetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT).Get<bool>();
++    Vector3     anchorPointOffSet       = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
++    Vector2     position                = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y);
  
      return {position.x, position.y, size.x, size.y};
    }
@@@ -143,17 -143,17 +143,18 @@@ public
      DBus::DBusInterfaceDescription& desc, const std::string& funcName, DBus::ValueOrError<RET...> (SELF::*funcPtr)(ARGS...))
    {
      if(auto self = dynamic_cast<SELF*>(this))
--      desc.addMethod<DBus::ValueOrError<RET...>(ARGS...)>(funcName,
--                                                          [=](ARGS... args) -> DBus::ValueOrError<RET...> {
--                                                            try
--                                                            {
--                                                              return (self->*funcPtr)(std::move(args)...);
--                                                            }
--                                                            catch(std::domain_error& e)
--                                                            {
--                                                              return DBus::Error{e.what()};
--                                                            }
--                                                          });
++      desc.addMethod<DBus::ValueOrError<RET...>(ARGS...)>(
++        funcName,
++        [=](ARGS... args) -> DBus::ValueOrError<RET...> {
++          try
++          {
++            return (self->*funcPtr)(std::move(args)...);
++          }
++          catch(std::domain_error& e)
++          {
++            return DBus::Error{e.what()};
++          }
++        });
    }
  
    template<typename T, typename SELF>
  // CLASS HEADER
  
  // EXTERNAL INCLUDES
 -#include <dali/public-api/actors/layer.h>
+ #include <dali/devel-api/common/stage.h>
  #include <dali/integration-api/debug.h>
++#include <dali/public-api/actors/layer.h>
  #include <iostream>
  #include <unordered_map>
  
  // INTERNAL INCLUDES
 +#include <dali/devel-api/adaptor-framework/environment-variable.h>
++#include <dali/devel-api/adaptor-framework/window-devel.h>
  #include <dali/internal/accessibility/bridge/bridge-accessible.h>
  #include <dali/internal/accessibility/bridge/bridge-action.h>
  #include <dali/internal/accessibility/bridge/bridge-collection.h>
  #include <dali/internal/accessibility/bridge/bridge-text.h>
  #include <dali/internal/accessibility/bridge/bridge-value.h>
  #include <dali/internal/accessibility/bridge/dummy-atspi.h>
+ #include <dali/internal/adaptor/common/adaptor-impl.h>
  #include <dali/internal/system/common/environment-variables.h>
 -#include <dali/devel-api/adaptor-framework/environment-variable.h>
 -#include <dali/devel-api/adaptor-framework/window-devel.h>
  
  using namespace Dali::Accessibility;
  
@@@ -403,8 -407,17 +407,17 @@@ void Bridge::EnableAutoInit(
      return;
    }
  
 -  auto rootLayer = Dali::Stage::GetCurrent().GetRootLayer();
 -  auto window = Dali::DevelWindow::Get(rootLayer);
++  auto rootLayer       = Dali::Stage::GetCurrent().GetRootLayer();
++  auto window          = Dali::DevelWindow::Get(rootLayer);
+   auto applicationName = Dali::Internal::Adaptor::Adaptor::GetApplicationPackageName();
    auto* bridge = Bridge::GetCurrentBridge();
-   bridge->AddTopLevelWindow(topLevelWindow);
+   bridge->AddTopLevelWindow(Dali::Accessibility::Accessible::Get(rootLayer, true));
    bridge->SetApplicationName(applicationName);
    bridge->Initialize();
+   if(window && window.IsVisible())
+   {
+     bridge->ApplicationShown();
+   }
  }
@@@ -30,6 -31,6 +30,7 @@@
  #include <dali/internal/imaging/common/loader-ktx.h>
  #include <dali/internal/imaging/common/loader-png.h>
  #include <dali/internal/imaging/common/loader-wbmp.h>
++#include <dali/internal/imaging/common/loader-webp.h>
  #include <dali/internal/system/common/file-reader.h>
  
  using namespace Dali::Integration;