|
|
@ -680,7 +680,7 @@ bool CalculatedSizer::applyRegPoints (Node * node, Single w, Single h,
|
|
|
|
node = SMIL::Smil::findSmilNode (node);
|
|
|
|
node = SMIL::Smil::findSmilNode (node);
|
|
|
|
if (!node)
|
|
|
|
if (!node)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
node = static_cast <SMIL::Smil *> (node)->tqlayout_node.ptr ();
|
|
|
|
node = static_cast <SMIL::Smil *> (node)->layout_node.ptr ();
|
|
|
|
if (!node)
|
|
|
|
if (!node)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
NodePtr c = node->firstChild ();
|
|
|
|
NodePtr c = node->firstChild ();
|
|
|
@ -1611,7 +1611,7 @@ KDE_NO_EXPORT void SMIL::Smil::activate () {
|
|
|
|
//kdDebug () << "Smil::activate" << endl;
|
|
|
|
//kdDebug () << "Smil::activate" << endl;
|
|
|
|
current_av_media_type = NodePtr ();
|
|
|
|
current_av_media_type = NodePtr ();
|
|
|
|
resolved = true;
|
|
|
|
resolved = true;
|
|
|
|
SMIL::Layout * tqlayout = convertNode <SMIL::Layout> (tqlayout_node);
|
|
|
|
SMIL::Layout * tqlayout = convertNode <SMIL::Layout> (layout_node);
|
|
|
|
if (tqlayout && tqlayout->region_surface) {
|
|
|
|
if (tqlayout && tqlayout->region_surface) {
|
|
|
|
kdError() << "Layout already has a surface" << endl;
|
|
|
|
kdError() << "Layout already has a surface" << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1622,16 +1622,16 @@ KDE_NO_EXPORT void SMIL::Smil::activate () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::deactivate () {
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::deactivate () {
|
|
|
|
if (tqlayout_node)
|
|
|
|
if (layout_node)
|
|
|
|
convertNode <SMIL::Layout> (tqlayout_node)->tqrepaint ();
|
|
|
|
convertNode <SMIL::Layout> (layout_node)->tqrepaint ();
|
|
|
|
if (tqlayout_node)
|
|
|
|
if (layout_node)
|
|
|
|
convertNode <SMIL::Layout> (tqlayout_node)->region_surface = NULL;
|
|
|
|
convertNode <SMIL::Layout> (layout_node)->region_surface = NULL;
|
|
|
|
Mrl::getSurface(0L);
|
|
|
|
Mrl::getSurface(0L);
|
|
|
|
Mrl::deactivate ();
|
|
|
|
Mrl::deactivate ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT bool SMIL::Smil::handleEvent (EventPtr event) {
|
|
|
|
KDE_NO_EXPORT bool SMIL::Smil::handleEvent (EventPtr event) {
|
|
|
|
return tqlayout_node ? tqlayout_node->handleEvent (event) : false;
|
|
|
|
return layout_node ? layout_node->handleEvent (event) : false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::closed () {
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::closed () {
|
|
|
@ -1650,7 +1650,7 @@ KDE_NO_EXPORT void SMIL::Smil::closed () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (NodePtr e = head->firstChild (); e; e = e->nextSibling ()) {
|
|
|
|
for (NodePtr e = head->firstChild (); e; e = e->nextSibling ()) {
|
|
|
|
if (e->id == id_node_layout) {
|
|
|
|
if (e->id == id_node_layout) {
|
|
|
|
tqlayout_node = e;
|
|
|
|
layout_node = e;
|
|
|
|
} else if (e->id == id_node_title) {
|
|
|
|
} else if (e->id == id_node_title) {
|
|
|
|
TQString str = e->innerText ();
|
|
|
|
TQString str = e->innerText ();
|
|
|
|
pretty_name = str.left (str.tqfind (TQChar ('\n')));
|
|
|
|
pretty_name = str.left (str.tqfind (TQChar ('\n')));
|
|
|
@ -1663,7 +1663,7 @@ KDE_NO_EXPORT void SMIL::Smil::closed () {
|
|
|
|
src = elm->getAttribute ("content");
|
|
|
|
src = elm->getAttribute ("content");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!tqlayout_node) {
|
|
|
|
if (!layout_node) {
|
|
|
|
kdError () << "no <root-tqlayout>" << endl;
|
|
|
|
kdError () << "no <root-tqlayout>" << endl;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1692,8 +1692,8 @@ KDE_NO_EXPORT bool SMIL::Smil::expose () const {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::accept (Visitor * v) {
|
|
|
|
KDE_NO_EXPORT void SMIL::Smil::accept (Visitor * v) {
|
|
|
|
if (active () && tqlayout_node)
|
|
|
|
if (active () && layout_node)
|
|
|
|
tqlayout_node->accept( v );
|
|
|
|
layout_node->accept( v );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SMIL::Smil::jump (const TQString & id) {
|
|
|
|
void SMIL::Smil::jump (const TQString & id) {
|
|
|
@ -1702,7 +1702,7 @@ void SMIL::Smil::jump (const TQString & id) {
|
|
|
|
if (n->unfinished ())
|
|
|
|
if (n->unfinished ())
|
|
|
|
kdDebug() << "Smil::jump node is unfinished " << id << endl;
|
|
|
|
kdDebug() << "Smil::jump node is unfinished " << id << endl;
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
for (NodePtr p = n; p; p = p->tqparentNode ()) {
|
|
|
|
for (NodePtr p = n; p; p = p->parentNode ()) {
|
|
|
|
if (p->unfinished () &&
|
|
|
|
if (p->unfinished () &&
|
|
|
|
p->id >= id_node_first_group &&
|
|
|
|
p->id >= id_node_first_group &&
|
|
|
|
p->id <= id_node_last_group) {
|
|
|
|
p->id <= id_node_last_group) {
|
|
|
@ -1719,7 +1719,7 @@ void SMIL::Smil::jump (const TQString & id) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SMIL::Smil * SMIL::Smil::findSmilNode (Node * node) {
|
|
|
|
SMIL::Smil * SMIL::Smil::findSmilNode (Node * node) {
|
|
|
|
for (Node * e = node; e; e = e->tqparentNode ().ptr ())
|
|
|
|
for (Node * e = node; e; e = e->parentNode ().ptr ())
|
|
|
|
if (e->id == SMIL::id_node_smil)
|
|
|
|
if (e->id == SMIL::id_node_smil)
|
|
|
|
return static_cast <SMIL::Smil *> (e);
|
|
|
|
return static_cast <SMIL::Smil *> (e);
|
|
|
|
return 0L;
|
|
|
|
return 0L;
|
|
|
@ -1950,7 +1950,7 @@ KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () {
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () {
|
|
|
|
KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () {
|
|
|
|
// if there is a region_surface and it's moved, do a limit tqrepaint
|
|
|
|
// if there is a region_surface and it's moved, do a limit tqrepaint
|
|
|
|
NodePtr p = tqparentNode ();
|
|
|
|
NodePtr p = parentNode ();
|
|
|
|
if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) &&
|
|
|
|
if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) &&
|
|
|
|
region_surface) {
|
|
|
|
region_surface) {
|
|
|
|
RegionBase *pr = convertNode <SMIL::RegionBase> (p);
|
|
|
|
RegionBase *pr = convertNode <SMIL::RegionBase> (p);
|
|
|
@ -1964,7 +1964,7 @@ KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () {
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () {
|
|
|
|
KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () {
|
|
|
|
if (!region_surface) {
|
|
|
|
if (!region_surface) {
|
|
|
|
Node *n = tqparentNode ().ptr ();
|
|
|
|
Node *n = parentNode ().ptr ();
|
|
|
|
if (n &&
|
|
|
|
if (n &&
|
|
|
|
(SMIL::id_node_region == n->id ||
|
|
|
|
(SMIL::id_node_region == n->id ||
|
|
|
|
SMIL::id_node_layout == n->id)) {
|
|
|
|
SMIL::id_node_layout == n->id)) {
|
|
|
@ -2005,7 +2005,7 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
|
|
|
|
return; // smart update of old bounds to new moved one
|
|
|
|
return; // smart update of old bounds to new moved one
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NodePtr p = tqparentNode ();
|
|
|
|
NodePtr p = parentNode ();
|
|
|
|
if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout))
|
|
|
|
if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout))
|
|
|
|
convertNode <SMIL::RegionBase> (p)->updateDimensions ();
|
|
|
|
convertNode <SMIL::RegionBase> (p)->updateDimensions ();
|
|
|
|
rect = rect.unite (SRect (x, y, w, h));
|
|
|
|
rect = rect.unite (SRect (x, y, w, h));
|
|
|
@ -2023,7 +2023,7 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
|
|
|
|
if (s) {
|
|
|
|
if (s) {
|
|
|
|
killWGet ();
|
|
|
|
killWGet ();
|
|
|
|
need_tqrepaint = !cached_img.isEmpty ();
|
|
|
|
need_tqrepaint = !cached_img.isEmpty ();
|
|
|
|
Mrl *mrl = s->tqparentNode () ? s->tqparentNode ()->mrl () : NULL;
|
|
|
|
Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL;
|
|
|
|
TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val;
|
|
|
|
TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val;
|
|
|
|
cached_img.setUrl (url);
|
|
|
|
cached_img.setUrl (url);
|
|
|
|
if (cached_img.isEmpty ()) {
|
|
|
|
if (cached_img.isEmpty ()) {
|
|
|
@ -2034,8 +2034,8 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (need_tqrepaint && active () && surface() && region_surface->tqparentNode ())
|
|
|
|
if (need_tqrepaint && active () && surface() && region_surface->parentNode ())
|
|
|
|
region_surface->tqparentNode ()->tqrepaint (rect);
|
|
|
|
region_surface->parentNode ()->tqrepaint (rect);
|
|
|
|
Element::parseParam (name, val);
|
|
|
|
Element::parseParam (name, val);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2389,11 +2389,11 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) {
|
|
|
|
TimedMrl * tm = convertNode <SMIL::TimedMrl> (n);
|
|
|
|
TimedMrl * tm = convertNode <SMIL::TimedMrl> (n);
|
|
|
|
if (tm->runtime ()->timingstate == Runtime::timings_started)
|
|
|
|
if (tm->runtime ()->timingstate == Runtime::timings_started)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
Node *p = n->tqparentNode ();
|
|
|
|
Node *p = n->parentNode ();
|
|
|
|
Node *np = tm;
|
|
|
|
Node *np = tm;
|
|
|
|
while (p && id_node_body != p->id && !isTimedMrl (p)) {
|
|
|
|
while (p && id_node_body != p->id && !isTimedMrl (p)) {
|
|
|
|
np = p;
|
|
|
|
np = p;
|
|
|
|
p = p->tqparentNode ().ptr (); // skip anchors
|
|
|
|
p = p->parentNode ().ptr (); // skip anchors
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tm->m_runtime && p && p->active ()) {
|
|
|
|
if (tm->m_runtime && p && p->active ()) {
|
|
|
|
if (tm->runtime ()->timingstate == Runtime::timings_stopped)
|
|
|
|
if (tm->runtime ()->timingstate == Runtime::timings_stopped)
|
|
|
@ -2427,7 +2427,7 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) {
|
|
|
|
KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) {
|
|
|
|
for (NodePtr p = n->tqparentNode (); p; p = p->tqparentNode ())
|
|
|
|
for (NodePtr p = n->parentNode (); p; p = p->parentNode ())
|
|
|
|
if (isTimedMrl (p)) {
|
|
|
|
if (isTimedMrl (p)) {
|
|
|
|
SMIL::TimedMrl * tm = convertNode<SMIL::TimedMrl>(p);
|
|
|
|
SMIL::TimedMrl * tm = convertNode<SMIL::TimedMrl>(p);
|
|
|
|
if (tm->fill_def != fill_inherit)
|
|
|
|
if (tm->fill_def != fill_inherit)
|
|
|
@ -2476,7 +2476,7 @@ KDE_NO_EXPORT void SMIL::GroupBase::setJumpNode (NodePtr n) {
|
|
|
|
for (NodePtr c = firstChild (); c; c = c->nextSibling ())
|
|
|
|
for (NodePtr c = firstChild (); c; c = c->nextSibling ())
|
|
|
|
if (c->active ())
|
|
|
|
if (c->active ())
|
|
|
|
c->reset ();
|
|
|
|
c->reset ();
|
|
|
|
for (NodePtr c = n->tqparentNode (); c; c = c->tqparentNode ()) {
|
|
|
|
for (NodePtr c = n->parentNode (); c; c = c->parentNode ()) {
|
|
|
|
if (c.ptr () == this || c->id == id_node_body)
|
|
|
|
if (c.ptr () == this || c->id == id_node_body)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
if (c->id >= id_node_first_group && c->id <= id_node_last_group)
|
|
|
|
if (c->id >= id_node_first_group && c->id <= id_node_last_group)
|
|
|
@ -2746,11 +2746,11 @@ KDE_NO_CDTOR_EXPORT SMIL::Area::~Area () {
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::Area::activate () {
|
|
|
|
KDE_NO_EXPORT void SMIL::Area::activate () {
|
|
|
|
init ();
|
|
|
|
init ();
|
|
|
|
if (tqparentNode () &&
|
|
|
|
if (parentNode () &&
|
|
|
|
tqparentNode ()->id >= id_node_first_mediatype &&
|
|
|
|
parentNode ()->id >= id_node_first_mediatype &&
|
|
|
|
tqparentNode ()->id <= id_node_last_mediatype) {
|
|
|
|
parentNode ()->id <= id_node_last_mediatype) {
|
|
|
|
mediatype_activated = tqparentNode ()->connectTo (this, event_activated);
|
|
|
|
mediatype_activated = parentNode ()->connectTo (this, event_activated);
|
|
|
|
mediatype_attach = tqparentNode ()->connectTo (this, mediatype_attached);
|
|
|
|
mediatype_attach = parentNode ()->connectTo (this, mediatype_attached);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Element::activate ();
|
|
|
|
Element::activate ();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2906,9 +2906,9 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT void SMIL::MediaType::begin () {
|
|
|
|
KDE_NO_EXPORT void SMIL::MediaType::begin () {
|
|
|
|
SMIL::Smil * s = Smil::findSmilNode (tqparentNode ().ptr ());
|
|
|
|
SMIL::Smil * s = Smil::findSmilNode (parentNode ().ptr ());
|
|
|
|
SMIL::Region * r = s ?
|
|
|
|
SMIL::Region * r = s ?
|
|
|
|
findRegion (s->tqlayout_node, param (StringPool::attr_region)) : 0L;
|
|
|
|
findRegion (s->layout_node, param (StringPool::attr_region)) : 0L;
|
|
|
|
MediaTypeRuntime *tr = static_cast<MediaTypeRuntime*>(runtime ());
|
|
|
|
MediaTypeRuntime *tr = static_cast<MediaTypeRuntime*>(runtime ());
|
|
|
|
if (trans_timer) // eg transOut and we're repeating
|
|
|
|
if (trans_timer) // eg transOut and we're repeating
|
|
|
|
document ()->cancelTimer (trans_timer);
|
|
|
|
document ()->cancelTimer (trans_timer);
|
|
|
@ -3085,8 +3085,8 @@ bool SMIL::MediaType::handleEvent (EventPtr event) {
|
|
|
|
active_trans = NULL;
|
|
|
|
active_trans = NULL;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
te->interval = trans_step++ < trans_steps;
|
|
|
|
te->interval = trans_step++ < trans_steps;
|
|
|
|
if (s && s->tqparentNode())
|
|
|
|
if (s && s->parentNode())
|
|
|
|
s->tqparentNode()->tqrepaint (s->bounds);
|
|
|
|
s->parentNode()->tqrepaint (s->bounds);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else if (te->timer_info->event_id == trans_out_timer_id) {
|
|
|
|
} else if (te->timer_info->event_id == trans_out_timer_id) {
|
|
|
|
active_trans = trans_out;
|
|
|
|
active_trans = trans_out;
|
|
|
@ -3282,7 +3282,7 @@ KDE_NO_EXPORT bool SMIL::AnimateMotion::handleEvent (EventPtr event) {
|
|
|
|
KDE_NO_EXPORT void SMIL::Param::activate () {
|
|
|
|
KDE_NO_EXPORT void SMIL::Param::activate () {
|
|
|
|
setState (state_activated);
|
|
|
|
setState (state_activated);
|
|
|
|
TQString name = getAttribute (StringPool::attr_name);
|
|
|
|
TQString name = getAttribute (StringPool::attr_name);
|
|
|
|
Node * tqparent = tqparentNode ().ptr ();
|
|
|
|
Node * tqparent = parentNode ().ptr ();
|
|
|
|
if (!name.isEmpty () && tqparent && tqparent->isElementNode ())
|
|
|
|
if (!name.isEmpty () && tqparent && tqparent->isElementNode ())
|
|
|
|
static_cast<Element*>(tqparent)->setParam (name,
|
|
|
|
static_cast<Element*>(tqparent)->setParam (name,
|
|
|
|
getAttribute (StringPool::attr_value));
|
|
|
|
getAttribute (StringPool::attr_value));
|
|
|
|