2002-04-27 20:26:10 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=4:tabstop=4:
|
|
|
|
*/
|
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/. */
|
2001-12-10 20:37:36 +03:00
|
|
|
|
|
|
|
#ifndef __nsLookAndFeel
|
|
|
|
#define __nsLookAndFeel
|
2012-02-21 03:19:48 +04:00
|
|
|
|
2001-12-10 20:37:36 +03:00
|
|
|
#include "nsXPLookAndFeel.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2012-02-21 03:19:48 +04:00
|
|
|
#include "gfxFont.h"
|
|
|
|
|
|
|
|
struct _GtkStyle;
|
2001-12-10 20:37:36 +03:00
|
|
|
|
2017-06-30 04:34:15 +03:00
|
|
|
class nsLookAndFeel final : public nsXPLookAndFeel
|
|
|
|
{
|
2001-12-10 20:37:36 +03:00
|
|
|
public:
|
2002-04-27 20:26:10 +04:00
|
|
|
nsLookAndFeel();
|
|
|
|
virtual ~nsLookAndFeel();
|
|
|
|
|
2011-09-09 06:27:13 +04:00
|
|
|
virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
|
2017-08-03 23:16:31 +03:00
|
|
|
virtual void NativeInit() final;
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
|
2011-09-09 06:27:13 +04:00
|
|
|
virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
|
2012-02-21 03:19:48 +04:00
|
|
|
virtual bool GetFontImpl(FontID aID, nsString& aFontName,
|
2012-09-29 15:35:08 +04:00
|
|
|
gfxFontStyle& aFontStyle,
|
|
|
|
float aDevPixPerCSSPixel);
|
2012-02-21 03:19:48 +04:00
|
|
|
|
2011-09-09 06:27:13 +04:00
|
|
|
virtual void RefreshImpl();
|
2014-01-04 19:02:17 +04:00
|
|
|
virtual char16_t GetPasswordCharacterImpl();
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool GetEchoPasswordImpl();
|
2001-12-10 20:37:36 +03:00
|
|
|
|
|
|
|
protected:
|
2012-02-21 03:19:48 +04:00
|
|
|
|
|
|
|
// Cached fonts
|
|
|
|
bool mDefaultFontCached;
|
|
|
|
bool mButtonFontCached;
|
|
|
|
bool mFieldFontCached;
|
|
|
|
bool mMenuFontCached;
|
|
|
|
nsString mDefaultFontName;
|
|
|
|
nsString mButtonFontName;
|
|
|
|
nsString mFieldFontName;
|
|
|
|
nsString mMenuFontName;
|
|
|
|
gfxFontStyle mDefaultFontStyle;
|
|
|
|
gfxFontStyle mButtonFontStyle;
|
|
|
|
gfxFontStyle mFieldFontStyle;
|
|
|
|
gfxFontStyle mMenuFontStyle;
|
2001-12-10 20:37:36 +03:00
|
|
|
|
2013-05-30 03:26:40 +04:00
|
|
|
// Cached colors
|
|
|
|
nscolor sInfoBackground;
|
|
|
|
nscolor sInfoText;
|
|
|
|
nscolor sMenuBackground;
|
|
|
|
nscolor sMenuBarText;
|
|
|
|
nscolor sMenuBarHoverText;
|
|
|
|
nscolor sMenuText;
|
2015-05-29 12:40:00 +03:00
|
|
|
nscolor sMenuTextInactive;
|
2013-05-30 03:26:40 +04:00
|
|
|
nscolor sMenuHover;
|
|
|
|
nscolor sMenuHoverText;
|
|
|
|
nscolor sButtonText;
|
2014-04-02 19:47:55 +04:00
|
|
|
nscolor sButtonHoverText;
|
2014-06-24 09:28:00 +04:00
|
|
|
nscolor sFrameOuterLightBorder;
|
|
|
|
nscolor sFrameInnerDarkBorder;
|
2013-05-30 03:26:40 +04:00
|
|
|
nscolor sOddCellBackground;
|
|
|
|
nscolor sNativeHyperLinkText;
|
|
|
|
nscolor sComboBoxText;
|
|
|
|
nscolor sComboBoxBackground;
|
|
|
|
nscolor sMozFieldText;
|
|
|
|
nscolor sMozFieldBackground;
|
|
|
|
nscolor sMozWindowText;
|
|
|
|
nscolor sMozWindowBackground;
|
2014-12-08 09:35:00 +03:00
|
|
|
nscolor sTextSelectedText;
|
|
|
|
nscolor sTextSelectedBackground;
|
2013-05-30 03:26:40 +04:00
|
|
|
nscolor sMozScrollbar;
|
2015-08-19 22:42:17 +03:00
|
|
|
nscolor sInfoBarText;
|
2014-01-04 19:02:17 +04:00
|
|
|
char16_t sInvisibleCharacter;
|
2013-05-30 03:26:40 +04:00
|
|
|
float sCaretRatio;
|
|
|
|
bool sMenuSupportsDrag;
|
2017-03-30 16:03:50 +03:00
|
|
|
bool mInitialized;
|
2001-12-10 20:37:36 +03:00
|
|
|
|
2017-03-30 16:03:50 +03:00
|
|
|
void EnsureInit();
|
2001-12-10 20:37:36 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|