- From: Chris Lilley <chris@w3.org>
- Date: Thu, 29 Sep 2005 16:49:17 +0200
- 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
have:
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