2019-09-04 18:26:26 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-10-14 17:42:47 +02:00
|
|
|
namespace ZoneConstants
|
|
|
|
|
{
|
2021-12-20 12:55:20 +01:00
|
|
|
constexpr int MAX_NEGATIVE_SPACING = -20;
|
2020-10-14 17:42:47 +02:00
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:05:03 +03:00
|
|
|
using ZoneIndex = int64_t;
|
|
|
|
|
using ZoneIndexSet = std::vector<ZoneIndex>;
|
|
|
|
|
using Bitmask = ZoneIndex;
|
|
|
|
|
|
2020-03-09 19:22:53 +01:00
|
|
|
/**
|
|
|
|
|
* Class representing one zone inside applied zone layout, which is basically wrapper around rectangle structure.
|
|
|
|
|
*/
|
2019-09-04 18:26:26 +02:00
|
|
|
interface __declspec(uuid("{8228E934-B6EF-402A-9892-15A1441BF8B0}")) IZone : public IUnknown
|
|
|
|
|
{
|
2020-03-09 19:22:53 +01:00
|
|
|
/**
|
|
|
|
|
* @returns Zone coordinates (top-left and bottom-right corner) represented as RECT structure.
|
|
|
|
|
*/
|
2020-10-14 09:00:50 +02:00
|
|
|
IFACEMETHOD_(RECT, GetZoneRect)() const = 0;
|
2021-06-22 11:34:27 +03:00
|
|
|
/**
|
|
|
|
|
* @returns Zone area calculated from zone rect
|
|
|
|
|
*/
|
|
|
|
|
IFACEMETHOD_(long, GetZoneArea)() const = 0;
|
2020-03-09 19:22:53 +01:00
|
|
|
/**
|
2020-04-10 16:09:08 +02:00
|
|
|
* @returns Zone identifier.
|
2020-03-09 19:22:53 +01:00
|
|
|
*/
|
2021-08-11 17:05:03 +03:00
|
|
|
IFACEMETHOD_(ZoneIndex, Id)() const = 0;
|
2019-09-04 18:26:26 +02:00
|
|
|
};
|
|
|
|
|
|
2021-08-11 17:05:03 +03:00
|
|
|
winrt::com_ptr<IZone> MakeZone(const RECT& zoneRect, const ZoneIndex zoneId) noexcept;
|