mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Formatting chores (#1441)
* format_sources: exclude 3rd party sources * format common project * format leftovers in runner & settings projects * move source formatting-related files according to #939
This commit is contained in:
@@ -14,47 +14,48 @@
|
||||
class D2DWindow
|
||||
{
|
||||
public:
|
||||
D2DWindow();
|
||||
void show(UINT x, UINT y, UINT width, UINT height);
|
||||
void hide();
|
||||
void initialize();
|
||||
virtual ~D2DWindow();
|
||||
D2DWindow();
|
||||
void show(UINT x, UINT y, UINT width, UINT height);
|
||||
void hide();
|
||||
void initialize();
|
||||
virtual ~D2DWindow();
|
||||
|
||||
protected:
|
||||
// Implement this:
|
||||
// Implement this:
|
||||
|
||||
// Initialization - called when D2D device needs to be created.
|
||||
// When called all D2DWindow members will be initialized, including d2d_dc
|
||||
virtual void init() = 0;
|
||||
// resize - when called, window_width and window_height will have current window size
|
||||
virtual void resize() = 0;
|
||||
// render - called on WM_PAIT, BeginPaint/EndPaint is handled by D2DWindow
|
||||
virtual void render(ID2D1DeviceContext5* d2d_dc) = 0;
|
||||
// on_show, on_hide - called when the window is about to be shown or about to be hidden
|
||||
virtual void on_show() = 0;
|
||||
virtual void on_hide() = 0;
|
||||
// Initialization - called when D2D device needs to be created.
|
||||
// When called all D2DWindow members will be initialized, including d2d_dc
|
||||
virtual void init() = 0;
|
||||
// resize - when called, window_width and window_height will have current window size
|
||||
virtual void resize() = 0;
|
||||
// render - called on WM_PAIT, BeginPaint/EndPaint is handled by D2DWindow
|
||||
virtual void render(ID2D1DeviceContext5* d2d_dc) = 0;
|
||||
// on_show, on_hide - called when the window is about to be shown or about to be hidden
|
||||
virtual void on_show() = 0;
|
||||
virtual void on_hide() = 0;
|
||||
|
||||
static LRESULT __stdcall d2d_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
|
||||
static D2DWindow* this_from_hwnd(HWND window);
|
||||
|
||||
void base_init();
|
||||
void base_resize(UINT width, UINT height);
|
||||
void base_render();
|
||||
void render_empty();
|
||||
static LRESULT __stdcall d2d_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
|
||||
static D2DWindow* this_from_hwnd(HWND window);
|
||||
|
||||
std::recursive_mutex mutex;
|
||||
bool initialized = false;
|
||||
HWND hwnd;
|
||||
UINT window_width, window_height;
|
||||
winrt::com_ptr<ID3D11Device> d3d_device;
|
||||
winrt::com_ptr<IDXGIDevice> dxgi_device;
|
||||
winrt::com_ptr<IDXGIFactory2> dxgi_factory;
|
||||
winrt::com_ptr<IDXGISwapChain1> dxgi_swap_chain;
|
||||
winrt::com_ptr<IDCompositionDevice> composition_device;
|
||||
winrt::com_ptr<IDCompositionTarget> composition_target;
|
||||
winrt::com_ptr<IDCompositionVisual> composition_visual;
|
||||
winrt::com_ptr<IDXGISurface2> dxgi_surface;
|
||||
winrt::com_ptr<ID2D1Bitmap1> d2d_bitmap;
|
||||
winrt::com_ptr<ID2D1Factory6> d2d_factory;
|
||||
winrt::com_ptr<ID2D1Device5> d2d_device;
|
||||
winrt::com_ptr<ID2D1DeviceContext5> d2d_dc;
|
||||
void base_init();
|
||||
void base_resize(UINT width, UINT height);
|
||||
void base_render();
|
||||
void render_empty();
|
||||
|
||||
std::recursive_mutex mutex;
|
||||
bool initialized = false;
|
||||
HWND hwnd;
|
||||
UINT window_width, window_height;
|
||||
winrt::com_ptr<ID3D11Device> d3d_device;
|
||||
winrt::com_ptr<IDXGIDevice> dxgi_device;
|
||||
winrt::com_ptr<IDXGIFactory2> dxgi_factory;
|
||||
winrt::com_ptr<IDXGISwapChain1> dxgi_swap_chain;
|
||||
winrt::com_ptr<IDCompositionDevice> composition_device;
|
||||
winrt::com_ptr<IDCompositionTarget> composition_target;
|
||||
winrt::com_ptr<IDCompositionVisual> composition_visual;
|
||||
winrt::com_ptr<IDXGISurface2> dxgi_surface;
|
||||
winrt::com_ptr<ID2D1Bitmap1> d2d_bitmap;
|
||||
winrt::com_ptr<ID2D1Factory6> d2d_factory;
|
||||
winrt::com_ptr<ID2D1Device5> d2d_device;
|
||||
winrt::com_ptr<ID2D1DeviceContext5> d2d_dc;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user