2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 22:01:16 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1998-07-29 18:54:36 +00:00
|
|
|
*
|
2004-04-18 22:01:16 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1998-07-29 18:54:36 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1998-07-29 18:54:36 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 22:01:16 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-28 20:14:13 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 03:40:37 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 22:01:16 +00:00
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
2001-09-28 20:14:13 +00:00
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 22:01:16 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-28 20:14:13 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 22:01:16 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-28 20:14:13 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1998-07-29 18:54:36 +00:00
|
|
|
|
|
|
|
#ifndef __nsILookAndFeel
|
|
|
|
#define __nsILookAndFeel
|
|
|
|
#include "nsISupports.h"
|
|
|
|
#include "nsColor.h"
|
|
|
|
|
2001-10-02 03:10:56 +00:00
|
|
|
// for |#ifdef NS_DEBUG|
|
|
|
|
struct nsSize;
|
1999-10-19 11:34:00 +00:00
|
|
|
|
1999-01-21 23:59:14 +00:00
|
|
|
|
2008-01-24 09:31:44 +00:00
|
|
|
// {6672E0EA-C936-11DC-9BB7-0014850B592F}
|
1998-07-29 18:54:36 +00:00
|
|
|
#define NS_ILOOKANDFEEL_IID \
|
2008-01-24 09:31:44 +00:00
|
|
|
{ 0x6672e0ea, 0xc936, 0x11dc, \
|
|
|
|
{ 0x9b, 0xb7, 0x00, 0x14, 0x85, 0x0b, 0x59, 0x2f} }
|
2005-09-17 11:34:27 +00:00
|
|
|
|
1998-07-29 18:54:36 +00:00
|
|
|
|
|
|
|
class nsILookAndFeel: public nsISupports {
|
|
|
|
public:
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOOKANDFEEL_IID)
|
1999-05-10 23:15:21 +00:00
|
|
|
|
2002-05-01 00:17:04 +00:00
|
|
|
// When modifying this list, also modify nsXPLookAndFeel::sColorPrefs
|
|
|
|
// in widget/src/xpwidgts/nsXPLookAndFeel.cpp.
|
1998-07-29 18:54:36 +00:00
|
|
|
typedef enum {
|
2002-08-06 14:39:55 +00:00
|
|
|
|
|
|
|
// WARNING : NO NEGATIVE VALUE IN THIS ENUMERATION
|
|
|
|
// see patch in bug 57757 for more information
|
|
|
|
|
1998-09-01 20:54:39 +00:00
|
|
|
eColor_WindowBackground,
|
|
|
|
eColor_WindowForeground,
|
|
|
|
eColor_WidgetBackground,
|
|
|
|
eColor_WidgetForeground,
|
|
|
|
eColor_WidgetSelectBackground,
|
|
|
|
eColor_WidgetSelectForeground,
|
|
|
|
eColor_Widget3DHighlight,
|
|
|
|
eColor_Widget3DShadow,
|
|
|
|
eColor_TextBackground,
|
|
|
|
eColor_TextForeground,
|
|
|
|
eColor_TextSelectBackground,
|
1999-09-10 18:30:55 +00:00
|
|
|
eColor_TextSelectForeground,
|
2002-08-10 08:15:30 +00:00
|
|
|
eColor_TextSelectBackgroundDisabled,
|
|
|
|
eColor_TextSelectBackgroundAttention,
|
1999-09-10 18:30:55 +00:00
|
|
|
|
2005-09-17 11:34:27 +00:00
|
|
|
eColor_IMERawInputBackground,
|
|
|
|
eColor_IMERawInputForeground,
|
|
|
|
eColor_IMERawInputUnderline,
|
|
|
|
eColor_IMESelectedRawTextBackground,
|
|
|
|
eColor_IMESelectedRawTextForeground,
|
|
|
|
eColor_IMESelectedRawTextUnderline,
|
|
|
|
eColor_IMEConvertedTextBackground,
|
|
|
|
eColor_IMEConvertedTextForeground,
|
|
|
|
eColor_IMEConvertedTextUnderline,
|
|
|
|
eColor_IMESelectedConvertedTextBackground,
|
|
|
|
eColor_IMESelectedConvertedTextForeground,
|
|
|
|
eColor_IMESelectedConvertedTextUnderline,
|
|
|
|
|
1999-09-10 18:30:55 +00:00
|
|
|
// New CSS 2 color definitions
|
|
|
|
eColor_activeborder,
|
|
|
|
eColor_activecaption,
|
|
|
|
eColor_appworkspace,
|
|
|
|
eColor_background,
|
|
|
|
eColor_buttonface,
|
|
|
|
eColor_buttonhighlight,
|
|
|
|
eColor_buttonshadow,
|
|
|
|
eColor_buttontext,
|
|
|
|
eColor_captiontext,
|
|
|
|
eColor_graytext,
|
|
|
|
eColor_highlight,
|
|
|
|
eColor_highlighttext,
|
|
|
|
eColor_inactiveborder,
|
|
|
|
eColor_inactivecaption,
|
|
|
|
eColor_inactivecaptiontext,
|
|
|
|
eColor_infobackground,
|
|
|
|
eColor_infotext,
|
|
|
|
eColor_menu,
|
|
|
|
eColor_menutext,
|
|
|
|
eColor_scrollbar,
|
|
|
|
eColor_threeddarkshadow,
|
|
|
|
eColor_threedface,
|
|
|
|
eColor_threedhighlight,
|
|
|
|
eColor_threedlightshadow,
|
|
|
|
eColor_threedshadow,
|
|
|
|
eColor_window,
|
|
|
|
eColor_windowframe,
|
2000-10-04 00:38:03 +00:00
|
|
|
eColor_windowtext,
|
|
|
|
|
2003-06-18 21:32:42 +00:00
|
|
|
eColor__moz_buttondefault,
|
2000-10-04 00:38:03 +00:00
|
|
|
// Colors which will hopefully become CSS3
|
2000-12-05 21:48:00 +00:00
|
|
|
eColor__moz_field,
|
2001-04-17 00:46:07 +00:00
|
|
|
eColor__moz_fieldtext,
|
|
|
|
eColor__moz_dialog,
|
|
|
|
eColor__moz_dialogtext,
|
2000-12-05 21:48:00 +00:00
|
|
|
eColor__moz_dragtargetzone, //used to highlight valid regions to drop something onto
|
1999-09-10 18:30:55 +00:00
|
|
|
|
2004-10-26 01:45:28 +00:00
|
|
|
eColor__moz_cellhighlight, //used to cell text background, selected but not focus
|
|
|
|
eColor__moz_cellhighlighttext, //used to cell text, selected but not focus
|
2008-01-24 09:31:44 +00:00
|
|
|
eColor__moz_html_cellhighlight, //used to html select cell text background, selected but not focus
|
|
|
|
eColor__moz_html_cellhighlighttext, //used to html select cell text, selected but not focus
|
2004-10-26 01:45:28 +00:00
|
|
|
eColor__moz_buttonhoverface, //used to button text background, when mouse is over
|
|
|
|
eColor__moz_buttonhovertext, //used to button text, when mouse is over
|
|
|
|
eColor__moz_menuhover, //used to menu item background, when mouse is over
|
|
|
|
eColor__moz_menuhovertext, //used to menu item text, when mouse is over
|
2005-10-07 00:31:36 +00:00
|
|
|
eColor__moz_menubarhovertext, //used to menu bar item text, when mouse is over
|
2008-03-29 11:43:31 +00:00
|
|
|
eColor__moz_oddrowbackground, //background color of odd list rows
|
2004-10-26 01:45:28 +00:00
|
|
|
|
2000-12-05 21:48:00 +00:00
|
|
|
//colours needed by Mac Classic skin
|
|
|
|
eColor__moz_mac_focusring, //ring around text fields and lists
|
|
|
|
eColor__moz_mac_menuselect, //colour used when mouse is over a menu item
|
|
|
|
eColor__moz_mac_menushadow, //colour used to do shadows on menu items
|
2006-07-14 19:54:08 +00:00
|
|
|
eColor__moz_mac_menutextdisable, // color used to display text for disabled menu items
|
2001-01-16 01:27:20 +00:00
|
|
|
eColor__moz_mac_menutextselect, //colour used to display text while mouse is over a menu item
|
2004-06-01 01:58:10 +00:00
|
|
|
|
2001-11-06 02:41:04 +00:00
|
|
|
//all of the accent colours
|
2001-01-16 01:27:20 +00:00
|
|
|
eColor__moz_mac_accentlightesthighlight,
|
|
|
|
eColor__moz_mac_accentregularhighlight,
|
|
|
|
eColor__moz_mac_accentface,
|
|
|
|
eColor__moz_mac_accentlightshadow,
|
|
|
|
eColor__moz_mac_accentregularshadow,
|
|
|
|
eColor__moz_mac_accentdarkshadow,
|
2001-11-06 02:41:04 +00:00
|
|
|
eColor__moz_mac_accentdarkestshadow,
|
2006-06-12 19:33:07 +00:00
|
|
|
|
|
|
|
//new in 10.2
|
|
|
|
eColor__moz_mac_alternateprimaryhighlight, //active list highlight
|
|
|
|
eColor__moz_mac_secondaryhighlight, //inactive light hightlight
|
2001-01-16 01:27:20 +00:00
|
|
|
|
2001-11-06 02:41:04 +00:00
|
|
|
// keep this one last, please
|
|
|
|
eColor_LAST_COLOR
|
1998-07-29 18:54:36 +00:00
|
|
|
} nsColorID;
|
|
|
|
|
2002-05-01 00:17:04 +00:00
|
|
|
// When modifying this list, also modify nsXPLookAndFeel::sIntPrefs
|
|
|
|
// in widget/src/xpwidgts/nsXPLookAndFeel.cpp.
|
1998-07-29 18:54:36 +00:00
|
|
|
typedef enum {
|
1998-09-01 20:54:39 +00:00
|
|
|
eMetric_WindowTitleHeight,
|
|
|
|
eMetric_WindowBorderWidth,
|
|
|
|
eMetric_WindowBorderHeight,
|
|
|
|
eMetric_Widget3DBorder,
|
1999-09-03 14:15:16 +00:00
|
|
|
eMetric_TextFieldBorder, // Native border size
|
1998-12-21 16:53:49 +00:00
|
|
|
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,
|
1999-02-11 00:51:36 +00:00
|
|
|
eMetric_CheckboxSize,
|
|
|
|
eMetric_RadioboxSize,
|
1998-12-21 16:53:49 +00:00
|
|
|
|
|
|
|
eMetric_ListShouldUseHorizontalInsideMinimumPadding, // needed only because of GTK
|
|
|
|
eMetric_ListHorizontalInsideMinimumPadding,
|
|
|
|
|
|
|
|
eMetric_ListShouldUseVerticalInsidePadding, // needed only because of GTK
|
1999-07-14 22:16:59 +00:00
|
|
|
eMetric_ListVerticalInsidePadding, // needed only because of GTK
|
|
|
|
|
|
|
|
eMetric_CaretBlinkTime, // default, may be overriden by OS
|
2004-10-13 01:12:14 +00:00
|
|
|
eMetric_CaretWidth, // pixel width of caret
|
2001-04-05 19:53:13 +00:00
|
|
|
eMetric_ShowCaretDuringSelection, // show the caret when text is selected?
|
2002-10-05 15:39:33 +00:00
|
|
|
eMetric_SelectTextfieldsOnKeyFocus, // select textfields when focused via tab/accesskey?
|
2000-11-16 22:25:45 +00:00
|
|
|
eMetric_SubmenuDelay, // delay before submenus open
|
|
|
|
eMetric_MenusCanOverlapOSBar, // can popups overlap menu/task bar?
|
2006-03-17 03:55:10 +00:00
|
|
|
eMetric_SkipNavigatingDisabledMenuItem, // skip navigating to disabled menu item?
|
2000-11-30 01:51:14 +00:00
|
|
|
eMetric_DragFullWindow, // show window contents while dragging?
|
2003-05-02 18:20:38 +00:00
|
|
|
eMetric_DragThresholdX, // begin a drag if the mouse is moved further than the threshold while the button is down
|
|
|
|
eMetric_DragThresholdY,
|
2004-06-08 19:34:55 +00:00
|
|
|
eMetric_UseAccessibilityTheme, // Accessibility theme being used?
|
2005-08-10 01:45:31 +00:00
|
|
|
eMetric_IsScreenReaderActive, // Screen reader being used?
|
2003-05-02 18:20:38 +00:00
|
|
|
|
2000-11-30 01:51:14 +00:00
|
|
|
eMetric_ScrollArrowStyle, // position of scroll arrows in a scrollbar
|
2003-03-16 23:26:31 +00:00
|
|
|
eMetric_ScrollSliderStyle, // is scroll thumb proportional or fixed?
|
|
|
|
|
2006-07-18 17:13:21 +00:00
|
|
|
eMetric_ScrollButtonLeftMouseButtonAction, // each button can take one of four values:
|
|
|
|
eMetric_ScrollButtonMiddleMouseButtonAction, // 0 - scrolls one line, 1 - scrolls one page
|
|
|
|
eMetric_ScrollButtonRightMouseButtonAction, // 2 - scrolls to end, 3 - button ignored
|
|
|
|
|
2003-03-16 23:26:31 +00:00
|
|
|
eMetric_TreeOpenDelay, // delay for opening spring loaded folders
|
|
|
|
eMetric_TreeCloseDelay, // delay for closing spring loaded folders
|
|
|
|
eMetric_TreeLazyScrollDelay, // delay for triggering the tree scrolling
|
|
|
|
eMetric_TreeScrollDelay, // delay for scrolling the tree
|
2005-01-06 23:41:52 +00:00
|
|
|
eMetric_TreeScrollLinesMax, // the maximum number of lines to be scrolled at ones
|
2006-07-19 19:47:19 +00:00
|
|
|
eMetric_TabFocusModel, // What type of tab-order to use
|
|
|
|
|
|
|
|
/*
|
|
|
|
* eMetric_AlertNotificationOrigin indicates from which corner of the
|
|
|
|
* screen alerts slide in, and from which direction (horizontal/vertical).
|
|
|
|
* 0, the default, represents bottom right, sliding vertically.
|
|
|
|
* Use any bitwise combination of the following constants:
|
|
|
|
* NS_ALERT_HORIZONTAL (1), NS_ALERT_LEFT (2), NS_ALERT_TOP (4).
|
|
|
|
*
|
|
|
|
* 6 4
|
|
|
|
* +-----------+
|
|
|
|
* 7| |5
|
|
|
|
* | |
|
|
|
|
* 3| |1
|
|
|
|
* +-----------+
|
|
|
|
* 2 0
|
|
|
|
*/
|
2007-04-12 00:36:40 +00:00
|
|
|
eMetric_AlertNotificationOrigin,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If true, clicking on a scrollbar (not as in dragging the thumb) defaults
|
|
|
|
* to scrolling the view corresponding to the clicked point. Otherwise, we
|
|
|
|
* only do so if the scrollbar is clicked using the middle mouse button or
|
|
|
|
* if shift is pressed when the scrollbar is clicked.
|
|
|
|
*/
|
2007-08-16 20:35:18 +00:00
|
|
|
eMetric_ScrollToClick,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IME underline styles, the values should be NS_DECORATION_LINE_STYLE_*.
|
|
|
|
* They are defined below.
|
|
|
|
*/
|
|
|
|
eMetric_IMERawInputUnderlineStyle,
|
|
|
|
eMetric_IMESelectedRawTextUnderlineStyle,
|
|
|
|
eMetric_IMEConvertedTextUnderlineStyle,
|
2008-02-20 10:12:33 +00:00
|
|
|
eMetric_IMESelectedConvertedTextUnderline,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If this metric != 0, show icons in menus.
|
|
|
|
*/
|
|
|
|
eMetric_ImagesInMenus
|
1998-07-29 18:54:36 +00:00
|
|
|
} nsMetricID;
|
|
|
|
|
2000-11-30 01:51:14 +00:00
|
|
|
enum {
|
2006-05-01 23:23:33 +00:00
|
|
|
eMetric_ScrollArrowStartBackward = 0x1000,
|
|
|
|
eMetric_ScrollArrowStartForward = 0x0100,
|
|
|
|
eMetric_ScrollArrowEndBackward = 0x0010,
|
|
|
|
eMetric_ScrollArrowEndForward = 0x0001,
|
|
|
|
eMetric_ScrollArrowStyleSingle = // single arrow at each end
|
|
|
|
eMetric_ScrollArrowStartBackward|eMetric_ScrollArrowEndForward,
|
|
|
|
eMetric_ScrollArrowStyleBothAtBottom = // both arrows at bottom/right, none at top/left
|
|
|
|
eMetric_ScrollArrowEndBackward|eMetric_ScrollArrowEndForward,
|
|
|
|
eMetric_ScrollArrowStyleBothAtEachEnd = // both arrows at both ends
|
|
|
|
eMetric_ScrollArrowEndBackward|eMetric_ScrollArrowEndForward|
|
|
|
|
eMetric_ScrollArrowStartBackward|eMetric_ScrollArrowStartForward,
|
|
|
|
eMetric_ScrollArrowStyleBothAtTop = // both arrows at top/left, none at bottom/right
|
|
|
|
eMetric_ScrollArrowStartBackward|eMetric_ScrollArrowStartForward
|
2000-11-30 01:51:14 +00:00
|
|
|
};
|
|
|
|
enum {
|
|
|
|
eMetric_ScrollThumbStyleNormal,
|
|
|
|
eMetric_ScrollThumbStyleProportional
|
|
|
|
};
|
|
|
|
|
2002-05-01 00:17:04 +00:00
|
|
|
// When modifying this list, also modify nsXPLookAndFeel::sFloatPrefs
|
|
|
|
// in widget/src/xpwidgts/nsXPLookAndFeel.cpp.
|
1998-12-21 16:53:49 +00:00
|
|
|
typedef enum {
|
|
|
|
eMetricFloat_TextFieldVerticalInsidePadding,
|
|
|
|
eMetricFloat_TextFieldHorizontalInsidePadding,
|
|
|
|
eMetricFloat_TextAreaVerticalInsidePadding,
|
|
|
|
eMetricFloat_TextAreaHorizontalInsidePadding,
|
|
|
|
eMetricFloat_ListVerticalInsidePadding,
|
|
|
|
eMetricFloat_ListHorizontalInsidePadding,
|
|
|
|
eMetricFloat_ButtonVerticalInsidePadding,
|
2005-09-17 11:34:27 +00:00
|
|
|
eMetricFloat_ButtonHorizontalInsidePadding,
|
|
|
|
eMetricFloat_IMEUnderlineRelativeSize
|
1998-12-21 16:53:49 +00:00
|
|
|
} nsMetricFloatID;
|
|
|
|
|
1998-09-01 20:54:39 +00:00
|
|
|
NS_IMETHOD GetColor(const nsColorID aID, nscolor &aColor) = 0;
|
|
|
|
NS_IMETHOD GetMetric(const nsMetricID aID, PRInt32 & aMetric) = 0;
|
1998-12-21 16:53:49 +00:00
|
|
|
NS_IMETHOD GetMetric(const nsMetricFloatID aID, float & aMetric) = 0;
|
2006-10-23 20:48:05 +00:00
|
|
|
virtual PRUnichar GetPasswordCharacter()
|
|
|
|
{
|
|
|
|
return PRUnichar('*');
|
|
|
|
}
|
|
|
|
|
2001-12-17 22:51:39 +00:00
|
|
|
NS_IMETHOD LookAndFeelChanged() = 0;
|
1999-10-19 11:34:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef NS_DEBUG
|
|
|
|
typedef enum {
|
|
|
|
eMetricSize_TextField = 0,
|
|
|
|
eMetricSize_TextArea = 1,
|
|
|
|
eMetricSize_ListBox = 2,
|
|
|
|
eMetricSize_ComboBox = 3,
|
|
|
|
eMetricSize_Radio = 4,
|
|
|
|
eMetricSize_CheckBox = 5,
|
|
|
|
eMetricSize_Button = 6
|
|
|
|
} nsMetricNavWidgetID;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
eMetricSize_Courier = 0,
|
|
|
|
eMetricSize_SansSerif = 1
|
|
|
|
} nsMetricNavFontID;
|
|
|
|
|
|
|
|
// This method returns the actual (or nearest estimate)
|
|
|
|
// of the Navigator size for a given form control for a given font
|
|
|
|
// and font size. This is used in NavQuirks mode to see how closely
|
|
|
|
// we match its size
|
|
|
|
NS_IMETHOD GetNavSize(const nsMetricNavWidgetID aWidgetID,
|
|
|
|
const nsMetricNavFontID aFontID,
|
|
|
|
const PRInt32 aFontSize,
|
|
|
|
nsSize &aSize) = 0;
|
|
|
|
#endif
|
1998-07-29 18:54:36 +00:00
|
|
|
};
|
|
|
|
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsILookAndFeel, NS_ILOOKANDFEEL_IID)
|
|
|
|
|
|
|
|
|
2000-04-04 09:07:41 +00:00
|
|
|
// On the Mac, GetColor(eColor_TextSelectForeground, color) returns this
|
|
|
|
// constant to specify that the foreground color should not be changed
|
|
|
|
// (ie. a colored text keeps its colors when selected).
|
|
|
|
// Of course if other plaforms work like the Mac, they can use it too.
|
|
|
|
#define NS_DONT_CHANGE_COLOR NS_RGB(0x01, 0x01, 0x01)
|
|
|
|
|
2005-09-17 11:34:27 +00:00
|
|
|
// --------------------------------
|
|
|
|
// Special colors for eColor_IME*
|
|
|
|
// --------------------------------
|
|
|
|
|
|
|
|
// For background color only.
|
|
|
|
#define NS_TRANSPARENT NS_RGBA(0x01, 0x00, 0x00, 0x00)
|
|
|
|
// For foreground color only.
|
|
|
|
#define NS_SAME_AS_FOREGROUND_COLOR NS_RGBA(0x02, 0x00, 0x00, 0x00)
|
|
|
|
#define NS_40PERCENT_FOREGROUND_COLOR NS_RGBA(0x03, 0x00, 0x00, 0x00)
|
|
|
|
|
|
|
|
#define NS_IS_IME_SPECIAL_COLOR(c) ((c) == NS_TRANSPARENT || \
|
|
|
|
(c) == NS_SAME_AS_FOREGROUND_COLOR || \
|
|
|
|
(c) == NS_40PERCENT_FOREGROUND_COLOR)
|
2000-04-04 09:07:41 +00:00
|
|
|
|
2007-08-16 20:35:18 +00:00
|
|
|
// -------------------------------------------------
|
|
|
|
// Underline styles for eMetric_IME*UnderlineStyle
|
|
|
|
// -------------------------------------------------
|
|
|
|
|
|
|
|
#define NS_UNDERLINE_STYLE_NONE 0
|
|
|
|
#define NS_UNDERLINE_STYLE_DOTTED 1
|
|
|
|
#define NS_UNDERLINE_STYLE_DASHED 2
|
|
|
|
#define NS_UNDERLINE_STYLE_SOLID 3
|
|
|
|
#define NS_UNDERLINE_STYLE_DOUBLE 4
|
|
|
|
|
|
|
|
#define NS_IS_VALID_UNDERLINE_STYLE(s) \
|
|
|
|
(NS_UNDERLINE_STYLE_NONE <= (s) && (s) <= NS_UNDERLINE_STYLE_DOUBLE)
|
|
|
|
|
2006-07-19 19:47:19 +00:00
|
|
|
// ------------------------------------------
|
|
|
|
// Bits for eMetric_AlertNotificationOrigin
|
|
|
|
// ------------------------------------------
|
|
|
|
|
|
|
|
#define NS_ALERT_HORIZONTAL 1
|
|
|
|
#define NS_ALERT_LEFT 2
|
|
|
|
#define NS_ALERT_TOP 4
|
|
|
|
|
1998-07-29 18:54:36 +00:00
|
|
|
#endif /* __nsILookAndFeel */
|