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
* License: see LICENSE.spdx (in this directory or the directories above)
8
*/
9
10
#pragma once
11
12
#include <
l4/re/dataspace
>
13
#include <l4/re/video/goos>
14
15
#include <
l4/sys/capability
>
16
#include <l4/sys/cxx/ipc_legacy>
17
18
namespace
L4Re
{
namespace
Util
{
namespace
Video {
19
24
class
Goos_svr
25
{
26
typedef
L4Re::Video::Goos::Rights Rights;
27
protected
:
29
L4::Cap<L4Re::Dataspace>
_fb_ds
;
31
L4Re::Video::Goos::Info
_screen_info
;
33
L4Re::Video::View::Info
_view_info
;
34
35
public
:
36
L4_RPC_LEGACY_DISPATCH(
L4Re::Video::Goos
);
41
L4::Cap<L4Re::Dataspace>
get_fb
()
const
{
return
_fb_ds
; }
42
47
L4Re::Video::Goos::Info
const
*
screen_info
()
const
{
return
&
_screen_info
; }
48
53
L4Re::Video::View::Info
const
*
view_info
()
const
{
return
&
_view_info
; }
54
65
virtual
int
refresh
(
int
x,
int
y,
int
w,
int
h)
66
{ (void)x; (void)y; (void)w; (void)h;
return
-
L4_ENOSYS
; }
67
68
77
void
init_infos
()
78
{
79
using
L4Re::Video::View
;
80
81
_view_info
.flags = View::F_none;
82
83
_view_info
.view_index = 0;
84
_view_info
.xpos = 0;
85
_view_info
.ypos = 0;
86
_view_info
.width =
_screen_info
.width;
87
_view_info
.height =
_screen_info
.height;
88
_view_info
.pixel_info =
_screen_info
.pixel_info;
89
_view_info
.buffer_index = 0;
90
}
91
95
virtual
~Goos_svr
() {}
96
97
l4_ret_t
op_view_info(Rights,
unsigned
idx,
L4Re::Video::View::Info
&info)
98
{
99
if
(idx != 0)
100
return
-
L4_ERANGE
;
101
102
info =
_view_info
;
103
return
L4_EOK
;
104
}
105
106
l4_ret_t
op_info(Rights,
L4Re::Video::Goos::Info
&info)
107
{
108
info =
_screen_info
;
109
return
L4_EOK
;
110
}
111
112
l4_ret_t
op_get_static_buffer(Rights,
unsigned
idx,
113
L4::Ipc::Cap<L4Re::Dataspace>
&ds)
114
{
115
if
(idx != 0)
116
return
-
L4_ERANGE
;
117
118
ds =
L4::Ipc::Cap<L4Re::Dataspace>
(
_fb_ds
,
L4_CAP_FPAGE_RW
);
119
return
L4_EOK
;
120
}
121
122
l4_ret_t
op_refresh(Rights,
int
x,
int
y,
int
w,
int
h)
123
{
return
refresh
(x, y, w, h); }
124
125
l4_ret_t
op_view_refresh(Rights,
unsigned
idx,
int
x,
int
y,
int
w,
int
h)
126
{
127
if
(idx != 0)
128
return
-
L4_ERANGE
;
129
130
return
refresh
(x, y, w, h);
131
}
132
133
l4_ret_t
op_set_view_info(Rights,
unsigned
, L4Re::Video::View::Info)
134
{
return
-
L4_ENOSYS
; }
135
136
l4_ret_t
op_view_stack(Rights,
unsigned
,
unsigned
,
bool
)
137
{
return
-
L4_ENOSYS
; }
138
139
l4_ret_t
op_delete_view(Rights,
unsigned
)
140
{
return
-
L4_ENOSYS
; }
141
142
l4_ret_t
op_create_view(Rights)
143
{
return
-
L4_ENOSYS
; }
144
145
l4_ret_t
op_create_buffer(Rights,
unsigned
long
,
146
L4::Ipc::Cap<L4Re::Dataspace> &)
147
{
return
-
L4_ENOSYS
; }
148
149
l4_ret_t
op_delete_buffer(Rights,
unsigned
)
150
{
return
-
L4_ENOSYS
; }
151
};
152
153
154
}}}
capability
L4::Cap related definitions.
L4Re::Util::Video::Goos_svr
Goos server class.
Definition
goos_svr:25
L4Re::Util::Video::Goos_svr::~Goos_svr
virtual ~Goos_svr()
Destructor.
Definition
goos_svr:95
L4Re::Util::Video::Goos_svr::_screen_info
L4Re::Video::Goos::Info _screen_info
Goos information.
Definition
goos_svr:31
L4Re::Util::Video::Goos_svr::_view_info
L4Re::Video::View::Info _view_info
View information.
Definition
goos_svr:33
L4Re::Util::Video::Goos_svr::get_fb
L4::Cap< L4Re::Dataspace > get_fb() const
Return framebuffer memory dataspace.
Definition
goos_svr:41
L4Re::Util::Video::Goos_svr::_fb_ds
L4::Cap< L4Re::Dataspace > _fb_ds
Goos memory dataspace.
Definition
goos_svr:29
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:65
L4Re::Util::Video::Goos_svr::init_infos
void init_infos()
Initialize the view information structure of this object.
Definition
goos_svr:77
L4Re::Util::Video::Goos_svr::view_info
L4Re::Video::View::Info const * view_info() const
View information structure.
Definition
goos_svr:53
L4Re::Util::Video::Goos_svr::screen_info
L4Re::Video::Goos::Info const * screen_info() const
Goos information structure.
Definition
goos_svr:47
L4Re::Video::Goos
Class that abstracts framebuffers.
Definition
goos:225
L4Re::Video::View
View of a framebuffer.
Definition
goos:40
L4::Cap
C++ interface for capabilities.
Definition
capability.h:249
L4::Ipc::Cap
Capability type for RPC interfaces (see L4::Cap<T>).
Definition
ipc_types:725
dataspace
Dataspace interface.
L4_ERANGE
@ L4_ERANGE
Range error.
Definition
err.h:49
L4_ENOSYS
@ L4_ENOSYS
No sys.
Definition
err.h:52
L4_EOK
@ L4_EOK
Ok.
Definition
err.h:33
L4_CAP_FPAGE_RW
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flexpages.
Definition
__l4_fpage.h:192
l4_ret_t
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
Definition
types.h:29
L4Re::Util
Documentation of the L4 Runtime Environment utility functionality in C++.
Definition
l4re.dox:21
L4Re
L4Re C++ Interfaces.
Definition
cmd_control:14
L4Re::Video::Goos::Info
Information structure of a Goos.
Definition
goos:238
L4Re::Video::View::Info
Information structure of a view.
Definition
goos:92
l4
re
util
video
goos_svr
Generated on
for L4Re Operating System Framework by
1.15.0