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 "domstubs.idl" michael@0: michael@0: [scriptable, uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)] michael@0: interface nsIDOMSVGLength : nsISupports michael@0: { michael@0: // Length Unit Types michael@0: const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; michael@0: const unsigned short SVG_LENGTHTYPE_NUMBER = 1; michael@0: const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; michael@0: const unsigned short SVG_LENGTHTYPE_EMS = 3; michael@0: const unsigned short SVG_LENGTHTYPE_EXS = 4; michael@0: const unsigned short SVG_LENGTHTYPE_PX = 5; michael@0: const unsigned short SVG_LENGTHTYPE_CM = 6; michael@0: const unsigned short SVG_LENGTHTYPE_MM = 7; michael@0: const unsigned short SVG_LENGTHTYPE_IN = 8; michael@0: const unsigned short SVG_LENGTHTYPE_PT = 9; michael@0: const unsigned short SVG_LENGTHTYPE_PC = 10; michael@0: michael@0: readonly attribute unsigned short unitType; michael@0: attribute float value; michael@0: // raises DOMException on setting michael@0: attribute float valueInSpecifiedUnits; michael@0: // raises DOMException on setting michael@0: attribute DOMString valueAsString; michael@0: // raises DOMException on setting michael@0: michael@0: void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits); michael@0: void convertToSpecifiedUnits(in unsigned short unitType); michael@0: }; michael@0: michael@0: michael@0: michael@0: