3 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
4 * Alexander Warg <warg@os.inf.tu-dresden.de>
5 * economic rights: Technische Universität Dresden (Germany)
7 * This file is part of TUD:OS and distributed under the terms of the
8 * GNU General Public License 2.
9 * Please see the COPYING-GPL-2 file for details.
11 * As a special exception, you may use this file as part of a free software
12 * library without restriction. Specifically, if other files instantiate
13 * templates or use macros or inline functions from this file, or you compile
14 * this file and link it with other files to produce an executable, this
15 * file does not by itself cause the resulting executable to be covered by
16 * the GNU General Public License. This exception does not however
17 * invalidate any other reasons why the executable file might be covered by
18 * the GNU General Public License.
22 #include <l4/re/video/goos>
24 namespace L4Re { namespace Util { namespace Video {
29 L4::Cap<L4Re::Video::Goos> _goos;
30 L4Re::Video::View _view;
31 L4::Cap<L4Re::Dataspace> _buffer;
41 unsigned _buffer_index;
46 Goos_fb(Goos_fb const &);
47 void operator = (Goos_fb const &);
50 Goos_fb() : _goos(L4_INVALID_CAP), _buffer(L4_INVALID_CAP), _flags(0) {}
52 explicit Goos_fb(L4::Cap<L4Re::Video::Goos> goos);
53 explicit Goos_fb(char const *name);
55 void setup(L4::Cap<L4Re::Video::Goos> goos);
56 void setup(char const *name);
60 int view_info(L4Re::Video::View::Info *info)
61 { return _view.info(info); }
63 L4Re::Video::View const *view() const { return &_view; }
64 L4Re::Video::View *view() { return &_view; }
66 L4::Cap<L4Re::Dataspace> buffer() const { return _buffer; }
67 void *attach_buffer();
69 int refresh(int x, int y, int w, int h)
70 { return _view.refresh(x, y, w, h); }
72 L4::Cap<L4Re::Video::Goos> goos() const { return _goos; }