W3C home > Mailing lists > Public > www-svg@w3.org > September 2005

Re: Questions on SVGTimer

From: Chris Lilley <chris@w3.org>
Date: Thu, 29 Sep 2005 16:49:17 +0200
Message-ID: <0543468.20050929164917@w3.org>
To: James Bentley <James.Bentley@guideworkstv.com>
Cc: "'www-svg@w3.org'" <www-svg@w3.org>

On Thursday, June 9, 2005, 7:29:32 PM, James wrote:

JB> Given that an SVG Timer is obtained from SVGGlobal, is there an IDL
JB> specification of SVGGlobal that defines the method for this?

Thanks for your comment. We have updated the spec to add the Timer
interface, which was missing from the published draft, so that we now

interface SVGDocument : Document, EventTarget
        readonly attribute SVGGlobal global;

interface SVGGlobal : Global
       Connection createConnection();
       Timer createTimer();
       void gotoLocation(in DOMString newURI);
       readonly attribute Document document;
       readonly attribute Global parent;

interface Timer : events::EventTarget // emits "timer" event
       attribute long delay;
       attribute long interval;
       readonly attribute boolean running;    
       void start();
       void stop();

JB> My current requirement is to support screen transitions based on user
JB> inactivity - i.e. a screen saver. I'm not certain that this can be
JB> accomplished with the 'set' element - since 'set' only changes attribute
JB> vaules and can not invoke a script, and script does not have animationTiming
JB> attributes. However, since SVGTimer is an EventTarget, I can add an
JB> EventListener to it to insure that I can produce the expected behavior. With
JB> the addition of a reset method, I can restart the timer when I get user
JB> activity - delaying the listener from being executed.

You have two options, either stop the current timer on user action, set
the delay back to your screen saver timout, and start the timer
again when there is no user activity; or alternatively, kill the timer
object and make a new one.

JB> This, however, brings up another question. What Event will be generated by
JB> the SVGTimer upon timeout?

a timer event.

Please let us know if this response does not address your concerns.

 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Thursday, 29 September 2005 14:49:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:04 UTC