Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / windows / nsWindowGfx.h
blob0d5fd9e01a467047c6b732b44fc22451ea4f9df3
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef WindowGfx_h__
7 #define WindowGfx_h__
9 /*
10 * nsWindowGfx - Painting and aceleration.
13 #include "nsWindow.h"
14 #include <imgIContainer.h>
16 class nsWindowGfx {
17 public:
18 enum IconSizeType { kSmallIcon, kRegularIcon };
19 static mozilla::LayoutDeviceIntSize GetIconMetrics(IconSizeType aSizeType);
20 static nsresult CreateIcon(imgIContainer* aContainer, bool aIsCursor,
21 mozilla::LayoutDeviceIntPoint aHotspot,
22 mozilla::LayoutDeviceIntSize aScaledSize,
23 HICON* aIcon);
25 private:
26 /**
27 * Cursor helpers
29 static uint8_t* Data32BitTo1Bit(uint8_t* aImageData, uint32_t aWidth,
30 uint32_t aHeight);
31 static HBITMAP DataToBitmap(uint8_t* aImageData, uint32_t aWidth,
32 uint32_t aHeight, uint32_t aDepth);
35 #endif // WindowGfx_h__