mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[FancyZones] Align zone numbers between Editor and FancyZonesLib (#7387)
* Align zone numbers between Editor and FancyZonesLib Use zoneId on win+arrow * Update tests * Fix crash * ZoneId starts from 0 * Define ZonesMap type IFACEMETHOD_ macro is having trouble processing std::map template when expanding, so return type needs to be predefined * Address PR comment * Address more PR comments * Handle .at
This commit is contained in:
@@ -6,13 +6,15 @@ namespace FancyZonesDataTypes
|
||||
{
|
||||
enum class ZoneSetLayoutType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing single zone layout. ZoneSet is responsible for actual calculation of rectangle coordinates
|
||||
* (whether is grid or canvas layout) and moving windows through them.
|
||||
*/
|
||||
interface __declspec(uuid("{E4839EB7-669D-49CF-84A9-71A2DFD851A3}")) IZoneSet : public IUnknown
|
||||
{
|
||||
// Mapping zone id to zone
|
||||
using ZonesMap = std::map<size_t, winrt::com_ptr<IZone>>;
|
||||
|
||||
/**
|
||||
* @returns Unique identifier of zone layout.
|
||||
*/
|
||||
@@ -45,7 +47,7 @@ interface __declspec(uuid("{E4839EB7-669D-49CF-84A9-71A2DFD851A3}")) IZoneSet :
|
||||
/**
|
||||
* @returns Array of zone objects (defining coordinates of the zone) inside this zone layout.
|
||||
*/
|
||||
IFACEMETHOD_(std::vector<winrt::com_ptr<IZone>>, GetZones)() const = 0;
|
||||
IFACEMETHOD_(ZonesMap, GetZones) () const = 0;
|
||||
/**
|
||||
* Assign window to the zone based on zone index inside zone layout.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user