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
18namespace L4Re { namespace Util { namespace Video {
19
25{
26 typedef L4Re::Video::Goos::Rights Rights;
27protected:
34
35public:
36 L4_RPC_LEGACY_DISPATCH(L4Re::Video::Goos);
42
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
78 {
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,
114 {
115 if (idx != 0)
116 return -L4_ERANGE;
117
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}}}
L4::Cap related definitions.
Goos server class.
Definition goos_svr:25
virtual ~Goos_svr()
Destructor.
Definition goos_svr:95
L4Re::Video::Goos::Info _screen_info
Goos information.
Definition goos_svr:31
L4Re::Video::View::Info _view_info
View information.
Definition goos_svr:33
L4::Cap< L4Re::Dataspace > get_fb() const
Return framebuffer memory dataspace.
Definition goos_svr:41
L4::Cap< L4Re::Dataspace > _fb_ds
Goos memory dataspace.
Definition goos_svr:29
virtual int refresh(int x, int y, int w, int h)
Refresh area of the framebuffer.
Definition goos_svr:65
void init_infos()
Initialize the view information structure of this object.
Definition goos_svr:77
L4Re::Video::View::Info const * view_info() const
View information structure.
Definition goos_svr:53
L4Re::Video::Goos::Info const * screen_info() const
Goos information structure.
Definition goos_svr:47
Class that abstracts framebuffers.
Definition goos:225
View of a framebuffer.
Definition goos:40
C++ interface for capabilities.
Definition capability.h:249
Capability type for RPC interfaces (see L4::Cap<T>).
Definition ipc_types:725
Dataspace interface.
@ L4_ERANGE
Range error.
Definition err.h:49
@ L4_ENOSYS
No sys.
Definition err.h:52
@ L4_EOK
Ok.
Definition err.h:33
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flexpages.
Definition __l4_fpage.h:192
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
Definition types.h:29
Documentation of the L4 Runtime Environment utility functionality in C++.
Definition l4re.dox:21
L4Re C++ Interfaces.
Definition cmd_control:14
Information structure of a Goos.
Definition goos:238
Information structure of a view.
Definition goos:92