Cette annexe contient les définitions OMG IDL [OMGIDL] complètes pour le modèle objet de document niveau 2 Style. Les définitions se répartissent entre les fonctionnalités StyleSheets et CSS.
Les fichiers IDL sont également disponibles sous la forme suivante : http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/idl.zip
// Fichier : stylesheets.idl
#ifndef _STYLESHEETS_IDL_
#define _STYLESHEETS_IDL_
#include "dom.idl"
#pragma prefix "dom.w3c.org"
module stylesheets
{
typedef dom::DOMString DOMString;
typedef dom::Node Node;
interface MediaList;
// Introduite dans DOM niveau 2 :
interface StyleSheet {
readonly attribute DOMString type;
attribute boolean disabled;
readonly attribute Node ownerNode;
readonly attribute StyleSheet parentStyleSheet;
readonly attribute DOMString href;
readonly attribute DOMString title;
readonly attribute MediaList media;
};
// Introduite dans DOM niveau 2 :
interface StyleSheetList {
readonly attribute unsigned long length;
StyleSheet item(in unsigned long index);
};
// Introduite dans DOM niveau 2 :
interface MediaList {
attribute DOMString mediaText;
// soulève une exception (dom::DOMException) à l'initialisation
readonly attribute unsigned long length;
DOMString item(in unsigned long index);
void deleteMedium(in DOMString oldMedium)
raises(dom::DOMException);
void appendMedium(in DOMString newMedium)
raises(dom::DOMException);
};
// Introduite dans DOM niveau 2 :
interface LinkStyle {
readonly attribute StyleSheet sheet;
};
// Introduite dans DOM niveau 2 :
interface DocumentStyle {
readonly attribute StyleSheetList styleSheets;
};
};
#endif // _STYLESHEETS_IDL_
// Fichier : css.idl
#ifndef _CSS_IDL_
#define _CSS_IDL_
#include "dom.idl"
#include "stylesheets.idl"
#include "views.idl"
#pragma prefix "dom.w3c.org"
module css
{
typedef dom::DOMString DOMString;
typedef dom::Element Element;
typedef dom::DOMImplementation DOMImplementation;
interface CSSRule;
interface CSSStyleSheet;
interface CSSStyleDeclaration;
interface CSSValue;
interface Counter;
interface Rect;
interface RGBColor;
// Introduite dans DOM niveau 2 :
interface CSSRuleList {
readonly attribute unsigned long length;
CSSRule item(in unsigned long index);
};
// Introduite dans DOM niveau 2 :
interface CSSRule {
// RuleType
const unsigned short UNKNOWN_RULE = 0;
const unsigned short STYLE_RULE = 1;
const unsigned short CHARSET_RULE = 2;
const unsigned short IMPORT_RULE = 3;
const unsigned short MEDIA_RULE = 4;
const unsigned short FONT_FACE_RULE = 5;
const unsigned short PAGE_RULE = 6;
readonly attribute unsigned short type;
attribute DOMString cssText;
// soulève une exception (dom::DOMException) à l'initialisation
readonly attribute CSSStyleSheet parentStyleSheet;
readonly attribute CSSRule parentRule;
};
// Introduite dans DOM niveau 2 :
interface CSSStyleRule : CSSRule {
attribute DOMString selectorText;
// soulève une exception (dom::DOMException) à l'initialisation
readonly attribute CSSStyleDeclaration style;
};
// Introduite dans DOM niveau 2 :
interface CSSMediaRule : CSSRule {
readonly attribute stylesheets::MediaList media;
readonly attribute CSSRuleList cssRules;
unsigned long insertRule(in DOMString rule,
in unsigned long index)
raises(dom::DOMException);
void deleteRule(in unsigned long index)
raises(dom::DOMException);
};
// Introduite dans DOM niveau 2 :
interface CSSFontFaceRule : CSSRule {
readonly attribute CSSStyleDeclaration style;
};
// Introduite dans DOM niveau 2 :
interface CSSPageRule : CSSRule {
attribute DOMString selectorText;
// soulève une exception (dom::DOMException) à l'initialisation
readonly attribute CSSStyleDeclaration style;
};
// Introduite dans DOM niveau 2 :
interface CSSImportRule : CSSRule {
readonly attribute DOMString href;
readonly attribute stylesheets::MediaList media;
readonly attribute CSSStyleSheet styleSheet;
};
// Introduite dans DOM niveau 2 :
interface CSSCharsetRule : CSSRule {
attribute DOMString encoding;
// soulève une exception (dom::DOMException) à l'initialisation
};
// Introduite dans DOM niveau 2 :
interface CSSUnknownRule : CSSRule {
};
// Introduite dans DOM niveau 2 :
interface CSSStyleDeclaration {
attribute DOMString cssText;
// soulève une exception (dom::DOMException) à l'initialisation
DOMString getPropertyValue(in DOMString propertyName);
CSSValue getPropertyCSSValue(in DOMString propertyName);
DOMString removeProperty(in DOMString propertyName)
raises(dom::DOMException);
DOMString getPropertyPriority(in DOMString propertyName);
void setProperty(in DOMString propertyName,
in DOMString value,
in DOMString priority)
raises(dom::DOMException);
readonly attribute unsigned long length;
DOMString item(in unsigned long index);
readonly attribute CSSRule parentRule;
};
// Introduite dans DOM niveau 2 :
interface CSSValue {
// Types d'unité
const unsigned short CSS_INHERIT = 0;
const unsigned short CSS_PRIMITIVE_VALUE = 1;
const unsigned short CSS_VALUE_LIST = 2;
const unsigned short CSS_CUSTOM = 3;
attribute DOMString cssText;
// soulève une exception (dom::DOMException) à l'initialisation
readonly attribute unsigned short cssValueType;
};
// Introduite dans DOM niveau 2 :
interface CSSPrimitiveValue : CSSValue {
// Types d'unité
const unsigned short CSS_UNKNOWN = 0;
const unsigned short CSS_NUMBER = 1;
const unsigned short CSS_PERCENTAGE = 2;
const unsigned short CSS_EMS = 3;
const unsigned short CSS_EXS = 4;
const unsigned short CSS_PX = 5;
const unsigned short CSS_CM = 6;
const unsigned short CSS_MM = 7;
const unsigned short CSS_IN = 8;
const unsigned short CSS_PT = 9;
const unsigned short CSS_PC = 10;
const unsigned short CSS_DEG = 11;
const unsigned short CSS_RAD = 12;
const unsigned short CSS_GRAD = 13;
const unsigned short CSS_MS = 14;
const unsigned short CSS_S = 15;
const unsigned short CSS_HZ = 16;
const unsigned short CSS_KHZ = 17;
const unsigned short CSS_DIMENSION = 18;
const unsigned short CSS_STRING = 19;
const unsigned short CSS_URI = 20;
const unsigned short CSS_IDENT = 21;
const unsigned short CSS_ATTR = 22;
const unsigned short CSS_COUNTER = 23;
const unsigned short CSS_RECT = 24;
const unsigned short CSS_RGBCOLOR = 25;
readonly attribute unsigned short primitiveType;
void setFloatValue(in unsigned short unitType,
in float floatValue)
raises(dom::DOMException);
float getFloatValue(in unsigned short unitType)
raises(dom::DOMException);
void setStringValue(in unsigned short stringType,
in DOMString stringValue)
raises(dom::DOMException);
DOMString getStringValue()
raises(dom::DOMException);
Counter getCounterValue()
raises(dom::DOMException);
Rect getRectValue()
raises(dom::DOMException);
RGBColor getRGBColorValue()
raises(dom::DOMException);
};
// Introduite dans DOM niveau 2 :
interface CSSValueList : CSSValue {
readonly attribute unsigned long length;
CSSValue item(in unsigned long index);
};
// Introduite dans DOM niveau 2 :
interface RGBColor {
readonly attribute CSSPrimitiveValue red;
readonly attribute CSSPrimitiveValue green;
readonly attribute CSSPrimitiveValue blue;
};
// Introduite dans DOM niveau 2 :
interface Rect {
readonly attribute CSSPrimitiveValue top;
readonly attribute CSSPrimitiveValue right;
readonly attribute CSSPrimitiveValue bottom;
readonly attribute CSSPrimitiveValue left;
};
// Introduite dans DOM niveau 2 :
interface Counter {
readonly attribute DOMString identifier;
readonly attribute DOMString listStyle;
readonly attribute DOMString separator;
};
// Introduite dans DOM niveau 2 :
interface ElementCSSInlineStyle {
readonly attribute CSSStyleDeclaration style;
};
// Introduite dans DOM niveau 2 :
interface CSS2Properties {
attribute DOMString azimuth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString background;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString backgroundAttachment;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString backgroundColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString backgroundImage;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString backgroundPosition;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString backgroundRepeat;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString border;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderCollapse;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderSpacing;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderTop;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderRight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderBottom;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderLeft;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderTopColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderRightColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderBottomColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderLeftColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderTopStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderRightStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderBottomStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderLeftStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderTopWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderRightWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderBottomWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderLeftWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString borderWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString bottom;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString captionSide;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString clear;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString clip;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString color;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString content;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString counterIncrement;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString counterReset;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString cue;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString cueAfter;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString cueBefore;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString cursor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString direction;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString display;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString elevation;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString emptyCells;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString cssFloat;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString font;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontFamily;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontSize;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontSizeAdjust;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontStretch;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontVariant;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString fontWeight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString height;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString left;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString letterSpacing;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString lineHeight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString listStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString listStyleImage;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString listStylePosition;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString listStyleType;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString margin;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString marginTop;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString marginRight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString marginBottom;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString marginLeft;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString markerOffset;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString marks;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString maxHeight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString maxWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString minHeight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString minWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString orphans;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString outline;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString outlineColor;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString outlineStyle;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString outlineWidth;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString overflow;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString padding;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString paddingTop;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString paddingRight;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString paddingBottom;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString paddingLeft;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString page;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pageBreakAfter;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pageBreakBefore;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pageBreakInside;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pause;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pauseAfter;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pauseBefore;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pitch;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString pitchRange;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString playDuring;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString position;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString quotes;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString richness;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString right;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString size;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString speak;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString speakHeader;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString speakNumeral;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString speakPunctuation;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString speechRate;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString stress;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString tableLayout;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString textAlign;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString textDecoration;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString textIndent;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString textShadow;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString textTransform;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString top;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString unicodeBidi;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString verticalAlign;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString visibility;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString voiceFamily;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString volume;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString whiteSpace;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString widows;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString width;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString wordSpacing;
// soulève une exception (dom::DOMException) à l'initialisation
attribute DOMString zIndex;
// soulève une exception (dom::DOMException) à l'initialisation
};
// Introduite dans DOM niveau 2 :
interface CSSStyleSheet : stylesheets::StyleSheet {
readonly attribute CSSRule ownerRule;
readonly attribute CSSRuleList cssRules;
unsigned long insertRule(in DOMString rule,
in unsigned long index)
raises(dom::DOMException);
void deleteRule(in unsigned long index)
raises(dom::DOMException);
};
// Introduite dans DOM niveau 2 :
interface ViewCSS : views::AbstractView {
CSSStyleDeclaration getComputedStyle(in Element elt,
in DOMString pseudoElt);
};
// Introduite dans DOM niveau 2 :
interface DocumentCSS : stylesheets::DocumentStyle {
CSSStyleDeclaration getOverrideStyle(in Element elt,
in DOMString pseudoElt);
};
// Introduced in DOM Level 2:
interface DOMImplementationCSS : DOMImplementation {
CSSStyleSheet createCSSStyleSheet(in DOMString title,
in DOMString media)
raises(dom::DOMException);
};
};
#endif // _CSS_IDL_