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 39 of file goos.

## Member Enumeration Documentation

## Flags

enum L4Re::Video::View::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 59 of file goos.

## V_flags

enum L4Re::Video::View::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 82 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] | info | Information structure pointer.

Return values

  0 | Success
  <0 | Error

Definition at line 367 of file goos.

References info().

Referenced by info(), and set_info().

Here is the call graph for this function:
Here is the caller graph for this function:

## refresh()

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

inlinenoexcept

Refresh/Redraw the view.

Parameters

  x | X position.
  y | Y position.
  w | Width.
  h | Height.

Return values

  0 | Success
  <0 | Error

Definition at line 379 of file goos.

## set_info()

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

inlinenoexcept

Set the information structure for this view.

Parameters

  info | Information structure.

Return values

  0 | Success
  <0 | Error

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

Definition at line 371 of file goos.

References info().

Referenced by set_viewport().

Here is the call graph for this function:
Here is the caller graph for this function:

## 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_x | X position
  scr_y | Y position
  w | Width
  h | Height
  buf_offset | Offset in the buffer in bytes

Return values

  0 | Success
  <0 | Error

Definition at line 383 of file goos.

References L4Re::Video::View::Info::buffer_index, L4Re::Video::View::Info::buffer_offset, L4Re::Video::View::Info::bytes_per_line, F_set_buffer_offset, F_set_position, L4Re::Video::View::Info::flags, L4Re::Video::View::Info::height, L4Re::Video::View::Info::pixel_info, set_info(), L4Re::Video::View::Info::view_index, L4Re::Video::View::Info::width, L4Re::Video::View::Info::xpos, and L4Re::Video::View::Info::ypos.

Here is the call graph for this function:

## stack()

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

inlinenoexcept

Move this view in the view stack.

Parameters

  pivot | View to move relative to
  behind | When true move the view behind the pivot view, if false move the view before the pivot view.

Return values

  0 | Success
  <0 | Error

Definition at line 375 of file goos.

Referenced by push_bottom(), and push_top().

Here is the caller graph for this function:

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

- l4/re/video/goos