gecko-dev/gfx2/public/nsISystemLook.idl

177 строки
6.0 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "gfxtypes.idl"
/**
* nsISystemLook interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.0
* @see "gfx2"
**/
[scriptable, uuid(bfe1502c-1dd1-11b2-8826-ee17ee8675f9)]
interface nsISystemLook : nsISupports
{
/**
* CSS native system colors
* @name colors
* @see CSS2: http://www.w3.org/TR/REC-CSS2/ui.html#system-colors
* @see CSS3: http://www.w3.org/TR/2000/WD-css3-userint-20000216.html#color
*/
//@{
const long color_WindowBackground = 1;
const long color_WindowForeground = 2;
const long color_WidgetBackground = 3;
const long color_WidgetForeground = 4;
const long color_WidgetSelectBackground = 5;
const long color_WidgetSelectForeground = 6;
const long color_Widget3DHighlight = 7;
const long color_Widget3DShadow = 8;
const long color_TextBackground = 9;
const long color_TextForeground = 10;
const long color_TextSelectBackground = 11;
const long color_TextSelectForeground = 12;
// New CSS 2 color definitions
const long color_ActiveBorder = 13;
const long color_ActiveCaption = 14;
const long color_AppWorkspace = 15;
const long color_Background = 16;
const long color_ButtonFace = 17;
const long color_ButtonHighlight = 18;
const long color_ButtonShadow = 19;
const long color_ButtonText = 20;
const long color_CaptionText = 21;
const long color_GrayText = 22;
const long color_Highlight = 23;
const long color_HighlightText = 24;
const long color_InactiveBorder = 25;
const long color_InactiveCaption = 26;
const long color_InactiveCaptionText = 27;
const long color_InfoBackground = 28;
const long color_InfoText = 29;
const long color_Menu = 30;
const long color_MenuText = 31;
const long color_Scrollbar = 32;
const long color_ThreeDDarkShadow = 33;
const long color_ThreeDFace = 34;
const long color_ThreeDHighlight = 35;
const long color_ThreeDLightShadow = 36;
const long color_ThreeDShadow = 37;
const long color_Window = 38;
const long color_WindowFrame = 39;
const long color_WindowText = 40;
// moz extensions
const long color_moz_Field = 41;
//@}
/**
* CSS native system fonts
* @name fonts
* @see CSS2: http://www.w3.org/TR/REC-CSS2/ui.html#system-fonts
* @see CSS3: http://www.w3.org/TR/2000/WD-css3-userint-20000216.html#font
*/
//@{
// css2
const long font_Caption = 1;
const long font_Icon = 2;
const long font_Menu = 3;
const long font_MessageBox = 4;
const long font_SmallCaption = 5;
const long font_StatusBar = 6;
// css3
const long font_Window = 7;
const long font_Document = 8;
const long font_Workspace = 9;
const long font_Desktop = 10;
const long font_Info = 11;
const long font_Dialog = 12;
const long font_Button = 13;
const long font_PullDownMenu = 14;
const long font_List = 15;
const long font_Field = 16;
// moz
const long font_Tooltips = 17;
const long font_Widget = 18;
//@}
/**
* Other native system attributes
* @name other
*/
//@{
const long dimension_TextFieldHeight = 0;
const long dimension_CheckboxDiameter = 1;
const long dimension_RadioboxDiameter = 2;
const long dimension_SingleLineCaretWidth = 4;
const long dimension_MultiLineCaretWidth = 5;
const long delay_CaretBlink = 0;
const long delay_Submenu = 1;
//@}
/**
* Returns the color that the system uses for a given
* constant value which relates to CSS native system
* font values.
* @param colorID the constant for the color you wish to get
* @return the color
*/
gfx_color getColor(in long colorID);
/**
* Returns the nsFont wrapped native font for a given
* constant value which related to CSS native system
* font values.
* @param fontID the constant for the font you wish to get
* @return the nsFont wrapped native font
*/
[noscript] nsFont getFont(in long fontID);
/**
* Returns the size in pixels of the dimension the system
* uses for the specified attribute you asked for.
* @param dimensionID is the constant for the dimension you
* wish to get
* @return the size in pixels of the dimension.
*/
gfx_dimension getDimension(in long dimensionID);
/**
* Returns the number of milliseconds that the system
* uses for the specified attribute.
* @param delayID the constant for the time you wish to get
* @return the number of milliseconds
*/
unsigned long getDelay(in long delayID);
};