/* -*- 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 "nsIDOMSVGElement.idl"

interface nsIDOMSVGAnimatedLength;
interface nsIDOMSVGRect;
interface nsIDOMSVGViewSpec;
interface nsIDOMSVGPoint;
interface nsIDOMSVGNumber;
interface nsIDOMSVGLength;
interface nsIDOMSVGAngle;
interface nsIDOMSVGMatrix;
interface nsIDOMSVGTransform;

// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
%{C++
#ifdef GetCurrentTime
#undef GetCurrentTime
#endif
%}

[scriptable, uuid(EF862DDA-DE4E-4F1C-9A70-4D3BEBDE5E6E)]
interface nsIDOMSVGSVGElement
  : nsIDOMSVGElement
/*
        The SVG DOM makes use of multiple interface inheritance.
        Since XPCOM only supports single interface inheritance,
        the best thing that we can do is to promise that whenever
        an object implements _this_ interface it will also
        implement the following interfaces. (We then have to QI to
        hop between them.)
        
    nsIDOMSVGTests,
    nsIDOMSVGLangSpace,
    nsIDOMSVGExternalResourcesRequired,
    nsIDOMSVGStylable,
    nsIDOMSVGLocatable,
    nsIDOMSVGFitToViewBox,
    nsIDOMSVGZoomAndPan,
    events::nsIDOMEventTarget,
*/
{ 
  readonly attribute nsIDOMSVGAnimatedLength x;
  readonly attribute nsIDOMSVGAnimatedLength y;
  readonly attribute nsIDOMSVGAnimatedLength width;
  readonly attribute nsIDOMSVGAnimatedLength height;
  attribute DOMString         contentScriptType;
      // raises DOMException on setting
  attribute DOMString         contentStyleType;
      // raises DOMException on setting
  readonly attribute nsIDOMSVGRect     viewport;
  readonly attribute float pixelUnitToMillimeterX;
  readonly attribute float pixelUnitToMillimeterY;
  readonly attribute float screenPixelToMillimeterX;
  readonly attribute float screenPixelToMillimeterY;
  attribute boolean useCurrentView;
      // raises DOMException on setting
  readonly attribute nsIDOMSVGViewSpec currentView;
  attribute float currentScale;
      // raises DOMException on setting
  readonly attribute nsIDOMSVGPoint currentTranslate;

  unsigned long suspendRedraw(in unsigned long max_wait_milliseconds);
  void          unsuspendRedraw(in unsigned long suspend_handle_id);
      // raises( DOMException );
  void          unsuspendRedrawAll();
  void          forceRedraw();
  void          pauseAnimations();
  void          unpauseAnimations();
  boolean       animationsPaused();
  float         getCurrentTime();
  void          setCurrentTime(in float seconds);
  nsIDOMNodeList getIntersectionList(in nsIDOMSVGRect rect,
                                     in nsIDOMSVGElement referenceElement);
  nsIDOMNodeList getEnclosureList(in nsIDOMSVGRect rect, in nsIDOMSVGElement referenceElement);
  boolean       checkIntersection(in nsIDOMSVGElement element, in nsIDOMSVGRect rect);
  boolean       checkEnclosure(in nsIDOMSVGElement element, in nsIDOMSVGRect rect);
  void          deSelectAll();
  nsIDOMSVGNumber       createSVGNumber();
  nsIDOMSVGLength       createSVGLength();
  nsIDOMSVGAngle        createSVGAngle();
  nsIDOMSVGPoint        createSVGPoint();
  nsIDOMSVGMatrix       createSVGMatrix();
  nsIDOMSVGRect         createSVGRect();
  nsIDOMSVGTransform    createSVGTransform();
  nsIDOMSVGTransform    createSVGTransformFromMatrix(in nsIDOMSVGMatrix matrix);
  nsIDOMElement         getElementById(in DOMString elementId);
};
