1 #ifndef __SMIL_H__
2 #define __SMIL_H__
3 /**
4 * Phoebe DOM Implementation.
5 *
6 * This is a C++ approximation of the W3C DOM model, which follows
7 * fairly closely the specifications in the various .idl files, copies of
8 * which are provided for reference. Most important is this one:
9 *
10 * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
11 *
12 * Authors:
13 * Bob Jamison
14 *
15 * Copyright (C) 2005 Bob Jamison
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2.1 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */
33 #include "dom.h"
34 #include "views.h"
35 #include "events.h"
37 #include <vector>
39 namespace org
40 {
41 namespace w3c
42 {
43 namespace dom
44 {
45 namespace smil
46 {
51 //Local definitions
52 typedef dom::DOMString DOMString;
53 typedef dom::Element Element;
54 typedef dom::NodeList NodeList;
55 typedef dom::Document Document;
57 //forward declarations
58 class ElementExclusiveTimeContainer;
59 class ElementLayout;
60 class ElementParallelTimeContainer;
61 class ElementSequentialTimeContainer;
62 class ElementSyncBehavior;
63 class ElementTargetAttributes;
64 class ElementTest;
65 class ElementTime;
66 class ElementTimeContainer;
67 class ElementTimeControl;
68 class ElementTimeManipulation;
69 class SMILAnimateColorElement;
70 class SMILAnimateElement;
71 class SMILAnimateMotionElement;
72 class SMILAnimation;
73 class SMILDocument;
74 class SMILElement;
75 class SMILLayoutElement;
76 class SMILMediaElement;
77 class SMILRefElement;
78 class SMILRegionElement;
79 class SMILRegionInterface;
80 class SMILRootLayoutElement;
81 class SMILSetElement;
82 class SMILSwitchElement;
83 class SMILTopLayoutElement;
84 class Time;
85 class TimeEvent;
86 class TimeList;
90 /*#########################################################################
91 ###########################################################################
92 ## D A T A T Y P E S
93 ###########################################################################
94 #########################################################################*/
98 /*#########################################################################
99 ## ElementLayout
100 #########################################################################*/
102 /**
103 *
104 */
105 class ElementLayout
106 {
107 public:
110 /**
111 *
112 */
113 virtual DOMString getTitle()
114 { return title; }
116 /**
117 *
118 */
119 virtual void setTitle(const DOMString &val) throw(dom::DOMException)
120 { title = val; }
122 /**
123 *
124 */
125 virtual DOMString getBackgroundColor()
126 { return backgroundColor; }
128 /**
129 *
130 */
131 virtual void setBackgroundColor(const DOMString &val) throw(dom::DOMException)
132 { backgroundColor = val; }
134 /**
135 *
136 */
137 virtual long getHeight()
138 { return height; }
140 /**
141 *
142 */
143 virtual void setHeight(long val) throw(dom::DOMException)
144 { height = val; }
146 /**
147 *
148 */
149 virtual long getWidth()
150 { return width; }
152 /**
153 *
154 */
155 virtual void setWidth(long val) throw(dom::DOMException)
156 { width = val; }
160 //##################
161 //# Non-API methods
162 //##################
164 /**
165 *
166 */
167 ElementLayout() {}
169 /**
170 *
171 */
172 ElementLayout(const ElementLayout &other)
173 {
174 title = other.title;
175 backgroundColor = other.backgroundColor;
176 height = other.height;
177 width = other.width;
178 }
180 /**
181 *
182 */
183 virtual ~ElementLayout() {}
185 protected:
187 DOMString title;
188 DOMString backgroundColor;
189 long height;
190 long width;
192 };
195 /*#########################################################################
196 ## SMILRegionInterface
197 #########################################################################*/
199 /**
200 *
201 */
202 class SMILRegionInterface
203 {
204 public:
206 /**
207 *
208 */
209 virtual SMILRegionElement *getRegion()
210 { return regionElement; }
211 /**
212 *
213 */
214 virtual void setRegion(const SMILRegionElement *val)
215 { regionElement = (SMILRegionElement *)val; }
217 //##################
218 //# Non-API methods
219 //##################
221 /**
222 *
223 */
224 SMILRegionInterface()
225 { regionElement = NULL; }
227 /**
228 *
229 */
230 SMILRegionInterface(const SMILRegionInterface &other)
231 { regionElement = other.regionElement; }
233 /**
234 *
235 */
236 virtual ~SMILRegionInterface() {}
238 protected:
240 SMILRegionElement *regionElement;
242 };
245 /*#########################################################################
246 ## Time
247 #########################################################################*/
249 /**
250 *
251 */
252 class Time
253 {
254 public:
257 /**
258 *
259 */
260 virtual bool getResolved()
261 { return resolved; }
263 /**
264 *
265 */
266 virtual double getResolvedOffset()
267 { return resolvedOffset; }
269 typedef enum
270 {
271 SMIL_TIME_INDEFINITE = 0,
272 SMIL_TIME_OFFSET = 1,
273 SMIL_TIME_SYNC_BASED = 2,
274 SMIL_TIME_EVENT_BASED = 3,
275 SMIL_TIME_WALLCLOCK = 4,
276 SMIL_TIME_MEDIA_MARKER = 5
277 } TimeTypes;
281 /**
282 *
283 */
284 virtual unsigned short getTimeType()
285 { return timeType; }
288 /**
289 *
290 */
291 virtual double getOffset()
292 { return offset; }
294 /**
295 *
296 */
297 virtual void setOffset(double val) throw (dom::DOMException)
298 { offset = val; }
300 /**
301 *
302 */
303 virtual Element *getBaseElement()
304 { return baseElement; }
306 /**
307 *
308 */
309 virtual void setBaseElement(const Element *val) throw (dom::DOMException)
310 { baseElement = (Element *)val; }
312 /**
313 *
314 */
315 virtual bool getBaseBegin()
316 { return baseBegin; }
318 /**
319 *
320 */
321 virtual void setBaseBegin(bool val) throw (dom::DOMException)
322 { baseBegin = val; }
324 /**
325 *
326 */
327 virtual DOMString getEvent()
328 { return eventStr; }
330 /**
331 *
332 */
333 virtual void setEvent(const DOMString &val) throw (dom::DOMException)
334 { eventStr = val; }
336 /**
337 *
338 */
339 virtual DOMString getMarker()
340 { return marker; }
342 /**
343 *
344 */
345 virtual void setMarker(const DOMString &val) throw (dom::DOMException)
346 { marker = val; }
350 //##################
351 //# Non-API methods
352 //##################
354 /**
355 *
356 */
357 Time()
358 {
359 resolved = false;
360 resolvedOffset = 0.0;
361 timeType = SMIL_TIME_INDEFINITE;
362 offset = 0.0;
363 baseElement = NULL;
364 baseBegin = false;
365 eventStr = "";
366 marker = "";
367 }
369 /**
370 *
371 */
372 Time(const Time &other)
373 {
374 resolved = other.resolved;
375 resolvedOffset = other.resolvedOffset;
376 timeType = other.timeType;
377 offset = other.offset;
378 baseElement = other.baseElement;
379 baseBegin = other.baseBegin;
380 eventStr = other.eventStr;
381 marker = other.marker;
382 }
384 /**
385 *
386 */
387 virtual ~Time() {}
389 protected:
391 bool resolved;
392 double resolvedOffset;
393 unsigned short timeType;
394 double offset;
395 Element * baseElement;
396 bool baseBegin;
397 DOMString eventStr;
398 DOMString marker;
400 };
403 /*#########################################################################
404 ## TimeList
405 #########################################################################*/
407 /**
408 *
409 */
410 class TimeList
411 {
412 public:
415 /**
416 *
417 */
418 virtual Time item(unsigned long index)
419 {
420 if (index >=items.size())
421 {
422 Time tim;
423 return tim;
424 }
425 return items[index];
426 }
428 /**
429 *
430 */
431 virtual unsigned long getLength()
432 {
433 return items.size();
434 }
436 //##################
437 //# Non-API methods
438 //##################
440 /**
441 *
442 */
443 TimeList() {}
445 /**
446 *
447 */
448 TimeList(const TimeList &other)
449 {
450 items = other.items;
451 }
453 /**
454 *
455 */
456 virtual ~TimeList() {}
458 protected:
460 std::vector<Time>items;
463 };
466 /*#########################################################################
467 ## ElementTime
468 #########################################################################*/
470 /**
471 *
472 */
473 class ElementTime
474 {
475 public:
478 /**
479 *
480 */
481 virtual TimeList getBegin()
482 { return beginTime; }
484 /**
485 *
486 */
487 virtual void setBegin(const TimeList &val) throw(dom::DOMException)
488 { beginTime = val; }
489 /**
490 *
491 */
492 virtual TimeList getEnd()
493 { return endTime; }
495 /**
496 *
497 */
498 virtual void setEnd(const TimeList &val) throw(dom::DOMException)
499 { endTime = val; }
501 /**
502 *
503 */
504 virtual double getDur()
505 { return dur; }
507 /**
508 *
509 */
510 virtual void setDur(double val) throw(dom::DOMException)
511 { dur = val; }
513 typedef enum
514 {
515 RESTART_ALWAYS = 0,
516 RESTART_NEVER = 1,
517 RESTART_WHEN_NOT_ACTIVE = 2
518 } RestartTypes;
520 /**
521 *
522 */
523 virtual unsigned short getRestart()
524 { return restart; }
526 /**
527 *
528 */
529 virtual void setRestart(unsigned short val) throw (dom::DOMException)
530 { restart = val; }
533 // fillTypes
534 typedef enum
535 {
536 FILL_REMOVE = 0,
537 FILL_FREEZE = 1
538 } FillTypes;
541 /**
542 *
543 */
544 virtual unsigned short getFill()
545 { return fill; }
547 /**
548 *
549 */
550 virtual void setFill(unsigned short val) throw (dom::DOMException)
551 { fill = val; }
553 /**
554 *
555 */
556 virtual double getRepeatCount()
557 { return repeatCount; }
559 /**
560 *
561 */
562 virtual void setRepeatCount(double val) throw (dom::DOMException)
563 { repeatCount = val; }
565 /**
566 *
567 */
568 virtual double getRepeatDur()
569 { return repeatDur; }
571 /**
572 *
573 */
574 virtual void setRepeatDur(double val) throw (dom::DOMException)
575 { repeatDur = val; }
577 /**
578 *
579 */
580 virtual bool beginElement()
581 {
582 return true;
583 }
585 /**
586 *
587 */
588 virtual bool endElement()
589 {
590 return true;
591 }
593 /**
594 *
595 */
596 virtual void pauseElement()
597 {
598 }
600 /**
601 *
602 */
603 virtual void resumeElement()
604 {
605 }
607 /**
608 *
609 */
610 virtual void seekElement(double &seekTo)
611 {
612 }
615 //##################
616 //# Non-API methods
617 //##################
619 /**
620 *
621 */
622 ElementTime()
623 {
624 dur = 0.0;
625 restart = RESTART_ALWAYS;
626 fill = FILL_REMOVE;
627 repeatCount = 0.0;
628 repeatDur = 0.0;
629 }
631 /**
632 *
633 */
634 ElementTime(const ElementTime &other)
635 {
636 beginTime = other.beginTime;
637 endTime = other.endTime;
638 dur = other.dur;
639 restart = other.restart;
640 fill = other.fill;
641 repeatCount = other.repeatCount;
642 repeatDur = other.repeatDur;
643 }
645 /**
646 *
647 */
648 virtual ~ElementTime() {}
651 protected:
653 TimeList beginTime;
654 TimeList endTime;
655 double dur;
656 unsigned short restart;
657 unsigned short fill;
658 double repeatCount;
659 double repeatDur;
662 };
665 /*#########################################################################
666 ## ElementTimeManipulation
667 #########################################################################*/
669 /**
670 *
671 */
672 class ElementTimeManipulation
673 {
674 public:
676 /**
677 *
678 */
679 virtual double getSpeed()
680 { return speed; }
681 /**
682 *
683 */
684 virtual void setSpeed(double val) throw (dom::DOMException)
685 { speed = val; }
686 /**
687 *
688 */
689 virtual double getAccelerate()
690 { return accelerate; }
692 /**
693 *
694 */
695 virtual void setAccelerate(double val) throw (dom::DOMException)
696 { accelerate = val; }
698 /**
699 *
700 */
701 virtual double getDecelerate()
702 { return decelerate; }
704 /**
705 *
706 */
707 virtual void setDecelerate(double val) throw (dom::DOMException)
708 { decelerate = val; }
710 /**
711 *
712 */
713 virtual bool getAutoReverse()
714 { return autoReverse; }
716 /**
717 *
718 */
719 virtual void setAutoReverse(bool val) throw (dom::DOMException)
720 { autoReverse = val; }
723 //##################
724 //# Non-API methods
725 //##################
727 /**
728 *
729 */
730 ElementTimeManipulation()
731 {
732 speed = 0.0;
733 accelerate = 0.0;
734 decelerate = 0.0;
735 autoReverse = false;
736 }
738 /**
739 *
740 */
741 ElementTimeManipulation(const ElementTimeManipulation &other)
742 {
743 speed = other.speed;
744 accelerate = other.accelerate;
745 decelerate = other.decelerate;
746 autoReverse = other.autoReverse;
747 }
749 /**
750 *
751 */
752 virtual ~ElementTimeManipulation() {}
755 protected:
757 double speed;
758 double accelerate;
759 double decelerate;
760 bool autoReverse;
762 };
765 /*#########################################################################
766 ## ElementTimeContainer
767 #########################################################################*/
769 /**
770 *
771 */
772 class ElementTimeContainer : public ElementTime
773 {
774 public:
777 /**
778 *
779 */
780 virtual NodeList getTimeChildren()
781 {
782 NodeList list;
783 return list;
784 }
786 /**
787 *
788 */
789 virtual NodeList getActiveChildrenAt(double instant)
790 {
791 NodeList list;
792 return list;
793 }
795 //##################
796 //# Non-API methods
797 //##################
799 /**
800 *
801 */
802 ElementTimeContainer() {}
804 /**
805 *
806 */
807 ElementTimeContainer(const ElementTimeContainer &other) : ElementTime(other)
808 {
809 }
811 /**
812 *
813 */
814 virtual ~ElementTimeContainer() {}
816 protected:
819 };
822 /*#########################################################################
823 ## ElementSyncBehavior
824 #########################################################################*/
826 /**
827 *
828 */
829 class ElementSyncBehavior
830 {
831 public:
833 /**
834 *
835 */
836 virtual DOMString getSyncBehavior()
837 { return syncBehavior; }
839 /**
840 *
841 */
842 virtual double getSyncTolerance()
843 { return syncTolerance; }
845 /**
846 *
847 */
848 virtual DOMString getDefaultSyncBehavior()
849 { return defaultSyncBehavior; }
851 /**
852 *
853 */
854 virtual double getDefaultSyncTolerance()
855 { return defaultSyncTolerance; }
857 /**
858 *
859 */
860 virtual bool getSyncMaster()
861 { return syncMaster; }
863 //##################
864 //# Non-API methods
865 //##################
867 /**
868 *
869 */
870 ElementSyncBehavior()
871 {
872 syncBehavior = "";
873 syncTolerance = 0.0;
874 defaultSyncBehavior = "";
875 defaultSyncTolerance = 0.0;
876 syncMaster = false;
877 }
879 /**
880 *
881 */
882 ElementSyncBehavior(const ElementSyncBehavior &other)
883 {
884 syncBehavior = other.syncBehavior;
885 syncTolerance = other.syncTolerance;
886 defaultSyncBehavior = other.defaultSyncBehavior;
887 defaultSyncTolerance = other.defaultSyncTolerance;
888 syncMaster = other.syncMaster;
889 }
891 /**
892 *
893 */
894 virtual ~ElementSyncBehavior() {}
896 protected:
898 DOMString syncBehavior;
899 double syncTolerance;
900 DOMString defaultSyncBehavior;
901 double defaultSyncTolerance;
902 bool syncMaster;
904 };
907 /*#########################################################################
908 ## ElementParallelTimeContainer
909 #########################################################################*/
911 /**
912 *
913 */
914 class ElementParallelTimeContainer : public ElementTimeContainer
915 {
916 public:
918 /**
919 *
920 */
921 virtual DOMString getEndSync()
922 { return endSync; }
924 /**
925 *
926 */
927 virtual void setEndSync(const DOMString &val) throw (dom::DOMException)
928 { endSync = val; }
930 /**
931 *
932 */
933 virtual double getImplicitDuration()
934 { return implicitDuration; }
936 //##################
937 //# Non-API methods
938 //##################
940 /**
941 *
942 */
943 ElementParallelTimeContainer()
944 {
945 endSync = "";
946 implicitDuration = 0.0;
947 }
949 /**
950 *
951 */
952 ElementParallelTimeContainer(const ElementParallelTimeContainer &other)
953 : ElementTimeContainer(other)
954 {
955 endSync = other.endSync;
956 implicitDuration = other.implicitDuration;
957 }
959 /**
960 *
961 */
962 virtual ~ElementParallelTimeContainer() {}
964 protected:
966 DOMString endSync;
967 double implicitDuration;
969 };
972 /*#########################################################################
973 ## ElementSequentialTimeContainer
974 #########################################################################*/
976 /**
977 *
978 */
979 class ElementSequentialTimeContainer : public ElementTimeContainer
980 {
981 public:
984 //##################
985 //# Non-API methods
986 //##################
988 /**
989 *
990 */
991 ElementSequentialTimeContainer() {}
993 /**
994 *
995 */
996 ElementSequentialTimeContainer(const ElementSequentialTimeContainer &other)
997 : ElementTimeContainer(other)
998 {
999 }
1001 /**
1002 *
1003 */
1004 virtual ~ElementSequentialTimeContainer() {}
1007 };
1010 /*#########################################################################
1011 ## ElementExclusiveTimeContainer
1012 #########################################################################*/
1014 /**
1015 *
1016 */
1017 class ElementExclusiveTimeContainer : public ElementTimeContainer
1018 {
1019 public:
1021 /**
1022 *
1023 */
1024 virtual DOMString getEndSync()
1025 { return endSync; }
1027 /**
1028 *
1029 */
1030 virtual void setEndSync(const DOMString &val) throw (dom::DOMException)
1031 { endSync = val; }
1033 /**
1034 *
1035 */
1036 virtual NodeList getPausedElements()
1037 { return pausedElements; }
1039 //##################
1040 //# Non-API methods
1041 //##################
1043 /**
1044 *
1045 */
1046 ElementExclusiveTimeContainer() {}
1048 /**
1049 *
1050 */
1051 ElementExclusiveTimeContainer(const ElementExclusiveTimeContainer &other)
1052 : ElementTimeContainer(other)
1053 {
1054 endSync = other.endSync;
1055 pausedElements = other.pausedElements;
1056 }
1058 /**
1059 *
1060 */
1061 virtual ~ElementExclusiveTimeContainer() {}
1063 protected:
1065 DOMString endSync;
1066 NodeList pausedElements;
1069 };
1072 /*#########################################################################
1073 ## ElementTimeControl
1074 #########################################################################*/
1076 /**
1077 *
1078 */
1079 class ElementTimeControl
1080 {
1081 public:
1083 /**
1084 *
1085 */
1086 virtual bool beginElement() throw(dom::DOMException)
1087 {
1088 return true;
1089 }
1091 /**
1092 *
1093 */
1094 virtual bool beginElementAt(double offset) throw(dom::DOMException)
1095 {
1096 return true;
1097 }
1099 /**
1100 *
1101 */
1102 virtual bool endElement() throw(dom::DOMException)
1103 {
1104 return true;
1105 }
1107 /**
1108 *
1109 */
1110 virtual bool endElementAt(double offset) throw(dom::DOMException)
1111 {
1112 return true;
1113 }
1115 //##################
1116 //# Non-API methods
1117 //##################
1119 /**
1120 *
1121 */
1122 ElementTimeControl() {}
1124 /**
1125 *
1126 */
1127 ElementTimeControl(const ElementTimeControl &other)
1128 {
1129 }
1131 /**
1132 *
1133 */
1134 virtual ~ElementTimeControl() {}
1137 };
1140 /*#########################################################################
1141 ## ElementTargetAttributes
1142 #########################################################################*/
1144 /**
1145 *
1146 */
1147 class ElementTargetAttributes
1148 {
1149 public:
1152 /**
1153 *
1154 */
1155 virtual DOMString getAttributeName()
1156 { return attributeName; }
1158 /**
1159 *
1160 */
1161 virtual void setAttributeName(const DOMString &val)
1162 { attributeName = val; }
1164 typedef enum
1165 {
1166 ATTRIBUTE_TYPE_AUTO = 0,
1167 ATTRIBUTE_TYPE_CSS = 1,
1168 ATTRIBUTE_TYPE_XML = 2
1169 } AttributeTypes;
1171 /**
1172 *
1173 */
1174 virtual unsigned short getAttributeType()
1175 { return attributeType; }
1177 /**
1178 *
1179 */
1180 virtual void setAttributeType(unsigned short val)
1181 { attributeType = val; }
1183 //##################
1184 //# Non-API methods
1185 //##################
1187 /**
1188 *
1189 */
1190 ElementTargetAttributes()
1191 {
1192 attributeName = "";
1193 attributeType = ATTRIBUTE_TYPE_AUTO;
1194 }
1196 /**
1197 *
1198 */
1199 ElementTargetAttributes(const ElementTargetAttributes &other)
1200 {
1201 attributeName = other.attributeName;
1202 attributeType = other.attributeType;
1203 }
1205 /**
1206 *
1207 */
1208 virtual ~ElementTargetAttributes() {}
1210 protected:
1212 DOMString attributeName;
1213 unsigned short attributeType;
1215 };
1218 /*#########################################################################
1219 ## ElementTest
1220 #########################################################################*/
1222 /**
1223 *
1224 */
1225 class ElementTest
1226 {
1227 public:
1230 /**
1231 *
1232 */
1233 virtual long getSystemBitrate()
1234 { return systemBitrate; }
1236 /**
1237 *
1238 */
1239 virtual void setSystemBitrate(long val) throw (dom::DOMException)
1240 { systemBitrate = val; }
1242 /**
1243 *
1244 */
1245 virtual bool getSystemCaptions()
1246 { return systemCaptions; }
1248 /**
1249 *
1250 */
1251 virtual void setSystemCaptions(bool val) throw (dom::DOMException)
1252 { systemCaptions = val; }
1254 /**
1255 *
1256 */
1257 virtual DOMString getSystemLanguage()
1258 { return systemLanguage; }
1260 /**
1261 *
1262 */
1263 virtual void setSystemLanguage(const DOMString &val) throw (dom::DOMException)
1264 { systemLanguage = val; }
1266 /**
1267 *
1268 */
1269 virtual bool getSystemRequired()
1270 { return systemRequired; }
1272 /**
1273 *
1274 */
1275 virtual bool getSystemScreenSize()
1276 { return systemScreenSize; }
1278 /**
1279 *
1280 */
1281 virtual bool getSystemScreenDepth()
1282 { return systemScreenDepth; }
1284 /**
1285 *
1286 */
1287 virtual DOMString getSystemOverdubOrSubtitle()
1288 { return systemOverdubOrSubtitle; }
1290 /**
1291 *
1292 */
1293 virtual void setSystemOverdubOrSubtitle(const DOMString &val) throw (dom::DOMException)
1294 { systemOverdubOrSubtitle = val; }
1296 /**
1297 *
1298 */
1299 virtual bool getSystemAudioDesc()
1300 { return systemBitrate; }
1302 /**
1303 *
1304 */
1305 virtual void setSystemAudioDesc(bool val) throw (dom::DOMException)
1306 { systemAudioDesc = val; }
1309 //##################
1310 //# Non-API methods
1311 //##################
1313 /**
1314 *
1315 */
1316 ElementTest()
1317 {
1318 systemBitrate = 0;
1319 systemCaptions = false;
1320 systemLanguage = "";
1321 systemRequired = false;
1322 systemScreenSize = false;
1323 systemScreenDepth = false;
1324 systemOverdubOrSubtitle = "";
1325 systemAudioDesc = false;
1326 }
1328 /**
1329 *
1330 */
1331 ElementTest(const ElementTest &other)
1332 {
1333 systemBitrate = other.systemBitrate;
1334 systemCaptions = other.systemCaptions;
1335 systemLanguage = other.systemLanguage;
1336 systemRequired = other.systemRequired;
1337 systemScreenSize = other.systemScreenSize;
1338 systemScreenDepth = other.systemScreenDepth;
1339 systemOverdubOrSubtitle = other.systemOverdubOrSubtitle;
1340 systemAudioDesc = other.systemAudioDesc;
1341 }
1343 /**
1344 *
1345 */
1346 virtual ~ElementTest() {}
1349 protected:
1352 long systemBitrate;
1353 bool systemCaptions;
1354 DOMString systemLanguage;
1355 bool systemRequired;
1356 bool systemScreenSize;
1357 bool systemScreenDepth;
1358 DOMString systemOverdubOrSubtitle;
1359 bool systemAudioDesc;
1360 };
1363 /*#########################################################################
1364 ## TimeEvent
1365 #########################################################################*/
1367 /**
1368 *
1369 */
1370 class TimeEvent : public events::Event
1371 {
1372 public:
1374 /**
1375 *
1376 */
1377 virtual views::View getView()
1378 { return view; }
1380 /**
1381 *
1382 */
1383 virtual long getDetail()
1384 { return detail; }
1386 /**
1387 *
1388 */
1389 virtual void initTimeEvent(const DOMString &typeArg,
1390 const views::View *viewArg,
1391 long detailArg)
1392 {
1393 }
1395 //##################
1396 //# Non-API methods
1397 //##################
1399 /**
1400 *
1401 */
1402 TimeEvent()
1403 {
1404 detail = 0;
1405 }
1407 /**
1408 *
1409 */
1410 TimeEvent(const TimeEvent &other) : events::Event(other)
1411 {
1412 view = other.view;
1413 detail = other.detail;
1414 }
1416 /**
1417 *
1418 */
1419 virtual ~TimeEvent() {}
1422 protected:
1424 views::View view;
1425 long detail;
1428 };
1433 /*#########################################################################
1434 ###########################################################################
1435 ## I N T E R F A C E T Y P E S
1436 ###########################################################################
1437 #########################################################################*/
1442 /*#########################################################################
1443 ## SMILDocument
1444 #########################################################################*/
1446 /**
1447 *
1448 */
1449 class SMILDocument : virtual public Document,
1450 public ElementSequentialTimeContainer
1451 {
1452 public:
1455 //##################
1456 //# Non-API methods
1457 //##################
1459 /**
1460 *
1461 */
1462 virtual ~SMILDocument() {}
1465 };
1468 /*#########################################################################
1469 ## SMILElement
1470 #########################################################################*/
1472 /**
1473 *
1474 */
1475 class SMILElement : virtual public Element
1476 {
1477 public:
1479 /**
1480 *
1481 */
1482 virtual DOMString getId() =0;
1484 /**
1485 *
1486 */
1487 virtual void setId(const DOMString &val) throw (dom::DOMException) =0;
1490 //##################
1491 //# Non-API methods
1492 //##################
1494 /**
1495 *
1496 */
1497 virtual ~SMILElement() {}
1500 };
1503 /*#########################################################################
1504 ## SMILLayoutElement
1505 #########################################################################*/
1507 /**
1508 *
1509 */
1510 class SMILLayoutElement : virtual public SMILElement
1511 {
1512 public:
1514 /**
1515 *
1516 */
1517 virtual DOMString getType() =0;
1519 /**
1520 *
1521 */
1522 virtual bool getResolved() =0;
1524 //##################
1525 //# Non-API methods
1526 //##################
1528 /**
1529 *
1530 */
1531 virtual ~SMILLayoutElement() {}
1534 };
1537 /*#########################################################################
1538 ## SMILTopLayoutElement
1539 #########################################################################*/
1541 /**
1542 *
1543 */
1544 class SMILTopLayoutElement : virtual public SMILElement,
1545 virtual public ElementLayout
1546 {
1547 public:
1550 //##################
1551 //# Non-API methods
1552 //##################
1554 /**
1555 *
1556 */
1557 virtual ~SMILTopLayoutElement() {}
1560 };
1563 /*#########################################################################
1564 ## SMILRootLayoutElement
1565 #########################################################################*/
1567 /**
1568 *
1569 */
1570 class SMILRootLayoutElement : virtual public SMILElement,
1571 virtual public ElementLayout
1572 {
1573 public:
1576 //##################
1577 //# Non-API methods
1578 //##################
1580 /**
1581 *
1582 */
1583 virtual ~SMILRootLayoutElement() {}
1586 };
1589 /*#########################################################################
1590 ## SMILRegionElement
1591 #########################################################################*/
1593 /**
1594 *
1595 */
1596 class SMILRegionElement : virtual public SMILElement,
1597 virtual public ElementLayout
1598 {
1599 public:
1602 /**
1603 *
1604 */
1605 virtual DOMString getFit() =0;
1607 /**
1608 *
1609 */
1610 virtual void setFit(const DOMString &val) throw (dom::DOMException) =0;
1612 /**
1613 *
1614 */
1615 virtual DOMString getTop() =0;
1617 /**
1618 *
1619 */
1620 virtual void setTop(const DOMString &val) throw (dom::DOMException) =0;
1622 /**
1623 *
1624 */
1625 virtual long getZIndex() =0;
1627 /**
1628 *
1629 */
1630 virtual void setZIndex(long val) throw (dom::DOMException) =0;
1633 //##################
1634 //# Non-API methods
1635 //##################
1637 /**
1638 *
1639 */
1640 virtual ~SMILRegionElement() {}
1643 };
1647 /*#########################################################################
1648 ## SMILMediaElement
1649 #########################################################################*/
1651 /**
1652 *
1653 */
1654 class SMILMediaElement : virtual public ElementTime,
1655 virtual public SMILElement
1656 {
1657 public:
1660 /**
1661 *
1662 */
1663 virtual DOMString getAbstractAttr() =0;
1665 /**
1666 *
1667 */
1668 virtual void setAbstractAttr(const DOMString &val) throw (dom::DOMException) =0;
1670 /**
1671 *
1672 */
1673 virtual DOMString getAlt() =0;
1675 /**
1676 *
1677 */
1678 virtual void setAlt(const DOMString &val) throw (dom::DOMException) =0;
1680 /**
1681 *
1682 */
1683 virtual DOMString getAuthor() =0;
1685 /**
1686 *
1687 */
1688 virtual void setAuthor(const DOMString &val) throw (dom::DOMException) =0;
1690 /**
1691 *
1692 */
1693 virtual DOMString getClipBegin() =0;
1695 /**
1696 *
1697 */
1698 virtual void setClipBegin(const DOMString &val) throw (dom::DOMException) =0;
1700 /**
1701 *
1702 */
1703 virtual DOMString getClipEnd() =0;
1705 /**
1706 *
1707 */
1708 virtual void setClipEnd(const DOMString &val) throw (dom::DOMException) =0;
1710 /**
1711 *
1712 */
1713 virtual DOMString getCopyright() =0;
1715 /**
1716 *
1717 */
1718 virtual void setCopyright(const DOMString &val) throw (dom::DOMException) =0;
1720 /**
1721 *
1722 */
1723 virtual DOMString getLongdesc() =0;
1725 /**
1726 *
1727 */
1728 virtual void setLongdesc(const DOMString &val) throw (dom::DOMException) =0;
1730 /**
1731 *
1732 */
1733 virtual DOMString getPort() =0;
1735 /**
1736 *
1737 */
1738 virtual void setPort(const DOMString &val) throw (dom::DOMException) =0;
1740 /**
1741 *
1742 */
1743 virtual DOMString getReadIndex() =0;
1745 /**
1746 *
1747 */
1748 virtual void setReadIndex(const DOMString &val) throw (dom::DOMException) =0;
1750 /**
1751 *
1752 */
1753 virtual DOMString getRtpformat() =0;
1755 /**
1756 *
1757 */
1758 virtual void setRtpformat(const DOMString &val) throw (dom::DOMException) =0;
1760 /**
1761 *
1762 */
1763 virtual DOMString getSrc() =0;
1765 /**
1766 *
1767 */
1768 virtual void setSrc(const DOMString &val) throw (dom::DOMException) =0;
1770 /**
1771 *
1772 */
1773 virtual DOMString getStripRepeat() =0;
1775 /**
1776 *
1777 */
1778 virtual void setStripRepeat(const DOMString &val) throw (dom::DOMException) =0;
1780 /**
1781 *
1782 */
1783 virtual DOMString getTitle() =0;
1785 /**
1786 *
1787 */
1788 virtual void setTitle(const DOMString &val) throw (dom::DOMException) =0;
1790 /**
1791 *
1792 */
1793 virtual DOMString getTransport() =0;
1795 /**
1796 *
1797 */
1798 virtual void setTransport(const DOMString &val) throw (dom::DOMException) =0;
1800 /**
1801 *
1802 */
1803 virtual DOMString getType() =0;
1805 /**
1806 *
1807 */
1808 virtual void setType(const DOMString &val) throw (dom::DOMException) =0;
1812 //##################
1813 //# Non-API methods
1814 //##################
1816 /**
1817 *
1818 */
1819 virtual ~SMILMediaElement() {}
1822 };
1825 /*#########################################################################
1826 ## SMILRefElement
1827 #########################################################################*/
1829 /**
1830 *
1831 */
1832 class SMILRefElement : virtual public SMILMediaElement
1833 {
1834 public:
1837 //##################
1838 //# Non-API methods
1839 //##################
1841 /**
1842 *
1843 */
1844 virtual ~SMILRefElement() {}
1847 };
1850 /*#########################################################################
1851 ## SMILAnimation
1852 #########################################################################*/
1854 /**
1855 *
1856 */
1857 class SMILAnimation : virtual public SMILElement,
1858 virtual public ElementTargetAttributes,
1859 virtual public ElementTime,
1860 virtual public ElementTimeControl
1861 {
1862 public:
1864 typedef enum
1865 {
1866 ADDITIVE_REPLACE = 0,
1867 ADDITIVE_SUM = 1
1868 } AdditiveTypes;
1871 /**
1872 *
1873 */
1874 virtual unsigned short getAdditive() =0;
1876 /**
1877 *
1878 */
1879 virtual void setAdditive(unsigned short val) throw (dom::DOMException)=0;
1881 typedef enum
1882 {
1883 ACCUMULATE_NONE = 0,
1884 ACCUMULATE_SUM = 1
1885 } AccumulateTypes;
1888 /**
1889 *
1890 */
1891 virtual unsigned short getAccumulate() =0;
1893 /**
1894 *
1895 */
1896 virtual void setAccumulate(unsigned short val) throw (dom::DOMException)=0;
1898 typedef enum
1899 {
1900 CALCMODE_DISCRETE = 0,
1901 CALCMODE_LINEAR = 1,
1902 CALCMODE_PACED = 2,
1903 CALCMODE_SPLINE = 3
1904 } CalcModeTypes;
1907 /**
1908 *
1909 */
1910 virtual unsigned short getCalcMode() =0;
1912 /**
1913 *
1914 */
1915 virtual void setCalcMode(unsigned short val) throw (dom::DOMException)=0;
1917 /**
1918 *
1919 */
1920 virtual DOMString getKeySplines() =0;
1922 /**
1923 *
1924 */
1925 virtual void setKeySplines(const DOMString &val) throw (dom::DOMException)=0;
1927 /**
1928 *
1929 */
1930 virtual TimeList getKeyTimes() =0;
1932 /**
1933 *
1934 */
1935 virtual void setKeyTimes(const TimeList &val) throw (dom::DOMException)=0;
1937 /**
1938 *
1939 */
1940 virtual DOMString getValues() =0;
1942 /**
1943 *
1944 */
1945 virtual void setValues(const DOMString &val) throw (dom::DOMException)=0;
1947 /**
1948 *
1949 */
1950 virtual DOMString getFrom() =0;
1952 /**
1953 *
1954 */
1955 virtual void setFrom(const DOMString &val) throw (dom::DOMException)=0;
1957 /**
1958 *
1959 */
1960 virtual DOMString getTo() =0;
1962 /**
1963 *
1964 */
1965 virtual void setTo(const DOMString &val) throw (dom::DOMException)=0;
1967 /**
1968 *
1969 */
1970 virtual DOMString getBy() =0;
1972 /**
1973 *
1974 */
1975 virtual void setBy(const DOMString &val) throw (dom::DOMException)=0;
1977 //##################
1978 //# Non-API methods
1979 //##################
1981 /**
1982 *
1983 */
1984 virtual ~SMILAnimation() {}
1987 };
1990 /*#########################################################################
1991 ## SMILAnimateElement
1992 #########################################################################*/
1994 /**
1995 *
1996 */
1997 class SMILAnimateElement : virtual public SMILAnimation
1998 {
1999 public:
2002 //##################
2003 //# Non-API methods
2004 //##################
2006 /**
2007 *
2008 */
2009 virtual ~SMILAnimateElement() {}
2012 };
2015 /*#########################################################################
2016 ## SMILSetElement
2017 #########################################################################*/
2019 /**
2020 *
2021 */
2022 class SMILSetElement : virtual public ElementTimeControl,
2023 virtual public ElementTime,
2024 virtual public ElementTargetAttributes,
2025 virtual public SMILElement
2026 {
2027 public:
2029 /**
2030 *
2031 */
2032 virtual DOMString getTo() =0;
2034 /**
2035 *
2036 */
2037 virtual void setTo(const DOMString &val) =0;
2039 //##################
2040 //# Non-API methods
2041 //##################
2043 /**
2044 *
2045 */
2046 virtual ~SMILSetElement() {}
2049 };
2052 /*#########################################################################
2053 ## SMILAnimateMotionElement
2054 #########################################################################*/
2056 /**
2057 *
2058 */
2059 class SMILAnimateMotionElement : virtual public SMILAnimateElement
2060 {
2061 public:
2063 /**
2064 *
2065 */
2066 virtual DOMString getPath() =0;
2068 /**
2069 *
2070 */
2071 virtual void setPath(const DOMString &val) throw(dom::DOMException) =0;
2073 /**
2074 *
2075 */
2076 virtual DOMString getOrigin() =0;
2078 /**
2079 *
2080 */
2081 virtual void setOrigin(const DOMString &val) throw(dom::DOMException) =0;
2084 //##################
2085 //# Non-API methods
2086 //##################
2088 /**
2089 *
2090 */
2091 virtual ~SMILAnimateMotionElement() {}
2094 };
2097 /*#########################################################################
2098 ## SMILAnimateColorElement
2099 #########################################################################*/
2101 /**
2102 *
2103 */
2104 class SMILAnimateColorElement : virtual public SMILAnimation
2105 {
2106 public:
2109 //##################
2110 //# Non-API methods
2111 //##################
2113 /**
2114 *
2115 */
2116 virtual ~SMILAnimateColorElement() {}
2119 };
2125 /*#########################################################################
2126 ## SMILSwitchElement
2127 #########################################################################*/
2129 /**
2130 *
2131 */
2132 class SMILSwitchElement : virtual public SMILElement
2133 {
2134 public:
2136 /**
2137 *
2138 */
2139 virtual Element *getSelectedElement() =0;
2141 //##################
2142 //# Non-API methods
2143 //##################
2145 /**
2146 *
2147 */
2148 virtual ~SMILSwitchElement() {}
2151 };
2157 } //namespace smil
2158 } //namespace dom
2159 } //namespace w3c
2160 } //namespace org
2162 #endif /* __SMIL_H__ */
2164 /*#########################################################################
2165 ## E N D O F F I L E
2166 #########################################################################*/