widget/windows/nsWindowGfx.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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.
    11  */
    13 #include "nsWindow.h"
    14 #include <imgIContainer.h>
    16 // This isn't ideal, we should figure out how to export
    17 // the #defines here; need this to figure out if we have
    18 // the DirectDraw surface or not.
    19 #include "cairo-features.h"
    21 class nsWindowGfx {
    22 public:
    23   enum IconSizeType {
    24     kSmallIcon,
    25     kRegularIcon
    26   };
    27   static gfxIntSize GetIconMetrics(IconSizeType aSizeType);
    28   static nsresult CreateIcon(imgIContainer *aContainer, bool aIsCursor, uint32_t aHotspotX, uint32_t aHotspotY, gfxIntSize aScaledSize, HICON *aIcon);
    30 private:
    31   /**
    32    * Cursor helpers
    33    */
    34   static uint8_t*         Data32BitTo1Bit(uint8_t* aImageData, uint32_t aWidth, uint32_t aHeight);
    35   static HBITMAP          DataToBitmap(uint8_t* aImageData, uint32_t aWidth, uint32_t aHeight, uint32_t aDepth);
    36 };
    38 #endif // WindowGfx_h__

mercurial