| 313 | } |
| 314 | |
| 315 | long Layout(const std::vector<HWND> &windows, const Options &options) { |
| 316 | if (windows.empty()) { |
| 317 | return 0; |
| 318 | } |
| 319 | |
| 320 | // 统一大小模式下,窗口尺寸不能小于最小阈值。 |
| 321 | if (!IsValidUniformSize(options)) { |
| 322 | return 0; |
| 323 | } |
| 324 | |
| 325 | const auto rects = Calculate(windows, options); |
| 326 | return Apply(windows, rects, options); |
| 327 | } |
| 328 | |
| 329 | } // namespace op::window_layout |
no test coverage detected