widget/windows/nsWindowGfx.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/nsWindowGfx.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef WindowGfx_h__
    1.10 +#define WindowGfx_h__
    1.11 +
    1.12 +/*
    1.13 + * nsWindowGfx - Painting and aceleration.
    1.14 + */
    1.15 +
    1.16 +#include "nsWindow.h"
    1.17 +#include <imgIContainer.h>
    1.18 +
    1.19 +// This isn't ideal, we should figure out how to export
    1.20 +// the #defines here; need this to figure out if we have
    1.21 +// the DirectDraw surface or not.
    1.22 +#include "cairo-features.h"
    1.23 +
    1.24 +class nsWindowGfx {
    1.25 +public:
    1.26 +  enum IconSizeType {
    1.27 +    kSmallIcon,
    1.28 +    kRegularIcon
    1.29 +  };
    1.30 +  static gfxIntSize GetIconMetrics(IconSizeType aSizeType);
    1.31 +  static nsresult CreateIcon(imgIContainer *aContainer, bool aIsCursor, uint32_t aHotspotX, uint32_t aHotspotY, gfxIntSize aScaledSize, HICON *aIcon);
    1.32 +
    1.33 +private:
    1.34 +  /**
    1.35 +   * Cursor helpers
    1.36 +   */
    1.37 +  static uint8_t*         Data32BitTo1Bit(uint8_t* aImageData, uint32_t aWidth, uint32_t aHeight);
    1.38 +  static HBITMAP          DataToBitmap(uint8_t* aImageData, uint32_t aWidth, uint32_t aHeight, uint32_t aDepth);
    1.39 +};
    1.40 +
    1.41 +#endif // WindowGfx_h__

mercurial