L4Re Operating System Framework
Interface and Usage Documentation
|
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. | |
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.
Flags of information on the goos.
Flags of information on a view.
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.
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. |
int l4re_video_goos_create_view | ( | l4re_video_goos_t | goos, |
l4re_video_view_t * | view | ||
) |
Create a new view (.
goos | the goos session to use. | |
[out] | view | structure initialized to the new view. |
int l4re_video_goos_delete_buffer | ( | l4re_video_goos_t | goos, |
unsigned | idx | ||
) |
Delete a pixel buffer.
goos | the target goos object. |
idx | the buffer index of the buffer to delete (the return value of l4re_video_goos_create_buffer()) |
int l4re_video_goos_delete_view | ( | l4re_video_goos_t | goos, |
l4re_video_view_t * | view | ||
) |
Delete a view.
goos | the goos session to use. |
view | the view to delete, the given data-structure is invalid afterwards. |
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.
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.
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.
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().
int l4re_video_goos_info | ( | l4re_video_goos_t | goos, |
l4re_video_goos_info_t * | ginfo | ||
) |
Get information on a goos.
goos | Goos object | |
[out] | ginfo | Pointer to goos information structure. |
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.
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 |
int l4re_video_view_get_info | ( | l4re_video_view_t * | view, |
l4re_video_view_info_t * | info | ||
) |
Retrieve information about the given view.
view | the target view for the operation. | |
[out] | info | a buffer receiving the information about the view. |
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.
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 |
int l4re_video_view_set_info | ( | l4re_video_view_t * | view, |
l4re_video_view_info_t * | info | ||
) |
Set properties of the view.
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.
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.
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.
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.
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. |