mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-01 21:45:06 -04:00
!1272 增加更新全部窗口的UpdateConfiguration接口
Merge pull request !1272 from xiahaiqin/master
This commit is contained in:
@@ -192,6 +192,13 @@ public:
|
||||
* @return std::vector<sptr<Window>>
|
||||
*/
|
||||
static std::vector<sptr<Window>> GetSubWindow(uint32_t parentId);
|
||||
|
||||
/**
|
||||
* @brief Update configuration for all windows
|
||||
*
|
||||
* @param configuration configuration for app
|
||||
*/
|
||||
static void UpdateConfigurationForAll(const std::shared_ptr<AppExecFwk::Configuration>& configuration);
|
||||
virtual std::shared_ptr<RSSurfaceNode> GetSurfaceNode() const = 0;
|
||||
virtual const std::shared_ptr<AbilityRuntime::Context> GetContext() const = 0;
|
||||
/**
|
||||
|
||||
@@ -101,6 +101,7 @@ public:
|
||||
static sptr<Window> GetTopWindowWithContext(const std::shared_ptr<AbilityRuntime::Context>& context = nullptr);
|
||||
static sptr<Window> GetTopWindowWithId(uint32_t mainWinId);
|
||||
static std::vector<sptr<Window>> GetSubWindow(uint32_t parantId);
|
||||
static void UpdateConfigurationForAll(const std::shared_ptr<AppExecFwk::Configuration>& configuration);
|
||||
virtual std::shared_ptr<RSSurfaceNode> GetSurfaceNode() const override;
|
||||
virtual Rect GetRect() const override;
|
||||
virtual Rect GetRequestRect() const override;
|
||||
|
||||
@@ -79,6 +79,11 @@ std::vector<sptr<Window>> Window::GetSubWindow(uint32_t parentId)
|
||||
return WindowImpl::GetSubWindow(parentId);
|
||||
}
|
||||
|
||||
void Window::UpdateConfigurationForAll(const std::shared_ptr<AppExecFwk::Configuration>& configuration)
|
||||
{
|
||||
return WindowImpl::UpdateConfigurationForAll(configuration);
|
||||
}
|
||||
|
||||
bool OccupiedAreaChangeInfo::Marshalling(Parcel& parcel) const
|
||||
{
|
||||
return parcel.WriteInt32(rect_.posX_) && parcel.WriteInt32(rect_.posY_) &&
|
||||
|
||||
@@ -198,6 +198,14 @@ std::vector<sptr<Window>> WindowImpl::GetSubWindow(uint32_t parentId)
|
||||
return std::vector<sptr<Window>>(subWindowMap_[parentId].begin(), subWindowMap_[parentId].end());
|
||||
}
|
||||
|
||||
void WindowImpl::UpdateConfigurationForAll(const std::shared_ptr<AppExecFwk::Configuration>& configuration)
|
||||
{
|
||||
for (auto& winPair : windowMap_) {
|
||||
auto window = winPair.second.second;
|
||||
window->UpdateConfiguration(configuration);
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<RSSurfaceNode> WindowImpl::GetSurfaceNode() const
|
||||
{
|
||||
return surfaceNode_;
|
||||
|
||||
Reference in New Issue
Block a user