eRect eWidgetDesktop::bounds() const { const eSize size = m_screen.m_screen_size; return eRect( m_margins.left(), m_margins.top(), size.width() - m_margins.left() - m_margins.right(), // width size.height() - m_margins.top() - m_margins.bottom() // height ); }
void eWindowStyleSimple::handleNewSize(eWindow *wnd, eSize &size, eSize &offset) { // eDebug("handle new size: %d x %d", size.width(), size.height()); eWidget *child = wnd->child(); wnd->m_clip_region = eRect(ePoint(0, 0), size); child->move(ePoint(m_border_left, m_border_top)); child->resize(eSize(size.width() - m_border_left - m_border_right, size.height() - m_border_top - m_border_bottom)); }
gSurface::gSurface(eSize size, int _bpp, int accel) { x = size.width(); y = size.height(); bpp = _bpp; switch (bpp) { case 8: bypp = 1; break; case 15: case 16: bypp = 2; break; case 24: // never use 24bit mode case 32: bypp = 4; break; default: bypp = (bpp+7)/8; } stride = x*bypp; data = 0; data_phys = 0; if (accel) { stride += 63; stride &=~63; if (gAccel::getInstance()) eDebug("accel memory: %d", gAccel::getInstance()->accelAlloc(data, data_phys, y * stride)); else eDebug("no accel available"); } clut.colors = 0; clut.data = 0; if (!data) data = new unsigned char [y * stride]; type = 1; }
void eRect::setSize( const eSize &s ) { x2 = s.width() +x1; y2 = s.height()+y1; }
void eWidget::cresize(const eSize& nsize) { recalcClientRect(); resize(eSize(nsize.width()+size.width()-clientrect.width(), nsize.height()+size.height()-clientrect.height())); }