m_dirty_region |= region;
}
-void eWidgetDesktop::setBackgroundColor(gColor col)
+void eWidgetDesktop::setBackgroundColor(gRGB col)
{
m_background_color = col;
}
}
+void eWidgetDesktop::setPalette(gPixmap &pm)
+{
+ ASSERT(m_dc);
+ gPainter painter(m_dc);
+ painter.setPalette(&pm);
+}
+
void eWidgetDesktop::paint()
{
gPainter painter(m_dc);
painter.setBackgroundColor(m_background_color);
painter.clear();
+ painter.flush();
+
m_dirty_region = gRegion();
}
m_timer->start(0, 1);
}
+void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
+{
+ eDebug("widgetDesktop: make compatible pixmap of %p\n", &pm);
+ if (!m_dc)
+ {
+ eWarning("eWidgetDesktop: no DC to make pixmap compatible with!");
+ return;
+ }
+ eDebug("painter..");
+ gPainter painter(m_dc);
+ eDebug("merge!");
+ painter.mergePalette(&pm);
+ eDebug("gone!");
+}
+
eWidgetDesktop::eWidgetDesktop(eSize size): m_screen_size(size), m_mainloop(0), m_timer(0)
{
}