#ifndef DEF_DISPLAY_PROTO_H #define DEF_DISPLAY_PROTO_H #include #include #include namespace Disp { struct mode_t; } class Display : public Device { public: virtual ~Display() {} virtual void getModes(Vector &to) = 0; virtual bool setMode(Disp::mode_t& mode) = 0; virtual void unsetMode() {} //To be overloaded if driver has to do some cleaning-up virtual void clear() = 0; //Text functions virtual void putChar(u16int line, u16int col, WChar c, u8int color) = 0; //Color : virtual void moveCursor(u16int line, u16int col) = 0; virtual bool textScroll(u16int line, u16int col, u16int height, u16int width, u8int color) { return false; } //Graphic functions, can stay unimplemented for textual displays virtual void putPix(u16int x, u16int y, u32int color) {} virtual u32int getPix(u16int x, u16int y) { return 0; } //Advanced graphic functions. These have a simple implementation in GraphicDisplay, //and should have an optimized version in each individual driver. This is also the //case of the graphical putChar and moveCursor. //drawLine, drawCircle, ... }; #endif