Files
PowerToys/src/modules/fancyzones/FancyZonesLib/WindowUtils.h
gokcekantarci 8cb632a0c2 [QuickAccent] A check is added to applications running under other ap… (#26808)
* [QuickAccent] A check is added to applications running under other applications with window name for excluding.

* [QuickAccent] Check moved under a general function and applied all modules includes excludeapp

* [QuickAccent] Function name revised

* [QuickAccent] check_excluded_app_with_title function moved to excluded_apps.h

* [QuickAccent] New function created for clean code.

* Reuse check_excluded_app_with_title

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2023-06-23 21:53:15 +02:00

41 lines
1.6 KiB
C++

#pragma once
#include <Windows.h>
// disabling warning 4458 - declaration of 'identifier' hides class member
// to avoid warnings from GDI files - can't add winRT directory to external code
// in the Cpp.Build.props
#pragma warning(push)
#pragma warning(disable : 4458)
#include "gdiplus.h"
#pragma warning(pop)
#include <string>
#include <vector>
namespace FancyZonesWindowUtils
{
bool IsSplashScreen(HWND window);
bool IsWindowMaximized(HWND window) noexcept;
bool HasVisibleOwner(HWND window) noexcept;
bool IsStandardWindow(HWND window);
bool IsPopupWindow(HWND window) noexcept;
bool HasThickFrameAndMinimizeMaximizeButtons(HWND window) noexcept;
bool IsCandidateForZoning(HWND window);
bool IsProcessOfWindowElevated(HWND window); // If HWND is already dead, we assume it wasn't elevated
bool IsExcludedByUser(const HWND& hwnd, std::wstring& processPath) noexcept;
bool IsExcludedByDefault(const HWND& hwnd, std::wstring& processPath) noexcept;
void SwitchToWindow(HWND window) noexcept;
void SizeWindowToRect(HWND window, RECT rect) noexcept; // Parameter rect must be in screen coordinates (e.g. obtained from GetWindowRect)
void SaveWindowSizeAndOrigin(HWND window) noexcept;
void RestoreWindowSize(HWND window) noexcept;
void RestoreWindowOrigin(HWND window) noexcept;
void MakeWindowTransparent(HWND window);
RECT AdjustRectForSizeWindowToRect(HWND window, RECT rect, HWND windowOfRect) noexcept; // Parameter rect is in windowOfRect coordinates
void DisableRoundCorners(HWND window) noexcept;
void ResetRoundCornersPreference(HWND window) noexcept;
bool IsCursorTypeIndicatingSizeEvent();
}