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 *
12 * Difference to the original copy of this file:
13 *   1) ADD public static final short FILL_AUTO = 2;
14 *   2) ADD public short getFillDefault();
15 *   3) AND public void setFillDefault(short fillDefault)
16 *                   throws DOMException;
17 */
18
19package org.w3c.dom.smil;
20
21import org.w3c.dom.DOMException;
22
23/**
24 *  This interface defines the set of timing attributes that are common to all
25 * timed elements.
26 */
27public interface ElementTime {
28    /**
29     *  The desired value (as a list of times) of the  begin instant of this
30     * node.
31     * @exception DOMException
32     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
33     */
34    public TimeList getBegin();
35    public void setBegin(TimeList begin)
36                     throws DOMException;
37
38    /**
39     *  The list of active  ends for this node.
40     * @exception DOMException
41     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
42     */
43    public TimeList getEnd();
44    public void setEnd(TimeList end)
45                     throws DOMException;
46
47    /**
48     *  The desired simple  duration value of this node in seconds. Negative
49     * value means "indefinite".
50     * @exception DOMException
51     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
52     */
53    public float getDur();
54    public void setDur(float dur)
55                     throws DOMException;
56
57    // restartTypes
58    public static final short RESTART_ALWAYS            = 0;
59    public static final short RESTART_NEVER             = 1;
60    public static final short RESTART_WHEN_NOT_ACTIVE   = 2;
61
62    /**
63     *  A code representing the value of the  restart attribute, as defined
64     * above. Default value is <code>RESTART_ALWAYS</code> .
65     * @exception DOMException
66     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
67     */
68    public short getRestart();
69    public void setRestart(short restart)
70                     throws DOMException;
71
72    // fillTypes
73    public static final short FILL_REMOVE               = 0;
74    public static final short FILL_FREEZE               = 1;
75    public static final short FILL_AUTO                 = 2;
76
77    /**
78     *  A code representing the value of the  fill attribute, as defined
79     * above. Default value is <code>FILL_REMOVE</code> .
80     * @exception DOMException
81     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
82     */
83    public short getFill();
84    public void setFill(short fill)
85                     throws DOMException;
86
87    /**
88     *  The  repeatCount attribute causes the element to play repeatedly
89     * (loop) for the specified number of times. A negative value repeat the
90     * element indefinitely. Default value is 0 (unspecified).
91     * @exception DOMException
92     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
93     */
94    public float getRepeatCount();
95    public void setRepeatCount(float repeatCount)
96                     throws DOMException;
97
98    /**
99     *  The  repeatDur causes the element to play repeatedly (loop) for the
100     * specified duration in milliseconds. Negative means "indefinite".
101     * @exception DOMException
102     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
103     */
104    public float getRepeatDur();
105    public void setRepeatDur(float repeatDur)
106                     throws DOMException;
107
108    /**
109     *  Causes this element to begin the local timeline (subject to sync
110     * constraints).
111     * @return  <code>true</code> if the method call was successful and the
112     *   element was begun. <code>false</code> if the method call failed.
113     *   Possible reasons for failure include:  The element doesn't support
114     *   the <code>beginElement</code> method. (the <code>beginEvent</code>
115     *   attribute is not set to <code>"undefinite"</code> )  The element is
116     *   already active and can't be restart when it is active. (the
117     *   <code>restart</code> attribute is set to <code>"whenNotActive"</code>
118     *    )  The element is active or has been active and can't be restart.
119     *   (the <code>restart</code> attribute is set to <code>"never"</code> ).
120     *
121     */
122    public boolean beginElement();
123
124    /**
125     *  Causes this element to end the local timeline (subject to sync
126     * constraints).
127     * @return  <code>true</code> if the method call was successful and the
128     *   element was endeed. <code>false</code> if method call failed.
129     *   Possible reasons for failure include:  The element doesn't support
130     *   the <code>endElement</code> method. (the <code>endEvent</code>
131     *   attribute is not set to <code>"undefinite"</code> )  The element is
132     *   not active.
133     */
134    public boolean endElement();
135
136    /**
137     *  Causes this element to pause the local timeline (subject to sync
138     * constraints).
139     */
140    public void pauseElement();
141
142    /**
143     *  Causes this element to resume a paused local timeline.
144     */
145    public void resumeElement();
146
147    /**
148     *  Seeks this element to the specified point on the local timeline
149     * (subject to sync constraints).  If this is a timeline, this must seek
150     * the entire timeline (i.e. propagate to all timeChildren).
151     * @param seekTo  The desired position on the local timeline in
152     *   milliseconds.
153     */
154    public void seekElement(float seekTo);
155
156    public short getFillDefault();
157    public void setFillDefault(short fillDefault)
158                     throws DOMException;
159
160}
161
162