L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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>
15
16#include <l4/sys/capability>
17#include <l4/sys/cxx/ipc_legacy>
18
19namespace L4Re { namespace Util { namespace Video {
20
26{
27 typedef L4Re::Video::Goos::Rights Rights;
28protected:
35
36public:
37 L4_RPC_LEGACY_DISPATCH(L4Re::Video::Goos);
43
49
54 L4Re::Video::View::Info const *view_info() const { return &_view_info; }
55
66 virtual int refresh(int x, int y, int w, int h)
67 { (void)x; (void)y; (void)w; (void)h; return -L4_ENOSYS; }
68
69
92
96 virtual ~Goos_svr() {}
97
98 long op_view_info(Rights, unsigned idx, L4Re::Video::View::Info &info)
99 {
100 if (idx != 0)
101 return -L4_ERANGE;
102
103 info = _view_info;
104 return L4_EOK;
105 }
106
107 long op_info(Rights, L4Re::Video::Goos::Info &info)
108 {
109 info = _screen_info;
110 return L4_EOK;
111 }
112
113 long op_get_static_buffer(Rights, unsigned idx,
115 {
116 if (idx != 0)
117 return -L4_ERANGE;
118
120 return L4_EOK;
121 }
122
123 long op_refresh(Rights, int x, int y, int w, int h)
124 { return refresh(x, y, w, h); }
125
126 long op_view_refresh(Rights, unsigned idx, int x, int y, int w, int h)
127 {
128 if (idx != 0)
129 return -L4_ERANGE;
130
131 return refresh(x, y, w, h);
132 }
133
134 long op_set_view_info(Rights, unsigned, L4Re::Video::View::Info)
135 { return -L4_ENOSYS; }
136
137 long op_view_stack(Rights, unsigned, unsigned, bool)
138 { return -L4_ENOSYS; }
139
140 long op_delete_view(Rights, unsigned)
141 { return -L4_ENOSYS; }
142
143 long op_create_view(Rights)
144 { return -L4_ENOSYS; }
145
146 long op_create_buffer(Rights, unsigned long,
148 { return -L4_ENOSYS; }
149
150 long op_delete_buffer(Rights, unsigned)
151 { return -L4_ENOSYS; }
152};
153
154
155}}}
L4::Cap related definitions.
Goos server class.
Definition goos_svr:26
virtual ~Goos_svr()
Destructor.
Definition goos_svr:96
L4Re::Video::Goos::Info _screen_info
Goos information.
Definition goos_svr:32
L4Re::Video::View::Info _view_info
View information.
Definition goos_svr:34
L4::Cap< L4Re::Dataspace > get_fb() const
Return framebuffer memory dataspace.
Definition goos_svr:42
L4::Cap< L4Re::Dataspace > _fb_ds
Goos memory dataspace.
Definition goos_svr:30
virtual int refresh(int x, int y, int w, int h)
Refresh area of the framebuffer.
Definition goos_svr:66
void init_infos()
Initialize the view information structure of this object.
Definition goos_svr:78
L4Re::Video::View::Info const * view_info() const
View information structure.
Definition goos_svr:54
L4Re::Video::Goos::Info const * screen_info() const
Goos information structure.
Definition goos_svr:48
Class that abstracts framebuffers.
Definition goos:225
View of a framebuffer.
Definition goos:40
C++ interface for capabilities.
Definition capability.h:219
Capability type for RPC interfaces (see L4::Cap<T>).
Definition ipc_types:699
Dataspace interface.
Goos protocol definition.
@ L4_ERANGE
Range error.
Definition err.h:48
@ L4_ENOSYS
No sys.
Definition err.h:50
@ L4_EOK
Ok.
Definition err.h:32
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flexpages.
Definition __l4_fpage.h:192
L4Re C++ Interfaces.
Definition cmd_control:14
Information structure of a Goos.
Definition goos:238
unsigned long height
Height.
Definition goos:240
unsigned long width
Width.
Definition goos:239
Pixel_info pixel_info
Pixel information.
Definition goos:244
Information structure of a view.
Definition goos:92
Pixel_info pixel_info
Pixel information.
Definition goos:102
unsigned long height
Height of the view in pixels.
Definition goos:99
unsigned long width
Width of the view in pixels.
Definition goos:98
unsigned buffer_index
Number of the buffer used for this view.
Definition goos:103
unsigned long xpos
X position in pixels of the view in the Goos.
Definition goos:96
unsigned view_index
Index of the view.
Definition goos:94
unsigned long ypos
Y position in pixels of the view in the Goos.
Definition goos:97
unsigned flags
Flags, see Flags and V_flags.
Definition goos:93