dom/interfaces/svg/nsIDOMSVGLength.idl
author Hsin-Yi Tsai <htsai@mozilla.com>
Mon, 15 Jul 2013 16:27:19 +0800
changeset 154783 5726180e4834d83a9eed9f4d3bd6bcfccfe8a281
parent 126036 29225925d6e4fcec7a48a8f6183b03e4cf1a9f4b
child 201485 c590fcb23c3c1c1bb3a41979b04fdc3031953130
permissions -rw-r--r--
Bug 888592 - move Telephony and TelephonyCall to webidl. sr=sicking, r=bent

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "domstubs.idl"

[scriptable, uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
interface nsIDOMSVGLength : nsISupports
{ 
  // Length Unit Types
  const unsigned short SVG_LENGTHTYPE_UNKNOWN    = 0;
  const unsigned short SVG_LENGTHTYPE_NUMBER     = 1;
  const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
  const unsigned short SVG_LENGTHTYPE_EMS        = 3;
  const unsigned short SVG_LENGTHTYPE_EXS        = 4;
  const unsigned short SVG_LENGTHTYPE_PX         = 5;
  const unsigned short SVG_LENGTHTYPE_CM         = 6;
  const unsigned short SVG_LENGTHTYPE_MM         = 7;
  const unsigned short SVG_LENGTHTYPE_IN         = 8;
  const unsigned short SVG_LENGTHTYPE_PT         = 9;
  const unsigned short SVG_LENGTHTYPE_PC         = 10;

  readonly attribute unsigned short unitType;
  attribute float          value;
  // raises DOMException on setting
  attribute float          valueInSpecifiedUnits;
  // raises DOMException on setting
  attribute DOMString      valueAsString;
  // raises DOMException on setting
  
  void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits);
  void convertToSpecifiedUnits(in unsigned short unitType);
};