13#include <l4/re/video/colors>
16namespace L4Re {
namespace Video {
48 : _goos(goos), _view_idx(_goos.is_valid() ? idx : ~0U) {}
50 unsigned view_index()
const noexcept
51 {
return _goos.is_valid() ? _view_idx : ~0U; }
122 template<
typename OUT >
125 s.printf(
"View::Info:\n"
129 " bytes_per_line: %ld\n"
130 " buffer_offset: %lx\n"
146 int info(Info *info)
const noexcept;
158 int set_info(Info
const &info)
const noexcept;
171 int set_viewport(
int scr_x,
int scr_y,
int w,
int h,
unsigned long buf_offset)
const noexcept;
182 int stack(
View const &pivot,
bool behind =
true) const noexcept;
186 {
return stack(View(),
true); }
190 {
return stack(View(),
false); }
202 int refresh(
int x,
int y,
int w,
int h)
const noexcept;
205 bool valid()
const {
return _goos.is_valid(); }
257 : width(0), height(0), flags(0), num_static_views(0),
258 num_static_buffers(0) {}
314 long r = create_view_t::call(
c(), utcb);
334 return delete_view_t::call(
c(), v._view_idx, utcb);
342 View view(
unsigned index)
const noexcept;
352 L4_INLINE_RPC(
long, view_stack, (
unsigned index,
unsigned pivit,
bool behind));
353 L4_INLINE_RPC(
long, view_refresh, (
unsigned index,
int x,
int y,
int w,
int h));
356 info_t, get_static_buffer_t, create_buffer_t, create_view_t, delete_buffer_t,
357 delete_view_t, view_info_t, set_view_info_t, view_stack_t, view_refresh_t,
368{
return _goos->view_info(_view_idx,
info); }
372{
return _goos->set_view_info(_view_idx,
info); }
376{
return _goos->view_stack(_view_idx, pivot._view_idx, behind); }
380{
return _goos->view_refresh(_view_idx, x, y, w, h); }
384 unsigned long buf_offset)
const noexcept
L4::Cap related definitions.
Class that abstracts framebuffers.
long create_buffer(unsigned long size, L4::Ipc::Out< L4::Cap< L4Re::Dataspace > > rbuf)
Create a buffer.
@ F_dynamic_buffers
Supports dynamically allocated buffers.
@ F_pointer
We have a mouse pointer.
@ F_dynamic_views
Supports dynamically allocated views.
@ F_auto_refresh
The graphics display is automatically refreshed.
long info(Info *info)
Return the Goos information of the Goos.
long refresh(int x, int y, int w, int h)
Trigger refreshing of the given area on the virtual screen.
int create_view(View *view, l4_utcb_t *utcb=l4_utcb()) const noexcept
Create a view.
View view(unsigned index) const noexcept
Return a view.
long delete_buffer(unsigned idx)
Delete a buffer.
int delete_view(View const &v, l4_utcb_t *utcb=l4_utcb()) const noexcept
Delete a view.
long get_static_buffer(unsigned idx, L4::Ipc::Out< L4::Cap< L4Re::Dataspace > > rbuf)
Return a static buffer of a Goos.
int set_info(Info const &info) const noexcept
Set the information structure for this view.
V_flags
Property flags of a view.
@ F_above
Flag the view as stay on top.
@ F_flags_mask
Mask containing all possible property flags.
int push_bottom() const noexcept
Push this view the back.
int info(Info *info) const noexcept
Return the view information of the view.
int push_top() const noexcept
Make this view the top-most view.
bool valid() const
Return whether this view is valid.
@ F_dyn_allocated
View is dynamically allocated.
@ F_none
everything for this view is static (the VESA-FB case)
@ F_set_bytes_per_line
bytes per line can be set
@ F_set_position
position on screen can be set
@ F_set_buffer_offset
buffer offset can be set
@ F_set_pixel
pixel type can be set
@ F_set_background
Set view as background for session.
@ F_set_flags
Set view flags (.
@ F_set_buffer
buffer object for this view can be changed
@ F_fully_dynamic
Flags for a fully dynamic view.
int set_viewport(int scr_x, int scr_y, int w, int h, unsigned long buf_offset) const noexcept
Set the position of the view in the Goos.
int refresh(int x, int y, int w, int h) const noexcept
Refresh/Redraw the view.
int stack(View const &pivot, bool behind=true) const noexcept
Move this view in the view stack.
@ Invalid
Invalid capability selector.
C++ interface for capabilities.
Helper class to create an L4Re interface class that is derived from a single base class.
L4::Cap< Class > c() const noexcept
l4_cap_idx_t cap() const noexcept
Return capability selector.
unsigned long l4_cap_idx_t
Capability selector type.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Interface Definition Language.
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
#define L4_RPC(res, name, args, attr...)
Define an RPC call (type and callable).
#define L4_INLINE_RPC_NF(res, name, args...)
Define an inline RPC call type (the type only, no callable).
Information structure of a Goos.
bool auto_refresh() const
Return whether this Goos does auto refreshing or the view refresh functions must be used to make chan...
unsigned long height
Height.
unsigned long width
Width.
Pixel_info pixel_info
Pixel information.
bool has_dynamic_buffers() const
Return whether dynamic buffers are supported.
bool has_pointer() const
Return whether a pointer is used by the provider of the Goos.
bool has_dynamic_views() const
Return whether dynamic view are supported.
unsigned flags
Flags, see Flags.
unsigned num_static_buffers
Number of static buffers.
unsigned num_static_views
Number of static view.
Information structure of a view.
Pixel_info pixel_info
Pixel information.
unsigned long height
Height of the view in pixels.
unsigned long width
Width of the view in pixels.
bool has_set_buffer() const
Return whether a buffer is set.
unsigned buffer_index
Number of the buffer used for this view.
unsigned long xpos
X position in pixels of the view in the Goos.
unsigned view_index
Index of the view.
unsigned long buffer_offset
Offset in the memory buffer in bytes.
bool has_set_pixel() const
Return whether the given pixel information is valid.
unsigned long bytes_per_line
Bytes per line.
bool has_static_buffer() const
Return whether the view has a static buffer.
void dump(OUT &s) const
Dump information on the view information to a stream.
bool has_set_buffer_offset() const
Return whether the given buffer offset is valid.
unsigned long ypos
Y position in pixels of the view in the Goos.
bool has_set_bytes_per_line() const
Return whether the given bytes-per-line value is valid.
unsigned flags
Flags, see Flags and V_flags.
bool has_static_buffer_offset() const
Return whether the static buffer offset is available.
bool has_set_position() const
Return whether the position information given is valid.
Mark an argument as a output value in an RPC signature.
Standard list of RPCs of an interface.