5 #include <l4/mag-gfx/geometry>
6 #include <l4/scout-gfx/widget>
10 using Mag_gfx::Canvas;
19 virtual ~Screen_update() { }
22 * Flip fore and back buffers
24 virtual void flip_buf_scr() { }
27 * Copy background buffer to foreground
29 virtual void copy_buf_to_scr(Rect const &) { }
32 * Flush pixels of specified screen area
34 virtual void scr_update(Rect const &r) = 0;
42 int _cnt; /* nb of requests since last process */
43 Widget *_root; /* root element for drawing */
44 Canvas *_canvas; /* graphics backend */
45 Screen_update *_scr_update; /* flushing pixels in backend */
46 Area _win; /* current size of output window */
54 : _cnt(0), _root(0), _canvas(0), _scr_update(0), _win(Area())
60 Canvas *canvas() const { return _canvas; }
62 void setup(Canvas *canvas, Screen_update *scr_update, Area const &win)
65 _scr_update = scr_update;
71 * Define root element for issueing drawing operations
73 inline void root(Widget *root) { _root = root; }
76 * Collect redraw requests
78 void request(Rect const &r);
81 * Process redrawing operations
83 void process(Rect const &view);