L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
goos_svr
1
// vi:set ft=cpp: -*- Mode: C++ -*-
2
/*
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)
6
*
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.
10
*
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.
19
*/
20
21
#pragma once
22
23
#include <
l4/re/dataspace
>
24
#include <l4/re/video/goos>
25
#include <
l4/re/video/goos-sys.h
>
26
27
#include <
l4/sys/capability
>
28
#include <l4/sys/cxx/ipc_legacy>
29
30
namespace
L4Re
{
namespace
Util {
namespace
Video {
31
36
class
Goos_svr
37
{
38
typedef
L4Re::Video::Goos::Rights Rights;
39
protected
:
41
L4::Cap<L4Re::Dataspace>
_fb_ds
;
43
L4Re::Video::Goos::Info
_screen_info
;
45
L4Re::Video::View::Info
_view_info
;
46
47
public
:
48
L4_RPC_LEGACY_DISPATCH(
L4Re::Video::Goos
);
53
L4::Cap<L4Re::Dataspace>
get_fb
()
const
{
return
_fb_ds
; }
54
59
L4Re::Video::Goos::Info
const
*
screen_info
()
const
{
return
&
_screen_info
; }
60
65
L4Re::Video::View::Info
const
*
view_info
()
const
{
return
&
_view_info
; }
66
77
virtual
int
refresh
(
int
x,
int
y,
int
w,
int
h)
78
{ (void)x; (void)y; (void)w; (void)h;
return
-
L4_ENOSYS
; }
79
80
89
void
init_infos
()
90
{
91
using
L4Re::Video::View
;
92
93
_view_info
.
flags
= View::F_none;
94
95
_view_info
.
view_index
= 0;
96
_view_info
.
xpos
= 0;
97
_view_info
.
ypos
= 0;
98
_view_info
.
width
=
_screen_info
.
width
;
99
_view_info
.
height
=
_screen_info
.
height
;
100
_view_info
.
pixel_info
=
_screen_info
.
pixel_info
;
101
_view_info
.
buffer_index
= 0;
102
}
103
107
virtual
~Goos_svr
() {}
108
109
long
op_view_info(Rights,
unsigned
idx,
L4Re::Video::View::Info
&info)
110
{
111
if
(idx != 0)
112
return
-
L4_ERANGE
;
113
114
info =
_view_info
;
115
return
L4_EOK
;
116
}
117
118
long
op_info(Rights,
L4Re::Video::Goos::Info
&info)
119
{
120
info =
_screen_info
;
121
return
L4_EOK
;
122
}
123
124
long
op_get_static_buffer(Rights,
unsigned
idx,
125
L4::Ipc::Cap<L4Re::Dataspace>
&ds)
126
{
127
if
(idx != 0)
128
return
-
L4_ERANGE
;
129
130
ds =
L4::Ipc::Cap<L4Re::Dataspace>
(
_fb_ds
,
L4_CAP_FPAGE_RW
);
131
return
L4_EOK
;
132
}
133
134
long
op_refresh(Rights,
int
x,
int
y,
int
w,
int
h)
135
{
return
refresh
(x, y, w, h); }
136
137
long
op_view_refresh(Rights,
unsigned
idx,
int
x,
int
y,
int
w,
int
h)
138
{
139
if
(idx != 0)
140
return
-
L4_ERANGE
;
141
142
return
refresh
(x, y, w, h);
143
}
144
145
long
op_set_view_info(Rights,
unsigned
,
L4Re::Video::View::Info
)
146
{
return
-
L4_ENOSYS
; }
147
148
long
op_view_stack(Rights,
unsigned
,
unsigned
,
bool
)
149
{
return
-
L4_ENOSYS
; }
150
151
long
op_delete_view(Rights,
unsigned
)
152
{
return
-
L4_ENOSYS
; }
153
154
long
op_create_view(Rights)
155
{
return
-
L4_ENOSYS
; }
156
157
long
op_create_buffer(Rights,
unsigned
long
,
158
L4::Ipc::Cap<L4Re::Dataspace>
&)
159
{
return
-
L4_ENOSYS
; }
160
161
long
op_delete_buffer(Rights,
unsigned
)
162
{
return
-
L4_ENOSYS
; }
163
};
164
165
166
}}}
capability
L4::Cap related definitions.
L4Re::Util::Video::Goos_svr
Goos server class.
Definition
goos_svr:37
L4Re::Util::Video::Goos_svr::~Goos_svr
virtual ~Goos_svr()
Destructor.
Definition
goos_svr:107
L4Re::Util::Video::Goos_svr::_screen_info
L4Re::Video::Goos::Info _screen_info
Goos information.
Definition
goos_svr:43
L4Re::Util::Video::Goos_svr::_view_info
L4Re::Video::View::Info _view_info
View information.
Definition
goos_svr:45
L4Re::Util::Video::Goos_svr::get_fb
L4::Cap< L4Re::Dataspace > get_fb() const
Return framebuffer memory dataspace.
Definition
goos_svr:53
L4Re::Util::Video::Goos_svr::_fb_ds
L4::Cap< L4Re::Dataspace > _fb_ds
Goos memory dataspace.
Definition
goos_svr:41
L4Re::Util::Video::Goos_svr::refresh
virtual int refresh(int x, int y, int w, int h)
Refresh area of the framebuffer.
Definition
goos_svr:77
L4Re::Util::Video::Goos_svr::init_infos
void init_infos()
Initialize the view information structure of this object.
Definition
goos_svr:89
L4Re::Util::Video::Goos_svr::view_info
L4Re::Video::View::Info const * view_info() const
View information structure.
Definition
goos_svr:65
L4Re::Util::Video::Goos_svr::screen_info
L4Re::Video::Goos::Info const * screen_info() const
Goos information structure.
Definition
goos_svr:59
L4Re::Video::Goos
Class that abstracts framebuffers.
Definition
goos:228
L4Re::Video::View
View of a framebuffer.
Definition
goos:43
L4::Cap
C++ interface for capabilities.
Definition
capability.h:219
L4::Ipc::Cap
Capability type for RPC interfaces (see L4::Cap<T>).
Definition
ipc_types:563
dataspace
Dataspace interface.
goos-sys.h
Goos protocol definition.
L4_ERANGE
@ L4_ERANGE
Range error.
Definition
err.h:59
L4_ENOSYS
@ L4_ENOSYS
No sys.
Definition
err.h:61
L4_EOK
@ L4_EOK
Ok.
Definition
err.h:43
L4_CAP_FPAGE_RW
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flex-pages.
Definition
__l4_fpage.h:195
L4Re
L4Re C++ Interfaces.
Definition
l4re.dox:17
L4Re::Video::Goos::Info
Information structure of a Goos.
Definition
goos:241
L4Re::Video::Goos::Info::height
unsigned long height
Height.
Definition
goos:243
L4Re::Video::Goos::Info::width
unsigned long width
Width.
Definition
goos:242
L4Re::Video::Goos::Info::pixel_info
Pixel_info pixel_info
Pixel information.
Definition
goos:247
L4Re::Video::View::Info
Information structure of a view.
Definition
goos:95
L4Re::Video::View::Info::pixel_info
Pixel_info pixel_info
Pixel information.
Definition
goos:105
L4Re::Video::View::Info::height
unsigned long height
Height of the view in pixels.
Definition
goos:102
L4Re::Video::View::Info::width
unsigned long width
Width of the view in pixels.
Definition
goos:101
L4Re::Video::View::Info::buffer_index
unsigned buffer_index
Number of the buffer used for this view.
Definition
goos:106
L4Re::Video::View::Info::xpos
unsigned long xpos
X position in pixels of the view in the Goos.
Definition
goos:99
L4Re::Video::View::Info::view_index
unsigned view_index
Index of the view.
Definition
goos:97
L4Re::Video::View::Info::ypos
unsigned long ypos
Y position in pixels of the view in the Goos.
Definition
goos:100
L4Re::Video::View::Info::flags
unsigned flags
Flags, see Flags and V_flags.
Definition
goos:96
l4
re
util
video
goos_svr
Generated on Sat Aug 24 2024 16:07:22 for L4Re Operating System Framework by
1.9.8