]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re_c/lib/src/view.cc
update
[l4.git] / l4 / pkg / l4re_c / lib / src / view.cc
1 /*
2  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  *
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU General Public License 2.
7  * Please see the COPYING-GPL-2 file for details.
8  *
9  * As a special exception, you may use this file as part of a free software
10  * library without restriction.  Specifically, if other files instantiate
11  * templates or use macros or inline functions from this file, or you compile
12  * this file and link it with other files to produce an executable, this
13  * file does not by itself cause the resulting executable to be covered by
14  * the GNU General Public License.  This exception does not however
15  * invalidate any other reasons why the executable file might be covered by
16  * the GNU General Public License.
17  */
18
19 #include <l4/re/c/video/view.h>
20
21 #include <l4/re/video/view>
22
23 using namespace L4Re::Video;
24
25 L4_CV int
26 l4re_video_view_refresh(l4re_video_view_t *view, int x, int y, int w,
27                         int h) L4_NOTHROW
28 {
29   View *v = reinterpret_cast<View *>(view);
30   return v->refresh(x, y, w, h);
31 }
32
33 L4_CV int
34 l4re_video_view_get_info(l4re_video_view_t *view,
35                          l4re_video_view_info_t *info) L4_NOTHROW
36 {
37   View *v = reinterpret_cast<View *>(view);
38   return v->info(reinterpret_cast<View::Info*>(info));
39 }
40
41 L4_CV int
42 l4re_video_view_set_info(l4re_video_view_t *view,
43                          l4re_video_view_info_t *info) L4_NOTHROW
44 {
45   View *v = reinterpret_cast<View *>(view);
46   return v->set_info(*reinterpret_cast<View::Info*>(info));
47 }
48
49 L4_CV int
50 l4re_video_view_set_viewport(l4re_video_view_t *view, int x, int y, int w,
51                              int h, unsigned long bofs) L4_NOTHROW
52 {
53   View *v = reinterpret_cast<View *>(view);
54   return v->set_viewport(x, y, w, h, bofs);
55 }
56
57 L4_CV int
58 l4re_video_view_stack(l4re_video_view_t *view, l4re_video_view_t *pivot,
59                       int behind) L4_NOTHROW
60 {
61   View *v = reinterpret_cast<View *>(view);
62   return v->stack(pivot ? *reinterpret_cast<View*>(pivot) : View(), behind);
63 }
64