L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Video::View Class Reference

View of a framebuffer. More...

#include <goos>

+ Collaboration diagram for L4Re::Video::View:

Data Structures

struct  Info
 Information structure of a view. More...
 

Public Types

enum  Flags {
  F_none = 0x00 , F_set_buffer = 0x01 , F_set_buffer_offset = 0x02 , F_set_bytes_per_line = 0x04 ,
  F_set_pixel = 0x08 , F_set_position = 0x10 , F_dyn_allocated = 0x20 , F_set_background = 0x40 ,
  F_set_flags = 0x80 , F_fully_dynamic
}
 Flags on a view. More...
 
enum  V_flags { F_above = 0x1000 , F_flags_mask = 0xff000 }
 Property flags of a view. More...
 

Public Member Functions

int info (Info *info) const noexcept
 Return the view information of the view.
 
int set_info (Info const &info) const noexcept
 Set the information structure for this 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 stack (View const &pivot, bool behind=true) const noexcept
 Move this view in the view stack.
 
int push_top () const noexcept
 Make this view the top-most view.
 
int push_bottom () const noexcept
 Push this view the back.
 
int refresh (int x, int y, int w, int h) const noexcept
 Refresh/Redraw the view.
 
bool valid () const
 Return whether this view is valid.
 

Detailed Description

View of a framebuffer.

A view is a rectangular subset of a framebuffer managed by a Goos object. The Goos orders multiple views in a stack which determines which view is on top in case they overlap. The view's pixel data is provided by a backing buffer, which must belong to the Goos. It can be static or dynamically allocated, depending on the framebuffer.

See also
L4Re::Video::Goos

Definition at line 42 of file goos.

Member Enumeration Documentation

◆ Flags

Flags on a view.

Enumerator
F_none 

everything for this view is static (the VESA-FB case)

F_set_buffer 

buffer object for this view can be changed

F_set_buffer_offset 

buffer offset can be set

F_set_bytes_per_line 

bytes per line can be set

F_set_pixel 

pixel type can be set

F_set_position 

position on screen can be set

F_dyn_allocated 

View is dynamically allocated.

F_set_background 

Set view as background for session.

F_set_flags 

Set view flags (.

See also
V_flags)
F_fully_dynamic 

Flags for a fully dynamic view.

Definition at line 62 of file goos.

◆ V_flags

Property flags of a view.

Such flags can be set or deleted with the F_set_flags operation using the set_info() method.

Enumerator
F_above 

Flag the view as stay on top.

F_flags_mask 

Mask containing all possible property flags.

Definition at line 85 of file goos.

Member Function Documentation

◆ info()

int L4Re::Video::View::info ( Info info) const
inlinenoexcept

Return the view information of the view.

Parameters
[out]infoInformation structure pointer.
Return values
0Success
<0Error

Definition at line 370 of file goos.

◆ refresh()

int L4Re::Video::View::refresh ( int  x,
int  y,
int  w,
int  h 
) const
inlinenoexcept

Refresh/Redraw the view.

Parameters
xX position.
yY position.
wWidth.
hHeight.
Return values
0Success
<0Error

Definition at line 382 of file goos.

◆ set_info()

int L4Re::Video::View::set_info ( Info const &  info) const
inlinenoexcept

Set the information structure for this view.

Parameters
infoInformation structure.
Return values
0Success
<0Error

The function will also set the view port according to the values given in the information structure.

Definition at line 374 of file goos.

◆ set_viewport()

int L4Re::Video::View::set_viewport ( int  scr_x,
int  scr_y,
int  w,
int  h,
unsigned long  buf_offset 
) const
inlinenoexcept

Set the position of the view in the Goos.

Parameters
scr_xX position
scr_yY position
wWidth
hHeight
buf_offsetOffset in the buffer in bytes
Return values
0Success
<0Error

Definition at line 386 of file goos.

References L4Re::Video::View::Info::buffer_index, L4Re::Video::View::Info::buffer_offset, L4Re::Video::View::Info::bytes_per_line, L4Re::Video::View::Info::flags, L4Re::Video::View::Info::height, L4Re::Video::View::Info::pixel_info, L4Re::Video::View::Info::view_index, L4Re::Video::View::Info::width, L4Re::Video::View::Info::xpos, and L4Re::Video::View::Info::ypos.

◆ stack()

int L4Re::Video::View::stack ( View const &  pivot,
bool  behind = true 
) const
inlinenoexcept

Move this view in the view stack.

Parameters
pivotView to move relative to
behindWhen true move the view behind the pivot view, if false move the view before the pivot view.
Return values
0Success
<0Error

Definition at line 378 of file goos.


The documentation for this class was generated from the following file: