20 #include "pedigree/kernel/machine/Display.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/utilities/Iterator.h" 23 #include "pedigree/kernel/utilities/String.h" 24 #include "pedigree/kernel/utilities/utility.h" 26 Display::ScreenMode::ScreenMode()
27 : id(0), width(0), height(0), refresh(0), framebuffer(0), pf(), pf2(),
28 bytesPerLine(0), bytesPerPixel(0), textMode(false)
52 str =
"Generic Display";
57 str =
"Generic Display";
75 rgb_t *pBuffer,
size_t x1,
size_t y1,
size_t x2,
size_t y2)
84 rgb_t *pBuffer,
size_t fromX,
size_t fromY,
size_t toX,
size_t toY,
85 size_t width,
size_t height)
90 rgb_t *pBuffer,
size_t x,
size_t y,
size_t width,
size_t height,
120 if (!getScreenModes(modes))
123 it != modes.
end(); it++)
125 if ((*it)->id == modeId)
133 ERROR(
"Screenmode not found: " << modeId);
137 return setScreenMode(*pSm);
149 if (!getScreenModes(modes))
152 it != modes.
end(); it++)
154 if (((*it)->width == nWidth) && ((*it)->height == nHeight))
156 if ((*it)->pf.nBpp == nBpp)
166 "Screenmode not found: " <<
Dec << nWidth <<
"x" << nHeight <<
"x" 171 return setScreenMode(*pSm);
virtual void getName(String &str)
virtual bool getCurrentScreenMode(ScreenMode &sm)
virtual rgb_t * newBuffer()
virtual void updateBuffer(rgb_t *pBuffer, size_t x1=~0UL, size_t y1=~0UL, size_t x2=~0UL, size_t y2=~0UL)
virtual void bitBlit(rgb_t *pBuffer, size_t fromX, size_t fromY, size_t toX, size_t toY, size_t width, size_t height)
virtual void killBuffer(rgb_t *pBuffer)
virtual bool getPixelFormat(PixelFormat &pf)
virtual void fillRectangle(rgb_t *pBuffer, size_t x, size_t y, size_t width, size_t height, rgb_t colour)
virtual bool getScreenModes(List< ScreenMode * > &sms)
virtual void setCurrentBuffer(rgb_t *pBuffer)
virtual void dump(String &str)
virtual bool setScreenMode(ScreenMode sm)
virtual void * getFramebuffer()