michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMCSSValue.idl" michael@0: michael@0: /** michael@0: * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive michael@0: * CSS value in the Document Object Model. michael@0: * michael@0: * For more information on this interface please see michael@0: * http://www.w3.org/TR/DOM-Level-2-Style michael@0: */ michael@0: michael@0: [scriptable, uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)] michael@0: interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue michael@0: { michael@0: // UnitTypes michael@0: const unsigned short CSS_UNKNOWN = 0; michael@0: const unsigned short CSS_NUMBER = 1; michael@0: const unsigned short CSS_PERCENTAGE = 2; michael@0: const unsigned short CSS_EMS = 3; michael@0: const unsigned short CSS_EXS = 4; michael@0: const unsigned short CSS_PX = 5; michael@0: const unsigned short CSS_CM = 6; michael@0: const unsigned short CSS_MM = 7; michael@0: const unsigned short CSS_IN = 8; michael@0: const unsigned short CSS_PT = 9; michael@0: const unsigned short CSS_PC = 10; michael@0: const unsigned short CSS_DEG = 11; michael@0: const unsigned short CSS_RAD = 12; michael@0: const unsigned short CSS_GRAD = 13; michael@0: const unsigned short CSS_MS = 14; michael@0: const unsigned short CSS_S = 15; michael@0: const unsigned short CSS_HZ = 16; michael@0: const unsigned short CSS_KHZ = 17; michael@0: const unsigned short CSS_DIMENSION = 18; michael@0: const unsigned short CSS_STRING = 19; michael@0: const unsigned short CSS_URI = 20; michael@0: const unsigned short CSS_IDENT = 21; michael@0: const unsigned short CSS_ATTR = 22; michael@0: const unsigned short CSS_COUNTER = 23; michael@0: const unsigned short CSS_RECT = 24; michael@0: const unsigned short CSS_RGBCOLOR = 25; michael@0: michael@0: readonly attribute unsigned short primitiveType; michael@0: void setFloatValue(in unsigned short unitType, michael@0: in float floatValue) michael@0: raises(DOMException); michael@0: float getFloatValue(in unsigned short unitType) michael@0: raises(DOMException); michael@0: void setStringValue(in unsigned short stringType, michael@0: in DOMString stringValue) michael@0: raises(DOMException); michael@0: DOMString getStringValue() michael@0: raises(DOMException); michael@0: nsIDOMCounter getCounterValue() michael@0: raises(DOMException); michael@0: nsIDOMRect getRectValue() michael@0: raises(DOMException); michael@0: };