[FancyZones] Zone indexes type change (#12724)

This commit is contained in:
Seraphima Zykova
2021-08-11 17:05:03 +03:00
committed by GitHub
parent 7278d62307
commit 7ea1f26209
24 changed files with 239 additions and 215 deletions

View File

@@ -26,7 +26,7 @@ namespace
struct Zone : winrt::implements<Zone, IZone>
{
public:
Zone(RECT zoneRect, const size_t zoneId) :
Zone(RECT zoneRect, const ZoneIndex zoneId) :
m_zoneRect(zoneRect),
m_id(zoneId)
{
@@ -34,12 +34,12 @@ public:
IFACEMETHODIMP_(RECT) GetZoneRect() const noexcept { return m_zoneRect; }
IFACEMETHODIMP_(long) GetZoneArea() const noexcept { return max(m_zoneRect.bottom - m_zoneRect.top, 0) * max(m_zoneRect.right - m_zoneRect.left, 0); }
IFACEMETHODIMP_(size_t) Id() const noexcept { return m_id; }
IFACEMETHODIMP_(ZoneIndex) Id() const noexcept { return m_id; }
IFACEMETHODIMP_(RECT) ComputeActualZoneRect(HWND window, HWND zoneWindow) const noexcept;
private:
RECT m_zoneRect{};
const size_t m_id{};
const ZoneIndex m_id{};
std::map<HWND, RECT> m_windows{};
};
@@ -75,7 +75,7 @@ RECT Zone::ComputeActualZoneRect(HWND window, HWND zoneWindow) const noexcept
return newWindowRect;
}
winrt::com_ptr<IZone> MakeZone(const RECT& zoneRect, const size_t zoneId) noexcept
winrt::com_ptr<IZone> MakeZone(const RECT& zoneRect, const ZoneIndex zoneId) noexcept
{
if (ValidateZoneRect(zoneRect) && zoneId >= 0)
{