diff --git a/coreengine/animation.c b/coreengine/animation.c index b3519de..a477eaf 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -14,7 +14,6 @@ cAnimation::cAnimation(cScrollable *scrollable) : cThread("scroller") { keepSleeping = false; doAnimation = true; modeIn = false; - doFlush = true; blinkFunc = -1; } @@ -28,7 +27,6 @@ cAnimation::cAnimation(cDetachable *detachable, bool wait, bool animation) : cTh keepSleeping = false; doAnimation = animation; modeIn = false; - doFlush = true; blinkFunc = -1; } @@ -42,11 +40,10 @@ cAnimation::cAnimation(cFadable *fadable, bool fadein) : cThread("fadable") { keepSleeping = false; doAnimation = true; modeIn = fadein; - doFlush = true; blinkFunc = -1; } -cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin, bool doFlush) : cThread("shiftable") { +cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin) : cThread("shiftable") { this->scrollable = NULL; this->detachable = NULL; this->fadable = NULL; @@ -58,7 +55,6 @@ cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool s modeIn = shiftin; shiftstart = start; shiftend = end; - this->doFlush = doFlush; blinkFunc = -1; } @@ -72,7 +68,6 @@ cAnimation::cAnimation(cBlinkable *blinkable, int func) : cThread("blinking") { keepSleeping = false; doAnimation = true; modeIn = false; - doFlush = true; blinkFunc = func; } @@ -100,14 +95,19 @@ void cAnimation::Stop(bool deletePixmaps) { void cAnimation::Action(void) { if (scrollable) { Scroll(); + scrollable->UnregisterAnimation(); } else if (detachable) { Detach(); } else if (fadable) { Fade(); + fadable->UnregisterAnimation(); } else if (shiftable) { Shift(); + shiftable->UnregisterAnimation(); } else if (blinkable) { + blinkable->RegisterAnimation(); Blink(); + blinkable->UnregisterAnimation(); } } @@ -129,7 +129,8 @@ void cAnimation::Wait(void) { void cAnimation::Scroll(void) { int delay = scrollable->ScrollDelay(); Sleep(delay); - if (!Running()) return; + scrollable->RegisterAnimation(); + if (!Running()) return; eOrientation orientation = scrollable->ScrollOrientation(); int scrollTotal = 0; @@ -200,7 +201,7 @@ void cAnimation::Scroll(void) { scrollable->SetDrawPort(drawPortPoint); if (!Running()) return; - scrollable->Flush(); + scrollable->Flush(true); if (orientation == eOrientation::horizontal && !carriageReturn && (drawPortX == 0)) { scrollDelta *= -1; @@ -229,7 +230,7 @@ void cAnimation::Detach(void) { detachable->RenderDetached(); if (!Running()) return; if (!doAnimation) - detachable->Flush(); + detachable->Flush(false); if (!Running()) return; if (doAnimation) { detachable->StartAnimation(); @@ -253,12 +254,13 @@ void cAnimation::Fade(void) { if (delay > 0) Sleep(delay); } + fadable->RegisterAnimation(); while (Running() || !modeIn) { uint64_t now = cTimeMs::Now(); if (Running() || !modeIn) fadable->SetTransparency(transparency, !modeIn); if (Running() || !modeIn) - fadable->Flush(); + fadable->Flush(true); int delta = cTimeMs::Now() - now; if ((Running() || !modeIn) && (delta < frametime)) { Sleep(frametime - delta); @@ -266,10 +268,10 @@ void cAnimation::Fade(void) { if ((int)(now - start) > fadetime) { if ((Running() && modeIn) && transparency > 0) { fadable->SetTransparency(0); - fadable->Flush(); + fadable->Flush(true); } else if (!modeIn && transparency < 100) { fadable->SetTransparency(100, true); - fadable->Flush(); + fadable->Flush(true); } break; } @@ -322,7 +324,7 @@ void cAnimation::Shift(void) { if (delay > 0) Sleep(delay); } - + shiftable->RegisterAnimation(); shiftable->SetStartShifting(); uint64_t start = cTimeMs::Now(); bool finished = false; @@ -330,8 +332,8 @@ void cAnimation::Shift(void) { uint64_t now = cTimeMs::Now(); if (Running() || !modeIn) shiftable->SetPosition(pos, shiftend); - if ((Running() || !modeIn) && doFlush) - shiftable->Flush(); + if (Running() || !modeIn) + shiftable->Flush(true); int delta = cTimeMs::Now() - now; if ((Running() || !modeIn) && (delta < frametime)) { cCondWait::SleepMs(frametime - delta); @@ -340,7 +342,7 @@ void cAnimation::Shift(void) { finished = true; if ((Running() && modeIn) && pos != shiftend) { shiftable->SetPosition(shiftend, shiftend); - shiftable->Flush(); + shiftable->Flush(true); } break; } @@ -370,7 +372,7 @@ void cAnimation::Blink(void) { if (Running()) blinkable->DoBlink(blinkFunc, blinkOn); if (Running()) - blinkable->Flush(); + blinkable->Flush(true); blinkOn = !blinkOn; } } diff --git a/coreengine/animation.h b/coreengine/animation.h index 2147e8a..8679f59 100644 --- a/coreengine/animation.h +++ b/coreengine/animation.h @@ -24,7 +24,9 @@ public: virtual void StartScrolling(void) = 0; virtual void StopScrolling(void) = 0; virtual void SetDrawPort(cPoint &point) = 0; - virtual void Flush(void) = 0; + virtual void RegisterAnimation(void) = 0; + virtual void UnregisterAnimation(void) = 0; + virtual void Flush(bool animFlush) = 0; }; /****************************************************************** @@ -39,7 +41,9 @@ public: virtual void ParseDetached(void) = 0; virtual void RenderDetached(void) = 0; virtual void StartAnimation(void) = 0; - virtual void Flush(void) = 0; + virtual void RegisterAnimation(void) = 0; + virtual void UnregisterAnimation(void) = 0; + virtual void Flush(bool animFlush) = 0; }; /****************************************************************** @@ -54,7 +58,9 @@ public: virtual int Delay(void) = 0; virtual int FadeTime(void) = 0; virtual void SetTransparency(int transparency, bool force = false) = 0; - virtual void Flush(void) = 0; + virtual void RegisterAnimation(void) = 0; + virtual void UnregisterAnimation(void) = 0; + virtual void Flush(bool animFlush) = 0; }; /****************************************************************** @@ -72,7 +78,9 @@ public: virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false) = 0; virtual void SetStartShifting(void) = 0; virtual void SetEndShifting(void) = 0; - virtual void Flush(void) = 0; + virtual void RegisterAnimation(void) = 0; + virtual void UnregisterAnimation(void) = 0; + virtual void Flush(bool animFlush) = 0; }; /****************************************************************** @@ -85,7 +93,9 @@ protected: public: virtual int BlinkFreq(int func) = 0; virtual void DoBlink(int func, bool on) = 0; - virtual void Flush(void) = 0; + virtual void RegisterAnimation(void) = 0; + virtual void UnregisterAnimation(void) = 0; + virtual void Flush(bool animFlush) = 0; }; /****************************************************************** @@ -106,7 +116,6 @@ private: int blinkFunc; cPoint shiftstart; cPoint shiftend; - bool doFlush; void Sleep(int duration); void Wait(void); void Scroll(void); @@ -118,7 +127,7 @@ public: cAnimation(cScrollable *scrollable); cAnimation(cDetachable *detachable, bool wait, bool animation); cAnimation(cFadable *fadable, bool fadein); - cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin, bool doFlush = true); + cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin); cAnimation(cBlinkable *blinkable, int func); ~cAnimation(void); void WakeUp(void); diff --git a/coreengine/area.c b/coreengine/area.c index 2340c39..a2a9641 100644 --- a/coreengine/area.c +++ b/coreengine/area.c @@ -491,8 +491,11 @@ void cArea::Debug(bool full) { } } -void cArea::Flush(void) { - sdOsd->Flush(); +void cArea::Flush(bool animFlush) { + if (animFlush) + sdOsd->AnimatedFlush(); + else + sdOsd->Flush(); } /****************************************************************** * Private Functions @@ -570,6 +573,14 @@ void cArea::StopBlinkers(void) { blinkers.Clear(); } +void cArea::RegisterAnimation(void) { + sdOsd->AddAnimation(); +} + +void cArea::UnregisterAnimation(void) { + sdOsd->RemoveAnimation(); +} + /****************************************************************** * cAreaContainer ******************************************************************/ diff --git a/coreengine/area.h b/coreengine/area.h index 3f29742..f8d548d 100644 --- a/coreengine/area.h +++ b/coreengine/area.h @@ -133,9 +133,11 @@ public: void DoBlink(int func, bool on); void StopBlinkers(void); //Common + void RegisterAnimation(void); + void UnregisterAnimation(void); const char *Name(void) { return attribs->Name(); }; bool BackgroundArea(void) { return attribs->BackgroundArea(); }; - void Flush(void); + void Flush(bool animFlush); void Debug(bool full = false); }; diff --git a/coreengine/osdwrapper.c b/coreengine/osdwrapper.c index 011ffc8..0bd1e01 100644 --- a/coreengine/osdwrapper.c +++ b/coreengine/osdwrapper.c @@ -3,6 +3,8 @@ cSdOsd::cSdOsd(void) { osd = NULL; flushLocked = false; + animsRunning = 0; + animsFlushed = 0; } cSdOsd::~cSdOsd(void) { @@ -48,6 +50,10 @@ void cSdOsd::DeleteOsd(void) { delete osd; osd = NULL; Unlock(); + animsRunningMutex.Lock(); + animsRunning = 0; + animsFlushed = 0; + animsRunningMutex.Unlock(); } cPixmap *cSdOsd::CreatePixmap(int layer, cRect &viewPort, cRect &drawPort) { @@ -63,7 +69,33 @@ void cSdOsd::DestroyPixmap(cPixmap *pix) { } } -void cSdOsd::Flush(void) { - if (osd && !flushLocked) - osd->Flush(); +void cSdOsd::AddAnimation(void) { + animsRunningMutex.Lock(); + animsRunning++; + animsRunningMutex.Unlock(); +} + +void cSdOsd::RemoveAnimation(void) { + animsRunningMutex.Lock(); + animsRunning--; + animsRunningMutex.Unlock(); +} + +void cSdOsd::AnimatedFlush(void) { + if (osd && !flushLocked) { + animsRunningMutex.Lock(); + if (animsFlushed + 1 >= animsRunning) { + animsFlushed = 0; + osd->Flush(); + } else { + animsFlushed++; + } + animsRunningMutex.Unlock(); + } +} + +void cSdOsd::Flush(void) { + if (osd && !flushLocked) { + osd->Flush(); + } } diff --git a/coreengine/osdwrapper.h b/coreengine/osdwrapper.h index fce9fa0..47bb20f 100644 --- a/coreengine/osdwrapper.h +++ b/coreengine/osdwrapper.h @@ -9,6 +9,9 @@ private: cOsd *osd; cMutex mutex; bool flushLocked; + int animsRunning; + int animsFlushed; + cMutex animsRunningMutex; public: cSdOsd(void); virtual ~cSdOsd(void); @@ -20,6 +23,9 @@ public: void DeleteOsd(void); cPixmap *CreatePixmap(int layer, cRect &viewPort, cRect &drawPort); void DestroyPixmap(cPixmap *pix); + void AddAnimation(void); + void RemoveAnimation(void); + void AnimatedFlush(void); void Flush(void); }; diff --git a/coreengine/view.c b/coreengine/view.c index 48cded7..ae7cee5 100644 --- a/coreengine/view.c +++ b/coreengine/view.c @@ -160,8 +160,6 @@ void cView::PreCache(void) { for (int i=0; i < numViewElements; i++) { if (!viewElements[i]) continue; - if (FadeTime() > 0 || ShiftTime() > 0) - viewElements[i]->SetAnimatedView(); viewElements[i]->SetContainer(contX, contY, attribs->Width(), attribs->Height()); viewElements[i]->Cache(); } @@ -169,8 +167,6 @@ void cView::PreCache(void) { for (int i=0; i < numViewElements; i++) { if (!viewElementsHorizontal[i]) continue; - if (FadeTime() > 0 || ShiftTime() > 0) - viewElementsHorizontal[i]->SetAnimatedView(); viewElementsHorizontal[i]->SetContainer(contX, contY, attribs->Width(), attribs->Height()); viewElementsHorizontal[i]->Cache(); } @@ -278,7 +274,15 @@ void cView::SetPosition(cPoint &position, cPoint &reference, bool force) { } } -void cView::Flush(void) { +void cView::RegisterAnimation(void) { + sdOsd.AddAnimation(); +} + +void cView::UnregisterAnimation(void) { + sdOsd.RemoveAnimation(); +} + +void cView::Flush(bool animFlush) { if (init) { init = false; StartAnimation(); @@ -292,7 +296,10 @@ void cView::Flush(void) { WakeViewElements(); menuInit = false; } - sdOsd.Flush(); + if (animFlush) + sdOsd.AnimatedFlush(); + else + sdOsd.Flush(); } void cView::Debug(void) { diff --git a/coreengine/view.h b/coreengine/view.h index 623dd08..efdd351 100644 --- a/coreengine/view.h +++ b/coreengine/view.h @@ -78,7 +78,7 @@ public: void Clear(int ve, bool forceClearBackground = false); void Render(int ve, bool force = false); virtual void Close(void); - virtual void Flush(void); + virtual void Flush(bool animFlush); virtual void Debug(void); bool Detached(void) { return false; }; int Delay(void) { return 0; }; @@ -91,6 +91,8 @@ public: virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false); void SetStartShifting(void) { shifting = true; }; void SetEndShifting(void) { shifting = false; }; + void RegisterAnimation(void); + void UnregisterAnimation(void); }; #endif //__VIEW_H diff --git a/coreengine/viewdisplaychannel.c b/coreengine/viewdisplaychannel.c index ef8f496..38c444f 100644 --- a/coreengine/viewdisplaychannel.c +++ b/coreengine/viewdisplaychannel.c @@ -166,7 +166,7 @@ void cViewChannel::SetMessage(eMessageType type, const char *text) { } } -void cViewChannel::Flush(void) { +void cViewChannel::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); Render((int)eVeDisplayChannel::background); @@ -198,6 +198,6 @@ void cViewChannel::Flush(void) { Render((int)eVeDisplayChannel::time); } channelChange = false; - cView::Flush(); + cView::Flush(animFlush); } diff --git a/coreengine/viewdisplaychannel.h b/coreengine/viewdisplaychannel.h index 9a53dc0..2170e40 100644 --- a/coreengine/viewdisplaychannel.h +++ b/coreengine/viewdisplaychannel.h @@ -25,7 +25,7 @@ public: void SetChannel(const cChannel *channel, int number); void SetEvents(const cEvent *present, const cEvent *following); void SetMessage(eMessageType type, const char *text); - void Flush(void); + void Flush(bool animFlush); }; #endif //__VIEWDISPLAYCHANNEL_H \ No newline at end of file diff --git a/coreengine/viewdisplaymenu.c b/coreengine/viewdisplaymenu.c index 9376879..b1cc0cc 100644 --- a/coreengine/viewdisplaymenu.c +++ b/coreengine/viewdisplaymenu.c @@ -566,7 +566,7 @@ void cViewMenu::Clear(void) { activeSubview->ClearViewList(); } -void cViewMenu::Flush(void) { +void cViewMenu::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); } @@ -591,7 +591,7 @@ void cViewMenu::Flush(void) { detailViewInit = false; } activeSubview->DrawDynamicVEs(); - cView::Flush(); + cView::Flush(animFlush); } void cViewMenu::SetTransparency(int transparency, bool forceDetached) { diff --git a/coreengine/viewdisplaymenu.h b/coreengine/viewdisplaymenu.h index b50bdb0..d2588ce 100644 --- a/coreengine/viewdisplaymenu.h +++ b/coreengine/viewdisplaymenu.h @@ -101,7 +101,7 @@ public: bool Init(void); void Close(void); void Clear(void); - void Flush(void); + void Flush(bool animFlush); void SetTransparency(int transparency, bool forceDetached = false); void Debug(void); }; diff --git a/coreengine/viewdisplaymessage.c b/coreengine/viewdisplaymessage.c index 760724f..12e0618 100644 --- a/coreengine/viewdisplaymessage.c +++ b/coreengine/viewdisplaymessage.c @@ -43,12 +43,12 @@ void cViewMessage::SetMessage(eMessageType type, const char *text) { veMessage->Set(type, text); } -void cViewMessage::Flush(void) { +void cViewMessage::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); Render((int)eVeDisplayMessage::background); } Render((int)eVeDisplayMessage::message); - cView::Flush(); + cView::Flush(animFlush); } diff --git a/coreengine/viewdisplaymessage.h b/coreengine/viewdisplaymessage.h index 83ee7b0..4ee36e5 100644 --- a/coreengine/viewdisplaymessage.h +++ b/coreengine/viewdisplaymessage.h @@ -13,7 +13,7 @@ public: cViewMessage(void); virtual ~cViewMessage(void); void SetMessage(eMessageType type, const char *text); - void Flush(void); + void Flush(bool animFlush); }; #endif //__VIEWDISPLAYMESSAGE_H \ No newline at end of file diff --git a/coreengine/viewdisplayplugin.c b/coreengine/viewdisplayplugin.c index 5808025..8830534 100644 --- a/coreengine/viewdisplayplugin.c +++ b/coreengine/viewdisplayplugin.c @@ -352,13 +352,13 @@ void cViewPlugin::ClearTab(int viewId) { tab->Clear(); } -void cViewPlugin::Flush(void) { +void cViewPlugin::Flush(bool animFlush) { if (viewChanged) { viewChanged = false; newTvFrame = views[newViewId]->GetTvFrame(); menuInit = true; } - cView::Flush(); + cView::Flush(animFlush); } bool cViewPlugin::ChannelLogoExists(string channelId) { diff --git a/coreengine/viewdisplayplugin.h b/coreengine/viewdisplayplugin.h index 85ea4e6..7aac3d7 100644 --- a/coreengine/viewdisplayplugin.h +++ b/coreengine/viewdisplayplugin.h @@ -64,7 +64,7 @@ public: void TabDown(int viewId); void DisplayTabs(int viewId); void ClearTab(int viewId); - void Flush(void); + void Flush(bool animFlush); bool ChannelLogoExists(string channelId); string GetEpgImagePath(void); }; diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c index 4b21ef3..8a61669 100644 --- a/coreengine/viewdisplayreplay.c +++ b/coreengine/viewdisplayreplay.c @@ -276,7 +276,7 @@ void cViewReplay::DelayOnPause(void) { veOnPause->ResetSleep(); } -void cViewReplay::Flush(void) { +void cViewReplay::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); if (!modeOnly) { @@ -303,7 +303,7 @@ void cViewReplay::Flush(void) { SetProgressModeOnly(); } - cView::Flush(); + cView::Flush(animFlush); } void cViewReplay::SetProgressModeOnly(void) { diff --git a/coreengine/viewdisplayreplay.h b/coreengine/viewdisplayreplay.h index 5b739ad..fdc9141 100644 --- a/coreengine/viewdisplayreplay.h +++ b/coreengine/viewdisplayreplay.h @@ -53,7 +53,7 @@ public: void StartOnPause(const char *recfilename); void ClearOnPause(void); void DelayOnPause(void); - void Flush(void); + void Flush(bool animFlush); }; #endif //__VIEWDISPLAYREPLAY_H1 \ No newline at end of file diff --git a/coreengine/viewdisplaytracks.c b/coreengine/viewdisplaytracks.c index 6a02361..97fee2d 100644 --- a/coreengine/viewdisplaytracks.c +++ b/coreengine/viewdisplaytracks.c @@ -107,7 +107,7 @@ void cViewTracks::SetCurrentTrack(int index) { change = true; } -void cViewTracks::Flush(void) { +void cViewTracks::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); Render((int)eVeDisplayTracks::background); @@ -118,5 +118,5 @@ void cViewTracks::Flush(void) { viewList->Draw(); change = false; } - cView::Flush(); + cView::Flush(animFlush); } diff --git a/coreengine/viewdisplaytracks.h b/coreengine/viewdisplaytracks.h index e56fa82..36f53f8 100644 --- a/coreengine/viewdisplaytracks.h +++ b/coreengine/viewdisplaytracks.h @@ -23,7 +23,7 @@ public: void SetTracks(const char * const *tracks); void SetAudiochannel(int audioChannel); void SetCurrentTrack(int index); - void Flush(void); + void Flush(bool animFlush); }; #endif //__VIEWDISPLAYTRACKS_H \ No newline at end of file diff --git a/coreengine/viewdisplayvolume.c b/coreengine/viewdisplayvolume.c index 1cd9926..a63febc 100644 --- a/coreengine/viewdisplayvolume.c +++ b/coreengine/viewdisplayvolume.c @@ -40,13 +40,13 @@ void cViewVolume::SetVolume(int current, int total, bool mute) { veVolume->Set(current, total, mute); } -void cViewVolume::Flush(void) { +void cViewVolume::Flush(bool animFlush) { if (init) { sdOsd.LockFlush(); Render((int)eVeDisplayVolume::background); } Render((int)eVeDisplayVolume::volume); - cView::Flush(); + cView::Flush(animFlush); } diff --git a/coreengine/viewdisplayvolume.h b/coreengine/viewdisplayvolume.h index 6fa7f17..b89fdbc 100644 --- a/coreengine/viewdisplayvolume.h +++ b/coreengine/viewdisplayvolume.h @@ -13,7 +13,7 @@ public: cViewVolume(void); virtual ~cViewVolume(void); void SetVolume(int current, int total, bool mute); - void Flush(void); + void Flush(bool animFlush); }; #endif //__VIEWDISPLAYVOLUME_H \ No newline at end of file diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 9e806cf..06ca23e 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -15,7 +15,6 @@ cViewElement::cViewElement(void) { detached = false; waitOnWakeup = true; startAnimation = true; - viewAnimated = false; globals = NULL; tokenContainer = NULL; attribs = new cViewElementAttribs((int)eViewElementAttribs::count); @@ -35,7 +34,6 @@ cViewElement::cViewElement(const cViewElement &other) { detached = false; waitOnWakeup = true; startAnimation = true; - viewAnimated = false; globals = other.globals; container.Set(other.container.X(), other.container.Y(), other.container.Width(), other.container.Height()); tokenContainer = NULL; @@ -436,7 +434,7 @@ void cViewElement::StartAnimation(void) { SetPosition(start, ref); sdOsd->Flush(); delete shifter; - shifter = new cAnimation((cShiftable*)this, start, ref, true, !viewAnimated); + shifter = new cAnimation((cShiftable*)this, start, ref, true); shifter->Start(); } else if (FadeTime() > 0) { SetTransparency(100); @@ -471,8 +469,19 @@ cRect cViewElement::CoveredArea(void) { return unionArea; } -void cViewElement::Flush(void) { - sdOsd->Flush(); +void cViewElement::RegisterAnimation(void) { + sdOsd->AddAnimation(); +} + +void cViewElement::UnregisterAnimation(void) { + sdOsd->RemoveAnimation(); +} + +void cViewElement::Flush(bool animFlush) { + if (animFlush) + sdOsd->AnimatedFlush(); + else + sdOsd->Flush(); } bool cViewElement::Parse(bool forced) { diff --git a/coreengine/viewelement.h b/coreengine/viewelement.h index 90cb544..9341ddf 100644 --- a/coreengine/viewelement.h +++ b/coreengine/viewelement.h @@ -27,7 +27,6 @@ protected: bool waitOnWakeup; bool scrollingStarted; bool startAnimation; - bool viewAnimated; cGlobals *globals; cRect container; cViewElementAttribs *attribs; @@ -55,7 +54,6 @@ public: bool Detached(void); void SetContainer(int x, int y, int width, int height); void SetAttributes(vector &attributes); - void SetAnimatedView(void) { viewAnimated = true; }; void AddArea(cAreaNode *area); void SetAreaX(int x); void SetAreaY(int y); @@ -88,8 +86,10 @@ public: virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false); void SetStartShifting(void) { }; void SetEndShifting(void) { }; + void RegisterAnimation(void); + void UnregisterAnimation(void); cRect CoveredArea(void); - void Flush(void); + void Flush(bool animFlush); virtual bool Parse(bool forced = false); cFunction *GetFunction(const char *name); virtual void Debug(bool full = false); diff --git a/displaychannel.c b/displaychannel.c index 0b2fbdc..9eead8f 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -32,5 +32,5 @@ void cSDDisplayChannel::SetMessage(eMessageType Type, const char *Text) { void cSDDisplayChannel::Flush(void) { if (!ok) return; - view->Flush(); + view->Flush(false); } diff --git a/displaymenu.c b/displaymenu.c index e9ffa38..7ca8026 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -165,7 +165,7 @@ bool cSDDisplayMenu::SetPluginText(skindesignerapi::cTokenContainer *tk) { void cSDDisplayMenu::Flush(void) { if (view) - view->Flush(); + view->Flush(false); } void cSDDisplayMenu::SetCurrentRecording(void) { diff --git a/displaymessage.c b/displaymessage.c index 535f6d5..b5427b0 100644 --- a/displaymessage.c +++ b/displaymessage.c @@ -21,5 +21,5 @@ void cSDDisplayMessage::SetMessage(eMessageType Type, const char *Text) { void cSDDisplayMessage::Flush(void) { if (!ok) return; - view->Flush(); + view->Flush(false); } diff --git a/displayreplay.c b/displayreplay.c index 8ba887b..e1f8246 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -78,7 +78,7 @@ void cSDDisplayReplay::SetMessage(eMessageType Type, const char *Text) { void cSDDisplayReplay::Flush(void) { if (!ok) return; - view->Flush(); + view->Flush(false); } void cSDDisplayReplay::SetTimeShiftValues(const cRecording *recording) { diff --git a/displaytracks.c b/displaytracks.c index a7420f6..82d2e9e 100644 --- a/displaytracks.c +++ b/displaytracks.c @@ -27,5 +27,5 @@ void cSDDisplayTracks::SetAudioChannel(int AudioChannel) { void cSDDisplayTracks::Flush(void) { if (!ok) return; - view->Flush(); + view->Flush(false); } diff --git a/displayvolume.c b/displayvolume.c index 02e61d5..fb99b50 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -22,5 +22,5 @@ void cSDDisplayVolume::SetVolume(int Current, int Total, bool Mute) { void cSDDisplayVolume::Flush(void) { if (!ok) return; - view->Flush(); + view->Flush(false); } diff --git a/libskindesignerapi/Makefile b/libskindesignerapi/Makefile index edff97c..a4648ff 100644 --- a/libskindesignerapi/Makefile +++ b/libskindesignerapi/Makefile @@ -3,7 +3,7 @@ NAME = skindesignerapi LIBNAME = lib$(NAME) MAJOR = 0 -MINOR = 1.0 +MINOR = 1.1 VERSION = $(MAJOR).$(MINOR) SONAME = $(LIBNAME).so.$(MAJOR) diff --git a/libskindesignerapi/osdelements.c b/libskindesignerapi/osdelements.c index ae688ea..f52ebba 100644 --- a/libskindesignerapi/osdelements.c +++ b/libskindesignerapi/osdelements.c @@ -198,5 +198,5 @@ skindesignerapi::cViewTab *skindesignerapi::cOsdView::GetViewTabs(void) { void skindesignerapi::cOsdView::Display(void) { if (displayPlugin) - displayPlugin->Flush(); + displayPlugin->Flush(false); } diff --git a/libskindesignerapi/skindesignerapi.h b/libskindesignerapi/skindesignerapi.h index 64155ae..d89c27e 100644 --- a/libskindesignerapi/skindesignerapi.h +++ b/libskindesignerapi/skindesignerapi.h @@ -47,7 +47,7 @@ public: virtual void TabDown(int viewId) = 0; virtual void DisplayTabs(int viewId) = 0; virtual void ClearTab(int viewId) = 0; - virtual void Flush(void) = 0; + virtual void Flush(bool animFlush) = 0; virtual bool ChannelLogoExists(string channelId) = 0; virtual string GetEpgImagePath(void) = 0; }; diff --git a/libskindesignerapi/tokencontainer.h b/libskindesignerapi/tokencontainer.h index b832da6..f4709e8 100644 --- a/libskindesignerapi/tokencontainer.h +++ b/libskindesignerapi/tokencontainer.h @@ -22,7 +22,7 @@ private: //token containers char **stringTokens; int *intTokens; - vectorloopTokens; + vector loopTokens; //mapping id --> name string *stNames; string *itNames;