Loading...
Searching...
No Matches
Video API
L4Re C Interface
Collaboration diagram for Video API:

## Data Structures

struct | l4re_video_color_component_t
| Color component structure. More...
struct | l4re_video_pixel_info_t
| Pixel_info structure. More...
struct | l4re_video_goos_info_t
| Goos information structure. More...
struct | l4re_video_view_info_t
| View information structure. More...
struct | l4re_video_view_t
| C representation of a goos view. More...

## Typedefs

typedef struct l4re_video_color_component_t | l4re_video_color_component_t
| Color component structure.
typedef struct l4re_video_pixel_info_t | l4re_video_pixel_info_t
| Pixel_info structure.
typedef l4_cap_idx_t | l4re_video_goos_t
| Goos object type.
typedef struct l4re_video_view_info_t | l4re_video_view_info_t
| View information structure.
typedef struct l4re_video_view_t | l4re_video_view_t
| C representation of a goos view.

## Enumerations

enum | l4re_video_goos_info_flags_t { F_l4re_video_goos_auto_refresh = 0x01 , F_l4re_video_goos_pointer = 0x02 , F_l4re_video_goos_dynamic_views = 0x04 , F_l4re_video_goos_dynamic_buffers = 0x08 }
| Flags of information on the goos. More...

enum

l4re_video_view_info_flags_t {
F_l4re_video_view_none = 0x00 , F_l4re_video_view_set_buffer = 0x01 , F_l4re_video_view_set_buffer_offset = 0x02 , F_l4re_video_view_set_bytes_per_line = 0x04 ,
F_l4re_video_view_set_pixel = 0x08 , F_l4re_video_view_set_position = 0x10 , F_l4re_video_view_dyn_allocated = 0x20 , F_l4re_video_view_set_background = 0x40 ,
F_l4re_video_view_set_flags = 0x80 , F_l4re_video_view_fully_dynamic , F_l4re_video_view_above = 0x01000 , F_l4re_video_view_flags_mask = 0xff000
}

| Flags of information on a view. More...

## Functions

