gecko-dev/widget/public/nsILookAndFeel.h

92 строки
3.2 KiB
C
Исходник Обычный вид История

1998-07-29 22:54:36 +04:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef __nsILookAndFeel
#define __nsILookAndFeel
#include "nsISupports.h"
#include "nsColor.h"
#include "nsFont.h"
1998-07-29 22:54:36 +04:00
1998-07-29 22:54:36 +04:00
// {21B51DE1-21A3-11d2-B6E0-00805F8A2676}
#define NS_ILOOKANDFEEL_IID \
{ 0x21b51de1, 0x21a3, 0x11d2, \
{ 0xb6, 0xe0, 0x0, 0x80, 0x5f, 0x8a, 0x26, 0x76 } }
class nsILookAndFeel: public nsISupports {
public:
1999-05-11 03:15:21 +04:00
static const nsIID& GetIID() { static nsIID iid = NS_ILOOKANDFEEL_IID; return iid; }
1998-07-29 22:54:36 +04:00
typedef enum {
eColor_WindowBackground,
eColor_WindowForeground,
eColor_WidgetBackground,
eColor_WidgetForeground,
eColor_WidgetSelectBackground,
eColor_WidgetSelectForeground,
eColor_Widget3DHighlight,
eColor_Widget3DShadow,
eColor_TextBackground,
eColor_TextForeground,
eColor_TextSelectBackground,
eColor_TextSelectForeground
1998-07-29 22:54:36 +04:00
} nsColorID;
typedef enum {
eMetric_WindowTitleHeight,
eMetric_WindowBorderWidth,
eMetric_WindowBorderHeight,
eMetric_Widget3DBorder,
eMetric_TextFieldHeight,
eMetric_TextVerticalInsidePadding, // needed only because of GTK
eMetric_TextShouldUseVerticalInsidePadding, // needed only because of GTK
eMetric_TextHorizontalInsideMinimumPadding,
eMetric_TextShouldUseHorizontalInsideMinimumPadding, // needed only because of GTK
eMetric_ButtonHorizontalInsidePaddingNavQuirks,
eMetric_ButtonHorizontalInsidePaddingOffsetNavQuirks,
eMetric_CheckboxSize,
eMetric_RadioboxSize,
eMetric_ListShouldUseHorizontalInsideMinimumPadding, // needed only because of GTK
eMetric_ListHorizontalInsideMinimumPadding,
eMetric_ListShouldUseVerticalInsidePadding, // needed only because of GTK
eMetric_ListVerticalInsidePadding // needed only because of GTK
1998-07-29 22:54:36 +04:00
} nsMetricID;
typedef enum {
eMetricFloat_TextFieldVerticalInsidePadding,
eMetricFloat_TextFieldHorizontalInsidePadding,
eMetricFloat_TextAreaVerticalInsidePadding,
eMetricFloat_TextAreaHorizontalInsidePadding,
eMetricFloat_ListVerticalInsidePadding,
eMetricFloat_ListHorizontalInsidePadding,
eMetricFloat_ButtonVerticalInsidePadding,
eMetricFloat_ButtonHorizontalInsidePadding
} nsMetricFloatID;
NS_IMETHOD GetColor(const nsColorID aID, nscolor &aColor) = 0;
NS_IMETHOD GetMetric(const nsMetricID aID, PRInt32 & aMetric) = 0;
NS_IMETHOD GetMetric(const nsMetricFloatID aID, float & aMetric) = 0;
1998-07-29 22:54:36 +04:00
};
#define nsLAF nsILookAndFeel
#endif /* __nsILookAndFeel */