1 /*
2 * Copyright (c) 2000 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 * details.
11 */
13 package org.w3c.dom.smil;
15 import org.w3c.dom.DOMException;
17 /**
18 * This interface defines the set of timing attributes that are common to all
19 * timed elements.
20 */
21 public interface ElementTime {
22 /**
23 * The desired value (as a list of times) of the begin instant of this
24 * node.
25 * @exception DOMException
26 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
27 */
28 public TimeList getBegin();
29 public void setBegin(TimeList begin)
30 throws DOMException;
32 /**
33 * The list of active ends for this node.
34 * @exception DOMException
35 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
36 */
37 public TimeList getEnd();
38 public void setEnd(TimeList end)
39 throws DOMException;
41 /**
42 * The desired simple duration value of this node in seconds. Negative
43 * value means "indefinite".
44 * @exception DOMException
45 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
46 */
47 public float getDur();
48 public void setDur(float dur)
49 throws DOMException;
51 // restartTypes
52 public static final short RESTART_ALWAYS = 0;
53 public static final short RESTART_NEVER = 1;
54 public static final short RESTART_WHEN_NOT_ACTIVE = 2;
56 /**
57 * A code representing the value of the restart attribute, as defined
58 * above. Default value is <code>RESTART_ALWAYS</code> .
59 * @exception DOMException
60 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
61 */
62 public short getRestart();
63 public void setRestart(short restart)
64 throws DOMException;
66 // fillTypes
67 public static final short FILL_REMOVE = 0;
68 public static final short FILL_FREEZE = 1;
70 /**
71 * A code representing the value of the fill attribute, as defined
72 * above. Default value is <code>FILL_REMOVE</code> .
73 * @exception DOMException
74 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
75 */
76 public short getFill();
77 public void setFill(short fill)
78 throws DOMException;
80 /**
81 * The repeatCount attribute causes the element to play repeatedly
82 * (loop) for the specified number of times. A negative value repeat the
83 * element indefinitely. Default value is 0 (unspecified).
84 * @exception DOMException
85 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
86 */
87 public float getRepeatCount();
88 public void setRepeatCount(float repeatCount)
89 throws DOMException;
91 /**
92 * The repeatDur causes the element to play repeatedly (loop) for the
93 * specified duration in milliseconds. Negative means "indefinite".
94 * @exception DOMException
95 * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
96 */
97 public float getRepeatDur();
98 public void setRepeatDur(float repeatDur)
99 throws DOMException;
101 /**
102 * Causes this element to begin the local timeline (subject to sync
103 * constraints).
104 * @return <code>true</code> if the method call was successful and the
105 * element was begun. <code>false</code> if the method call failed.
106 * Possible reasons for failure include: The element doesn't support
107 * the <code>beginElement</code> method. (the <code>beginEvent</code>
108 * attribute is not set to <code>"undefinite"</code> ) The element is
109 * already active and can't be restart when it is active. (the
110 * <code>restart</code> attribute is set to <code>"whenNotActive"</code>
111 * ) The element is active or has been active and can't be restart.
112 * (the <code>restart</code> attribute is set to <code>"never"</code> ).
113 *
114 */
115 public boolean beginElement();
117 /**
118 * Causes this element to end the local timeline (subject to sync
119 * constraints).
120 * @return <code>true</code> if the method call was successful and the
121 * element was endeed. <code>false</code> if method call failed.
122 * Possible reasons for failure include: The element doesn't support
123 * the <code>endElement</code> method. (the <code>endEvent</code>
124 * attribute is not set to <code>"undefinite"</code> ) The element is
125 * not active.
126 */
127 public boolean endElement();
129 /**
130 * Causes this element to pause the local timeline (subject to sync
131 * constraints).
132 */
133 public void pauseElement();
135 /**
136 * Causes this element to resume a paused local timeline.
137 */
138 public void resumeElement();
140 /**
141 * Seeks this element to the specified point on the local timeline
142 * (subject to sync constraints). If this is a timeline, this must seek
143 * the entire timeline (i.e. propagate to all timeChildren).
144 * @param seekTo The desired position on the local timeline in
145 * milliseconds.
146 */
147 public void seekElement(float seekTo);
149 }