L4_BEGIN_DECLS int | l4re_video_goos_info (l4re_video_goos_t goos, l4re_video_goos_info_t *ginfo) L4_NOTHROW
| Get information on a goos.
int | l4re_video_goos_refresh (l4re_video_goos_t goos, int x, int y, int w, int h) L4_NOTHROW
| Flush a rectangle of pixels of the goos screen.
int | l4re_video_goos_create_buffer (l4re_video_goos_t goos, unsigned long size, l4_cap_idx_t buffer) L4_NOTHROW
| Create a new buffer (memory buffer) for pixel data.
int | l4re_video_goos_delete_buffer (l4re_video_goos_t goos, unsigned idx) L4_NOTHROW
| Delete a pixel buffer.
int | l4re_video_goos_get_static_buffer (l4re_video_goos_t goos, unsigned idx, l4_cap_idx_t buffer) L4_NOTHROW
| Get the data-space capability of the static pixel buffer.
int | l4re_video_goos_create_view (l4re_video_goos_t goos, l4re_video_view_t *view) L4_NOTHROW
| Create a new view (.
int | l4re_video_goos_delete_view (l4re_video_goos_t goos, l4re_video_view_t *view) L4_NOTHROW
| Delete a view.
int | l4re_video_goos_get_view (l4re_video_goos_t goos, unsigned idx, l4re_video_view_t *view) L4_NOTHROW
| Get a view for the given index.
L4_BEGIN_DECLS int | l4re_video_view_refresh (l4re_video_view_t *view, int x, int y, int w, int h) L4_NOTHROW
| Flush the given rectangle of pixels of the given view.
int | l4re_video_view_get_info (l4re_video_view_t *view, l4re_video_view_info_t *info) L4_NOTHROW
| Retrieve information about the given view.
int | l4re_video_view_set_info (l4re_video_view_t *view, l4re_video_view_info_t *info) L4_NOTHROW
| Set properties of the view.
int | l4re_video_view_set_viewport (l4re_video_view_t *view, int x, int y, int w, int h, unsigned long bofs) L4_NOTHROW
| Set the viewport parameters of a view.
int | l4re_video_view_stack (l4re_video_view_t *view, l4re_video_view_t *pivot, int behind) L4_NOTHROW
| Change the stacking order in the stack of visible views.

## Detailed Description

## Typedef Documentation

## l4re_video_view_t

typedef struct l4re_video_view_t l4re_video_view_t

C representation of a goos view.

A view is a visible rectangle that provides a view to the contents of a buffer (frame buffer) memory object and is placed on a real screen.

## Enumeration Type Documentation

## l4re_video_goos_info_flags_t

enum l4re_video_goos_info_flags_t

Flags of information on the goos.

Enumerator
F_l4re_video_goos_auto_refresh | The graphics display is automatically refreshed.
F_l4re_video_goos_pointer | We have a mouse pointer.
F_l4re_video_goos_dynamic_views | Supports dynamically allocated views.
F_l4re_video_goos_dynamic_buffers | Supports dynamically allocated buffers.

Definition at line 29 of file goos.h.

## l4re_video_view_info_flags_t

enum l4re_video_view_info_flags_t

Flags of information on a view.

Enumerator
F_l4re_video_view_none | everything for this view is static (the VESA-FB case)
F_l4re_video_view_set_buffer | buffer object for this view can be changed
F_l4re_video_view_set_buffer_offset | buffer offset can be set
F_l4re_video_view_set_bytes_per_line | bytes per line can be set
F_l4re_video_view_set_pixel | pixel type can be set
F_l4re_video_view_set_position | position on screen can be set
F_l4re_video_view_dyn_allocated | View is dynamically allocated.
F_l4re_video_view_set_background | Set view as background for session.
F_l4re_video_view_set_flags | Set view property flags.
F_l4re_video_view_above | Flag the view as stay on top.
F_l4re_video_view_flags_mask | Mask containing all possible property flags.

Definition at line 23 of file view.h.

## Function Documentation

## l4re_video_goos_create_buffer()

int l4re_video_goos_create_buffer | ( | l4re_video_goos_t | goos,
|  | unsigned long | size,
|  | l4_cap_idx_t | buffer )

Create a new buffer (memory buffer) for pixel data.

Parameters

  goos | the target object for the operation.
  size | the size in bytes for the pixel buffer.
  buffer | a capability index to receive the data-space capability for the buffer.

Returns
  >=0: The index of the created buffer (used to assign views and for deletion). < 0: on error

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_create_view()

int l4re_video_goos_create_view | ( | l4re_video_goos_t | goos,
|  | l4re_video_view_t * | view )

Create a new view (.

See also
  l4re_video_view_t)

Parameters

  | goos | the goos session to use.
  [out] | view | structure initialized to the new view.

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_delete_buffer()

int l4re_video_goos_delete_buffer | ( | l4re_video_goos_t | goos,
|  | unsigned | idx )

Delete a pixel buffer.

Parameters

  goos | the target goos object.
  idx | the buffer index of the buffer to delete (the return value of l4re_video_goos_create_buffer())

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_delete_view()

int l4re_video_goos_delete_view | ( | l4re_video_goos_t | goos,
|  | l4re_video_view_t * | view )

Delete a view.

Parameters

  goos | the goos session to use.
  view | the view to delete, the given data-structure is invalid afterwards.

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_get_static_buffer()

int l4re_video_goos_get_static_buffer | ( | l4re_video_goos_t | goos,
|  | unsigned | idx,
|  | l4_cap_idx_t | buffer )

Get the data-space capability of the static pixel buffer.

Parameters

  goos | The target goos object.
  idx | Index of the static buffer.
  buffer | A capability index to receive the data-space capability.

This function allows access to static, preexisting pixel buffers. Such static buffers exist for static configurations, such as the VESA framebuffer.

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_get_view()

int l4re_video_goos_get_view | ( | l4re_video_goos_t | goos,
|  | unsigned | idx,
|  | l4re_video_view_t * | view )

Get a view for the given index.

Parameters

  | goos | the target goos session.
  | idx | the index of the view to retrieve.
  [out] | view | structure initialized to the view with the given index.

This function allows to access static views as provided by the VESA framebuffer (the monitor). However, it also allows to access dynamic views created with l4re_video_goos_create_view().

References L4_END_DECLS, and L4_NOTHROW.

## l4re_video_goos_info()

L4_BEGIN_DECLS int l4re_video_goos_info | ( | l4re_video_goos_t | goos,
|  | l4re_video_goos_info_t * | ginfo )

Get information on a goos.

Parameters

  | goos | Goos object
  [out] | ginfo | Pointer to goos information structure.

Returns
  0 for success, <0 on error
  - -L4_ENODEV
  - IPC errors

References L4_CV, and L4_NOTHROW.

## l4re_video_goos_refresh()

int l4re_video_goos_refresh | ( | l4re_video_goos_t | goos,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h )

Flush a rectangle of pixels of the goos screen.

Parameters

  goos | the target object of the operation.
  x | the x-coordinate of the upper left corner of the rectangle
  y | the y-coordinate of the upper left corner of the rectangle
  w | the width of the rectangle to be flushed
  h | the height of the rectangle

References L4_CV, and L4_NOTHROW.

## l4re_video_view_get_info()

int l4re_video_view_get_info | ( | l4re_video_view_t * | view,
|  | l4re_video_view_info_t * | info )

Retrieve information about the given view.

Parameters

  | view | the target view for the operation.
  [out] | info | a buffer receiving the information about the view.

References L4_CV, and L4_NOTHROW.

## l4re_video_view_refresh()

L4_BEGIN_DECLS int l4re_video_view_refresh | ( | l4re_video_view_t * | view,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h )

Flush the given rectangle of pixels of the given view.

Parameters

  view | the target view of the operation.
  x | x-coordinate of the upper left corner
  y | y-coordinate of the upper left corner
  w | the width of the rectangle
  h | the height of the rectangle

References L4_CV, and L4_NOTHROW.

## l4re_video_view_set_info()

int l4re_video_view_set_info | ( | l4re_video_view_t * | view,
|  | l4re_video_view_info_t * | info )

Set properties of the view.

Parameters

  view | the target view of the operation.
  info | the parameters to be set on the view.

Which parameters can be manipulated on a given view can be figured out with l4re_video_view_get_info() and this depends on the concrete instance the view object.

References L4_CV, and L4_NOTHROW.

## l4re_video_view_set_viewport()

int l4re_video_view_set_viewport | ( | l4re_video_view_t * | view,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | unsigned long | bofs )

Set the viewport parameters of a view.

Parameters

  view | the target view of the operation.
  x | the x-coordinate of the upper left corner on the screen.
  y | the y-coordinate of the upper left corner on the screen.
  w | the width of the view.
  h | the height of the view.
  bofs | the offset (in bytes) of the upper left pixel in the memory buffer

This function is a convenience wrapper for l4re_video_view_set_info(), just setting the often changed parameters of a dynamic view. With this function a view can be placed on the real screen and at the same time on its backing buffer.

References L4_CV, and L4_NOTHROW.

## l4re_video_view_stack()

int l4re_video_view_stack | ( | l4re_video_view_t * | view,
|  | l4re_video_view_t * | pivot,
|  | int | behind )

Change the stacking order in the stack of visible views.

Parameters

  view | the target view for the operation.
  pivot | the neighbor view, relative to which view shall be stacked. a NULL value allows top (behind = 1) and bottom (behind = 0) placement of the view.
  behind | describes the placement of the view relative to the pivot view.

References L4_END_DECLS, and L4_NOTHROW.