L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
+ 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 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

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.
 
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

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

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

◆ 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 33 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
goosthe target object for the operation.
sizethe size in bytes for the pixel buffer.
buffera 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

◆ 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
goosthe goos session to use.
[out]viewstructure initialized to the new view.

◆ l4re_video_goos_delete_buffer()

int l4re_video_goos_delete_buffer ( l4re_video_goos_t  goos,
unsigned  idx 
)

Delete a pixel buffer.

Parameters
goosthe target goos object.
idxthe buffer index of the buffer to delete (the return value of l4re_video_goos_create_buffer())

◆ 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
goosthe goos session to use.
viewthe view to delete, the given data-structure is invalid afterwards.

◆ 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
goosThe target goos object.
idxIndex of the static buffer.
bufferA 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.

◆ 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
goosthe target goos session.
idxthe index of the view to retrieve.
[out]viewstructure 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().

◆ l4re_video_goos_info()

int l4re_video_goos_info ( l4re_video_goos_t  goos,
l4re_video_goos_info_t ginfo 
)

Get information on a goos.

Parameters
goosGoos object
[out]ginfoPointer to goos information structure.
Returns
0 for success, <0 on error

◆ 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
goosthe target object of the operation.
xthe x-coordinate of the upper left corner of the rectangle
ythe y-coordinate of the upper left corner of the rectangle
wthe width of the rectangle to be flushed
hthe height of the rectangle

◆ 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
viewthe target view for the operation.
[out]infoa buffer receiving the information about the view.

◆ l4re_video_view_refresh()

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
viewthe target view of the operation.
xx-coordinate of the upper left corner
yy-coordinate of the upper left corner
wthe width of the rectangle
hthe height of the rectangle

◆ 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
viewthe target view of the operation.
infothe 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.

◆ 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
viewthe target view of the operation.
xthe x-coordinate of the upper left corner on the screen.
ythe y-coordinate of the upper left corner on the screen.
wthe width of the view.
hthe height of the view.
bofsthe 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.

◆ 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
viewthe target view for the operation.
pivotthe neighbor view, relative to which view shall be stacked. a NULL value allows top (behind = 1) and bottom (behind = 0) placement of the view.
behinddescribes the placement of the view relative to the pivot view.