31 lines
624 B
C++
31 lines
624 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
class AeroBackdrop
|
|
{
|
|
public:
|
|
AeroBackdrop() = default;
|
|
~AeroBackdrop();
|
|
|
|
AeroBackdrop(const AeroBackdrop&) = delete;
|
|
AeroBackdrop& operator=(const AeroBackdrop&) = delete;
|
|
|
|
bool Create(HWND owner);
|
|
void Sync(HWND owner);
|
|
void Refresh();
|
|
void Hide();
|
|
void Destroy();
|
|
bool IsValid() const { return hwnd_ != nullptr; }
|
|
|
|
private:
|
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
void ApplyGlass(int width, int height);
|
|
|
|
HWND hwnd_ = nullptr;
|
|
int blur_width_ = 0;
|
|
int blur_height_ = 0;
|
|
bool blur_enabled_ = false;
|
|
bool visible_ = false;
|
|
};
|