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>
26
27#include <l4/sys/capability>
28#include <l4/sys/cxx/ipc_legacy>
29
30namespace L4Re { namespace Util { namespace Video {
31
37{
38 typedef L4Re::Video::Goos::Rights Rights;
39protected:
46
47public:
48 L4_RPC_LEGACY_DISPATCH(L4Re::Video::Goos);
54
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
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,
126 {
127 if (idx != 0)
128 return -L4_ERANGE;
129
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,
159 { return -L4_ENOSYS; }
160
161 long op_delete_buffer(Rights, unsigned)
162 { return -L4_ENOSYS; }
163};
164
165
166}}}
L4::Cap related definitions.
Goos server class.
Definition goos_svr:37
virtual ~Goos_svr()
Destructor.
Definition goos_svr:107
L4Re::Video::Goos::Info _screen_info
Goos information.
Definition goos_svr:43
L4Re::Video::View::Info _view_info
View information.
Definition goos_svr:45
L4::Cap< L4Re::Dataspace > get_fb() const
Return framebuffer memory dataspace.
Definition goos_svr:53
L4::Cap< L4Re::Dataspace > _fb_ds
Goos memory dataspace.
Definition goos_svr:41
virtual int refresh(int x, int y, int w, int h)
Refresh area of the framebuffer.
Definition goos_svr:77
void init_infos()
Initialize the view information structure of this object.
Definition goos_svr:89
L4Re::Video::View::Info const * view_info() const
View information structure.
Definition goos_svr:65
L4Re::Video::Goos::Info const * screen_info() const
Goos information structure.
Definition goos_svr:59
Class that abstracts framebuffers.
Definition goos:228
View of a framebuffer.
Definition goos:43
C++ interface for capabilities.
Definition capability.h:222
Capability type for RPC interfaces (see L4::Cap<T>).
Definition ipc_types:546
Dataspace interface.
Goos protocol definition.
@ L4_ERANGE
Range error.
Definition err.h:58
@ L4_ENOSYS
No sys.
Definition err.h:60
@ L4_EOK
Ok.
Definition err.h:43
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flex-pages.
Definition __l4_fpage.h:195
L4Re C++ Interfaces.
Definition cmd_control:15
Information structure of a Goos.
Definition goos:241
unsigned long height
Height.
Definition goos:243
unsigned long width
Width.
Definition goos:242
Pixel_info pixel_info
Pixel information.
Definition goos:247
Information structure of a view.
Definition goos:95
Pixel_info pixel_info
Pixel information.
Definition goos:105
unsigned long height
Height of the view in pixels.
Definition goos:102
unsigned long width
Width of the view in pixels.
Definition goos:101
unsigned buffer_index
Number of the buffer used for this view.
Definition goos:106
unsigned long xpos
X position in pixels of the view in the Goos.
Definition goos:99
unsigned view_index
Index of the view.
Definition goos:97
unsigned long ypos
Y position in pixels of the view in the Goos.
Definition goos:100
unsigned flags
Flags, see Flags and V_flags.
Definition goos:96