mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponents: remove bgmode handler
bg_mode varible was never used
This commit is contained in:
@@ -70,14 +70,6 @@ typedef struct comp_screen_data_t
|
||||
fb_pixel_t* pixbuf;
|
||||
} comp_screen_data_struct_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CC_BGMODE_STANDARD,
|
||||
CC_BGMODE_PERMANENT,
|
||||
|
||||
CC_BGMODE_TYPES
|
||||
}BGMODE_TYPES;
|
||||
|
||||
//align types
|
||||
enum
|
||||
{
|
||||
@@ -132,7 +124,6 @@ class CComponents
|
||||
std::vector<comp_fbdata_t> v_fbdata;
|
||||
fb_pixel_t col_body, col_shadow, col_frame;
|
||||
bool firstPaint, shadow, is_painted;
|
||||
BGMODE_TYPES bgMode;
|
||||
|
||||
void initVarBasic();
|
||||
void paintFbItems(struct comp_fbdata_t * fbdata, const int items_count, bool do_save_bg = true);
|
||||
@@ -162,7 +153,6 @@ class CComponents
|
||||
inline virtual void setColorBody(fb_pixel_t color){col_body = color;};
|
||||
inline virtual void setColorShadow(fb_pixel_t color){col_shadow = color;};
|
||||
inline virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;};
|
||||
inline virtual void setBgMode(BGMODE_TYPES mode) {bgMode = mode;};
|
||||
|
||||
virtual void hide();
|
||||
virtual bool isPainted(){return is_painted;};
|
||||
|
@@ -78,7 +78,6 @@ void CComponents::initVarBasic()
|
||||
is_painted = false;
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
v_fbdata.clear();
|
||||
bgMode = CC_BGMODE_STANDARD;
|
||||
saved_screen.pixbuf = NULL;
|
||||
}
|
||||
|
||||
@@ -89,17 +88,13 @@ void CComponents::paintFbItems(struct comp_fbdata_t * fbdata, const int items_co
|
||||
for(int i=0; i<items_count; i++){
|
||||
if (fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){
|
||||
//printf("\n#####[%s - %d] firstPaint: %d, fbdata_type: %d\n \n", __FUNCTION__, __LINE__, firstPaint, fbdata[i].fbdata_type);
|
||||
if (bgMode == CC_BGMODE_PERMANENT) {
|
||||
saved_screen.x = fbdata[i].x;
|
||||
saved_screen.y = fbdata[i].y;
|
||||
saved_screen.dx = fbdata[i].dx;
|
||||
saved_screen.dy = fbdata[i].dy;
|
||||
clearSavedScreen();
|
||||
saved_screen.pixbuf = getScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy);
|
||||
}
|
||||
else {
|
||||
fbdata[i].pixbuf = getScreen(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy);
|
||||
}
|
||||
|
||||
firstPaint = false;
|
||||
break;
|
||||
}
|
||||
@@ -223,7 +218,6 @@ void CComponentsContainer::hideContainer(bool no_restore)
|
||||
{
|
||||
is_painted = false;
|
||||
|
||||
if (bgMode == CC_BGMODE_PERMANENT) {
|
||||
if (saved_screen.pixbuf) {
|
||||
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
||||
if (no_restore) {
|
||||
@@ -232,19 +226,6 @@ void CComponentsContainer::hideContainer(bool no_restore)
|
||||
firstPaint = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (no_restore)
|
||||
return;
|
||||
|
||||
for(size_t i =0; i< v_fbdata.size() ;i++) {
|
||||
if (v_fbdata[i].pixbuf != NULL && v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN)
|
||||
frameBuffer->RestoreScreen(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].pixbuf);
|
||||
delete[] v_fbdata[i].pixbuf;
|
||||
}
|
||||
v_fbdata.clear();
|
||||
firstPaint = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentsContainer::hide(bool no_restore)
|
||||
@@ -338,7 +319,6 @@ void CComponentsInfoBox::initVarInfobox()
|
||||
{
|
||||
//CComponents, ComponentsContainer
|
||||
initVarContainer();
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
|
||||
//CComponentsInfoBox
|
||||
box = NULL;
|
||||
@@ -447,9 +427,6 @@ CComponentsShapeSquare::CComponentsShapeSquare(const int x_pos, const int y_pos,
|
||||
col_frame = color_frame;
|
||||
col_body = color_body;
|
||||
col_shadow = color_shadow;
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
@@ -469,7 +446,6 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
|
||||
col_frame = color_frame;
|
||||
col_body = color_body;
|
||||
col_shadow = color_shadow;
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
|
||||
//CComponentsShapeCircle
|
||||
width = height = d = diam;
|
||||
@@ -647,7 +623,6 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc
|
||||
col_frame = COL_BACKGROUND;
|
||||
col_body = COL_BACKGROUND;
|
||||
col_shadow = COL_MENUCONTENTDARK_PLUS_0;
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
}
|
||||
|
||||
CComponentsPIP::~CComponentsPIP()
|
||||
@@ -727,7 +702,6 @@ void CComponentsPicture::init( int x_pos, int y_pos, const string& picture_name,
|
||||
col_frame = color_frame;
|
||||
col_body = color_background;
|
||||
col_shadow = color_shadow;
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
}
|
||||
|
||||
void CComponentsPicture::setPicture(const std::string& picture_name)
|
||||
@@ -1236,7 +1210,6 @@ CComponentsTitleBar::CComponentsTitleBar()
|
||||
{
|
||||
//CComponentsTitleBar
|
||||
initVarTitleBar();
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
}
|
||||
|
||||
void CComponentsTitleBar::initVarTitleBar()
|
||||
@@ -1375,7 +1348,6 @@ void CComponentsForm::initVarForm()
|
||||
{
|
||||
//CComponentsContainer
|
||||
initVarContainer();
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
|
||||
//simple default dimensions
|
||||
width = 150;
|
||||
|
Reference in New Issue
Block a user