[FancyZones] Added persistence to app zone history (#3132)

* Persist app zone history in a separate file

* Almost ready to be functionally tested

* Now all unit tests pass

* Bug fixes, it seems to work

* Various fixups

* Improved performance of FancyZones::UpdateWindowsPositions()
This commit is contained in:
Ivan Stošić
2020-05-26 16:01:12 +02:00
committed by GitHub
parent bc9add783c
commit 6f22c7ad19
17 changed files with 349 additions and 881 deletions

View File

@@ -31,12 +31,12 @@ interface __declspec(uuid("{E4839EB7-669D-49CF-84A9-71A2DFD851A3}")) IZoneSet :
*/
IFACEMETHOD_(std::vector<int>, ZonesFromPoint)(POINT pt) = 0;
/**
* Get index of the zone inside zone layout by window assigned to it.
* Get index set of the zones to which the window was assigned.
*
* @param window Handle of window assigned to zone.
* @returns Zone index withing zone layout.
* @param window Handle of the window.
* @returns A vector of integers, 0-based, the index set.
*/
IFACEMETHOD_(int, GetZoneIndexFromWindow)(HWND window) = 0;
IFACEMETHOD_(std::vector<int>, GetZoneIndexSetFromWindow)(HWND window) = 0;
/**
* @returns Array of zone objects (defining coordinates of the zone) inside this zone layout.
*/
@@ -95,6 +95,14 @@ interface __declspec(uuid("{E4839EB7-669D-49CF-84A9-71A2DFD851A3}")) IZoneSet :
* @returns Boolean indicating if calculation was successful.
*/
IFACEMETHOD_(bool, CalculateZones)(MONITORINFO monitorInfo, int zoneCount, int spacing) = 0;
/**
* Check if the zone with the specified index is empty. Returns true if the zone does not exist.
*
* @param zoneIndex The index of of the zone within this zone set.
*
* @returns Boolean indicating whether the zone is empty.
*/
IFACEMETHOD_(bool, IsZoneEmpty)(int zoneIndex) = 0;
};
#define VERSION_PERSISTEDDATA 0x0000F00D