infoviewer: add slide (test only)

Origin commit data
------------------
Branch: ni/coolstream
Commit: a5e8add178
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-11-23 (Wed, 23 Nov 2022)

Origin message was:
------------------
- infoviewer: add slide (test only)

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-11-23 23:54:02 +01:00
parent 8cbe4eb7c8
commit 21b95fc437
2 changed files with 18 additions and 13 deletions

View File

@@ -99,7 +99,7 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
extern bool timeset; extern bool timeset;
CInfoViewer::CInfoViewer () CInfoViewer::CInfoViewer ()
: fader(g_settings.theme.infobar_alpha) : slider()
{ {
sigbox = NULL; sigbox = NULL;
header = numbox = body = NULL; header = numbox = body = NULL;
@@ -499,7 +499,7 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
reset_allScala(); reset_allScala();
if(!is_visible) if(!is_visible)
fader.StartFadeIn(); slider.StartSlideIn();
is_visible = true; is_visible = true;
infoViewerBB->is_visible = true; infoViewerBB->is_visible = true;
@@ -666,7 +666,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
reset_allScala(); reset_allScala();
if(!is_visible && !calledFromNumZap) if(!is_visible && !calledFromNumZap)
fader.StartFadeIn(); slider.StartSlideIn();
is_visible = true; is_visible = true;
infoViewerBB->is_visible = true; infoViewerBB->is_visible = true;
@@ -1114,9 +1114,13 @@ void CInfoViewer::loop(bool show_dot)
g_RCInput->postMsg(NeutrinoMessages::SHOW_EPG, 0); g_RCInput->postMsg(NeutrinoMessages::SHOW_EPG, 0);
res = messages_return::cancel_info; res = messages_return::cancel_info;
#endif #endif
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) { } else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == slider.GetSlideTimer())) {
if(fader.FadeDone()) if(slider.SlideDone())
res = messages_return::cancel_info; res = messages_return::cancel_info;
} else if ((msg == NeutrinoMessages::EVT_SLIDER) && (data == COSDSlider::AFTER_SLIDEIN)) {
// after slide in
} else if ((msg == NeutrinoMessages::EVT_SLIDER) && (data == COSDSlider::BEFORE_SLIDEOUT)) {
// before slide out
} else if ((msg == CRCInput::RC_ok) || (CNeutrinoApp::getInstance()->backKey(msg)) || (msg == CRCInput::RC_timeout)) { } else if ((msg == CRCInput::RC_ok) || (CNeutrinoApp::getInstance()->backKey(msg)) || (msg == CRCInput::RC_timeout)) {
if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && (msg == CRCInput::RC_ok)) if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && (msg == CRCInput::RC_ok))
{ {
@@ -1129,8 +1133,8 @@ void CInfoViewer::loop(bool show_dot)
hideIt = true; hideIt = true;
} }
} }
if(fader.StartFadeOut()) if(slider.StartSlideOut())
timeoutEnd = CRCInput::calcTimeoutEnd(1); timeoutEnd = CRCInput::calcTimeoutEnd(2);
else else
res = messages_return::cancel_info; res = messages_return::cancel_info;
} else if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && ((msg == CRCInput::RC_right) || (msg == CRCInput::RC_left ))) { } else if ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VZAP) && ((msg == CRCInput::RC_right) || (msg == CRCInput::RC_left ))) {
@@ -1201,7 +1205,7 @@ void CInfoViewer::loop(bool show_dot)
} else { } else {
if (msg == CRCInput::RC_standby) { if (msg == CRCInput::RC_standby) {
g_RCInput->killTimer (sec_timer_id); g_RCInput->killTimer (sec_timer_id);
fader.StopFade(); slider.StopSlide();
} }
res = neutrino->handleMsg (msg, data); res = neutrino->handleMsg (msg, data);
if (res & messages_return::unhandled) { if (res & messages_return::unhandled) {
@@ -1238,7 +1242,7 @@ void CInfoViewer::loop(bool show_dot)
} }
g_RCInput->killTimer (sec_timer_id); g_RCInput->killTimer (sec_timer_id);
fader.StopFade(); slider.StopSlide();
if (zap_mode & IV_MODE_VIRTUAL_ZAP) { if (zap_mode & IV_MODE_VIRTUAL_ZAP) {
/* if bouquet cycle set, do virtual over current bouquet */ /* if bouquet cycle set, do virtual over current bouquet */
if (/*g_settings.zap_cycle && */ /* (bouquetList != NULL) && */ !(bouquetList->Bouquets.empty())) if (/*g_settings.zap_cycle && */ /* (bouquetList != NULL) && */ !(bouquetList->Bouquets.empty()))
@@ -1411,9 +1415,9 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
//Set_CA_Status (data); //Set_CA_Status (data);
return messages_return::handled; return messages_return::handled;
} else if (msg == NeutrinoMessages::EVT_TIMER) { } else if (msg == NeutrinoMessages::EVT_TIMER) {
if (data == fader.GetFadeTimer()) { if (data == slider.GetSlideTimer()) {
// here, the event can only come if there is another window in the foreground! // here, the event can only come if there is another window in the foreground!
fader.StopFade(); slider.StopSlide();
return messages_return::handled; return messages_return::handled;
} else if (data == lcdUpdateTimer) { } else if (data == lcdUpdateTimer) {
//printf("CInfoViewer::handleMsg: lcdUpdateTimer\n"); //printf("CInfoViewer::handleMsg: lcdUpdateTimer\n");

View File

@@ -41,10 +41,11 @@
#include <zapit/channel.h> #include <zapit/channel.h>
#include <gui/components/cc.h> #include <gui/components/cc.h>
#include <gui/weather.h> #include <gui/weather.h>
#include <driver/slide.h>
#include "widget/record_info.h" #include "widget/record_info.h"
class CFrameBuffer; class CFrameBuffer;
class COSDFader; class COSDSlider;
class CInfoViewerBB; class CInfoViewerBB;
class CInfoViewer : public sigc::trackable class CInfoViewer : public sigc::trackable
{ {
@@ -93,7 +94,7 @@ class CInfoViewer : public sigc::trackable
t_channel_id current_channel_id; t_channel_id current_channel_id;
t_channel_id current_epg_id; t_channel_id current_epg_id;
COSDFader fader; COSDSlider slider;
int time_width; int time_width;
int time_height; int time_height;