2009-06-29 23:36:16 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-29 23:36:16 +04:00
|
|
|
|
|
|
|
#ifndef WindowGfx_h__
|
|
|
|
#define WindowGfx_h__
|
|
|
|
|
2009-06-30 10:00:16 +04:00
|
|
|
/*
|
|
|
|
* nsWindowGfx - Painting and aceleration.
|
|
|
|
*/
|
|
|
|
|
2009-06-29 23:36:16 +04:00
|
|
|
#include "nsWindow.h"
|
2009-07-28 22:52:40 +04:00
|
|
|
#include <imgIContainer.h>
|
2009-06-29 23:36:16 +04:00
|
|
|
|
|
|
|
class nsWindowGfx {
|
|
|
|
public:
|
2011-09-28 22:36:43 +04:00
|
|
|
enum IconSizeType { kSmallIcon, kRegularIcon };
|
2015-09-23 21:49:05 +03:00
|
|
|
static mozilla::gfx::IntSize GetIconMetrics(IconSizeType aSizeType);
|
|
|
|
static nsresult CreateIcon(imgIContainer* aContainer, bool aIsCursor,
|
|
|
|
uint32_t aHotspotX, uint32_t aHotspotY,
|
|
|
|
mozilla::gfx::IntSize aScaledSize, HICON* aIcon);
|
2009-07-28 22:52:40 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* Cursor helpers
|
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
static uint8_t* Data32BitTo1Bit(uint8_t* aImageData, uint32_t aWidth,
|
|
|
|
uint32_t aHeight);
|
|
|
|
static HBITMAP DataToBitmap(uint8_t* aImageData, uint32_t aWidth,
|
|
|
|
uint32_t aHeight, uint32_t aDepth);
|
2009-06-29 23:36:16 +04:00
|
|
|
};
|
|
|
|
|
2009-07-28 22:52:40 +04:00
|
|
|
#endif // WindowGfx_h__
|