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;
|
fb_pixel_t* pixbuf;
|
||||||
} comp_screen_data_struct_t;
|
} comp_screen_data_struct_t;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CC_BGMODE_STANDARD,
|
|
||||||
CC_BGMODE_PERMANENT,
|
|
||||||
|
|
||||||
CC_BGMODE_TYPES
|
|
||||||
}BGMODE_TYPES;
|
|
||||||
|
|
||||||
//align types
|
//align types
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -132,7 +124,6 @@ class CComponents
|
|||||||
std::vector<comp_fbdata_t> v_fbdata;
|
std::vector<comp_fbdata_t> v_fbdata;
|
||||||
fb_pixel_t col_body, col_shadow, col_frame;
|
fb_pixel_t col_body, col_shadow, col_frame;
|
||||||
bool firstPaint, shadow, is_painted;
|
bool firstPaint, shadow, is_painted;
|
||||||
BGMODE_TYPES bgMode;
|
|
||||||
|
|
||||||
void initVarBasic();
|
void initVarBasic();
|
||||||
void paintFbItems(struct comp_fbdata_t * fbdata, const int items_count, bool do_save_bg = true);
|
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 setColorBody(fb_pixel_t color){col_body = color;};
|
||||||
inline virtual void setColorShadow(fb_pixel_t color){col_shadow = 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 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 void hide();
|
||||||
virtual bool isPainted(){return is_painted;};
|
virtual bool isPainted(){return is_painted;};
|
||||||
|
@@ -78,7 +78,6 @@ void CComponents::initVarBasic()
|
|||||||
is_painted = false;
|
is_painted = false;
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
v_fbdata.clear();
|
v_fbdata.clear();
|
||||||
bgMode = CC_BGMODE_STANDARD;
|
|
||||||
saved_screen.pixbuf = NULL;
|
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++){
|
for(int i=0; i<items_count; i++){
|
||||||
if (fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){
|
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);
|
//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.x = fbdata[i].x;
|
saved_screen.y = fbdata[i].y;
|
||||||
saved_screen.y = fbdata[i].y;
|
saved_screen.dx = fbdata[i].dx;
|
||||||
saved_screen.dx = fbdata[i].dx;
|
saved_screen.dy = fbdata[i].dy;
|
||||||
saved_screen.dy = fbdata[i].dy;
|
clearSavedScreen();
|
||||||
clearSavedScreen();
|
saved_screen.pixbuf = getScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy);
|
||||||
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;
|
firstPaint = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -223,28 +218,14 @@ void CComponentsContainer::hideContainer(bool no_restore)
|
|||||||
{
|
{
|
||||||
is_painted = false;
|
is_painted = false;
|
||||||
|
|
||||||
if (bgMode == CC_BGMODE_PERMANENT) {
|
if (saved_screen.pixbuf) {
|
||||||
if (saved_screen.pixbuf) {
|
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
||||||
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
if (no_restore) {
|
||||||
if (no_restore) {
|
delete[] saved_screen.pixbuf;
|
||||||
delete[] saved_screen.pixbuf;
|
saved_screen.pixbuf = NULL;
|
||||||
saved_screen.pixbuf = NULL;
|
firstPaint = true;
|
||||||
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)
|
void CComponentsContainer::hide(bool no_restore)
|
||||||
@@ -338,8 +319,7 @@ void CComponentsInfoBox::initVarInfobox()
|
|||||||
{
|
{
|
||||||
//CComponents, ComponentsContainer
|
//CComponents, ComponentsContainer
|
||||||
initVarContainer();
|
initVarContainer();
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
|
|
||||||
//CComponentsInfoBox
|
//CComponentsInfoBox
|
||||||
box = NULL;
|
box = NULL;
|
||||||
textbox = NULL;
|
textbox = NULL;
|
||||||
@@ -447,9 +427,6 @@ CComponentsShapeSquare::CComponentsShapeSquare(const int x_pos, const int y_pos,
|
|||||||
col_frame = color_frame;
|
col_frame = color_frame;
|
||||||
col_body = color_body;
|
col_body = color_body;
|
||||||
col_shadow = color_shadow;
|
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_frame = color_frame;
|
||||||
col_body = color_body;
|
col_body = color_body;
|
||||||
col_shadow = color_shadow;
|
col_shadow = color_shadow;
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
|
|
||||||
//CComponentsShapeCircle
|
//CComponentsShapeCircle
|
||||||
width = height = d = diam;
|
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_frame = COL_BACKGROUND;
|
||||||
col_body = COL_BACKGROUND;
|
col_body = COL_BACKGROUND;
|
||||||
col_shadow = COL_MENUCONTENTDARK_PLUS_0;
|
col_shadow = COL_MENUCONTENTDARK_PLUS_0;
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CComponentsPIP::~CComponentsPIP()
|
CComponentsPIP::~CComponentsPIP()
|
||||||
@@ -727,7 +702,6 @@ void CComponentsPicture::init( int x_pos, int y_pos, const string& picture_name,
|
|||||||
col_frame = color_frame;
|
col_frame = color_frame;
|
||||||
col_body = color_background;
|
col_body = color_background;
|
||||||
col_shadow = color_shadow;
|
col_shadow = color_shadow;
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsPicture::setPicture(const std::string& picture_name)
|
void CComponentsPicture::setPicture(const std::string& picture_name)
|
||||||
@@ -1236,7 +1210,6 @@ CComponentsTitleBar::CComponentsTitleBar()
|
|||||||
{
|
{
|
||||||
//CComponentsTitleBar
|
//CComponentsTitleBar
|
||||||
initVarTitleBar();
|
initVarTitleBar();
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsTitleBar::initVarTitleBar()
|
void CComponentsTitleBar::initVarTitleBar()
|
||||||
@@ -1375,7 +1348,6 @@ void CComponentsForm::initVarForm()
|
|||||||
{
|
{
|
||||||
//CComponentsContainer
|
//CComponentsContainer
|
||||||
initVarContainer();
|
initVarContainer();
|
||||||
bgMode = CC_BGMODE_PERMANENT;
|
|
||||||
|
|
||||||
//simple default dimensions
|
//simple default dimensions
|
||||||
width = 150;
|
width = 150;
|
||||||
|
Reference in New Issue
Block a user